:root {
  --forest:#073835; --deep:#052d2c; --teal:#007d76; --mint:#dcf3eb;
  --ink:#152e2d; --quiet:#506967; --line:#d9e4e1; --canvas:#f1f5f4;
  --shadow:0 2px 7px rgb(7 50 43 / 6%);
}
body { color:var(--ink); background:var(--canvas); font:15px/1.45 "Segoe UI",Arial,sans-serif; }
[hidden] {display:none!important}
#masthead { padding:0; background:#021719; }
#masthead picture {display:block;}
#masthead img { display:block; width:100%; height:auto; }
@media (max-width:959.98px) {
  #masthead picture { aspect-ratio:16 / 9; }
  #masthead img { height:100%; object-fit:contain; }
}
.portal-shell {min-height:50vh; }
main {margin:0; padding:0 clamp(12px,2vw,30px) 28px; min-width:0; max-width:none;}
.portal-bar {display:flex;align-items:center;justify-content:space-between;gap:14px;min-height:54px;margin:0 calc(-1 * clamp(12px,2vw,30px)) 18px;padding:6px clamp(12px,2vw,30px);background:var(--forest);color:#fff;}
.portal-context,.session-account,#session {display:flex;align-items:center;gap:12px;min-width:0;}
.portal-context {flex-wrap:wrap;column-gap:14px;row-gap:0;}
#portalSubtitle {font-weight:700;letter-spacing:.012em;}
#viewTitle {border-left:1px solid #67918b;padding-left:14px;color:#d9f1ed;}
#session {margin:0;flex-shrink:1;}
.session-account strong {overflow-wrap:anywhere;line-height:1.15;}
#session #settingsButton,#session #refresh {color:white;background:transparent;border:1px solid #56847d;min-height:40px;margin:0;}
#session #settingsButton {width:42px;}
#settingsMenu {z-index:50;color:var(--ink);}
#message:empty {display:none}
#login {max-width:440px;margin:28px auto;padding:clamp(18px,3vw,32px);}
#loginForm button {margin:12px 0 0;width:100%;}
h2,h3,h4 {line-height:1.25;}
h2 {font-size:clamp(21px,2.2vw,29px);letter-spacing:-.032em;}
h3 {font-size:16px;letter-spacing:-.015em;}
section,article {border:1px solid var(--line);border-radius:10px;box-shadow:var(--shadow);min-width:0;overflow-wrap:anywhere;}
button {background:var(--teal);border-color:var(--teal);font-weight:600;}
button.secondary {background:#fff;border-color:#cadaD6;color:var(--forest);}
button:not(:disabled):hover {filter:brightness(.96);}
button:focus-visible,a:focus-visible,select:focus-visible,input:focus-visible,textarea:focus-visible,[tabindex]:focus-visible {outline:3px solid #20aeaa;outline-offset:2px;}
button,input,textarea,select {border-radius:7px;}
nav svg,.overview-icon {width:20px;height:20px;flex:none;fill:none;stroke:currentColor;stroke-width:1.75;stroke-linecap:round;stroke-linejoin:round;}
#appNavigation {background:var(--deep);color:white;}
#appNavigation nav {display:grid;gap:4px;margin:0;}
#appNavigation nav button {display:flex;align-items:center;gap:10px;color:#e0eeec;background:transparent;border:1px solid transparent;min-width:0;margin:0;text-align:left;}
#appNavigation nav button[aria-pressed=true] {background:#097a71;color:#fff;border-color:#25988b;}
#appNavigation nav button:hover {background:#12534e;}
#sidebarVersion {font-size:12px;letter-spacing:.03em;color:#b0cfca;}
#overviewPane {background:transparent;border:0;padding:0;box-shadow:none;}
.overview-heading,.panel-heading {display:flex;align-items:center;justify-content:space-between;gap:12px;}
.overview-heading {margin:0 0 14px;}
.overview-heading h2,.overview-heading button,.panel-heading h3 {margin:0;}
.overview-heading button {padding:8px 14px;}
.dashboard-metrics {display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin-bottom:14px;}
.dashboard-metrics button {--accent:#177253;display:grid;grid-template-columns:32px 1fr;gap:0 9px;align-items:center;text-align:left;margin:0;padding:12px;background:#e5f4ea;border:1px solid #bcdcca;color:var(--ink);box-shadow:var(--shadow);}
.dashboard-metrics button:nth-child(2) {--accent:#087875;background:#e9f5f3;border-color:#bfdfda;}
.dashboard-metrics button:nth-child(3) {--accent:#88600f;background:#fff6e5;border-color:#eddbb6;}
.dashboard-metrics button:nth-child(4) {--accent:#a4464d;background:#fbeff0;border-color:#eccdd1;}
.dashboard-metrics svg {grid-row:span 2;width:25px;height:25px;color:var(--accent);}
.dashboard-metrics span {font-size:12px;font-weight:650;line-height:1.22;}
.dashboard-metrics strong {font-size:24px;line-height:1.1;color:var(--accent);font-variant-numeric:tabular-nums;}
.dashboard-grid {display:grid;grid-template-columns:minmax(0,1.5fr) minmax(0,1fr);align-items:start;gap:12px;}
.dashboard-side,.overview-lists {display:grid;gap:12px;min-width:0;}
.overview-panel,#dashboardCalendar #calendarPanel {margin:0;padding:15px;background:white;border:1px solid var(--line);border-radius:10px;box-shadow:var(--shadow);min-width:0;}
.overview-panel h3,.employee-pay-heading {display:flex;align-items:center;gap:8px;margin:0 0 10px;}
.overview-panel h3 svg {color:var(--teal);width:18px;height:18px;}
#dashboardUpcoming,#dashboardIssues {margin:12px 0;}
.panel-heading {margin-bottom:10px;flex-wrap:wrap;}
.panel-heading h3 {margin:0;}
#dashboardMonth {font-size:13px;width:auto;padding:5px 8px;}
.pay-table-scroll {max-width:100%;max-height:256px;overflow:auto;}
.pay-table {font-size:13px;font-variant-numeric:tabular-nums;}
.pay-table th,.pay-table td {border:0;border-bottom:1px solid var(--line);padding:8px 5px;text-align:right;white-space:nowrap;}
.pay-table th:first-child {white-space:normal;text-align:left;min-width:85px;max-width:190px;}
.pay-table thead th {background:#f2f7f5;color:var(--quiet);position:sticky;top:0;}
.pay-table tfoot {color:var(--forest);font-weight:700;background:#e4f1ec;}
.card-caption,.overview-period,.card-empty {margin:4px 0 8px;color:var(--quiet);font-size:13px;}
button.panel-link {background:transparent;border:0;color:var(--teal);padding:7px 0;margin:4px 0 0;font-size:13px;text-align:left;}
.dashboard-record,.overview-order {display:flex;align-items:center;justify-content:space-between;gap:7px;padding:8px 0;border-bottom:1px solid var(--line);font-size:13px;}
.dashboard-record>div,.overview-order>* {min-width:0;}
.dashboard-record strong,.dashboard-record small {display:block;overflow-wrap:anywhere;}
.dashboard-record small,.overview-order span {font-size:12px;color:var(--quiet);}
.record-state {font-size:11px;padding:3px 6px;border-radius:5px;white-space:nowrap;background:#fff1d8;color:#704c05;}
.record-state.approved {background:#dbf1e5;color:#186342;}
.record-state.rejected {background:#fae5e6;color:#9c343e;}
button.overview-order {background:transparent;border:0;border-bottom:1px solid var(--line);border-radius:0;width:100%;margin:0;text-align:left;overflow-wrap:anywhere;}
button.overview-order strong {font-weight:650;}
#dashboardReviewList,#dashboardExpiryList,#dashboardUpcomingList,#dashboardIssueList,[data-overview] {max-height:250px;overflow:auto;color:var(--quiet);font-size:13px;}
[data-overview="upcoming"],[data-overview="upcoming-more"] {max-height:none;overflow:visible;}
.overview-more-orders > summary {min-height:44px;padding:12px 0;line-height:20px;color:var(--teal);cursor:pointer;font-size:13px;font-weight:650;}
.overview-more-orders > summary:focus-visible {outline:2px solid var(--teal);outline-offset:2px;}
.overview-more-orders:not([open]) .overview-less-label,.overview-more-orders[open] .overview-more-label {display:none;}
#dashboardExpiryList .deadline-expired {border-left:3px solid #b1474e;padding-left:7px;}
#dashboardExpiryList .deadline-upcoming {border-left:3px solid #d39a31;padding-left:7px;}
.dashboard-grid .cal-day {min-height:40px;padding:4px;}
#dashboardCalendar {min-width:0;}
.cal-legend {flex-wrap:wrap;}
#overviewContent {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;align-items:start;}
.overview-lists {grid-column:1/-1;grid-template-columns:repeat(2,minmax(0,1fr));}
[data-worker-panel=confirm] {grid-column:1/-1;}
.overview-breakdown {margin:0;}
.vacation-toolbar {display:flex;flex-wrap:wrap;gap:12px;}
.vacation-toolbar input {width:7em;}
#vacationOverview {margin:10px 0 18px;overflow-wrap:anywhere;}
#vacationOverview summary {cursor:pointer;padding:9px 0;font-weight:650;}
#vacationOverview ul {padding-left:20px;}
#vacationOverview .overview-breakdown>div:last-child {background:#e0f2e9;}
.vacation-notice {background:#fff5de;padding:10px 12px;border-radius:6px;margin-bottom:12px;}
.vacation-notice ul {margin:4px 0;}
.receipt-list {padding:0;list-style:none;}
.receipt-list li {border-bottom:1px solid var(--line);padding:8px 0;overflow-wrap:anywhere;}
.receipt-list li>div,.receipt-pages {display:flex;align-items:center;gap:8px;flex-wrap:wrap;}
.receipt-list button {min-height:44px;margin:4px 0;}
.receipt-error {color:#a51d32;}
.receipt-error:empty,.receipt-list:empty {display:none;}
#trips output {display:block;margin:8px 0;}
.driving-error {color:#8d2626;margin:6px 0 10px;}
.driving-conflict {outline:1px solid #b63838;background:#ffe4e4;border-radius:6px;padding:6px 8px;}
#receiptPreview {max-width:min(720px,calc(100% - 20px));width:100%;box-sizing:border-box;overflow-wrap:anywhere;}
#receiptPreview img,#receiptPreview canvas {display:block;max-width:100%;height:auto;margin:auto;}
.approved-report-actions {display:grid;gap:8px;background:#f2f7f5;border:1px solid var(--line);padding:14px;margin:12px 0;}
.approved-report-actions h4,.approved-report-actions p,.approved-report-actions button {margin:0;}
.approved-report-actions p {color:var(--quiet);overflow-wrap:anywhere;}
.approved-report-actions button {min-height:44px;}
.duty-note {display:block;font-size:12px;color:#50655d;line-height:1.35;}
.duty-details {margin:8px 0;}
.duty-details summary {cursor:pointer;padding:6px 0;}
.overview-breakdown>div {display:flex;align-items:center;justify-content:space-between;gap:10px;border-bottom:1px solid #eaf0ee;padding:5px 7px;font-size:14px;}
.overview-breakdown dt {display:flex;align-items:center;gap:8px;}
.overview-breakdown dd {margin:0;white-space:nowrap;font-weight:650;font-variant-numeric:tabular-nums;}
.employee-month-rows>div:nth-child(odd) {background:#f4f7f6;}
.employee-month-rows>div:last-child,.employee-pay-rows>div:last-child {background:#dcf2e5;color:#195c40;}
.employee-pay-rows>div:first-child {background:#ecf4fb;color:#2e5877;}
.employee-summary .overview-icon {color:var(--teal);width:17px;height:17px;}
#newOrdersNotice:not([hidden]) {margin:0 0 10px;background:#fff5dc;border-color:#e5cb90;color:#77511d;}
#pullRefreshStatus {position:fixed;top:10px;left:50%;transform:translateX(-50%);z-index:35;border-radius:999px;background:var(--forest);color:white;padding:7px 14px;pointer-events:none;}
.absence-card p {margin:5px 0;}
.availability-check {display:inline-flex;align-items:center;gap:6px;margin:0;}
.availability-check input {width:auto;margin:0;accent-color:#7e22ce;}
.availability-actions {display:flex;gap:8px;flex-wrap:wrap;align-items:center;}
#availabilityTimes {margin:8px 0;padding:7px 10px;grid-template-columns:repeat(2,minmax(0,1fr));}
#availabilityTimes small {grid-column:1/-1;}
.legend-dot.available {background:#7e22ce;}
.calendar-availability {display:grid;gap:2px;min-width:0;color:#7e22ce;}
.calendar-availability-name {background:#f3e8ff;color:#7e22ce;font-size:11px;font-weight:700;line-height:1.3;border-radius:3px;padding:1px 3px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.calendar-availability-name.partial {box-shadow:inset 2px 0 #8d2626;}
.calendar-availability-name.occupied {box-shadow:inset 2px 0 #8d2626;text-decoration:line-through;}
.calendar-availability-more {font-size:10px;font-weight:700;line-height:1.1;}
#calendarAvailabilityDetails summary {cursor:pointer;font-weight:700;padding:7px 0;}
.calendar-availability-list {padding:0;margin:4px 0;list-style:none;max-height:220px;overflow:auto;}
.calendar-availability-list li,#availabilityList .availability-card {background:#f3e8ff;border-radius:6px;border:1px solid #dfcaed;padding:9px 12px;margin:5px 0;overflow-wrap:anywhere;}
.calendar-availability-list strong,#availabilityList .availability-card h3 {color:#7e22ce;}
.calendar-availability-list p {margin:4px 0;}
.availability-busy {color:#8d2626;font-weight:650;}
.availability-note {white-space:pre-wrap;}
@media(max-width:620px){
  .calendar-availability-name {font-size:9px;padding-inline:1px;}
  .calendar-availability-more {font-size:9px;}
}
.vacation-month {border-top:1px solid var(--line);padding-top:8px;}
.vacation-month .grid {grid-template-columns:repeat(auto-fit,minmax(min(160px,100%),1fr));}
#vacationMonthsDetails summary,.duty-issue summary {cursor:pointer;}
@media(min-width:960px) {
  .portal-shell.signed-in {display:grid;grid-template-columns:clamp(178px,15vw,220px) minmax(0,1fr);align-items:start;background:linear-gradient(to right,var(--deep) clamp(178px,15vw,220px),var(--canvas) 0);}
  .portal-shell.signed-in>main {grid-column:2;grid-row:1;}
  #appNavigation {position:sticky;top:0;grid-column:1;grid-row:1;display:flex;flex-direction:column;min-height:calc(100vh - 15.2394107vw);max-height:100vh;overflow:auto;padding:8px 10px 14px;}
  #appNavigation nav button {padding:10px;min-height:44px;font-size:14px;}
  #sidebarVersion {margin:auto 10px 0;padding-top:28px;}
}
@media(max-width:959px) {
  .portal-shell.signed-in main {padding-bottom:calc(76px + env(safe-area-inset-bottom));}
  #appNavigation {position:fixed;z-index:18;bottom:0;left:0;right:0;border-top:1px solid #40736d;box-shadow:0 -2px 10px #09393319;}
  #appNavigation nav {grid-auto-flow:column;grid-auto-columns:minmax(0,1fr);padding:4px 6px calc(4px + env(safe-area-inset-bottom));gap:3px;}
  #appNavigation nav button {flex-direction:column;align-items:center;justify-content:center;gap:2px;min-height:51px;padding:3px;line-height:1.15;font-size:11px;text-align:center;overflow-wrap:anywhere;}
  #appNavigation #adminMonthlyTab,#sidebarVersion {display:none;}
  .portal-bar {min-height:48px;margin-bottom:12px;}
  .dashboard-grid {grid-template-columns:minmax(0,1.3fr) minmax(0,1fr);}
}
@media(max-width:680px) {
  main {padding-inline:10px;}
  .portal-bar {margin-inline:-10px;padding:5px 10px;gap:8px;}
  .portal-context {display:grid;gap:0;font-size:13px;}
  #viewTitle {border:0;padding:0;font-size:11px;}
  #session {gap:6px;max-width:58%;}
  .session-account {max-width:none;min-width:0;gap:4px;flex-wrap:wrap;justify-content:flex-end;}
  .session-account strong {max-width:120px;font-size:12px;text-align:right;}
  #session #refresh {display:none;}
  .settings-menu {right:0;max-width:calc(100vw - 16px);}
  .dashboard-metrics {grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;}
  .dashboard-metrics button {padding:9px;min-height:60px;}
  .dashboard-grid,#overviewContent,.overview-lists {grid-template-columns:minmax(0,1fr);}
  .dashboard-grid,.dashboard-side,#overviewContent,.overview-lists {gap:9px;}
  .overview-heading {margin-bottom:10px;}
  .overview-heading button {font-size:13px;padding:8px 9px;min-height:44px;}
  .overview-panel,#dashboardCalendar #calendarPanel {padding:12px;}
  .overview-panel h3 {font-size:15px;}
  button.panel-link {min-height:44px;}
  #overviewTitle {overflow-wrap:anywhere;}
  .overview-order {display:grid;}
  .dashboard-grid .cal-day {min-height:44px;}
  .pay-table th,.pay-table td {padding:8px;}
  .pay-table th:first-child {min-width:120px;}
}
@media print {#appNavigation,#masthead,.portal-bar{display:none!important;}}
.dashboard-column {display:grid;gap:12px;min-width:0;}
.employee-overview #newOrdersNotice {display:none;}
#masthead .employee-banner,#employeeSectionLogo {display:none;}
.employee-subpage #masthead,.employee-subpage #portalSubtitle {display:none;}
.employee-subpage .portal-context {display:flex;flex-wrap:nowrap;gap:8px;}
.employee-subpage #employeeSectionLogo {display:block;width:64px;height:auto;flex:none;filter:brightness(0) invert(1);}
.employee-subpage #viewTitle {border:0;padding:0;font-size:14px;font-weight:650;line-height:1.25;overflow-wrap:anywhere;}
@media (min-width:960px) {
  .employee-subpage #appNavigation {min-height:100vh;}
}
@media (max-width:959.98px) {
  .employee-overview #masthead picture {display:none;}
  .employee-overview #masthead .employee-banner {display:block;height:80px;object-fit:contain;}
  .employee-overview .portal-bar,.employee-subpage .portal-bar {min-height:48px;padding-block:2px;margin-bottom:8px;}
  .employee-overview #session #settingsButton,.employee-subpage #session #settingsButton {width:44px;height:44px;}
}
@media(max-width:680px){
  .dashboard-column {gap:9px;}
  #session #refresh {display:inline-grid;place-items:center;width:40px;padding:0;font-size:0;}
  #session #refresh::before {content:"↻";font:22px/1 "Segoe UI Symbol",sans-serif;}
}

.confirmation-row {display:flex;align-items:center;gap:8px;border-bottom:1px solid var(--line);}
.confirmation-row .overview-order {flex:1;min-width:0;overflow-wrap:anywhere;}
.confirmation-row > button {min-height:44px;}
.order-card > summary {overflow-wrap:anywhere;}
@media(max-width:420px){#employeeNavigation button {font-size:10.5px;}}

[data-android-download] {margin-block:16px;}
.apk-download {display:inline-block;padding:10px 14px;border-radius:6px;background:var(--teal);color:white;font-weight:650;}
[data-android-download] small {display:block;margin-top:4px;}
.android-install-guide {margin-top:16px;overflow-wrap:anywhere;}
.android-install-guide h3 {font-size:1rem;margin:0 0 6px;}
.android-install-guide p {margin:0 0 12px;}
.android-install-guide details {border:1px solid var(--line);border-radius:8px;background:var(--canvas);}
.android-install-guide summary {padding:12px;min-height:44px;cursor:pointer;color:var(--forest);font-weight:650;}
.android-install-steps {padding:0 12px 4px;}
.android-install-steps h4 {margin:8px 0 6px;}
.android-install-steps ol {margin:6px 0 14px;padding-inline-start:22px;}
.android-install-steps li+li {margin-top:8px;}
.android-install-steps a {color:var(--forest);}
.calendar-export+span {display:block;font-size:.9rem;}

.back-hint {position:fixed;z-index:55;bottom:80px;left:50%;transform:translateX(-50%);width:max-content;max-width:90vw;background:var(--deep);color:white;border-radius:8px;padding:10px 15px;text-align:center;}
