/* Abrechnung page overrides */
html, body{overflow-x:hidden}
.card{min-width:0}
.table-wrap{min-width:0; width:100%; max-width:100%; overflow-x:auto; overflow-y:visible; max-height:none}
.calc-table{width:max-content; min-width:2600px; border-collapse:collapse; font-size:12px}
.calc-table th,.calc-table td{border-bottom:1px solid rgba(255,255,255,.08); padding:6px 8px; text-align:left; vertical-align:middle}
.calc-table th{font-size:11px; color:var(--muted)}
.calc-table thead th{position:sticky; top:0; z-index:2; background:var(--card); box-shadow:0 2px 0 rgba(0,0,0,.35)}
.calc-table input{min-width:110px}
.calc-table select{min-width:140px}
.calc-table .num{text-align:right; white-space:nowrap}
.calc-table .name{min-width:220px}
.summary{display:grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap:10px; margin-top:10px}
.summary .stat{background:rgba(0,0,0,.16); border:1px solid rgba(255,255,255,.08); border-radius:12px; padding:10px}
.summary .stat .k{font-size:11px; color:var(--muted)}
.summary .stat .v{font-size:14px; font-weight:700}
.row-inline{display:flex; gap:10px; flex-wrap:wrap; align-items:center}
.small-input{max-width:160px}
#data-warning{margin-top:8px}

@media print{
  *{-webkit-print-color-adjust: exact; print-color-adjust: exact; color:#000 !important;}
  .table-wrap{max-height:none; overflow:visible}
  body{font-family:Arial, Helvetica, sans-serif; font-size:10pt; color:#000}
  .calc-table{font-size:9pt}
}

/* Invoice / print layout */
.invoice{font:10pt/1.35 Arial, Helvetica, sans-serif; color:#000}
.inv-top{display:flex; justify-content:space-between; align-items:flex-start; gap:10mm}
.inv-left{min-width:60%}
.inv-right{text-align:right; min-width:30%}
.inv-small{font-size:9pt; color:#444}
.inv-company{font-size:10pt; font-weight:700; margin:1mm 0}
.inv-date{font-size:8.5pt; font-weight:600}
.inv-title{font-size:11pt; font-weight:800; margin:5mm 0 2mm}
.inv-sub{font-size:9pt; margin-bottom:4mm}
.inv-columns{display:grid; grid-template-columns: 1fr 1fr; gap:10mm; margin-bottom:4mm}
.inv-section{font-weight:700; margin-bottom:1mm}
.inv-meta{font-size:8.5pt}
.inv-row{display:flex; justify-content:space-between; gap:6mm; border-bottom:1px solid #eee; padding:1mm 0}
.inv-table{width:100%; border-collapse:collapse; margin:4mm 0}
.inv-table th,.inv-table td{border-bottom:1px solid #000; padding:2mm 1.5mm; text-align:left}
.inv-table th{font-size:8.5pt; color:#000; background:transparent}
.inv-table .num{text-align:right}
.inv-totals{margin-top:3mm; border-top:1px solid #ccc; padding-top:2mm}
.inv-line{display:flex; justify-content:space-between; gap:8mm; padding:1mm 0}
.inv-strong{font-weight:800; border-top:1px solid #999; margin-top:2mm; padding-top:2mm}
.inv-footer{margin-top:6mm; font-size:7.5pt; color:#000}


/* Active row highlight */
.calc-table tr.row-active td{
  background: rgba(95,163,255,.14);
}
.calc-table tr.row-active td input,
.calc-table tr.row-active td select{
  border-color: rgba(95,163,255,.45);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.18);
}

.topbar{left:0; right:0}

/* UI refresh 2026-02 */
.calc-table th,.calc-table td{border-bottom:1px solid rgba(120,160,220,.22)}
.calc-table th{color:var(--muted)}
.calc-table thead th{
  background:linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,.03));
  box-shadow:0 2px 0 rgba(95,163,255,.25);
}
.summary .stat{
  background:linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.02));
  border:1px solid rgba(120,160,220,.25);
}
.calc-table tr.row-active td{
  background:rgba(95,163,255,.14);
}
.invoice{
  font-family:"IBM Plex Sans","Fira Sans","Segoe UI",sans-serif;
}



/* Extras (Studio/Tonmeister) */
.extras-table{min-width:900px}
.extras-table .num{text-align:right; white-space:nowrap}
.extras-table .btn.small{padding:4px 8px; font-size:11px}
.extras-wrap{max-height:none}

.extras-table input{min-width:120px}
.extras-table select{min-width:120px}


/* Kassenübersicht */
.kassen-table{min-width:1350px}
.kassen-table .num{text-align:right; white-space:nowrap}
.kassen-wrap{max-height:none}
.kassen-table input{min-width:140px}

.kassen-table tr.kassen-total td{font-weight:700; border-top:2px solid rgba(255,255,255,.25)}
.kassen-sheet .kassen-total td{border-top:2px solid #999}

/* Solid header for Abrechnung table */
#calc-table thead th{background:#121b33; box-shadow:0 2px 0 rgba(0,0,0,.35)}
#calc-table tfoot td{
  border-top:2px solid rgba(95,163,255,.45);
  border-bottom:none;
  background:rgba(10,24,52,.92);
  font-weight:700;
}
#calc-table tfoot .num{font-variant-numeric:tabular-nums}
#calc-table tfoot tr.calc-total-row td:first-child{letter-spacing:.2px}


.kassen-note{margin:8px 0 12px; padding:10px 12px; border-radius:10px; background:rgba(20,30,55,.85); border:1px solid rgba(120,160,220,.25); font-size:12px; line-height:1.35}
.kassen-note b{color:var(--text)}
.kassen-note .muted{color:var(--muted)}
.inv-note{margin:3mm 0 4mm; font-size:9.5pt; color:#333}

.kasse-link{display:inline-block; padding:4px 8px; border-radius:8px; background:rgba(95,163,255,.18); border:1px solid rgba(95,163,255,.4); color:#eaf2ff; text-decoration:none; font-weight:600; font-size:11px}
.kasse-link:hover{background:rgba(95,163,255,.3)}


@media print{
  .sheet.invoice{
    padding:7mm 8mm !important;
    font:9pt/1.2 Arial, Helvetica, sans-serif !important;
    page-break-inside:avoid;
    break-inside:avoid-page;
  }
  .invoice .inv-top{gap:6mm; margin-bottom:1mm}
  .invoice .inv-small{font-size:8pt}
  .invoice .inv-company{font-size:9pt; margin:.6mm 0}
  .invoice .inv-date{font-size:7.5pt}
  .invoice .inv-title{font-size:10pt; margin:2.5mm 0 1.5mm}
  .invoice .inv-sub{font-size:8.5pt; margin-bottom:2mm}
  .invoice .inv-columns{gap:6mm; margin-bottom:2mm}
  .invoice .inv-meta{font-size:8pt}
  .invoice .inv-row{padding:.35mm 0}
  .invoice .inv-table{margin:2mm 0}
  .invoice .inv-table th,
  .invoice .inv-table td{padding:1mm 1mm}
  .invoice .inv-totals{margin-top:1.5mm; padding-top:1.2mm}
  .invoice .inv-line{padding:.6mm 0}
  .invoice .inv-footer{margin-top:2mm; font-size:7pt}
}


/* No inner scroll in Abrechnung */
.card{overflow:visible}
