/* Styles of the job-pattern modules (Aufträge, Annahme am Pult, Anproben, Aufträge einstellen). Linked from
   index.html after app.css. Use the variables of app.css. */

/* Lists and Heute */
.job-new { width: 100%; margin: 0 0 1rem; }
/* K13: „Auftrag annehmen“ and „Anfrage eintragen“ side by side, the main one wider. */
.job-new-row { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: .6rem; margin: 0 0 1rem; }
.job-new-row .button { width: 100%; margin: 0; min-width: 0; }
.job-new-row .button span[icon], .job-new-row .button svg { flex: none; }
@media (max-width: 380px) { .job-new-row { grid-template-columns: 1fr; } }
.job-week-line { margin: .35rem 0 0; color: var(--ink-2); font-size: .9rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.job-filters { display: grid; gap: .45rem; margin: 0 0 .9rem; }
.job-filters .chips { margin: 0; }
.job-subfilters { padding-left: .1rem; }
.job-subfilters .chip { min-height: 2.75rem; background: transparent; box-shadow: inset 0 0 0 1px var(--line); }
.job-subfilters .chip.on { box-shadow: inset 0 0 0 1.5px var(--brand); background: var(--brand-soft); color: var(--brand); }
.tag.express { background: #fde8d7; color: #7a3a0c; }
.more-row .chevron { margin-left: auto; }
.more-row .row-title { color: var(--brand); font-weight: 650; }
.screen > .segmented + .search, .screen > .segmented + .fittings { margin-top: 1rem; }
.screen > .chips, #job-filter-box > .chips { margin: 0 0 .9rem; }
.job-row { align-items: flex-start; padding-top: .75rem; padding-bottom: .8rem; }
.ticket {
  flex: none; min-width: 3.3rem; padding: .3rem .45rem; border-radius: 9px; background: var(--brand-soft); color: var(--brand);
  font-weight: 750; font-size: .95rem; text-align: center; font-variant-numeric: tabular-nums; letter-spacing: .01em;
}
.job-row .chevron { align-self: center; }
.job-row .badges { align-items: center; gap: .35rem; margin-top: .35rem; }
.job-due, .job-fach { font-size: .8rem; color: var(--ink-2); font-weight: 600; white-space: nowrap; }
.job-due.late { color: var(--danger); }
.job-fach { padding: .12rem .45rem; border-radius: 6px; box-shadow: inset 0 0 0 1px var(--line); }
.job-extra { color: var(--ink); }
.tag.job-state.tone-new { background: #e6eef6; color: #23476a; }
.tag.job-state.tone-work { background: var(--brand-soft); color: var(--brand); }
.tag.job-state.tone-quote { background: #fbf1df; color: #6b4708; }
.tag.job-state.tone-wait { background: #efe6f4; color: #553570; }
.tag.job-state.tone-done { background: #e1f0e7; color: #1c5f3c; }
.tag.job-state.tone-bad { background: #fbe4e1; color: #8c1d16; }
.job-today + .job-today { border-top: .5px solid var(--line); }
.job-today .job-row { padding-bottom: .35rem; }
.job-today-actions { margin: 0; padding: 0 1rem .85rem 4.9rem; }
.job-today-actions .button { flex: 0 1 auto; min-width: 0; }
.job-today-actions .field-hint { align-self: center; }
/* A row confirmed in place on Heute („Fertig. Bitte geben Sie Bescheid.“) */
.job-done-line { display: flex; align-items: flex-start; gap: .75rem; margin: 0; padding: .8rem 1rem .85rem; }
.job-done-line .row-text { display: grid; gap: .1rem; min-width: 0; }
.job-done-line .row-title { overflow-wrap: anywhere; }
.job-done-line .row-value { color: #1c5f3c; font-weight: 600; }
.job-done-icon { flex: none; display: grid; place-items: center; min-width: 3.3rem; height: 1.95rem; border-radius: 9px; background: #e1f0e7; color: #1c5f3c; }
.job-done-icon svg { width: 1.05rem; height: 1.05rem; }
.job-done .job-done-line + .job-today-actions { margin-top: -.35rem; }
.msg-state { flex: none; align-self: center; }
.tag.attention { background: #fbf1df; color: #6b4708; }
.card.job-prices { margin-bottom: 1rem; }
#job-results .job-list { margin-bottom: 1.5rem; }
.job-quick { padding: 1rem; margin-bottom: 1.5rem; display: grid; gap: .8rem; }
.job-quick-head { display: flex; align-items: center; justify-content: space-between; gap: .75rem 1.25rem; flex-wrap: wrap; }
.job-quick-head .button { flex: 1 1 12rem; white-space: nowrap; }
.job-quick-head .job-kpi { flex: 0 1 auto; }
.today-search { margin: 0; }
.today-search .input { padding-left: 2.55rem; background-repeat: no-repeat; background-position: .85rem 50%; background-size: 1.05rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E"); }
#today-results:empty { display: none; }
.today-results-list { margin: 0; box-shadow: inset 0 0 0 1px var(--line); }
/* „Zu erledigen“: one line per thing, the text one tap away. */
.compact-list .todo-row { min-height: 3.25rem; }
.compact-list .todo-row .row-icon { color: #8a5a0b; }
.compact-list .todo-row.is-done .row-title { color: var(--ink-2); }
.compact-list .todo-row .row-icon.done { color: #1c5f3c; }
.job-kpi { display: flex; flex-wrap: wrap; gap: .4rem 1.5rem; margin: 0; color: var(--ink-2); font-size: .9rem; }
.job-kpi span { display: grid; }
.job-kpi b { font-size: 1.55rem; line-height: 1.1; color: var(--brand); font-variant-numeric: tabular-nums; }
.job-quick .card-actions { padding: .85rem 0 .9rem; }
.job-quick .card-actions .button { flex: 1 1 11.5rem; white-space: nowrap; }

/* One job */
.job-status { padding: 1rem 1rem .4rem; margin-bottom: 1.5rem; }
.job-status-head { display: flex; align-items: flex-start; justify-content: space-between; gap: .75rem; flex-wrap: wrap; }
.job-ticket { margin: 0; font-size: 2rem; font-weight: 750; line-height: 1.05; color: var(--brand); font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.job-ticket small { display: block; font-size: .78rem; font-weight: 600; color: var(--ink-2); letter-spacing: 0; }
.job-status-head .badges { margin-top: .2rem; }
.job-next { margin: .75rem 0 .25rem; font-size: 1rem; }
.job-status .field-hint { margin: 0 0 .25rem; }
/* The actions of a job: always the same layout, one per line on a phone and a grid on the iPad, the main step first
   across the whole width, so no button moves or wraps between two orders. */
.job-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; padding: .55rem 0 .35rem; }
.job-actions.single { grid-template-columns: 1fr; }
.job-actions .button { width: 100%; min-width: 0; }
/* K13: the main step and one more as buttons, the rest one tap away under „Weitere Schritte“. */
.job-more { margin: .1rem -1rem .2rem; border-top: .5px solid var(--line); }
.job-more > summary { list-style: none; display: flex; align-items: center; justify-content: space-between; min-height: 2.9rem; padding: 0 1rem;
  color: var(--brand); font-weight: 650; cursor: pointer; }
.job-more > summary::-webkit-details-marker { display: none; }
.job-more > summary::after { content: ''; width: .5rem; height: .5rem; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translateY(-2px); transition: transform .15s ease; }
.job-more[open] > summary::after { transform: rotate(-135deg) translateY(-1px); }
.job-more-list .more-row { border-top: .5px solid var(--line); }
.job-more-list .more-row .row-title { color: var(--ink); font-weight: 600; }
.job-actions .button.secondary { min-height: 2.75rem; padding: .4rem .95rem; font-size: .97rem; border-radius: 11px; }
.job-place { display: flex; align-items: baseline; flex-wrap: wrap; gap: .2rem .5rem; margin: .1rem 0 .35rem; }
.job-place-label { color: var(--ink-2); font-size: .93rem; }
.job-place b { font-size: 1.15rem; color: var(--brand); font-variant-numeric: tabular-nums; }
.job-place .text-button { min-height: 2.75rem; }
.job-place + .job-place { margin-top: -.6rem; }
.row-value.due-warn { color: var(--danger); font-weight: 600; }
.tell-text summary { cursor: pointer; color: var(--brand); font-weight: 600; font-size: .93rem; display: list-item; padding: .7rem 0; }
.tell-text .quote-box { display: block; margin-top: .1rem; }
.tell-card .tell-preview { padding: 0 1rem 1rem; }
.job-links { display: flex; flex-wrap: wrap; gap: .25rem 1rem; margin: 0 -.5rem .3rem; }
.item-row { align-items: flex-start; }
.item-row .tag { margin-top: .3rem; }
.quote-row { align-items: flex-start; }
.quote-row.is-old .row-title { color: var(--ink-2); text-decoration: line-through; text-decoration-thickness: 1px; }
.quote-row .badges { margin-top: .3rem; }
.pay-row .failure-actions .button { flex: 0 1 auto; min-width: 5.5rem; }
.history-row { align-items: flex-start; min-height: 2.9rem; gap: .9rem; }
.history-at { flex: none; width: 6.4rem; font-size: .84rem; color: var(--ink-2); font-variant-numeric: tabular-nums; padding-top: .1rem; }
.pickup-amount { display: grid; margin: 0; font-size: 2rem; font-weight: 750; color: var(--brand); font-variant-numeric: tabular-nums; }
.pickup-amount small { font-size: .84rem; font-weight: 600; color: var(--ink-2); }
.pickup-items .check-row, .sheet-card .check-row { min-height: 3.1rem; }
.check { width: 1.35rem; height: 1.35rem; accent-color: var(--brand); flex: none; }
.pay-line { min-height: 2.9rem; }
.quote-options { color: var(--ink); }
.option-pair { align-items: end; }

/* Kunden and Diese Woche */
.customer-summary { padding: 1rem; margin-bottom: 1.5rem; display: grid; gap: .3rem; }
.customer-summary .field-label { margin: .35rem 0 0; color: var(--ink-2); font-size: .84rem; }
.customer-summary .field-label:first-child { margin-top: 0; }
.customer-last { margin: 0; font-weight: 650; font-size: 1.05rem; overflow-wrap: anywhere; }
.customer-note { margin: 0; font-size: 1.02rem; overflow-wrap: anywhere; white-space: pre-line; }
.customer-note.muted { color: var(--ink-2); }
.customer-summary .card-actions { padding: .7rem 0 0; flex-wrap: wrap; }
.customer-row .badges { margin-top: .35rem; }
.match-row { margin-top: -.25rem; border-radius: 12px; box-shadow: inset 0 0 0 1px var(--line); }
.match-row + .match-row { margin-top: .4rem; }
.stat-row .stat { font-size: 1.35rem; font-weight: 750; color: var(--brand); font-variant-numeric: tabular-nums; }
.week-table { display: grid; padding: .35rem 1rem .6rem; font-variant-numeric: tabular-nums; }
.week-head, .week-row { display: grid; grid-template-columns: minmax(5.8rem, 1.4fr) repeat(4, minmax(0, 1fr)); gap: .4rem; align-items: center; min-height: 2.6rem; }
.week-head { color: var(--ink-2); font-size: .8rem; font-weight: 650; border-bottom: .5px solid var(--line); }
.week-row + .week-row { border-top: .5px solid var(--line); }
.week-head span:not(:first-child), .week-row span:not(:first-child) { text-align: right; }

/* The customer's job page */
.customer-page { padding: 1.15rem 1.1rem 1rem; margin-bottom: 1rem; display: grid; gap: .55rem; border: 1px solid var(--line); }
.customer-page p { margin: 0; }
.cp-shop { font-size: .84rem; color: var(--ink-2); font-weight: 600; }
.cp-title { margin: 0; font-size: 1.35rem; }
.cp-track { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .35rem; margin: .2rem 0; padding: 0; list-style: none; }
.cp-track li { padding-top: .45rem; border-top: 4px solid #dcdcd6; font-size: .8rem; color: var(--ink-2); overflow-wrap: anywhere; }
.cp-track li.on { border-color: var(--brand); color: var(--ink); }
.cp-track li.current { font-weight: 700; }
.cp-label { font-weight: 700; font-size: 1.05rem; }
.cp-line { color: var(--ink-2); }
.cp-quote { display: grid; gap: .3rem; padding: .8rem .9rem; border-radius: 12px; background: #fbf1df; color: #4d3608; }
.cp-amount { font-size: 1.5rem; font-weight: 750; }
.cp-buttons { display: flex; gap: .5rem; flex-wrap: wrap; }
.cp-button { padding: .55rem 1rem; border-radius: 11px; background: #fff; font-weight: 650; }
.cp-button.primary { background: var(--brand); color: var(--cream); }
.cp-contact { font-size: .84rem; color: var(--ink-2); padding-top: .4rem; border-top: .5px solid var(--line); }

/* Anproben */
.fit-nav { display: flex; align-items: center; gap: .25rem; padding: .35rem .5rem; margin-bottom: .9rem; }
.fit-date { flex: 1; min-width: 0; display: grid; margin: 0; text-align: center; }
.fit-date span { font-size: .84rem; color: var(--ink-2); }
.fit-nav .icon-button:last-of-type svg { width: .65rem; }
.fit-new { width: 100%; margin: 0 0 1rem; }
.fit-row { align-items: flex-start; gap: .9rem; }
.fit-time { flex: none; min-width: 3.3rem; font-size: 1.15rem; font-weight: 750; color: var(--brand); font-variant-numeric: tabular-nums; padding-top: .05rem; }
.fit-row .failure-actions .button { flex: 0 1 auto; min-width: 0; }
.fit-free .fit-chips { padding: 0 1rem 1rem; }
.fit-chips .chip { min-width: 4.3rem; justify-content: center; font-variant-numeric: tabular-nums; }

/* Annahme am Pult */
.step-title { display: flex; align-items: center; gap: .5rem; }
.step-no {
  display: grid; place-items: center; width: 1.45rem; height: 1.45rem; border-radius: 50%; background: var(--brand); color: var(--cream);
  font-size: .78rem; font-weight: 700; flex: none;
}
.intake-step .form-card { gap: 1rem; }
.intake .field-pair { grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr)); align-items: start; }
.guide-preview .preview { max-height: none; padding: .85rem .9rem; border-radius: 12px; background: #faf8f3; box-shadow: inset 0 0 0 .5px var(--line); }
.intake-item { display: grid; gap: .85rem; }
.intake-item + .intake-item { padding-top: 1rem; border-top: .5px solid var(--line); }
.intake-item-head { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.intake-step .action-row { margin: -.25rem -1rem -1rem; width: calc(100% + 2rem); border-top: .5px solid var(--line); }
.intake .field .chips + .input { margin-top: .45rem; }
.intake .field .input + .field-hint { margin-top: .35rem; }
/* Cards in a sheet keep their full height: the sheet body is a grid with a max height, and a card that clips its
   corners (overflow hidden) would otherwise be squeezed to the height left over. Its rows have no background to clip. */
.sheet-card { overflow: visible; }
.fit-due { margin: 0; }
.fit-due-field { padding: 0 1rem 1rem; }
.photo-row { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.photo-tile { display: grid; place-items: center; width: 3.1rem; height: 3.1rem; border-radius: 10px; background: var(--fill); color: var(--ink-2); }
.photo-tile svg { width: 1.3rem; height: 1.3rem; }
.savebar-summary { margin: 0; font-weight: 650; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }

/* Abholschein: on screen a paper slip, printed alone */
.slip { display: grid; gap: .5rem; padding: 1rem; border-radius: 12px; background: #fff; box-shadow: inset 0 0 0 1px var(--line); color: #111; }
.slip p { margin: 0; }
.slip-head { display: flex; justify-content: space-between; align-items: flex-start; gap: .75rem; padding-bottom: .6rem; border-bottom: 1px dashed #b9bdba; }
.slip-shop { font-weight: 750; font-size: 1.05rem; }
.slip-small { font-size: .82rem; color: #444; }
.slip-no { display: grid; text-align: right; flex: none; }
.slip-no small { font-size: .74rem; color: #444; }
.slip-no b { font-size: 1.9rem; line-height: 1.05; font-variant-numeric: tabular-nums; }
.slip-who { font-weight: 650; overflow-wrap: anywhere; }
.slip-line { display: flex; justify-content: space-between; gap: .75rem; overflow-wrap: anywhere; }
.slip-line b { text-align: right; flex: none; max-width: 55%; }
.slip-item { display: grid; gap: .1rem; padding-bottom: .45rem; border-bottom: 1px solid #ecedeb; }
.slip-piece { overflow-wrap: anywhere; }
.slip-item .slip-small { overflow-wrap: anywhere; }

@media (max-width: 359px) {
  .job-today-actions { padding-left: 1rem; }
  .history-at { width: 5.2rem; }
  .job-ticket { font-size: 1.7rem; }
}
@media print {
  body * { visibility: hidden !important; }
  .slip, .slip * { visibility: visible !important; }
  .slip { position: fixed; left: 0; top: 0; width: 80mm; box-shadow: none; padding: 4mm; }
}
