:root{font-family:Inter,ui-sans-serif,system-ui,sans-serif;color:#1d1d1b;background:#f4f3f0;--line:#dedbd5;--muted:#68645e;--gold:#926723}*{box-sizing:border-box}[hidden]{display:none!important}body{margin:0}h1,h2,p{margin:0}header{min-height:98px;background:#191917;color:white;padding:22px 28px;display:flex;justify-content:space-between;align-items:center;gap:18px}.eyebrow{font-size:12px;letter-spacing:.12em;text-transform:uppercase;color:#c7ad81}h1{font-size:27px;margin-top:3px}.account{display:flex;gap:12px;align-items:center;font-size:14px}.account button{color:white;background:transparent;border-color:#ffffff55}main{max-width:1150px;margin:auto;padding:24px 28px}button,input,select{font:inherit}button{border:1px solid var(--line);border-radius:8px;padding:11px 16px;background:white;font-weight:650;cursor:pointer;font-size:14px;min-height:44px}button:disabled{opacity:.5;cursor:not-allowed}button.primary{background:var(--gold);border-color:var(--gold);color:white}input,select{min-height:44px;border:1px solid #bdb9b1;border-radius:7px;padding:9px 12px;background:white;color:#1d1d1b;max-width:100%}input:focus,select:focus,button:focus-visible{outline:3px solid #b88a4266;outline-offset:2px}input[aria-invalid=true]{border:2px solid #b33737;background:#fff1f1}fieldset{border:0;padding:0;margin:0;min-width:0}label{display:grid;gap:7px;font-size:14px;font-weight:600}.filters{display:flex;gap:14px;align-items:end;margin-bottom:20px}.filters label:first-child{flex:1}.filters label:nth-child(2),.filters label:nth-child(3){width:220px}.summary{display:grid;grid-template-columns:repeat(5,1fr);gap:14px;margin-bottom:20px}.summary article{border:1px solid var(--line);border-radius:12px;padding:18px 20px;background:white;display:grid;gap:6px}.summary span{font-size:14px;color:var(--muted)}.summary strong{font-size:32px;font-variant-numeric:tabular-nums}.summary small{font-size:13px;color:var(--muted)}.summary .overtime-card{border-top:3px solid var(--gold);padding-top:16px}.overtime-card strong{color:var(--gold)}.sheet{border:1px solid var(--line);border-radius:12px;background:white;overflow:hidden}.sheet-heading{padding:20px;border-bottom:1px solid var(--line)}h2{font-size:20px}.sheet-heading p{font-size:14px;color:var(--muted);margin-top:7px;line-height:1.5}.empty{padding:40px 20px;text-align:center;color:var(--muted)}.table-wrap{overflow-x:auto}table{border-collapse:collapse;width:100%;font-size:15px;font-variant-numeric:tabular-nums}th,td{padding:10px 20px;border-bottom:1px solid #eeece8;text-align:right}th:first-child{text-align:left}thead th{font-size:13px;font-weight:600;color:var(--muted);background:#faf9f7}tbody th{font-weight:500}tbody th small{display:inline-block;min-width:95px;color:var(--muted);font-size:14px;margin-left:12px}td input{width:112px;text-align:right}.day-leave,.day-permission,.day-overtime{width:98px;text-align:right}.day-overtime{color:var(--gold);font-weight:700}tr.weekend{background:#f8f6f1}tfoot{background:#f1eee7;font-weight:750}tfoot th,tfoot td{padding-top:18px;padding-bottom:18px;border:0}.save-bar{position:sticky;bottom:0;display:flex;align-items:center;justify-content:space-between;gap:16px;background:#f4f3f0f5;padding:16px 0;border-top:1px solid var(--line);margin-top:16px}.save-bar p{font-size:14px;line-height:1.5;color:var(--muted)}.save-bar p.error{color:#a22828}.save-bar button{flex-shrink:0}dialog{border:0;border-radius:12px;padding:25px;width:min(440px,calc(100% - 28px))}dialog::backdrop{background:#1119}dialog form{display:grid;gap:18px}.dialog-actions{display:flex;gap:10px;justify-content:flex-end}#auth-feedback{color:#a22828;font-size:14px}.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0)}@media(max-width:650px){header{padding:18px 16px}.account>span{display:none}main{padding:16px 12px}.filters{flex-wrap:wrap;gap:10px}.filters label:first-child{flex-basis:100%}.filters label:nth-child(2),.filters label:nth-child(3){flex:1}.summary{gap:8px}.summary article{padding:12px 10px}.summary .overtime-card{padding-top:10px}.summary strong{font-size:26px}.summary small{font-size:12px}.summary span{font-size:13px}.sheet-heading{padding:16px}th,td{padding:9px 8px}thead th{font-size:12px}tbody th small{display:block;margin:3px 0 0;min-width:0;font-size:12px}td input{width:85px;padding:9px 6px;font-size:16px}.save-bar{align-items:flex-start}.save-bar p{font-size:13px}}

.sheet-actions{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end}
.danger-bar{display:flex;align-items:center;justify-content:flex-end;gap:12px;margin-top:8px;flex-wrap:wrap}
button.danger{background:#8d1f1f;border-color:#8d1f1f;color:#fff}
button.danger:hover{background:#6f1a1a;border-color:#6f1a1a}
.danger-bar p{margin:0;min-height:44px;display:flex;align-items:center;font-size:13px;color:#8d1f1f}
#print-area{display:none}
.ore-pdf-host{position:absolute;left:0;top:0;z-index:-100;width:190mm;background:#fff;pointer-events:none}
.ore-report{width:190mm;max-width:none;margin:0;padding:0;background:#fff;color:#20201d;font:10pt/1.25 Arial,Helvetica,sans-serif;box-sizing:border-box}
.ore-report *{box-sizing:border-box}
.ore-report .ore-report-heading{display:flex;justify-content:space-between;align-items:center;gap:8mm;border-bottom:1mm solid #926723;padding-bottom:4mm;margin-bottom:4mm}
.ore-report-heading>strong{font-size:23pt;letter-spacing:.02em}.ore-report-heading>strong small{display:block;font-size:9pt;font-weight:400;letter-spacing:.12em}
.ore-report .ore-report-heading h1{font-size:17pt;margin:0 0 1.5mm}.ore-report-heading>div{text-align:right}.ore-report .report-month{font-size:11pt;text-transform:capitalize}
.ore-report-person{display:flex;align-items:baseline;gap:4mm;margin-bottom:4mm}.ore-report-person span{font-size:9pt;color:#555}.ore-report-person strong{font-size:12pt;overflow-wrap:anywhere}
.ore-report table{width:100%;border-collapse:collapse;table-layout:fixed;font-size:9pt;line-height:1.2}
.ore-report th,.ore-report td{padding:1mm 2mm;height:5.6mm;border-bottom:.2mm solid #dedbd5;text-align:right;color:#20201d}
.ore-report th:first-child{width:29%;text-align:left}.ore-report tbody th{font-weight:400}.ore-report thead th{font-size:8pt;background:#eeeae2;font-weight:700}
.ore-report .ore-report-weekend{background:#f5f3ee}.ore-report tfoot th,.ore-report tfoot td{padding:2mm;font-weight:700;background:#eeeae2}
.ore-report tr{break-inside:avoid;page-break-inside:avoid}.ore-report thead{display:table-header-group}.ore-report tfoot{display:table-row-group}
.ore-report-summary{display:grid;grid-template-columns:repeat(4,1fr);gap:3mm;margin:4mm 0 3mm;break-inside:avoid}.ore-report-summary>div{border:.25mm solid #c9c3b8;padding:2.5mm;font-size:9pt}.ore-report-summary strong{display:block;font-size:16pt;margin-top:1mm}.ore-report-summary>div:last-child{border-color:#926723}
.ore-report .ore-report-note,.ore-report .ore-report-state{font-size:8pt;line-height:1.35;color:#555;margin:1.5mm 0 0}
@media(max-width:650px){.save-bar{flex-direction:column}.sheet-actions{width:100%}.sheet-actions button{flex:1;padding:10px}.save-bar p{width:100%}}
@media(min-width:651px){.summary{grid-template-columns:repeat(4,1fr)}.day-cig,.day-holiday{width:98px;text-align:right}}
@media(max-width:650px){.summary{grid-template-columns:repeat(2,1fr)}.day-cig,.day-holiday{width:85px;padding:9px 6px;font-size:16px;text-align:right}}
.national-holiday{background:#fff4dc}.national-holiday .day-holiday{border-color:#926723;background:#fffaf0;font-weight:700;color:#7b541b}
@media print{
  @page{size:A4 portrait;margin:10mm}
  html,body{width:auto!important;min-height:0!important;margin:0!important;padding:0!important;background:#fff!important}
  body>*:not(#print-area){display:none!important}
  #print-area{display:block!important;margin:0!important;padding:0!important}
  .ore-report{width:100%;print-color-adjust:exact;-webkit-print-color-adjust:exact}
}

.overtime-only-label{display:flex;align-items:center;gap:5px;font-size:10px;font-weight:400;margin-top:5px;white-space:normal}.overtime-only-label input{width:15px;min-height:15px;height:15px;padding:0;margin:0}

.pay-policy{font-size:14px;line-height:1.5;margin:0 0 16px;color:var(--muted)}.pay-policy:empty{display:none}.saturday-label{font-size:11px;margin-top:6px;white-space:normal}.saturday-label select{width:150px;font-size:12px;padding:6px;min-height:36px}.report-pay-policy,.report-saturdays{font-size:10px;line-height:1.4;margin-top:6px}

/* Keep all eight columns inside the desktop sheet, including Saturday pay. */
#table-wrap table{table-layout:fixed;min-width:640px}
#table-wrap th,#table-wrap td{padding:10px 8px}
#table-wrap thead th{white-space:normal;overflow-wrap:anywhere}
#table-wrap th:first-child{width:14%}
#table-wrap th:nth-child(2){width:12%}
#table-wrap th:nth-child(3),#table-wrap th:nth-child(4),#table-wrap th:nth-child(5),#table-wrap th:nth-child(6){width:10%}
#table-wrap th:nth-child(7){width:14%}
#table-wrap th:nth-child(8){width:20%}
#table-wrap tbody th small{display:block;min-width:0;margin:3px 0 0;overflow-wrap:anywhere}
#table-wrap td input:not([type=checkbox]){width:100%;max-width:98px;min-width:0;padding:9px 6px}
#table-wrap .overtime-only-label{justify-content:flex-end;gap:5px}
#table-wrap .overtime-only-label input{flex:0 0 15px}
#table-wrap .saturday-label{min-width:0}
#table-wrap .saturday-label select{width:100%;min-width:0;max-width:170px;justify-self:end}
@media(min-width:651px){.filters{flex-wrap:wrap}.filters label:first-child{min-width:180px}.filters label:nth-child(2),.filters label:nth-child(3){width:180px}}

.advances { background: #fff; border: 1px solid #dedbd5; border-radius: 16px; padding: 20px; margin: 20px 0; }
.advances h2 { margin: 0 0 8px; font-size: 1.2rem; }
.advances p { color: #69655e; margin: 8px 0; }
.advance-fields { display: grid; grid-template-columns: minmax(150px, 220px) minmax(0, 1fr); gap: 16px; margin: 16px 0; }
.advance-fields input { width: 100%; min-width: 0; }
#net-summary { font-size: 1.15rem; color: #292823; }
@media (max-width: 600px) { .advance-fields { grid-template-columns: 1fr; } }

#accountant-note { display: block; width: 100%; box-sizing: border-box; margin-top: 8px; padding: 12px; border: 1px solid #c9c3b8; border-radius: 8px; font: inherit; resize: vertical; }
.report-accountant-note { border: .25mm solid #c9c3b8; padding: 3mm; margin: 4mm 0; }
.report-accountant-note p { white-space: pre-wrap; overflow-wrap: anywhere; margin: 2mm 0 0; }


/* Imported attendance and office reconciliation, contained above the sheet. */
.worker-presences{padding:18px 20px;background:#f0f6fc;border-bottom:1px solid #cbdcec;min-width:0}
.worker-presences h3{margin:0 0 7px;font-size:16px;color:#214d72}
.worker-presences p{font-size:13px;line-height:1.5;margin:7px 0;overflow-wrap:anywhere}
.source-day{border:1px solid #cadceb;border-radius:8px;background:white;margin-top:9px;padding:10px 12px;min-width:0}
.source-day summary{cursor:pointer;font-size:13px;font-weight:650;line-height:1.5;overflow-wrap:anywhere}
.source-day button{margin-top:6px;white-space:normal;max-width:100%}
.source-review{border-color:#d5a64d;background:#fffbef}
.worker-source-badge{display:block!important;color:#285d85!important;font-size:10px!important;margin-top:5px}
@media(max-width:650px){.worker-presences{padding:14px 12px}}

.on-call-label{display:flex;align-items:center;gap:6px;font-size:12px;white-space:normal;min-width:95px}.on-call-label input{width:18px;height:18px;flex:none}

/* Ten attendance columns, with room for the on-call checkbox. */
#table-wrap table{min-width:900px}
#table-wrap th:first-child{width:12%}
#table-wrap th:nth-child(2){width:10%}
#table-wrap th:nth-child(3),#table-wrap th:nth-child(4),#table-wrap th:nth-child(5),#table-wrap th:nth-child(6),#table-wrap th:nth-child(7){width:8%}
#table-wrap th:nth-child(8){width:16%}
#table-wrap th:nth-child(9){width:10%}
#table-wrap th:nth-child(10){width:12%}


/* Compact date column and readable on-call headings in saved PDFs. */
.ore-report th,.ore-report td{padding-left:1mm;padding-right:1mm}
.ore-report th:first-child{width:18%}
.ore-report thead th:nth-child(2){width:9%}
.ore-report thead th:nth-child(3){width:6%}
.ore-report thead th:nth-child(4){width:8%}
.ore-report thead th:nth-child(5){width:5%}
.ore-report thead th:nth-child(6){width:7%}
.ore-report thead th:nth-child(7){width:9%}
.ore-report thead th:nth-child(8){width:10%}
.ore-report thead th:nth-child(9),.ore-report thead th:nth-child(10){width:14%}
.ore-report thead th{white-space:normal;overflow-wrap:normal}
