@page {
    size: A4 portrait;
    margin: 12mm;
}

* { box-sizing: border-box; }
body {
    margin: 0;
    background: #e9edf2;
    color: #202c3b;
    font: 14px/1.4 Arial, Helvetica, sans-serif;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
}
.print-toolbar {
    max-width: 230mm;
    margin: 24px auto 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}
.print-back { color: #34465c; text-decoration: none; font-weight: 600; }
.print-back:hover { text-decoration: underline; }
.print-toolbar-actions, .print-week-form { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.print-week-form label { font-size: 13px; font-weight: 600; }
.print-week-form input {
    border: 1px solid #8794a4;
    border-radius: 6px;
    padding: 8px;
    background: #fff;
    color: #202c3b;
    font: inherit;
}
.print-button {
    border: 1px solid #193d64;
    border-radius: 6px;
    padding: 11px 17px;
    background: #193d64;
    color: #fff;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}
.print-button:hover { background: #102d4c; }
.print-button-secondary { padding: 8px 10px; background: #fff; color: #193d64; }
.print-button-secondary:hover { background: #edf1f5; }
a:focus-visible, button:focus-visible, input:focus-visible { outline: 3px solid #3885c7; outline-offset: 4px; }
.print-sheet {
    width: 210mm;
    min-height: 297mm;
    margin: 0 auto;
    padding: 12mm;
    background: #fff;
    box-shadow: 0 5px 24px #24364b14;
}
.print-sheet + .print-sheet { margin-top: 24px; }
.print-brand { padding-bottom: 12px; }
.print-sheet-compact .print-event td { padding-top: 6px; padding-bottom: 6px; }
.print-sheet-compact .print-day th { padding-top: 6px; padding-bottom: 5px; }
.print-sheet-compact .print-footer { margin-top: 14px; }
.print-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 18px;
    border-bottom: 1px solid #d8dfe7;
    color: #34465c;
    font-size: 11px;
    font-weight: 600;
}
.print-logo { width: 38px; height: 38px; object-fit: contain; }
.print-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 23px 0 22px; }
.print-eyebrow { margin: 0 0 5px; color: #536174; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 1.5px; }
h1 { margin: 0; font-size: 30px; line-height: 1.15; letter-spacing: -.7px; color: #193d64; }
.print-period { margin: 9px 0 0; font-size: 14px; font-weight: 600; }
.print-period span { margin: 0 4px; color: #536174; font-weight: 400; }
.print-total { min-width: 67px; padding-left: 20px; border-left: 1px solid #d8dfe7; text-align: center; }
.print-total strong { display: block; color: #193d64; font-size: 30px; line-height: 1.15; }
.print-total span { font-size: 11px; color: #536174; }
.print-schedule { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: 12px; }
.col-time { width: 12%; }
.col-event { width: 40%; }
.col-type { width: 23%; }
.col-place { width: 25%; }
.print-schedule thead th { padding: 8px 9px; border-top: 2px solid #193d64; border-bottom: 1px solid #c6d0dd; color: #536174; font-size: 9px; letter-spacing: .7px; text-transform: uppercase; text-align: left; }
.print-day th { padding: 10px 9px 7px; background: #edf1f5; border-bottom: 1px solid #d8dfe7; color: #283f59; text-align: left; font-size: 11px; font-weight: 600; }
.print-day th > span { display: inline-block; margin-right: 9px; font-weight: 700; }
.print-day small { float: right; color: #536174; font-size: 9px; font-weight: 400; }
.print-event td { padding: 11px 9px; vertical-align: top; border-bottom: 1px solid #e0e5ec; overflow-wrap: anywhere; }
.print-time { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.print-event-name { font-weight: 600; }
.print-type, .print-place { color: #435165; font-size: 11px; }
.print-swatch { display: inline-block; width: 6px; height: 6px; margin-right: 5px; border-radius: 50%; border: 1px solid #0002; vertical-align: 1px; }
.print-footer { margin-top: 20px; padding-top: 11px; border-top: 1px solid #c6d0dd; display: flex; justify-content: space-between; gap: 12px; color: #536174; font-size: 9px; }
.print-empty { margin: 16px 0; padding: 28px 18px; border: 1px solid #d8dfe7; text-align: center; }
.print-empty h2 { margin: 0 0 7px; font-size: 16px; }
.print-empty p { margin: 0; color: #536174; }
.print-tip { margin: 18px auto 28px; padding: 0 16px; color: #536174; font-size: 12px; text-align: center; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
/* Folhas cheias mantêm fonte de 9 pt, com menos espaço entre as linhas. */
.print-sheet-compact .print-schedule { line-height: 1.2; }
.print-sheet-compact .print-event td { padding-top: 3px; padding-bottom: 3px; }
.print-sheet-compact .print-day th { padding-top: 5px; padding-bottom: 4px; }
.print-sheet-compact .print-heading { padding-top: 12px; padding-bottom: 14px; }
.print-sheet-compact .print-brand { padding-bottom: 8px; }
.print-sheet-compact .print-logo { width: 30px; height: 30px; }
.print-sheet-compact h1 { font-size: 26px; }
.print-sheet-compact .print-footer { margin-top: 12px; padding-top: 8px; }

@media screen and (max-width: 820px) {
    .print-toolbar { margin: 16px; flex-wrap: wrap; }
    .print-sheet { width: 100%; min-height: auto; padding: 24px 16px; }
    h1 { font-size: 26px; }
    .print-schedule { font-size: 11px; }
    .print-event td, .print-schedule thead th { padding-left: 5px; padding-right: 5px; }
    .print-type, .print-place { font-size: 10px; }
    .col-time { width: 14%; }
    .col-event { width: 36%; }
    .print-footer { flex-wrap: wrap; }
}
@media print {
    body { background: #fff; font-size: 10pt; }
    .print-toolbar, .print-tip { display: none !important; }
    .print-sheet { width: auto; min-height: 0; margin: 0; padding: 0; box-shadow: none; }
    .print-sheet + .print-sheet { margin-top: 0; break-before: page; }
    .print-header { break-inside: avoid; }
    .print-schedule thead { display: table-header-group; }
    .print-schedule tbody { break-inside: auto; }
    .print-day { break-after: avoid; page-break-after: avoid; }
    .print-event { break-inside: avoid; page-break-inside: avoid; }
    .print-footer { break-inside: avoid; }
}
