/* Shared workspace controls: exact values, one visible time field, responsive actions. */
.cg-console{--workflow-ink:#234653;--workflow-line:#c5d8df;--workflow-soft:#f2f8f8}
.cg-console :is(input:not([type=checkbox]):not([type=radio]):not([type=hidden]),select,textarea){box-sizing:border-box;min-width:0;border-radius:9px;border-color:var(--workflow-line);font:inherit;color:var(--workflow-ink);background-color:#fff}
.cg-console :is(input:not([type=checkbox]):not([type=radio]):not([type=hidden]),select){min-height:44px}
.cg-console :is(button,.button){min-height:42px;border-radius:9px;line-height:1.3}
.cg-console :is(input,select,textarea,button,a):focus-visible{outline:3px solid #67b8b5;outline-offset:3px}
.cg-console label{min-width:0}.cg-console small{overflow-wrap:anywhere}
.cg-console .attendance-navigation{display:flex;align-items:end;gap:12px;padding:16px;background:#fff;border:1px solid var(--workflow-line);border-radius:14px;margin:18px 0;flex-wrap:wrap}
.cg-console .attendance-date-form{display:flex;align-items:end;gap:10px;flex:1;flex-wrap:wrap;margin:0}
.cg-console .attendance-date-form label{flex:1 1 125px;max-width:230px;margin:0}
.cg-console .attendance-date-form :is(select,input){width:100%;height:44px;margin:5px 0 0}
.cg-console .attendance-navigation .inline-actions{gap:6px}.cg-console .attendance-navigation .inline-actions a{padding:11px 13px}
.cg-console .attendance-print-menu{position:relative;align-self:center}.cg-console .attendance-print-menu>summary{padding:12px;cursor:pointer;border:1px solid var(--workflow-line);border-radius:9px;font-weight:650}
.cg-console .attendance-print-menu[open]>div{position:absolute;right:0;z-index:10;min-width:230px;display:grid;gap:8px;padding:12px;background:white;border:1px solid var(--workflow-line);border-radius:12px;box-shadow:0 8px 30px #23465320}
.cg-console .status-shortcuts{display:flex;gap:10px;flex-wrap:wrap;margin:16px 0}.cg-console .status-card{display:flex;gap:10px;align-items:center;flex:1 1 120px;padding:12px 16px;text-decoration:none;background:#fff;border:1px solid var(--workflow-line);border-radius:12px;color:var(--workflow-ink);text-align:left}
.cg-console .status-card strong{font-size:1.55rem;font-variant-numeric:tabular-nums}.cg-console .status-card span{font-size:.9rem}.cg-console .status-card:is([aria-pressed=true],[aria-current=page]){background:#e1f3f1;border-color:#197e80;box-shadow:inset 0 -3px #197e80}
.cg-console .roll-tools{display:flex;align-items:end;justify-content:space-between;padding:16px 20px;gap:20px;margin:14px 0}.cg-console .roll-tools .form-grid{margin:0;flex:1}.cg-console .roll-tools p{margin:0 0 10px}
.cg-console .attendance-inputs{display:grid;grid-template-columns:150px minmax(140px,1fr) minmax(140px,1fr) minmax(190px,1.3fr);align-items:start;gap:16px}
.cg-console .attendance-inputs>.reason{grid-column:1 / -1;width:100%;max-width:none}.cg-console .attendance-inputs>.reason textarea{width:100%;min-height:78px;resize:vertical}.cg-console .attendance-inputs>button{grid-column:1 / -1;justify-self:start;min-width:160px}
.cg-console .time-picker{display:flex;flex-direction:column;gap:5px;min-width:0;width:100%}.cg-console .time-entry{display:grid;grid-template-columns:minmax(0,1fr) 44px;gap:0;position:relative;width:100%}.cg-console .time-entry>input{border-radius:9px 0 0 9px;width:100%;margin:0;height:44px}.cg-console .time-choice-button{display:block;position:relative;width:44px;height:44px;overflow:hidden;border:1px solid var(--workflow-line);border-left:0;border-radius:0 9px 9px 0;background:#f2f8f8}.cg-console .time-choice-button:after{content:'⌄';position:absolute;inset:0;display:grid;place-items:center;pointer-events:none;font-weight:700}.cg-console .time-choice-button select.time-choices{position:absolute;inset:0;width:44px!important;min-width:0!important;height:44px;margin:0!important;opacity:0;cursor:pointer;padding:0!important}.cg-console .time-choice-button:focus-within{outline:3px solid #67b8b5;outline-offset:2px}.cg-console .time-hint{display:none}.cg-console .time-now{min-height:30px;padding:5px 0;border:0;background:transparent;font-size:.8rem;text-align:left;box-shadow:none;width:auto;align-self:start}.cg-console .time-feedback{margin:12px 0;color:#246365}
.cg-console .roll-editor{padding:22px}.cg-console .roll-editor>.child-record-link{margin:0 0 15px;display:inline-block}.cg-console .funding-detail{margin:20px 0 0}.cg-console .attendance-checks{margin:16px 0}.cg-console .attendance-checks>summary{padding:15px 18px;font-weight:650;cursor:pointer}.cg-console .attendance-checks .panel{margin:0;border:0;box-shadow:none}
.cg-console .workflow-page{max-width:1320px;margin:0 auto;padding:28px}.cg-console .workflow-page .entry-header{margin-bottom:24px}.cg-console .workflow-page table td small{display:block;max-width:42em;margin-top:6px}
.cg-console .record-checklist{padding:20px}.cg-console .record-checklist ul{list-style:none;padding:0;margin:0;display:grid;grid-template-columns:repeat(auto-fit,minmax(230px,1fr));gap:10px}.cg-console .record-checklist li{border:1px solid #dce7eb;border-radius:10px;padding:12px}.cg-console .record-checklist li a{display:block;font-weight:650;margin-bottom:5px}.cg-console .record-checklist .check-detail{margin:8px 0 0;font-size:.84rem;color:#526c78}.cg-console .record-checklist h2{font-size:1.15rem}
.cg-console .period-presets{display:flex;gap:6px;flex-wrap:wrap;margin:8px 0 12px}.cg-console .period-presets button{font-size:.8rem;min-height:32px;padding:6px 10px;background:#f4f8fa}
.cg-console .report-cards>[data-report-card]{position:relative}.cg-console .report-favourite{float:right;font-size:.83rem;min-height:32px;padding:7px 10px}.cg-console .report-favourite[aria-pressed=true]{background:#fff4d6;border-color:#d3ad4c}.cg-console .report-cards h2{padding-right:90px}.cg-console .report-empty{padding:20px}
.cg-console .task-cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(230px,1fr));gap:16px;margin:20px 0}.cg-console .task-card{background:#fff;border:1px solid var(--workflow-line);border-radius:14px;padding:20px;display:flex;flex-direction:column;gap:10px}.cg-console .task-card h2{font-size:1.2rem;margin:0}.cg-console .task-card p{margin:0;font-size:.9rem}.cg-console .task-card .button{margin-top:auto}.cg-console .workflow-steps{display:flex;gap:10px;flex-wrap:wrap;margin:20px 0}.cg-console .workflow-steps a{flex:1;min-width:160px;padding:16px;background:white;border:1px solid var(--workflow-line);border-radius:12px;text-decoration:none}.cg-console .workflow-steps a strong{display:block;margin-bottom:4px}
.cg-console .desk-visual{margin:16px 0;padding:16px;background:#f5f9fb;border:1px solid var(--workflow-line);border-radius:12px}.cg-console .desk-visual h3{margin:0 0 10px}.cg-console .desk-preview-list{display:grid;gap:8px}.cg-console .desk-preview-person{display:grid;grid-template-columns:180px minmax(0,1fr);gap:12px;align-items:start}.cg-console .desk-preview-person>strong{padding:10px 0}.cg-console .desk-preview-intervals{display:flex;gap:6px;flex-wrap:wrap}.cg-console .desk-interval{padding:10px 12px;text-align:left;border-left:5px solid #277e82!important;min-width:140px}.cg-console .desk-interval small{display:block;font-size:.76rem}.cg-console .desk-interval.activity-Break{border-left-color:#b17e27!important;background:#fff5dc}.cg-console .desk-interval.activity-NonContact{border-left-color:#647bc1!important;background:#edf0fb}.cg-console .desk-interval.activity-Absence{border-left-color:#a37788!important;background:#f7edf2}.cg-console .desk-interval.activity-Contact{background:#e5f3ef}.cg-console .desk-editor tr:focus-within{background:#e9f6f4}.cg-console .desk-editor input:not([type=checkbox]){min-width:80px}.cg-console .desk-editor td:nth-child(2) select{min-width:160px}.cg-console .desk-editor td:nth-child(6) select{min-width:160px}.cg-console .desk-review-diff{font-size:.9rem;padding:14px;border-left:4px solid #318d8b;background:#eef7f6;margin:14px 0}.cg-console .desk-review-diff ul{margin:8px 0;padding-left:20px}.cg-console .staff-time-grid button{padding:6px 8px;min-height:30px;font-size:.82rem;background:transparent;border:0}.cg-console .funding-months .button{white-space:normal}.cg-console [data-funding-day] summary{display:flex;justify-content:space-between;gap:12px}
@media(max-width:850px){.cg-console .attendance-inputs{grid-template-columns:repeat(2,minmax(0,1fr))}.cg-console .roll-tools{display:block}.cg-console .roll-tools p{margin-top:10px}.cg-console .desk-preview-person{grid-template-columns:1fr}.cg-console .attendance-navigation{padding:12px}.cg-console .workflow-page{padding:16px}.cg-console .attendance-date-form{flex-basis:100%}}
@media(max-width:480px){.cg-console .attendance-inputs{grid-template-columns:1fr}.cg-console .status-card{flex-basis:40%;padding:10px}.cg-console .roll-editor{padding:14px}.cg-console .attendance-date-form label{max-width:none}.cg-console .workflow-page table{min-width:650px}}
@media print{.cg-console .status-shortcuts,.cg-console .period-presets,.cg-console .report-favourite,.cg-console .desk-visual,.cg-console .workflow-steps,.cg-console .review-filters{display:none!important}.cg-console .workflow-page{max-width:none;padding:0}.cg-console .attendance-checks>summary{display:none}.cg-console .record-checklist li{break-inside:avoid}}

.cg-console .report-cards label:has(>select[name=report]){grid-column:1 / -1}

/* Dedicated MOE and funding reviews share the selected period and source links. */
.cg-console .funding-links{margin:12px 0 20px}.cg-console .funding-period{flex-wrap:wrap}.cg-console [data-child-hours] small,.cg-console [data-monthly-reconciliation] small{display:block}.cg-console #rs7-staff>h2{margin:24px 0 12px}
@media print{.cg-console .funding-links,.cg-console .funding-period{display:none!important}.cg-console [data-child-hours],.cg-console [data-monthly-reconciliation]{font-size:9pt}.cg-console #rs7-staff{break-inside:auto}}

/* MOE review tools preserve the existing table overflow and print behaviour. */
.practice-steps { padding-left: 1.5rem; }
.practice-steps li { padding: .8rem 0; border-bottom: 1px solid var(--border, #dbe4e7); }
.practice-steps label { font-weight: 650; }
.practice-steps input { width: auto; margin-right: .5rem; }
.evidence-digest { overflow-wrap: anywhere; }
[data-walkthrough-progress] { font-weight: 650; color: #125f66; }

/* Historical review uses existing forms and print tables; long evidence IDs wrap. */
.correction-workspace { max-width: 1440px; margin-inline: auto; }
.correction-workspace .evidence-digest { overflow-wrap: anywhere; }
.correction-workspace .table-wrap small { display: block; }

.correction-workspace .table-wrap { max-width: 100%; overflow-x: auto; }
.correction-workspace .form-grid > label { min-width: 0; }
.correction-workspace select { max-width: 100%; }
@media print { .correction-workspace .table-wrap { overflow: visible; } .correction-workspace button, .correction-workspace nav { display: none; } }

/* Keep absence evidence and its source links readable on narrow screens. */
@media screen and (max-width: 640px) {
  .cg-console table:is(.absence-months,.te-kura-workings,.exemption-place-checks,.makeup-day-checks), .cg-console table:is(.absence-months,.te-kura-workings,.exemption-place-checks,.makeup-day-checks) tbody, .cg-console table:is(.absence-months,.te-kura-workings,.exemption-place-checks,.makeup-day-checks) tr, .cg-console table:is(.absence-months,.te-kura-workings,.exemption-place-checks,.makeup-day-checks) td {
    display: block; width: 100%; min-width: 0; max-width: 100%; box-sizing: border-box;
  }
  .cg-console table:is(.absence-months,.te-kura-workings,.exemption-place-checks,.makeup-day-checks) thead { display: none; }
  .cg-console table:is(.absence-months,.te-kura-workings,.exemption-place-checks,.makeup-day-checks) tr { padding: .5rem 0; border-bottom: 1px solid var(--line, #dce5e8); }
  .cg-console table:is(.absence-months,.te-kura-workings,.exemption-place-checks,.makeup-day-checks) td { padding: .6rem .75rem; border: 0; white-space: normal; overflow-wrap: anywhere; }
  .cg-console table:is(.absence-months,.te-kura-workings,.exemption-place-checks,.makeup-day-checks) td::before { content: attr(data-label); display: block; font-weight: 700; margin-bottom: .3rem; }
  .cg-console table:is(.absence-months,.te-kura-workings,.exemption-place-checks,.makeup-day-checks) ul { padding-left: 1.25rem; }
}

/* Funding amount review: maintain readable totals and horizontal category tables. */
.cg-console .funding-money-summary{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:18px 0}
.cg-console .funding-analysis-summary{grid-template-columns:repeat(3,minmax(0,1fr))}
.cg-console .funding-money-summary .stat-card{padding:18px;border:1px solid var(--line);border-radius:8px;background:#f5f8f3;min-width:0}
.cg-console .funding-money-summary .stat-card span{display:block;font-size:12px;color:var(--muted)}
.cg-console .funding-money-summary .stat-card strong{display:block;font-size:23px;line-height:1.3;margin-top:7px;overflow-wrap:anywhere}
.cg-console .funding-money-table{min-width:760px}
.cg-console :is(.funding-calculator,.funding-analysis) .form-footer{grid-column:1/-1}
@media screen and (max-width:640px){.cg-console .funding-money-summary{grid-template-columns:1fr}.cg-console .funding-calculator .form-grid{grid-template-columns:1fr}}
@media print{.cg-console .funding-money-summary{grid-template-columns:repeat(2,minmax(0,1fr));break-inside:avoid}.cg-console .funding-money-table{min-width:0;font-size:10px}}

@media print{.cg-console .funding-calculator .panel{break-inside:auto;padding:10px;margin:12px 0}.cg-console .funding-calculator :is(nav,.inline-actions,.page-heading>a){display:none!important}.cg-console .funding-calculator :is(th,td){padding:6px;white-space:normal}.cg-console .funding-calculator tr{break-inside:avoid}.cg-console .funding-calculator .stat-card{padding:10px}.cg-console .funding-calculator .stat-card strong{font-size:18px}.cg-console .funding-calculator h2{break-after:avoid}.cg-console .funding-calculator .digest{overflow-wrap:anywhere}}

/* Keep eligibility choices and evidence readable without shrinking their controls. */
@media screen and (max-width: 1100px) {
  .funding-place-entry, .funding-place-entry tbody { display: block; width: 100%; min-width: 0; }
  .funding-place-entry thead { display: none; }
  .funding-place-entry tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; padding: 1rem 0; border-bottom: 1px solid var(--line, #d4dfe1); }
  .funding-place-entry td { display: block; min-width: 0; padding: 0; border: 0; }
  .funding-place-entry td:first-child, .funding-place-entry td:last-child { grid-column: 1 / -1; }
  .funding-place-entry textarea { min-height: 5rem; }
}
@media screen and (max-width: 540px) {
  .funding-place-entry tr { grid-template-columns: minmax(0, 1fr); }
}
.funding-place-entry .absence-fee-review { min-width: 14rem; max-width: 28rem; }
@media screen and (max-width:1100px){.funding-place-entry .absence-fee-review{min-width:0;max-width:none}}
@media print{.console-workspace #main-content{outline:0}.console-workspace .topbar{display:none!important}.console-workspace .main-shell{display:block;min-width:0;width:100%}}
@media print{.cg-console [data-makeup-checks]{break-inside:avoid}.cg-console .makeup-day-checks thead{display:table-header-group}.cg-console .makeup-day-checks tr{break-inside:avoid}}
.funding-guide-steps { padding-left: 1.5rem; }
.funding-guide-steps li { margin-bottom: 1.25rem; line-height: 1.7; }
[data-funding-learning] [data-learning-result] { margin-top: 1rem; font-size: 1.15rem; }

/* Funding evidence remains readable without hiding fields on narrow screens. */
@media (max-width: 600px) {
  .emergency-workings thead { display: none; }
  .emergency-workings, .emergency-workings tbody, .emergency-workings tr, .emergency-workings td { display: block; width: 100%; }
  .emergency-workings tr { margin-bottom: 1rem; border-bottom: 2px solid var(--border, #d8e0e3); }
  .emergency-workings td::before { content: attr(data-label); display: block; font-weight: 700; margin-bottom: .25rem; }
  .emergency-funding .record-foot { flex-wrap: wrap; }
}
@media print { [data-emergency-workings] h2 { break-after: avoid; } .emergency-funding form, .emergency-funding .page-heading > a { display: none; } }
/* Keep each retained correction comparison row together on printed pages. */
@media print {
  .rs7-source-reconciliation { break-inside:auto; page-break-inside:auto; }
  .rs7-source-reconciliation thead { display:table-header-group; }
  .rs7-source-reconciliation tr { break-inside:avoid; page-break-inside:avoid; }
  .rs7-source-reconciliation table { table-layout:fixed; min-width:0; width:100%; }
  .rs7-source-reconciliation th,.rs7-source-reconciliation td { overflow-wrap:anywhere; font-size:8pt; padding:4pt; }
}

/* Retained evidence hashes stay complete at narrow widths and in print. */
.cg-console .digest{overflow-wrap:anywhere;word-break:break-word}
@media print{.provider-evidence nav,.provider-evidence .provider-history{display:none!important}.provider-evidence>.panel{break-inside:auto}.provider-evidence article{break-inside:avoid}.provider-evidence h2,.provider-evidence h3{break-after:avoid}}
