/* ── Screen styles ──────────────────────────────────────────── */

.export-check {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  font-size: 14px;
  cursor: pointer;
  border-bottom: 1px solid var(--border);
}

.export-check input[type="checkbox"] {
  width: 15px;
  height: 15px;
  accent-color: var(--dark);
  flex-shrink: 0;
}

#export-error {
  padding: 9px 12px;
  background: #fef2f2;
  border: 1.5px solid #fca5a5;
  color: #991b1b;
  border-radius: 8px;
  font-size: 13px;
}

/* ── Print styles ───────────────────────────────────────────── */

@media print {
  /* Hide all direct children of body except .container */
  body > *:not(.container) { display: none !important; }
  /* Inside .container, hide everything except print-area */
  .container > *:not(#print-area) { display: none !important; }
  /* Show print-area */
  #print-area { display: block !important; }

  body {
    background: white;
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
    color: #1a1a2e;
  }

  @page {
    margin: 18mm 16mm;
    size: A4 portrait;
  }

  /* ── Report header ── */
  .rpt-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
    border-bottom: 2px solid #1a1a2e;
    padding-bottom: 10px;
  }

  .rpt-company {
    font-size: 20px;
    font-weight: 700;
    color: #1a1a2e;
  }

  .rpt-period {
    font-size: 12px;
    color: #666;
    margin-top: 3px;
  }

  .rpt-header-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
  }

  .rpt-logo {
    height: 40px;
    width: auto;
  }

  .rpt-generated {
    font-size: 11px;
    color: #999;
    text-align: end;
  }

  /* ── Sections ── */
  .rpt-section {
    margin-top: 20px;
    page-break-inside: avoid;
  }

  .rpt-section-title {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #1a1a2e;
    margin-bottom: 8px;
    border-bottom: 1px solid #1a1a2e;
    padding-bottom: 4px;
  }

  /* ── Summary rows (revenue, food cost, expense summary lines) ── */
  .rpt-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 5px 0;
    font-size: 13px;
    border-bottom: 1px solid #f0f0f0;
  }

  .rpt-row .lbl { color: #444; }

  .rpt-row .val {
    font-weight: 600;
    font-variant-numeric: tabular-nums;
  }

  .rpt-row .pct {
    color: #888;
    font-size: 11px;
    margin-inline-start: 8px;
  }

  .rpt-row.goal-ok  .val { color: #065f46; }
  .rpt-row.goal-bad .val { color: #991b1b; }

  /* ── Accumulation note ── */
  .rpt-accum-note {
    font-size: 11px;
    color: #555;
    font-style: italic;
    padding: 4px 0;
    border-bottom: 1px solid #f0f0f0;
  }

  /* ── Labor groups table ── */
  .rpt-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
    margin-top: 4px;
  }

  .rpt-table th {
    padding: 6px 8px;
    background: #f4f4f4;
    text-align: start;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #555;
    border-bottom: 1px solid #e0e0e0;
  }

  .rpt-table td {
    padding: 7px 8px;
    border-bottom: 1px solid #f0f0f0;
  }

  .rpt-table .num {
    text-align: right;
    font-variant-numeric: tabular-nums;
  }

  .rpt-table tr:last-child td { border-bottom: none; }

  .rpt-table tfoot td {
    font-weight: 700;
    border-top: 2px solid #1a1a2e;
    border-bottom: none;
  }

  /* ── Fixed salaries sub-section ── */
  .rpt-fixed-label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #666;
    margin-top: 12px;
    margin-bottom: 4px;
  }

  /* ── Monthly breakdown table (multi-month only) ── */
  .rpt-monthly-table th {
    background: #1a1a2e;
    color: white;
  }

  /* ── Page break for owner expenses page ── */
  .rpt-page-break {
    page-break-before: always;
  }
}
