* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: "Segoe UI", Arial, sans-serif;
  margin: 0;
  background: #f5f6f8;
  color: #222;
  overflow-x: hidden;
}
.forecast-controls { margin-bottom: 16px; }
.date-stepper { display: flex; align-items: stretch; gap: 4px; }
.date-stepper input { flex: 1; min-width: 0; }
.date-step { display: inline-flex; align-items: center; justify-content: center; min-width: 38px; min-height: 38px; padding: 0 10px; border: 0; border-radius: 4px; background: #2c3e50; color: #fff; font: inherit; font-size: 18px; line-height: 1; text-decoration: none; cursor: pointer; }
.inline-form .date-stepper .date-step { width: auto; min-width: 38px; padding: 0 10px; }
.date-step:hover { background: #3d5570; }
.date-step:focus-visible { outline: 2px solid #4a7ebb; outline-offset: 1px; }
.forecast-stat-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.forecast-factor { font-size: 22px; }
.forecast-chart { min-height: 220px; }
.forecast-bar { background: #4a7ebb; }
.actual-bar { background: #b8860b; }
.forecast-swatch { background: #4a7ebb; }
.actual-swatch { background: #b8860b; }
.forecast-info-grid .dashboard-panel h2 { margin-top: 0; font-size: 18px; }
.forecast-facts { margin: 0; }
.forecast-facts div { display: flex; justify-content: space-between; gap: 16px; padding: 9px 0; border-top: 1px solid #eef0f2; }
.forecast-facts dt { color: #666; }
.forecast-facts dd { margin: 0; text-align: right; font-weight: 600; }
.brand-icon { width: 22px; height: 22px; border-radius: 4px; }
.sidebar-nav { position: fixed; inset: 0 auto 0 0; z-index: 900; display: flex; width: 240px; flex-direction: column; background: #263746; color: #dbe5ec; box-shadow: 1px 0 5px rgba(20, 30, 40, 0.18); }
.sticky-nav-disabled .sidebar-nav { position: absolute; }
.sidebar-brand { display: flex; align-items: center; gap: 9px; min-height: 62px; padding: 14px 16px; border-bottom: 1px solid rgba(255, 255, 255, 0.1); color: #fff; font-weight: 700; }
.sidebar-close { display: none; width: 36px; height: 36px; margin-left: auto; padding: 0; border: 0; background: transparent; color: #fff; font-size: 28px; line-height: 1; cursor: pointer; }
.sidebar-scroll { flex: 1; padding: 10px; overflow-y: auto; }
.sidebar-group { margin-bottom: 15px; }
.sidebar-group-label { display: block; padding: 5px 10px; color: #8fa6b7; font-size: 10px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.sidebar-nav a, .sidebar-section summary { display: flex; align-items: center; gap: 10px; min-height: 39px; padding: 8px 10px; border-radius: 4px; color: #d6e0e8; text-decoration: none; font-size: 14px; cursor: pointer; }
.sidebar-nav a > span, .sidebar-section summary > span { width: 20px; color: #a9bdca; text-align: center; font-size: 17px; }
.sidebar-nav a > .forecast-nav-icon img { display: block; width: 100%; height: 20px; object-fit: contain; }
.sidebar-section summary > .schedule-nav-icon img { display: block; width: 100%; height: 20px; object-fit: contain; }
.sidebar-account a > .settings-nav-icon img { display: block; width: 100%; height: 20px; object-fit: contain; }
.sidebar-nav a:hover, .sidebar-section summary:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }
.sidebar-nav a.active, .sidebar-section summary.active { background: #3f6078; color: #fff; }
.sidebar-section summary { list-style: none; }
.sidebar-section summary::-webkit-details-marker { display: none; }
.sidebar-section summary::after { content: "›"; margin-left: auto; color: #9db3c4; font-size: 18px; transform: rotate(0); transition: transform 0.15s ease; }
.sidebar-section[open] summary::after { transform: rotate(90deg); }
.sidebar-subnav { margin: 2px 0 4px 30px; padding-left: 10px; border-left: 1px solid rgba(255, 255, 255, 0.16); }
.sidebar-subnav a { min-height: 32px; padding: 5px 9px; color: #b9c9d4; font-size: 13px; }
.sidebar-account { display: grid; grid-template-columns: 1fr auto; gap: 4px; padding: 12px; border-top: 1px solid rgba(255, 255, 255, 0.1); }
.sidebar-account .username { grid-column: 1 / -1; padding: 0 7px 6px; color: #9db3c4; font-size: 12px; overflow-wrap: anywhere; }
.sidebar-account a { min-height: 34px; justify-content: center; padding: 6px 8px; background: rgba(255, 255, 255, 0.06); font-size: 12px; }
.nav-toggle, .nav-backdrop { display: none; }

main { width: min(1100px, 100%); margin: 0 auto; padding: 20px; }
main.with-sidebar { width: min(1100px, calc(100% - 240px)); margin-right: 0; margin-left: calc(240px + max(0px, (100vw - 1340px) / 2)); }

h1 { margin-top: 0; }
.note { color: #555; }
.muted { color: #888; font-style: italic; }

.subnav { margin-bottom: 16px; }
.subnav a {
  display: inline-block;
  padding: 6px 14px;
  margin-right: 6px;
  border-radius: 4px;
  text-decoration: none;
  color: #2c3e50;
  background: #e6e9ed;
}
.subnav a.active { background: #2c3e50; color: #fff; }

.flashes { list-style: none; padding: 0; margin-bottom: 16px; }
.flash-error { background: #f8d7da; color: #842029; padding: 8px 12px; border-radius: 4px; margin-bottom: 6px; }
.flash-success { background: #d1e7dd; color: #0f5132; padding: 8px 12px; border-radius: 4px; margin-bottom: 6px; }

.auth-box { max-width: 360px; margin: 60px auto; background: #fff; padding: 24px; border-radius: 6px; }
.auth-box label { display: block; margin-bottom: 12px; }
.auth-box input { width: 100%; min-height: 42px; padding: 8px 10px; margin-top: 4px; }
.auth-box button { width: 100%; min-height: 42px; padding: 8px 14px; background: #2c3e50; color: #fff; border: none; border-radius: 4px; cursor: pointer; }
.auth-box button:hover { background: #3d5570; }

.inline-form {
  background: #fff;
  padding: 12px 16px;
  border-radius: 6px;
  margin-bottom: 16px;
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 12px;
}
.inline-form label { display: flex; flex-direction: column; font-size: 13px; color: #444; gap: 4px; }
.field-hint { color: #777; font-size: 11px; font-weight: normal; }
.inline-form input, .inline-form select { padding: 5px 7px; }
.inline-form input, .inline-form select { min-height: 38px; }
.inline-form button { padding: 7px 14px; background: #2c3e50; color: #fff; border: none; border-radius: 4px; cursor: pointer; }
.inline-form button:hover { background: #3d5570; }
.inline-form button.danger { background: #b00020; }
.inline-form button.danger:hover { background: #d1364e; }

.days-fieldset { border: 1px solid #ddd; border-radius: 4px; padding: 6px 10px; display: flex; gap: 8px; }
.days-fieldset legend { font-size: 12px; color: #666; }
.day-check { flex-direction: row !important; align-items: center; gap: 4px !important; }

table.data-table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 6px; overflow: hidden; }
table.data-table th, table.data-table td { padding: 8px 10px; text-align: left; border-bottom: 1px solid #eee; }
table.data-table th { background: #f0f2f5; font-size: 13px; }
table.data-table th a { color: inherit; text-decoration: none; }
table.data-table button { padding: 4px 10px; background: #b00020; color: #fff; border: none; border-radius: 4px; cursor: pointer; }
table.data-table button.button-link { background: #2c3e50; }
table.data-table button.button-link:hover { background: #3d5570; }
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: 6px; margin-bottom: 16px; }
.table-scroll { scrollbar-width: thin; }
.table-scroll table.data-table, .table-scroll table.calendar { margin-bottom: 0; min-width: 480px; }
.row-actions { display: flex; gap: 6px; align-items: center; }
.employee-dates-form { display: flex; gap: 5px; align-items: center; }
.employee-dates-form input { min-width: 132px; padding: 4px 6px; }
.employee-dates-form button { padding: 4px 8px !important; background: #2c3e50 !important; }
.button-link {
  display: inline-block; padding: 4px 10px; background: #2c3e50; color: #fff;
  border-radius: 4px; text-decoration: none; font-size: 13px;
}
.button-link:hover { background: #3d5570; }
.modal-open-button, button.button-link { border: 0; cursor: pointer; font: inherit; }
.availability-modal {
  width: min(560px, calc(100vw - 28px)); max-height: calc(100vh - 28px); padding: 0;
  border: 0; border-radius: 6px; box-shadow: 0 18px 55px rgba(24, 36, 48, 0.28);
}
.availability-modal::backdrop { background: rgba(20, 30, 40, 0.58); }
.modal-heading { display: flex; align-items: start; justify-content: space-between; gap: 16px; padding: 18px 20px 12px; border-bottom: 1px solid #e3e7ea; }
.modal-heading h2 { margin: 0; font-size: 20px; }
.modal-close { width: 34px; height: 34px; padding: 0; border: 0; background: transparent; color: #56616b; font-size: 28px; line-height: 1; cursor: pointer; }
.modal-form { display: grid; gap: 12px; padding: 16px 20px 20px; overflow-y: auto; }
.modal-form > label, .modal-form-row label { display: flex; flex-direction: column; gap: 4px; color: #444; font-size: 13px; }
.modal-form input, .modal-form select, .modal-form textarea { width: 100%; min-height: 38px; padding: 7px 9px; border: 1px solid #c9d0d6; border-radius: 4px; background: #fff; font: inherit; }
.modal-form textarea { resize: vertical; }
.all-day-field { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; color: #444; font-size: 13px; }
.modal-form .day-check { display: block; line-height: 1; }
.modal-form input[type="checkbox"] { width: auto; min-height: 0; margin: 0; padding: 0; }
.policy-override-field { display: grid; gap: 8px; padding: 10px; border: 1px solid #d9c790; border-radius: 4px; background: #fffaf0; }
.policy-override-field > label { display: flex; flex-direction: column; gap: 4px; color: #444; font-size: 13px; }
.override-badge { display: inline-block; margin-left: 4px; padding: 2px 5px; border-radius: 3px; background: #fff0c2; color: #765b09; font-size: 10px; font-weight: 700; text-transform: uppercase; }
.override-history { margin-top: 5px; font-size: 12px; }
.override-history summary { color: #365b78; cursor: pointer; }
.override-history div { margin-top: 6px; padding: 7px; border-left: 2px solid #c9aa4d; background: #fffaf0; white-space: normal; }
.modal-form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; padding-top: 4px; }
.modal-actions button { padding: 8px 12px; border: 0; border-radius: 4px; background: #2c3e50; color: #fff; cursor: pointer; }
.modal-actions button.secondary { border: 1px solid #c9d0d6; background: #fff; color: #2c3e50; }
.time-off-tabs { display: flex; align-items: flex-end; gap: 3px; margin: 0 0 -1px; padding: 0 8px; overflow-x: auto; border-bottom: 1px solid #b9a879; background: transparent; scrollbar-width: thin; }
.time-off-tabs button { position: relative; z-index: 1; display: inline-flex; align-items: center; gap: 7px; flex: 1 0 auto; min-height: 40px; padding: 8px 18px 7px; border: 1px solid #c5b486; border-bottom-color: #b9a879; border-radius: 7px 7px 0 0; background: #dfd2a8; color: #4b4432; box-shadow: inset 0 1px rgba(255, 255, 255, 0.55); font: inherit; font-size: 14px; cursor: pointer; }
.time-off-tabs button::after { content: ""; position: absolute; right: 8px; bottom: 4px; left: 8px; height: 1px; background: rgba(99, 83, 45, 0.12); }
.time-off-tabs button[aria-selected="true"] { z-index: 2; min-height: 45px; margin-bottom: -1px; border-color: #b9a879; border-bottom-color: #fff; background: #fff; color: #20384d; box-shadow: 0 -2px 5px rgba(65, 53, 28, 0.10); font-weight: 600; }
.time-off-tabs button[aria-selected="true"]::after { display: none; }
.tab-icon { display: inline-grid; width: 21px; height: 21px; place-items: center; border-radius: 3px; background: rgba(255, 255, 255, 0.42); color: #66582f; font-size: 15px; line-height: 1; }
.tab-icon img { display: block; width: 100%; height: 100%; object-fit: contain; }
.time-off-tabs button[aria-selected="true"] .tab-icon { background: #edf2f5; color: #365b78; }
.time-off-tabs button:focus-visible { outline: 2px solid #4a7ebb; outline-offset: 1px; }
.animated-tab-icon img { transform-origin: 50% 85%; }
.time-off-tabs button:hover .animated-tab-icon img, .time-off-tabs button:focus-visible .animated-tab-icon img { animation: tab-icon-wiggle 0.6s ease-in-out infinite; }
@keyframes tab-icon-wiggle {
  0%, 100% { transform: rotate(0); }
  25% { transform: rotate(-12deg) translateY(-1px); }
  50% { transform: rotate(10deg); }
  75% { transform: rotate(-8deg) translateY(-1px); }
}
@media (prefers-reduced-motion: reduce) {
  .time-off-tabs button:hover .animated-tab-icon img, .time-off-tabs button:focus-visible .animated-tab-icon img { animation: none; }
}
.time-off-tab-panel[hidden] { display: none; }
.time-off-tab-panel { padding-top: 16px; border-top: 0; }
.time-off-tab-panel > .dashboard-panel:last-child { margin-bottom: 16px; }
.balance-toolbar { display: flex; align-items: end; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.balance-toolbar label { display: flex; flex-direction: column; gap: 4px; color: #444; font-size: 13px; }
.balance-toolbar select { min-height: 38px; padding: 5px 30px 5px 8px; }
.balance-toolbar .panel-meta { padding-bottom: 8px; }
.leave-balance-table th[aria-sort] { white-space: nowrap; }
.leave-balance-table .balance-sort { display: inline-flex; align-items: center; gap: 5px; padding: 0; border: 0; border-radius: 0; background: transparent; color: inherit; font: inherit; font-weight: 600; cursor: pointer; }
.leave-balance-table .balance-sort:hover { background: transparent; color: #365b78; }
.leave-balance-table .balance-sort span { color: #71808d; font-size: 12px; }
.policy-settings-form { align-items: end; }
.inline-form .setting-check { flex-direction: row; align-items: center; align-self: center; gap: 7px; }
.inline-form .setting-check input[type="checkbox"] { width: auto; min-height: 0; margin: 0; }

tr.row-gap { color: #b00020; }
tr.row-overlap { color: #b8860b; }
tr.row-ok { color: #1a7a1a; }
tr.row-understaffed { color: #b00020; }
tr.row-overstaffed { color: #b8860b; }
tr.row-balanced { color: #1a7a1a; }

.summary { font-weight: bold; padding: 8px 0; }
.summary-bad { color: #b00020; }
.summary-good { color: #1a7a1a; }

.two-col { display: flex; gap: 20px; }
.two-col .panel { flex: 1; background: #fff; padding: 14px; border-radius: 6px; }

.preview-box { background: #fff; padding: 14px; border-radius: 6px; margin-bottom: 16px; }
.preview-gap { color: #b00020; }
.preview-ok { color: #1a7a1a; }
.impact-summary { margin: -4px 0 12px; padding: 9px 10px; border-left: 3px solid #4a7ebb; background: #f4f7fa; color: #444; font-size: 13px; }

/* Monthly calendar */
.cal-header { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.cal-title { font-weight: bold; font-size: 16px; }
.cal-nav { text-decoration: none; padding: 4px 10px; background: #2c3e50; color: #fff; border-radius: 4px; }
table.calendar { width: 100%; border-collapse: collapse; table-layout: fixed; }
table.calendar th { padding: 6px; background: #e6e9ed; }
table.calendar td.cal-cell { border: 1px solid #ddd; height: 70px; vertical-align: top; padding: 0; }
table.calendar td.cal-cell a { display: block; height: 100%; padding: 6px; text-decoration: none; color: #222; }
table.calendar td.cal-blank { background: #fafafa; }
.cal-day { display: block; font-weight: bold; }
.cal-info { display: block; font-size: 11px; color: #555; }
.cal-working { background: #e6f4ea; }
.cal-empty { background: #f0f0f0; }
.cal-holiday { background: #f8d7da; }
.cal-today a { outline: 2px solid #2c3e50; }

/* Daily timeline */
.timeline { background: #fff; border-radius: 6px; padding: 10px; overflow-x: auto; }
.timeline-header { display: flex; padding-left: 140px; }
.timeline-hour-label { width: 34px; font-size: 10px; color: #666; flex-shrink: 0; }
.timeline-row { display: flex; align-items: center; height: 30px; border-top: 1px solid #f0f0f0; }
.timeline-name { width: 140px; flex-shrink: 0; font-size: 13px; }
.timeline-track { position: relative; flex: 1; height: 22px; background: #fafafa; min-width: 612px; }
.timeline-bar {
  position: absolute; top: 0; height: 100%;
  background: #4a7ebb; color: #fff; font-size: 10px;
  overflow: hidden; white-space: nowrap; border-radius: 3px;
  display: flex; align-items: center; justify-content: center;
}

/* Bar chart */
.bar-chart { display: flex; align-items: flex-end; gap: 6px; height: 200px; background: #fff; border-radius: 6px; padding: 10px; overflow-x: auto; }
.bar-col { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; min-width: 36px; }
.bar { width: 26px; background: #4a7ebb; border-radius: 2px 2px 0 0; display: flex; align-items: flex-start; justify-content: center; }
.bar-value { font-size: 10px; color: #222; margin-top: -16px; }
.bar-label { font-size: 10px; color: #555; margin-top: 4px; }

.chart-presets { margin-bottom: 12px; }
.chart-presets a {
  display: inline-block; margin-right: 6px; padding: 4px 10px;
  background: #e6e9ed; border-radius: 4px; text-decoration: none; color: #2c3e50; font-size: 13px;
}

/* Today dashboard */
.dashboard-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
.dashboard-heading h1 { margin-bottom: 4px; }
.eyebrow { margin: 0 0 6px; color: #4a7ebb; font-size: 12px; font-weight: bold; letter-spacing: 0.08em; text-transform: uppercase; }
.dashboard-heading .note { margin: 0; }
.stat-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin-bottom: 20px; }
.stat-card, .dashboard-panel { background: #fff; border-radius: 6px; }
.stat-card { padding: 15px; border-top: 3px solid #4a7ebb; }
.stat-card-alert { border-top-color: #b00020; }
.stat-label, .stat-detail, .panel-meta { display: block; color: #666; font-size: 12px; }
.stat-value { display: block; margin: 4px 0; color: #2c3e50; font-size: 28px; line-height: 1; }
.stat-card-alert .stat-value { color: #b00020; }
.dashboard-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; margin-bottom: 20px; }
.dashboard-panel { padding: 16px; margin-bottom: 20px; }
.dashboard-grid .dashboard-panel { margin-bottom: 0; }
.panel-heading { display: flex; align-items: start; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.panel-heading h2 { margin: 0 0 3px; font-size: 18px; }
.text-link { color: #2c3e50; font-size: 13px; white-space: nowrap; }
.people-list { list-style: none; padding: 0; margin: 0; }
.people-list li { display: flex; align-items: center; gap: 8px; min-height: 40px; border-top: 1px solid #eef0f2; }
.status-dot { width: 9px; height: 9px; border-radius: 50%; flex: 0 0 auto; }
.status-working { background: #1a7a1a; }
.status-off { background: #b8860b; }
.person-name { font-weight: 600; }
.person-time { margin-left: auto; color: #666; font-size: 13px; }
.empty-state, .panel-footnote { color: #777; font-style: italic; }
.panel-footnote { margin-bottom: 0; font-size: 13px; }
.hourly-chart { display: flex; align-items: end; gap: 5px; height: 190px; padding: 12px 4px 0; overflow-x: auto; border-bottom: 1px solid #ddd; }
.hour-column { display: flex; flex: 1 0 32px; flex-direction: column; align-items: center; justify-content: end; height: 100%; }
.hour-bars { display: flex; align-items: end; justify-content: center; gap: 2px; width: 100%; height: calc(100% - 22px); }
.hour-bar { width: 10px; min-height: 2px; border-radius: 2px 2px 0 0; }
.calls-bar { background: #b8860b; }
.staff-bar { background: #4a7ebb; }
.hour-label { margin-top: 6px; color: #666; font-size: 9px; white-space: nowrap; transform: rotate(-35deg); transform-origin: top center; }
.chart-legend { display: flex; gap: 16px; margin-top: 16px; color: #666; font-size: 12px; }
.legend-swatch { display: inline-block; width: 10px; height: 10px; margin-right: 5px; border-radius: 2px; vertical-align: -1px; }
.calls-swatch { background: #b8860b; }
.staff-swatch { background: #4a7ebb; }
.attention-panel { border-left: 4px solid #b8860b; }
.attention-panel p { margin-bottom: 0; }
.quick-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.quick-actions-label { margin-right: 4px; color: #666; font-size: 13px; font-weight: 600; }
.quick-actions a { padding: 7px 11px; border: 1px solid #cdd4db; border-radius: 4px; color: #2c3e50; background: #fff; text-decoration: none; font-size: 13px; }
.quick-actions a:hover { border-color: #2c3e50; }
.welcome-panel { border-left: 4px solid #4a7ebb; }
.welcome-panel h2 { margin-top: 0; }
.welcome-panel .button-link { margin-top: 4px; }
.settings-section { margin-top: 20px; padding: 16px; background: #fff; border-radius: 6px; }
.settings-section h2 { margin-top: 0; }
.policy-reference-callout { margin-bottom: 16px; padding: 12px 14px; border-left: 4px solid #c7a84b; border-radius: 4px; background: #fff9e8; color: #514722; font-size: 13px; line-height: 1.5; }
.policy-reference-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.policy-reference-grid .settings-section { margin-top: 0; }
.policy-reference-facts { margin: 0; }
.policy-reference-facts div { display: grid; grid-template-columns: minmax(130px, 0.8fr) minmax(0, 1.5fr); gap: 12px; padding: 9px 0; border-top: 1px solid #eef0f2; }
.policy-reference-facts dt { color: #666; font-size: 13px; }
.policy-reference-facts dd { margin: 0; font-size: 13px; font-weight: 600; }
.policy-reference-grid .panel-meta { margin-top: 12px; line-height: 1.5; }
.policy-holiday-list, .policy-request-list { margin: 10px 0 0; padding-left: 20px; }
.policy-holiday-list li { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-top: 1px solid #eef0f2; font-size: 13px; }
.policy-holiday-list li span { color: #666; text-align: right; }
.policy-request-list li { padding: 4px 0; line-height: 1.45; }
.schedule-employment-boundary { color: #777; background: #f5f6f8; font-size: 12px; font-style: italic; }
.weekly-schedule-controls { margin-bottom: 14px; }
.holiday-work-checklist { display: grid; grid-template-columns: repeat(2, minmax(150px, 1fr)); gap: 3px 10px; min-width: 320px; max-height: 220px; overflow-y: auto; }
.holiday-work-form { margin: 0; }
.holiday-work-form label { display: flex; align-items: center; gap: 5px; min-height: 25px; white-space: nowrap; font-size: 12px; cursor: pointer; }
.holiday-work-form input[type="checkbox"] { margin: 0; accent-color: #267346; }
.holiday-work-status { color: #267346; font-size: 10px; font-weight: 700; }
.holiday-work-form button { padding: 2px 6px !important; font-size: 11px; }
.holiday-note-tooltip { display: inline-block; padding: 2px 5px; color: #365b78; font-size: 16px; font-weight: 700; cursor: help; }
.holiday-note-tooltip:focus-visible { outline: 2px solid #4a7ebb; outline-offset: 2px; }
@media (max-width: 760px) {
  .policy-reference-grid { grid-template-columns: 1fr; }
  .policy-reference-facts div { grid-template-columns: minmax(110px, 0.8fr) minmax(0, 1.5fr); gap: 8px; }
  .holiday-work-checklist { grid-template-columns: 1fr; min-width: 180px; }
}
.settings-list { list-style: none; padding: 0; margin: 0; max-width: 520px; }
.settings-list li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 0; border-top: 1px solid #eef0f2; }
.settings-list form { margin: 0; }
.employee-name-link { color: #2c3e50; font-weight: 600; }
.detail-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
.detail-heading h1 { margin-bottom: 4px; }
.detail-heading .note { margin: 0; }
.profile-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 20px; }
.employee-leave-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-bottom: 0; }
.profile-card { display: flex; flex-direction: column; gap: 5px; padding: 15px; background: #fff; border-top: 3px solid #4a7ebb; border-radius: 6px; }
.profile-card.sick-balance-overdrawn, td.sick-balance-overdrawn { background: #fff0f0; color: #8b1e1e; }
.profile-card.sick-balance-overdrawn { border-top-color: #b00020; }
.profile-card.sick-balance-overdrawn strong, td.sick-balance-overdrawn { color: #8b1e1e; font-weight: 700; }
.balance-warning { display: block; margin-top: 3px; color: #8b1e1e; font-size: 11px; font-weight: 700; }
.profile-label { color: #666; font-size: 12px; font-weight: 600; text-transform: uppercase; }
.profile-card strong { color: #2c3e50; font-size: 16px; }
.profile-detail { color: #777; font-size: 12px; }
.detail-list { list-style: none; padding: 0; margin: 0; }
.detail-list li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid #eef0f2; }
.detail-list li span { color: #666; }

/* Mobile */
@media (max-width: 700px) {
  main, main.with-sidebar { width: 100%; margin: 0; padding: 64px 12px 12px; }
  h1 { font-size: 22px; line-height: 1.2; }
  h2 { font-size: 18px; }

  .dashboard-heading { align-items: stretch; flex-direction: column; gap: 12px; }
  .dashboard-heading .button-link { width: 100%; text-align: center; }
  .quick-actions { align-items: stretch; }
  .quick-actions-label { flex: 0 0 100%; }
  .quick-actions a { flex: 1 1 30%; text-align: center; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .stat-card { padding: 12px; }
  .stat-value { font-size: 24px; }
  .dashboard-grid { grid-template-columns: 1fr; gap: 12px; }
  .detail-heading { align-items: stretch; flex-direction: column; gap: 12px; }
  .detail-heading .button-link { width: 100%; text-align: center; }
  .profile-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .employee-leave-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .profile-card { padding: 12px; }
  .dashboard-panel { padding: 13px; margin-bottom: 12px; }
  .availability-modal { width: calc(100vw - 16px); max-height: calc(100vh - 16px); }
  .modal-heading { padding: 15px 14px 10px; }
  .modal-form { padding: 14px; }
  .modal-form-row { grid-template-columns: 1fr; }
  .modal-actions { align-items: stretch; flex-direction: column-reverse; }
  .modal-actions button { width: 100%; min-height: 42px; }
  .hourly-chart { margin-right: -4px; }

  .sidebar-nav, .sticky-nav-disabled .sidebar-nav { position: fixed; z-index: 1200; width: min(82vw, 290px); transform: translateX(-105%); transition: transform 0.2s ease; }
  .nav-open .sidebar-nav { transform: translateX(0); }
  .sidebar-close { display: block; }
  .nav-toggle { position: fixed; top: 10px; left: 10px; z-index: 1100; display: flex; width: 48px; height: 48px; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 0; border: 0; border-radius: 5px; background: transparent; cursor: pointer; filter: drop-shadow(0 1px 2px rgba(255, 255, 255, 0.9)); }
  .nav-toggle span { display: block; width: 27px; height: 3px; border-radius: 2px; background: #263746; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.9); }
  .nav-open .nav-toggle { opacity: 0; pointer-events: none; }
  .nav-backdrop { position: fixed; inset: 0; z-index: 1150; display: block; background: rgba(15, 24, 32, 0.56); }
  body.nav-open { overflow: hidden; }

  .inline-form { flex-direction: column; align-items: stretch; padding: 12px; }
  .inline-form label { width: 100%; }
  .inline-form input, .inline-form select, .inline-form button, .button-link {
    width: 100%;
    min-height: 40px;
  }
  .row-actions { flex-direction: column; align-items: stretch; }
  .row-actions form, .row-actions button { width: 100%; }
  .employee-dates-form { align-items: stretch; flex-direction: column; }
  .employee-dates-form input, .employee-dates-form button { width: 100%; min-height: 38px; }

  .subnav { display: flex; flex-wrap: wrap; gap: 6px; }
  .subnav a { margin: 0; flex: 1 1 auto; text-align: center; }

  .days-fieldset { flex-wrap: wrap; }

  .two-col { flex-direction: column; }

  .table-scroll { margin-left: -2px; margin-right: -2px; }
  table.data-table th, table.data-table td { padding: 10px 9px; }
  .table-scroll table.data-table { min-width: 560px; }

  table.calendar td.cal-cell { height: 54px; }
  .cal-info { font-size: 10px; }
  table.calendar th { padding: 5px 2px; font-size: 12px; }
  table.calendar td.cal-cell a { padding: 5px 3px; }

  .auth-box { margin: 24px auto; max-width: 100%; padding: 20px 16px; }
}

@media (max-width: 420px) {
  .cal-info { display: none; }
  .cal-day { font-size: 13px; }
  .profile-grid { grid-template-columns: 1fr; }
  .employee-leave-grid { grid-template-columns: 1fr; }
}
