/* SchichtKalender – auswertung.css
 *
 * Mehrseitige Auswertung, DIN A4 Hochformat.
 * Jeder .page-Block ist ein Blatt und beginnt beim Druck auf einer neuen Seite.
 *
 *   A4 hoch      210 x 297 mm
 *   Rand          12 mm ringsum
 *   nutzbar      186 x 273 mm
 */

.page {
  width: 210mm;
  min-height: 297mm;
  padding: 12mm;
  margin: 0 auto 16px;
  background: #fff;
  color: #111318;
  box-shadow: 0 2px 18px rgba(0, 0, 0, .18);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  box-sizing: border-box;
}

.page-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  border-bottom: .4mm solid #333;
  padding-bottom: 2mm;
  margin-bottom: 4mm;
}
.page-title { font-size: 13pt; font-weight: 800; }
.page-meta  { font-size: 8pt; color: #6b7280; }
.page-foot  { margin-top: 4mm; font-size: 7pt; color: #6b7280;
              display: flex; justify-content: space-between; }

.sec-title {
  font-size: 9.5pt;
  font-weight: 800;
  margin: 5mm 0 2mm;
  padding-bottom: 1mm;
  border-bottom: .2mm solid #b8bcc6;
}
.sec-title:first-of-type { margin-top: 0; }

/* ── Tabellen ──────────────────────────────────────────────────────── */
.rt { width: 100%; border-collapse: collapse; font-size: 8pt; }
.rt th {
  background: #eef0f4;
  font-weight: 800;
  text-align: right;
  padding: 1.4mm 1.6mm;
  border: .2mm solid #b8bcc6;
  white-space: nowrap;
}
.rt th:first-child, .rt td:first-child { text-align: left; }
.rt td {
  padding: 1.3mm 1.6mm;
  border: .2mm solid #cdd1d8;
  text-align: right;
  white-space: nowrap;
}
.rt tr:nth-child(even) td { background: #f7f8fa; }
.rt .sum td { font-weight: 800; background: #e4e6eb !important; border-top: .35mm solid #333; }
.rt .neg { color: #a1231b; }
.rt .pos { color: #15702f; }
.rt .mut { color: #6b7280; }

/* Ampel im Abgleich – zusätzlich mit Zeichen, damit Graustufen tragen */
.st-ok::before   { content: "\2713 "; }
.st-warn::before { content: "\26A0 "; }
.st-bad::before  { content: "\2717 "; }
.st-none::before { content: "\2013 "; }
.st-ok   { color: #15702f; font-weight: 800; }
.st-warn { color: #92610b; font-weight: 800; }
.st-bad  { color: #a1231b; font-weight: 800; }
.st-none { color: #6b7280; }

/* ── Kennzahlen ────────────────────────────────────────────────────── */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2.5mm;
  margin-bottom: 4mm;
}
.kpi-box {
  border: .2mm solid #b8bcc6;
  padding: 2mm 2.5mm;
  background: #f7f8fa;
}
.kpi-label { font-size: 7pt; color: #6b7280; text-transform: uppercase; letter-spacing: .04em; }
.kpi-value { font-size: 13pt; font-weight: 800; margin-top: .5mm; }
.kpi-sub   { font-size: 7pt; color: #6b7280; }

/* ── Schichtliste, mehrspaltig ─────────────────────────────────────── */
.shift-cols {
  column-count: 4;
  column-gap: 4mm;
  font-size: 7.2pt;
}
.shift-row {
  display: flex;
  justify-content: space-between;
  gap: 1.5mm;
  padding: .5mm 1mm;
  border-bottom: .15mm solid #e2e4e9;
  break-inside: avoid;
}
.shift-row .sd { color: #6b7280; min-width: 16mm; }
.shift-row .sw { min-width: 6mm; }
.shift-row .ss { font-weight: 800; min-width: 7mm; text-align: right; }
.shift-row .se { font-weight: 800; min-width: 8mm; text-align: right; }
.shift-row.is-ft { background: #e4e6eb; }
.shift-row.is-entry { background: #f0f1f4; }
.month-head {
  font-size: 8pt; font-weight: 800;
  margin: 2mm 0 1mm; padding-bottom: .5mm;
  border-bottom: .2mm solid #b8bcc6;
  break-after: avoid;
}

.hinweis {
  font-size: 7.5pt;
  color: #6b7280;
  line-height: 1.5;
  margin-top: 3mm;
  padding: 2mm 2.5mm;
  background: #f7f8fa;
  border-left: .6mm solid #b8bcc6;
}

/* ── Ausdruck ──────────────────────────────────────────────────────── */
@page { size: A4 portrait; margin: 0; }

@media print {
  html, body { margin: 0; padding: 0; background: #fff; }
  .app-header, .bottom-nav, .no-print { display: none !important; }
  .page {
    width: 210mm;
    min-height: 297mm;
    margin: 0;
    box-shadow: none;
    page-break-after: always;
  }
  .page:last-of-type { page-break-after: auto; }
  .rt, .kpi-grid { page-break-inside: avoid; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
