.v160-scan-page{display:none;min-width:0}
.v160-scan-page.active{display:grid;gap:16px}
.v160-hero{display:flex;align-items:center;justify-content:space-between;gap:20px}
.v160-hero h2{font-size:22px;margin:3px 0 5px}.v160-hero p{margin:0;color:#667085}
.v160-home-help{display:inline-flex;align-items:center;min-height:40px;padding:9px 13px;border:1px solid #bfd5eb;border-radius:10px;background:#eff7ff;color:#075b9e;font-weight:700;text-decoration:none}
.v160-settings{display:grid;grid-template-columns:repeat(4,minmax(170px,1fr));gap:12px;align-items:end}
.v160-settings>div[hidden]{display:none!important}
.v160-drop-card{display:grid;gap:14px}.v160-actions{display:flex;gap:10px;flex-wrap:wrap}
.v160-file{display:inline-flex;align-items:center;justify-content:center;min-height:42px;padding:9px 15px;border-radius:10px;background:#475467;color:#fff;font-weight:700;cursor:pointer}.v160-file.primary{background:#0069b4}.v160-file input{display:none}
.v160-drop{min-height:180px;border:2px dashed #9dbce0;border-radius:14px;background:#f7fbff;display:grid;place-content:center;gap:8px;text-align:center;padding:24px;outline:none;transition:.15s ease}.v160-drop span{color:#667085}.v160-drop:focus,.v160-drop.dragover{border-color:#0069b4;background:#edf7ff;box-shadow:0 0 0 4px rgba(0,105,180,.1)}
.v160-queue-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px}.v160-queue-head h2{margin:0 0 3px}.v160-queue-head p{margin:0;color:#667085}
.v160-queue{display:grid;gap:8px}.v160-job{display:grid;grid-template-columns:46px minmax(0,1fr) auto auto;gap:12px;align-items:center;padding:11px;border:1px solid #d9e2ec;border-radius:12px;background:#fff}.v160-job-icon{width:42px;height:42px;display:grid;place-items:center;border-radius:9px;background:#eaf4ff;color:#075b9e;font-size:11px;font-weight:800}.v160-job-copy{display:grid;gap:2px;min-width:0}.v160-job-copy strong,.v160-job-copy span,.v160-job-copy small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.v160-job-copy span,.v160-job-copy small{color:#667085}.v160-status{display:inline-flex;padding:5px 9px;border-radius:999px;background:#eaf4ff;color:#075b9e;font-size:12px;font-weight:700;white-space:nowrap}.v160-job[data-state="completed"] .v160-status{background:#dcfce7;color:#166534}.v160-job[data-state="failed"] .v160-status,.v160-job[data-state="local_error"] .v160-status{background:#fff1f0;color:#b42318}.v160-job[data-state="processing"] .v160-status,.v160-job[data-state="importing"] .v160-status{background:#fff7dd;color:#8a5100}
@media(max-width:900px){.v160-settings{grid-template-columns:1fr 1fr}.v160-hero{align-items:flex-start;flex-direction:column}.v160-job{grid-template-columns:40px minmax(0,1fr);}.v160-status{grid-column:2;justify-self:start}.v160-job>button{grid-column:2;justify-self:start}}
@media(max-width:560px){.v160-scan-page{gap:12px}.v160-settings{grid-template-columns:1fr}.v160-actions{display:grid;grid-template-columns:1fr}.v160-file{width:100%}.v160-drop{min-height:145px}.v160-queue-head{align-items:flex-start}.v160-job{padding:10px}.v160-job-copy strong{white-space:normal;line-height:1.25}.v160-home-help{width:100%;justify-content:center}}

.v160-job-actions{display:flex;gap:6px;align-items:center;flex-wrap:wrap}
.v160-preview-backdrop{position:fixed;inset:0;z-index:100700;background:rgba(15,23,42,.55);display:grid;place-items:center;padding:18px}
.v160-preview-backdrop[hidden]{display:none!important}
.v160-preview-dialog{width:min(980px,96vw);height:min(88vh,920px);background:#fff;border:1px solid #d7e0ea;border-radius:16px;box-shadow:0 24px 70px rgba(15,23,42,.28);display:grid;grid-template-rows:auto 1fr auto;overflow:hidden}
.v160-preview-dialog header,.v160-preview-dialog footer{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:14px 16px;border-bottom:1px solid #e5e7eb}
.v160-preview-dialog footer{border-top:1px solid #e5e7eb;border-bottom:0;justify-content:flex-end}
.v160-preview-dialog h2{margin:2px 0 0}.v160-preview-stage{min-height:0;background:#f3f5f7;display:grid;place-items:center;overflow:auto;padding:12px}
.v160-preview-stage img{max-width:100%;max-height:100%;object-fit:contain}.v160-preview-stage iframe{width:100%;height:100%;min-height:60vh;border:0;background:#fff}
.v160-preview-error{padding:16px;border:1px solid #fecaca;border-radius:10px;background:#fff1f2;color:#991b1b}
@media(max-width:900px){.v160-job-actions{grid-column:2;justify-self:start}.v160-preview-dialog{width:100%;height:92vh}.v160-preview-stage iframe{min-height:68vh}}

.v200-job{grid-template-columns:72px minmax(0,1fr) auto auto}
.v200-thumb{width:64px;height:64px;border:1px solid #d8e2ee;border-radius:10px;background:#f5f8fb;display:grid;place-items:center;overflow:hidden;padding:0}
.v200-thumb img{width:100%;height:100%;object-fit:cover}
.v200-facts{display:flex;gap:10px;flex-wrap:wrap;margin-top:4px;font-size:12px}.v200-facts span{color:#475467}.v200-facts b{color:#101828}
.v200-review-backdrop{position:fixed;inset:0;z-index:140000;background:rgba(15,23,42,.58);display:grid;place-items:center;padding:14px}.v200-review-backdrop[hidden]{display:none!important}
.v200-review-dialog{width:min(1180px,calc(100vw - 28px));height:min(92vh,980px);background:#fff;border-radius:16px;display:grid;grid-template-rows:auto 1fr auto;overflow:hidden;box-shadow:0 24px 70px rgba(15,23,42,.3)}
.v200-review-dialog>header,.v200-review-dialog>footer{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:14px 16px;border-bottom:1px solid #e5e7eb}.v200-review-dialog>footer{border-top:1px solid #e5e7eb;border-bottom:0}.v200-review-dialog h2{margin:2px 0}.v200-review-dialog header p{margin:0;color:#667085}
.v200-review-layout{display:grid;grid-template-columns:minmax(340px,.9fr) minmax(420px,1.1fr);min-height:0}.v200-review-layout aside,.v200-review-layout main{padding:14px;min-height:0;overflow:auto}.v200-review-layout aside{border-right:1px solid #e5e7eb;display:grid;grid-template-rows:1fr auto;gap:10px}
.v200-review-preview{min-height:320px;background:#f3f5f7;border-radius:10px;display:grid;place-items:center;overflow:auto}.v200-review-preview img{max-width:100%;max-height:100%;object-fit:contain}.v200-review-preview iframe{width:100%;height:100%;min-height:60vh;border:0;background:#fff}
.v200-review-fields{display:grid;grid-template-columns:1fr 1fr;gap:10px}.v200-review-fields .wide{grid-column:1/-1}.v200-review-fields label{display:grid;gap:5px;font-size:12px;font-weight:700;color:#475467}
.v200-review-facts{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin-top:12px}.v200-review-facts>div{padding:10px;border:1px solid #e5e7eb;border-radius:9px}.v200-review-facts span{display:block;color:#667085;font-size:10px}.v200-review-facts p{grid-column:1/-1;margin:0;color:#8a5100}
.v200-receipt-tabs{display:flex;gap:6px;flex-wrap:wrap;margin-bottom:10px}.v200-receipt-tabs .active{background:#0069b4;color:#fff}
.v200-review-dialog>footer>div{display:flex;gap:8px;flex-wrap:wrap}
body.v200-review-open{overflow:hidden}
@media(max-width:900px){.v200-job{grid-template-columns:64px minmax(0,1fr)}.v200-job .v160-status,.v200-job .v160-job-actions{grid-column:2}.v200-review-dialog{width:100%;height:100%;max-height:none;border-radius:0}.v200-review-layout{grid-template-columns:1fr}.v200-review-layout aside{border-right:0;border-bottom:1px solid #e5e7eb;max-height:42vh}.v200-review-fields{grid-template-columns:1fr}.v200-review-fields .wide{grid-column:1}.v200-review-facts{grid-template-columns:1fr 1fr}.v200-review-dialog>footer{align-items:stretch;flex-direction:column}.v200-review-dialog>footer>div{display:grid}.v200-review-dialog>footer button{width:100%}}

#v160ReceiptModeWrap{display:grid;gap:5px}#v160ReceiptModeWrap small{color:#667085;font-size:10px;line-height:1.3}

/* Receipt review: limit image preview to available dialog height. */
.v200-review-dialog { height:min(90dvh,900px); max-height:calc(100dvh - 24px); }
.v200-review-layout { min-height:0; overflow:hidden; }
.v200-review-layout aside { min-height:0; grid-template-rows:minmax(0,1fr) auto; overflow:hidden; }
.v200-review-preview { min-height:0; height:100%; max-height:100%; overflow:auto; }
.v200-review-preview img { display:block; width:auto; height:auto; max-width:100%; max-height:100%; object-fit:contain; margin:auto; }
.v200-review-preview iframe { min-height:0; height:100%; }
@media(max-width:900px) {
 .v200-review-layout { overflow:auto; }
 .v200-review-layout aside { min-height:220px; max-height:38dvh; }
 .v200-review-preview { min-height:180px; }
}

.v160-review-all-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.v160-review-all-actions button{width:auto;padding:0 12px}.v160-review-all-actions button:disabled{opacity:.5;cursor:not-allowed}
@media(max-width:650px){.v160-review-all-actions{width:100%}.v160-review-all-actions button{flex:1 1 145px}}

/* Mobile camera flow: one decision after each capture. */
.v160-camera-continue { position:fixed;inset:0;z-index:150000;background:rgba(15,23,42,.65);display:grid;place-items:center;padding:18px; }
.v160-camera-continue[hidden] { display:none!important; }
.v160-camera-continue section { width:min(100%,420px);padding:22px;background:#fff;color:#172033;border-radius:16px;box-shadow:0 20px 70px rgba(0,0,0,.25); }
.v160-camera-continue h2 { margin:0 0 12px;font-size:21px; }
.v160-camera-continue p { font-size:14px;line-height:1.5;margin-bottom:18px; }
.v160-camera-continue section > div { display:grid;grid-template-columns:1fr 1fr;gap:10px; }
.v160-camera-continue button { min-height:48px;height:auto;padding:10px; }
@media(max-width:750px){.v160-scan-page .v160-drop-card .v160-actions{display:grid;grid-template-columns:1fr}.v160-scan-page .v160-drop-card .v160-file.primary{min-height:54px;font-size:16px}.v160-scan-page .v160-drop{display:none}}

/* V229: Auswahl importierter Kontobuchungen als Belegentwurf */
.v160-bank-picker-card { display:grid; gap:14px; }
#v160BankPicker { display:grid; gap:12px; }
#v160BankPicker[hidden] { display:none!important; }
#v160BankPicker label { display:grid; gap:6px; font-weight:650; }
#v160BankPicker input { width:100%; min-height:44px; }
.v160-bank-rows { display:grid; gap:7px; max-height:460px; overflow-y:auto; overscroll-behavior:contain; }
.v160-bank-row { display:grid; grid-template-columns:minmax(0,1fr) auto auto; align-items:center; gap:10px; padding:10px 12px; background:var(--surface,#fff); border:1px solid #d9e3ed; border-radius:10px; }
.v160-bank-row>div { min-width:0; display:grid; gap:3px; }
.v160-bank-row strong, .v160-bank-row span, .v160-bank-row small { overflow-wrap:anywhere; }
.v160-bank-row small { color:var(--muted,#667085); font-size:12px; }
.v160-bank-row span { color:var(--muted,#667085); }
.v160-bank-amount { font-variant-numeric:tabular-nums; white-space:nowrap; }
.v160-bank-row button { min-height:42px; }
@media(max-width:620px) {
 .v160-bank-row { grid-template-columns:minmax(0,1fr) auto; gap:8px; }
 .v160-bank-row>div { grid-column:1/-1; }
 .v160-bank-row button { min-width:130px; min-height:44px; }
 .v160-bank-rows { max-height:52vh; }
}


/* V230: sichtbare Bestätigung und sequentielle Übernahme von Kontobuchungen. */
#v160BankSuccess[hidden], #v160BankQueueWrap[hidden], #v160BankClearDone[hidden] { display:none!important; }
.v160-bank-success {
  display:grid;gap:5px;
  border:2px solid #43ad72;
  background:#e8f8ef;
  color:#16653a;
  border-radius:13px;
  padding:15px 17px;
  box-shadow:0 5px 15px rgba(22,101,58,.08);
}
.v160-bank-success strong {font-size:17px;line-height:1.3;}
.v160-bank-success span {font-weight:700;overflow-wrap:anywhere;}
.v160-bank-success small {color:#216944;line-height:1.4;}
.v160-bank-queue-wrap {border:1px solid #cbd9e4;border-radius:12px;padding:12px;display:grid;gap:10px;background:#f8fafc;}
.v160-bank-queue-head {display:flex;gap:10px;align-items:center;justify-content:space-between;flex-wrap:wrap;}
.v160-bank-queue-head strong {font-size:14px;}
.v160-bank-queue-head button {min-height:36px;}
.v160-bank-progress {height:8px;background:#dfe8ed;border-radius:99px;overflow:hidden;}
.v160-bank-progress > span {display:block;background:#258b58;width:0;height:100%;border-radius:inherit;transition:width .25s ease;}
.v160-bank-queue {display:grid;gap:7px;max-height:350px;overflow-y:auto;}
.v160-bank-queue-row {display:flex;align-items:center;gap:10px;padding:10px;border:1px solid #dce5ed;background:#fff;border-radius:10px;min-width:0;}
.v160-bank-queue-icon {display:grid;place-items:center;flex:0 0 28px;height:28px;font-weight:900;background:#edf3f8;color:#33556d;border-radius:50%;}
.v160-bank-queue-row[data-state="done"] {border-color:#b6dfc7;background:#f1faf4;}
.v160-bank-queue-row[data-state="done"] .v160-bank-queue-icon {background:#237e4b;color:#fff;}
.v160-bank-queue-row[data-state="running"] {border-color:#dba64b;background:#fffbef;}
.v160-bank-queue-row[data-state="failed"] {border-color:#e9acac;background:#fff5f5;}
.v160-bank-queue-row[data-state="failed"] .v160-bank-queue-icon {background:#b42318;color:#fff;}
.v160-bank-queue-details {display:grid;gap:3px;min-width:0;flex:1;}
.v160-bank-queue-details strong {overflow-wrap:anywhere;}
.v160-bank-queue-details small {color:#576b80;}
.v160-bank-queue-details span {font-size:12px;color:#41566e;overflow-wrap:anywhere;}
.v160-bank-queue-row[data-state="done"] .v160-bank-queue-details span {color:#17673f;font-weight:750;}
.v160-bank-row[data-state="done"] {border-color:#a4d7b6;background:#f0faf3;}
.v160-bank-row .v160-bank-added {border:1px solid #2f985d;background:#2c8c57;color:#fff;border-radius:8px;padding:8px 11px;font-weight:750;min-height:44px;white-space:normal;}
.v160-bank-row button:disabled {opacity:1;cursor:default;}
.v160-bank-row[data-state="running"], .v160-bank-row[data-state="queued"] {border-color:#e7c87f;background:#fffcf2;}
@media(max-width:620px) {
 .v160-bank-success {padding:13px;}
 .v160-bank-queue-row {align-items:flex-start;flex-wrap:wrap;}
 .v160-bank-queue-row button {margin-left:auto;min-height:42px;}
 .v160-bank-queue-details {flex-basis:calc(100% - 48px);}
 .v160-bank-queue-head strong {font-size:13px;}
}
