/* zunfto-screens.css — components for list, editor and abnahme screens.
   Loaded after zunfto.css. */

/* page topbar title */
.zt-page { display: flex; flex-direction: column; gap: 3px; }
.zt-page h1 { margin: 0; font-size: 21px; font-weight: 800; letter-spacing: -.015em; white-space: nowrap; }
.zt-back { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); text-decoration: none; }
.zt-back svg { width: 13px; height: 13px; }
.zt-back:hover { color: var(--accent); }

/* toolbar: filters + search */
.zt-toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.zt-tabs { display: flex; gap: 2px; background: var(--input-bg); border: 1px solid var(--line); border-radius: var(--r-ctrl); padding: 3px; }
.zt-tabs button { border: none; background: transparent; cursor: pointer; font-family: var(--font-ui); font-size: 12.5px; font-weight: 600; color: var(--muted); padding: 7px 13px; border-radius: 6px; display: inline-flex; align-items: center; gap: 7px; }
.zt-tabs button .c { font-family: var(--font-mono); font-size: 10.5px; background: var(--panel); color: var(--muted); border-radius: var(--r-pill); padding: 1px 6px; }
.zt-tabs button.on { background: var(--panel); color: var(--ink); box-shadow: var(--shadow-card); }
.zt-tabs button.on .c { background: var(--accent); color: #fff; }
.zt-toolbar .grow { flex: 1; }
.zt-filter { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 13px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-ctrl); font-size: 13px; font-weight: 500; color: var(--ink); cursor: pointer; }
.zt-filter svg { width: 15px; height: 15px; color: var(--muted); }

/* table */
.zt-table { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-card); box-shadow: var(--shadow-card); overflow: hidden; }
.zt-th, .zt-tr { display: grid; align-items: center; gap: 16px; padding: 0 20px; }
.zt-th { height: 42px; border-bottom: 1px solid var(--line); background: var(--panel-soft); }
.zt-th span { font-family: var(--font-mono); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.zt-tr { min-height: 64px; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink); cursor: pointer; }
.zt-tr:last-child { border-bottom: none; }
.zt-tr:hover { background: var(--panel-soft); }
.zt-tr .nr { font-family: var(--font-mono); font-size: 12px; color: var(--muted); }
.zt-tr .cust { font-size: 14px; font-weight: 600; }
.zt-tr .cust small { display: block; font-size: 11.5px; font-weight: 400; color: var(--faint); margin-top: 2px; }
.zt-tr .amt { font-size: 14.5px; font-weight: 700; text-align: right; }
.zt-tr .date { font-size: 12.5px; color: var(--muted); }
.zt-avatar-sm { width: 30px; height: 30px; border-radius: 8px; flex: 0 0 30px; display: grid; place-items: center; font-size: 11px; font-weight: 700; background: var(--accent-soft); color: var(--accent); }
.zt-cust-cell { display: flex; align-items: center; gap: 11px; min-width: 0; }
.zt-cust-cell .cust { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* status badges */
.zt-badge2 { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 600; padding: 4px 11px; border-radius: var(--r-pill); border: 1px solid var(--line); color: var(--muted); background: var(--panel-soft); white-space: nowrap; width: fit-content; }
.zt-badge2::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.zt-badge2.draft { color: var(--muted); }
.zt-badge2.sent { color: var(--info); background: var(--info-soft); border-color: transparent; }
.zt-badge2.accepted { color: var(--good); background: var(--good-soft); border-color: transparent; }
.zt-badge2.abnahme { color: var(--accent); background: var(--accent-soft); border-color: var(--accent-line); }
.zt-badge2.late { color: var(--bad); background: var(--bad-soft); border-color: transparent; }

/* ============ EDITOR ============ */
.zt-editor { display: grid; grid-template-columns: 1fr 360px; gap: 22px; align-items: start; }
.zt-paper { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-card); box-shadow: var(--shadow-card); padding: 26px 28px; }
.zt-aside { display: flex; flex-direction: column; gap: 16px; position: sticky; top: 0; }

.zt-fieldset { margin-bottom: 22px; }
.zt-fieldset:last-child { margin-bottom: 0; }
.zt-legend { display: flex; align-items: center; gap: 9px; margin-bottom: 13px; }
.zt-legend .ovl { color: var(--accent); }
.zt-legend .rule { flex: 1; height: 1px; background: var(--line); }

.zt-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.zt-field { display: flex; flex-direction: column; gap: 6px; }
.zt-field > label { font-size: 12px; font-weight: 600; color: var(--muted); }
.zt-input, .zt-select {
  height: 42px; padding: 0 13px; border: 1px solid var(--line); border-radius: var(--r-ctrl);
  background: var(--input-bg); color: var(--ink); font-family: var(--font-ui); font-size: 14px; width: 100%;
}
.zt-input:focus, .zt-select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); background: var(--panel); }
.zt-input::placeholder { color: var(--faint); }
textarea.zt-input { height: auto; padding: 11px 13px; resize: vertical; min-height: 70px; line-height: 1.5; }

/* customer pick */
.zt-pick { display: flex; align-items: center; gap: 13px; padding: 13px 15px; border: 1px solid var(--line); border-radius: var(--r-ctrl); background: var(--input-bg); }
.zt-pick .zt-avatar-sm { width: 38px; height: 38px; flex: 0 0 38px; font-size: 13px; }
.zt-pick .who { flex: 1; min-width: 0; }
.zt-pick .who b { font-size: 14px; font-weight: 700; display: block; }
.zt-pick .who span { font-size: 12px; color: var(--muted); }

/* line items */
.zt-li-head, .zt-li {
  display: grid; grid-template-columns: 1fr 70px 100px 64px 110px 28px; gap: 12px; align-items: center;
}
.zt-li-head { padding: 0 4px 8px; }
.zt-li-head span { font-family: var(--font-mono); font-size: 9.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--faint); }
.zt-li-head span.r, .zt-li .r { text-align: right; }
.zt-li { padding: 8px 4px; border-top: 1px solid var(--line); }
.zt-li .zt-input { height: 38px; font-size: 13.5px; }
.zt-li .lt { font-size: 13.5px; font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }
.zt-li .del { width: 28px; height: 28px; border: none; background: transparent; color: var(--faint); cursor: pointer; border-radius: 6px; display: grid; place-items: center; }
.zt-li .del:hover { background: var(--bad-soft); color: var(--bad); }
.zt-li .del svg { width: 15px; height: 15px; }
.zt-li-add { display: inline-flex; align-items: center; gap: 8px; margin-top: 12px; background: transparent; border: 1px dashed var(--line-strong); border-radius: var(--r-ctrl); padding: 9px 14px; font-family: var(--font-ui); font-size: 13px; font-weight: 600; color: var(--muted); cursor: pointer; }
.zt-li-add:hover { color: var(--accent); border-color: var(--accent-line); }
.zt-li-add svg { width: 15px; height: 15px; }

/* totals (aside) */
.zt-tot { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-card); box-shadow: var(--shadow-card); padding: 18px 20px; }
.zt-tot h3 { margin: 0 0 14px; font-size: 14px; font-weight: 700; }
.zt-tot-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 7px 0; font-size: 13.5px; }
.zt-tot-row span { color: var(--muted); white-space: nowrap; }
.zt-tot-row b { white-space: nowrap; }
.zt-tot-row b { font-weight: 600; font-variant-numeric: tabular-nums; }
.zt-tot-sum { display: flex; align-items: baseline; justify-content: space-between; margin-top: 10px; padding-top: 14px; border-top: 2px solid var(--line); }
.zt-tot-sum span { font-size: 13px; font-weight: 600; }
.zt-tot-sum b { font-size: 24px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.zt-tot-sum b .u { font-size: 16px; color: var(--muted); margin-left: 2px; }
.zt-actions { display: flex; flex-direction: column; gap: 9px; }
.zt-btn--block { width: 100%; justify-content: center; height: 44px; }
.zt-meta-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-card); box-shadow: var(--shadow-card); padding: 16px 18px; }
.zt-meta-card .ovl { display: block; margin-bottom: 10px; }
.zt-meta-line { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 6px 0; font-size: 13px; }
.zt-meta-line span { color: var(--muted); white-space: nowrap; }
.zt-meta-line b { font-weight: 600; white-space: nowrap; }

/* ============ ABNAHME ============ */
.zt-ab { display: grid; grid-template-columns: 1fr 420px; gap: 22px; align-items: start; }
.zt-steps { display: flex; align-items: center; gap: 0; margin-bottom: 20px; }
.zt-step { display: flex; align-items: center; gap: 10px; }
.zt-step .n { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-family: var(--font-mono); font-size: 12px; font-weight: 600; background: var(--input-bg); color: var(--muted); border: 1px solid var(--line); }
.zt-step .t { font-size: 13px; font-weight: 600; color: var(--muted); }
.zt-step.done .n { background: var(--good); color: #fff; border-color: transparent; }
.zt-step.active .n { background: var(--accent); color: #fff; border-color: transparent; }
.zt-step.done .t, .zt-step.active .t { color: var(--ink); }
.zt-step-line { width: 38px; height: 2px; background: var(--line); margin: 0 14px; }
.zt-step.done + .zt-step-line { background: var(--good); }

.zt-check { display: flex; align-items: flex-start; gap: 13px; padding: 14px 0; border-top: 1px solid var(--line); }
.zt-check:first-child { border-top: none; }
.zt-check .box { width: 22px; height: 22px; border-radius: 6px; border: 1.5px solid var(--line-strong); flex: 0 0 22px; display: grid; place-items: center; margin-top: 1px; color: transparent; }
.zt-check.ok .box { background: var(--good); border-color: transparent; color: #fff; }
.zt-check .box svg { width: 14px; height: 14px; }
.zt-check .ct b { font-size: 14px; font-weight: 600; }
.zt-check .ct p { margin: 3px 0 0; font-size: 12.5px; color: var(--muted); }

/* photo grid */
.zt-photos { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.zt-photo { aspect-ratio: 1; border-radius: 10px; border: 1px solid var(--line); background:
  repeating-linear-gradient(135deg, var(--input-bg) 0 9px, var(--panel-soft) 9px 18px);
  display: grid; place-items: center; position: relative; overflow: hidden; }
.zt-photo .cap { position: absolute; bottom: 6px; left: 7px; font-family: var(--font-mono); font-size: 9px; color: var(--muted); background: var(--panel); padding: 1px 5px; border-radius: 4px; }
.zt-photo.add { border-style: dashed; color: var(--muted); cursor: pointer; }
.zt-photo.add svg { width: 22px; height: 22px; }
.zt-photo.add:hover { color: var(--accent); border-color: var(--accent-line); }

/* signature pad */
.zt-sign-wrap { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-card); box-shadow: var(--shadow-card); overflow: hidden; }
.zt-sign-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.zt-sign-head h2 { margin: 0; font-size: 15px; font-weight: 700; }
.zt-sign-head .ovl { margin-top: 2px; }
.zt-sign-pad { margin: 18px; height: 180px; border: 1.5px dashed var(--line-strong); border-radius: 10px; background: var(--input-bg); position: relative; display: grid; place-items: center; overflow: hidden; }
.zt-sign-pad svg.sig { width: 70%; height: auto; color: var(--ink); }
.zt-sign-pad .line { position: absolute; left: 18px; right: 18px; bottom: 34px; border-bottom: 1px solid var(--line-strong); }
.zt-sign-pad .x { position: absolute; left: 20px; bottom: 18px; font-family: var(--font-mono); font-size: 11px; color: var(--faint); }
.zt-sign-meta { display: flex; align-items: center; justify-content: space-between; padding: 0 18px 16px; }
.zt-sign-meta .who b { font-size: 13.5px; font-weight: 700; display: block; }
.zt-sign-meta .who span { font-size: 11.5px; color: var(--muted); }
.zt-sign-foot { display: flex; gap: 10px; padding: 16px 18px; border-top: 1px solid var(--line); background: var(--panel-soft); }

/* device frame for signing */
.zt-device { background: var(--side); border-radius: 28px; padding: 12px; box-shadow: var(--shadow-pop); }
.zt-device-screen { background: var(--canvas); border-radius: 18px; overflow: hidden; border: 1px solid var(--side-line); }
.zt-device-bar { display: flex; align-items: center; justify-content: space-between; padding: 10px 18px 6px; font-family: var(--font-mono); font-size: 11px; color: var(--muted); }

.zt-hint { display: flex; gap: 10px; padding: 13px 15px; border-radius: var(--r-ctrl); background: var(--accent-soft); border: 1px solid var(--accent-line); margin-bottom: 16px; }
.zt-hint svg { width: 18px; height: 18px; color: var(--accent); flex: 0 0 18px; margin-top: 1px; }
.zt-hint p { margin: 0; font-size: 12.5px; color: var(--ink); line-height: 1.5; }
.zt-hint b { font-weight: 700; }

@media (max-width: 1240px) {
  .zt-editor, .zt-ab { grid-template-columns: 1fr; }
}
