:root {
  color-scheme: light;
  --navy-950: #0b2231;
  --navy-900: #112c3e;
  --navy-800: #183d54;
  --teal: #187a78;
  --teal-dark: #116462;
  --paper: #f4f6f5;
  --white: #ffffff;
  --ink: #192b36;
  --muted: #667985;
  --line: #dfe6e8;
  --green: #1f7a4f;
  --green-bg: #e6f3ec;
  --amber: #9a6514;
  --amber-bg: #fff2d9;
  --blue: #28678e;
  --blue-bg: #e6f1f8;
  --red: #a13d3d;
  --red-bg: #fae9e8;
  --shadow: 0 12px 36px rgba(20, 43, 56, 0.09);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); min-width: 320px; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .5; }
svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.app-shell { min-height: 100vh; display: grid; grid-template-columns: 250px minmax(0, 1fr); }

.access-login-screen { position: fixed; inset: 0; z-index: 120; display: none; place-items: center; padding: 22px; background: radial-gradient(circle at top, rgba(24,122,120,.2), transparent 32%), linear-gradient(145deg, var(--navy-950), #081720); }
html.auth-locked .access-login-screen { display: grid; }
html.auth-locked .app-shell { filter: blur(2px); pointer-events: none; user-select: none; }
.password-change-screen { display: none; }
html.auth-locked #passwordChangeScreen { display: none; }
html.password-change-required #accessLoginScreen { display: none; }
html.password-change-required #passwordChangeScreen { display: grid; }
html.password-change-required .app-shell { filter: blur(2px); pointer-events: none; user-select: none; }
.access-login-card { width: min(430px, 100%); padding: 28px; border: 1px solid rgba(232,187,103,.34); border-radius: 18px; background: rgba(255,255,255,.97); box-shadow: 0 28px 80px rgba(0,0,0,.34); }
.access-login-mark { display: grid; place-items: center; overflow: hidden; width: 86px; height: 86px; margin-bottom: 16px; border: 1px solid rgba(232,187,103,.45); border-radius: 18px; background: #020402; box-shadow: 0 9px 24px rgba(0,0,0,.2); }
.access-login-mark img { width: 100%; height: 100%; object-fit: contain; }
.access-login-card h1 { margin: 5px 0 8px; color: var(--ink); font-family: Georgia, serif; font-size: 31px; line-height: 1.05; }
.access-login-card p { color: var(--muted); font-size: 12px; line-height: 1.5; }
.access-login-card .field { margin-top: 18px; }
.access-remember { display: flex; align-items: center; gap: 9px; margin: 13px 0; color: var(--ink); font-size: 11px; font-weight: 750; cursor: pointer; }
.access-remember input { width: 18px; height: 18px; accent-color: var(--teal); }
.access-login-message { min-height: 18px; margin: 0 0 12px !important; color: var(--muted); font-size: 10px !important; font-weight: 750; }
.access-login-message.warning { color: var(--red); }
.access-login-card .primary-button { width: 100%; }

.sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; padding: 28px 18px 20px; color: #dce8ed; background: linear-gradient(180deg, var(--navy-900), var(--navy-950)); }
.brand { display: flex; align-items: center; gap: 12px; padding: 0 8px 32px; color: white; text-decoration: none; }
.brand-mark { display: grid; place-items: center; overflow: hidden; flex: 0 0 auto; width: 50px; height: 50px; border: 1px solid rgba(232,187,103,.45); border-radius: 11px; background: #020402; box-shadow: 0 4px 12px rgba(0,0,0,.24); }
.brand-mark img { display: block; width: 100%; height: 100%; object-fit: contain; }
.brand strong, .brand small { display: block; }
.brand strong { font-family: Georgia, serif; font-size: 20px; letter-spacing: .2px; }
.brand small { margin-top: 2px; color: #9fb4bf; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
.brand .brand-user-status { margin-top: 7px; padding: 5px 7px; border: 1px solid rgba(232,187,103,.22); border-radius: 7px; background: rgba(255,255,255,.06); color: #f1d486; font-size: 9px; letter-spacing: .04em; line-height: 1.25; text-transform: uppercase; }
nav { display: grid; gap: 7px; overflow-y: auto; }
.nav-item { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 14px; border: 0; border-radius: 9px; background: transparent; color: #b8cbd4; font-weight: 650; text-align: left; }
.nav-item svg { width: 20px; height: 20px; }
.nav-item:hover { color: white; background: rgba(255,255,255,.06); }
.nav-item.active { color: white; background: rgba(255,255,255,.11); box-shadow: inset 3px 0 #e8bb67; }
.sidebar-footer { margin-top: auto; display: grid; gap: 8px; padding-top: 24px; border-top: 1px solid rgba(255,255,255,.1); }
.sync-status { display: flex; align-items: flex-start; gap: 9px; margin: 0 8px 4px; padding: 10px; border: 1px solid rgba(255,255,255,.1); border-radius: 8px; background: rgba(255,255,255,.04); }
.sync-status strong, .sync-status small { display: block; }
.sync-status strong { color: #dce8ed; font-size: 11px; }
.sync-status small { margin-top: 3px; color: #91a8b2; font-size: 9px; line-height: 1.35; }
.sync-dot { flex: 0 0 auto; width: 9px; height: 9px; margin-top: 3px; border-radius: 50%; background: #829da9; box-shadow: 0 0 0 3px rgba(130,157,169,.14); }
.sync-status.connected .sync-dot { background: #56c98c; box-shadow: 0 0 0 3px rgba(86,201,140,.16); }
.sync-status.syncing .sync-dot { background: #e8bb67; box-shadow: 0 0 0 3px rgba(232,187,103,.16); animation: sync-pulse 1.1s ease-in-out infinite; }
.sync-status.offline .sync-dot { background: #ed8989; box-shadow: 0 0 0 3px rgba(237,137,137,.16); }
@keyframes sync-pulse { 50% { opacity: .45; transform: scale(.78); } }
.privacy-note { display: flex; gap: 10px; padding: 0 8px 14px; }
.privacy-note svg { flex: 0 0 auto; width: 18px; height: 18px; color: #7fc0b5; }
.privacy-note strong, .privacy-note small { display: block; }
.privacy-note strong { color: #dce8ed; font-size: 12px; }
.privacy-note small { margin-top: 3px; color: #829da9; font-size: 10px; }
.sidebar-action { padding: 9px 12px; border: 1px solid rgba(255,255,255,.14); border-radius: 7px; background: transparent; color: #aec2cb; font-size: 12px; }
.sidebar-action:hover { border-color: rgba(255,255,255,.3); color: white; }

main { min-width: 0; }
.sync-banner { display: flex; align-items: center; gap: 16px; margin: 20px clamp(24px, 4vw, 54px) 0; padding: 14px 16px; border: 1px solid #d8c18f; border-radius: 10px; background: #fff7e5; color: #5f4b22; box-shadow: 0 5px 18px rgba(72,55,18,.06); }
.sync-banner div { min-width: 0; flex: 1; }
.sync-banner strong, .sync-banner span { display: block; }
.sync-banner strong { font-size: 12px; }
.sync-banner span { margin-top: 4px; font-size: 10px; line-height: 1.45; }
.sync-banner .secondary-button { flex: 0 0 auto; }
.sync-banner .icon-button { flex: 0 0 auto; color: #785f2a; background: transparent; }
.topbar { display: flex; align-items: center; gap: 24px; padding: 25px clamp(24px, 4vw, 54px); border-bottom: 1px solid var(--line); background: rgba(255,255,255,.82); backdrop-filter: blur(12px); }
.topbar h1 { margin: 2px 0 0; font-family: Georgia, serif; font-size: clamp(25px, 3vw, 32px); font-weight: 600; }
.eyebrow { margin: 0; color: var(--teal); font-size: 11px; font-weight: 750; letter-spacing: .1em; text-transform: uppercase; }
.topbar-actions { margin-left: auto; display: flex; align-items: flex-end; gap: 12px; }
.date-control { display: grid; gap: 4px; color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.date-control input, .filters select { height: 40px; border: 1px solid var(--line); border-radius: 8px; background: white; color: var(--ink); }
.date-control input { padding: 0 11px; }
.primary-button, .secondary-button, .text-button, .icon-button { border-radius: 8px; font-weight: 700; }
.primary-button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 42px; padding: 0 17px; border: 1px solid var(--teal); background: var(--teal); color: white; box-shadow: 0 5px 12px rgba(24,122,120,.16); }
.primary-button:hover { border-color: var(--teal-dark); background: var(--teal-dark); }
.emergency-button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 42px; padding: 0 15px; border: 1px solid #a94b3f; border-radius: 8px; background: #ad4b3f; color: white; font-weight: 750; box-shadow: 0 5px 12px rgba(169,75,63,.16); }
.emergency-button:hover { border-color: #8e3c33; background: #8e3c33; }
.secondary-button { min-height: 40px; padding: 0 15px; border: 1px solid #c8d3d7; background: white; color: var(--ink); }
.secondary-button:hover { border-color: #9cabb2; background: #f9fbfb; }
.text-button { border: 0; background: transparent; color: var(--muted); }
.danger-text { color: var(--red); }
.icon-button { display: grid; place-items: center; width: 36px; height: 36px; border: 0; background: #edf1f2; color: var(--muted); font-size: 24px; }
.mobile-menu { display: none; border: 0; background: transparent; font-size: 22px; }
.sidebar-scrim { display: none; }
.theme-toggle { align-self: flex-end; min-height: 40px; padding: 0 11px; border: 1px solid var(--line); border-radius: 8px; background: var(--white); color: var(--ink); font-size: 11px; font-weight: 700; white-space: nowrap; }
.theme-toggle:hover { border-color: var(--teal); color: var(--teal-dark); }

.view { display: none; padding: 30px clamp(24px, 4vw, 54px) 54px; }
.view.active { display: block; }
.command-hero, .operations-intro { display: flex; align-items: flex-end; gap: 24px; margin-bottom: 18px; padding: 24px 26px; border-radius: 14px; background: linear-gradient(125deg, var(--navy-900), #1c525b); color: white; box-shadow: var(--shadow); }
.command-hero h2, .operations-intro h2 { margin: 5px 0 5px; font-family: Georgia, serif; font-size: clamp(24px, 3vw, 32px); font-weight: 600; }
.command-hero p:last-child, .operations-intro p:last-child { margin: 0; color: #b9ced4; font-size: 11px; }
.command-hero .eyebrow, .operations-intro .eyebrow { color: #8bd2c9; }
.command-clock { margin-left: auto; text-align: right; }
.command-clock strong, .command-clock small { display: block; }
.command-clock strong { font-family: Georgia, serif; font-size: 32px; font-weight: 500; white-space: nowrap; }
.command-clock small { margin-top: 3px; color: #9fbac3; font-size: 9px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.command-metrics { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin-bottom: 12px; }
.command-metrics article { display: flex; align-items: center; gap: 12px; padding: 15px 17px; border: 1px solid var(--line); border-radius: 11px; background: var(--white); box-shadow: 0 3px 12px rgba(20,43,56,.04); }
.command-metrics small, .command-metrics strong { display: block; }
.command-metrics small { color: var(--muted); font-size: 9px; font-weight: 750; letter-spacing: .04em; text-transform: uppercase; }
.command-metrics strong { margin-top: 2px; font-family: Georgia, serif; font-size: 25px; }
.metric-symbol { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; font-size: 15px; font-weight: 900; }
.metric-symbol.green { color: var(--green); background: var(--green-bg); }
.metric-symbol.blue { color: var(--blue); background: var(--blue-bg); }
.metric-symbol.amber { color: var(--amber); background: var(--amber-bg); }
.metric-symbol.red { color: var(--red); background: var(--red-bg); }
.metric-symbol.purple { color: #72529a; background: #eee8f7; }
.command-metrics article.command-late-metric { border-color: #8d3232; background: #a13d3d; }
.command-late-metric .metric-symbol.red { color: white; background: rgba(255,255,255,.18); }
.command-late-metric small { color: rgba(255,255,255,.82); }
.command-late-metric strong { color: white; text-shadow: 0 1px 2px rgba(0,0,0,.18); }
.quick-action-bar { display: flex; gap: 8px; margin-bottom: 18px; padding: 9px; overflow-x: auto; border: 1px solid var(--line); border-radius: 11px; background: var(--white); }
.quick-action-bar button { display: inline-flex; align-items: center; gap: 6px; flex: 1 0 auto; justify-content: center; min-height: 38px; padding: 0 12px; border: 0; border-radius: 7px; background: var(--paper); color: var(--ink); font-size: 10px; font-weight: 750; }
.quick-action-bar button:hover { background: #e7f2f1; color: var(--teal-dark); }
.quick-action-bar span { color: var(--teal); font-size: 15px; }
.command-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 16px; }
.command-panel { min-height: 310px; }
.command-panel .panel-header { padding: 18px 20px; }
.live-pill { padding: 4px 7px; border-radius: 999px; background: var(--green-bg); color: var(--green); font-size: 8px; font-weight: 850; letter-spacing: .08em; }
.attention-list, .on-duty-list, .coverage-list { display: grid; padding: 4px 20px 18px; }
.attention-item { display: grid; grid-template-columns: 30px 1fr auto; align-items: center; gap: 10px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.attention-item:last-child, .on-duty-item:last-child, .coverage-item:last-child { border-bottom: 0; }
.attention-icon { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; background: var(--amber-bg); color: var(--amber); font-size: 12px; font-weight: 900; }
.attention-item.urgent .attention-icon { background: var(--red-bg); color: var(--red); }
.attention-item.late-alert strong, .attention-item.late-alert small { color: var(--red); }
.attention-item.info .attention-icon { background: var(--blue-bg); color: var(--blue); }
.attention-item strong, .attention-item small { display: block; }
.attention-item strong { font-size: 10px; }
.attention-item small { margin-top: 3px; color: var(--muted); font-size: 9px; line-height: 1.35; }
.attention-item button { padding: 5px 7px; border: 0; border-radius: 5px; background: var(--paper); color: var(--teal-dark); font-size: 8px; font-weight: 750; }
.command-empty { display: grid; place-items: center; min-height: 215px; padding: 25px; color: var(--muted); font-size: 11px; text-align: center; }
.command-empty strong { display: block; margin-bottom: 5px; color: var(--green); font-family: Georgia, serif; font-size: 17px; }
.on-duty-item, .coverage-item { display: grid; grid-template-columns: 36px 1fr auto; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.on-duty-date-bar { display: flex; align-items: center; gap: 8px; margin: 5px -20px 0; padding: 9px 20px; background: var(--navy-800); color: white; }
.on-duty-date-bar:first-child { margin-top: -4px; }
.on-duty-date-bar strong { font-size: 9px; letter-spacing: .055em; text-transform: uppercase; }
.on-duty-date-bar small { color: #c3d4db; font-size: 8px; }
.on-duty-date-bar.carryover { background: #60517e; }
.on-duty-date-bar.carryover small { color: #ddd2ee; }
.on-duty-date-bar.next { background: var(--teal-dark); }
.on-duty-date-bar.next small { color: #c7e5e2; }
.on-duty-item .avatar { width: 34px; height: 34px; }
.on-duty-item strong, .on-duty-item small, .coverage-item strong, .coverage-item small { display: block; }
.on-duty-item strong, .coverage-item strong { font-size: 10px; }
.on-duty-item small, .coverage-item small { margin-top: 2px; color: var(--muted); font-size: 8px; }
.mini-status { padding: 4px 6px; border-radius: 5px; font-size: 8px; font-weight: 750; }
.coverage-dot { width: 10px; height: 10px; margin-left: 8px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 4px var(--red-bg); }
.coverage-item.covered .coverage-dot { background: var(--green); box-shadow: 0 0 0 4px var(--green-bg); }
.trend-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 0 20px 20px; }
.trend-grid div { padding: 13px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); }
.trend-grid small, .trend-grid strong { display: block; }
.trend-grid small { color: var(--muted); font-size: 8px; }
.trend-grid strong { margin-top: 5px; font-family: Georgia, serif; font-size: 20px; }
.trend-grid .late-highlight, .stat-card.late-highlight, .record-stat.late-highlight { border-color: #8d3232; background: #a13d3d; }
.late-highlight small { color: rgba(255,255,255,.82); }
.late-highlight strong { color: white; text-shadow: 0 1px 2px rgba(0,0,0,.18); }
.operations-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }
.operations-panel { min-width: 0; }
.equipment-panel { grid-column: 1 / -1; }
.security-panel, .audit-panel, .system-status-panel, .system-health-panel { grid-column: 1 / -1; }
.operations-form { border-bottom: 1px solid var(--line); background: #fbfcfc; }
.security-preset-form { border-bottom: 2px solid rgba(42,109,125,.18); background: linear-gradient(180deg, #f7fbfb, #edf6f5); }
.operations-actions { display: flex; justify-content: flex-end; padding: 0 24px 18px; }
.operations-list { display: grid; padding: 8px 20px 18px; }
.operations-item { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 12px 2px; border-bottom: 1px solid var(--line); }
.operations-item:last-child { border-bottom: 0; }
.operations-item-icon { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 8px; background: var(--blue-bg); color: var(--blue); font-size: 10px; font-weight: 850; }
.operations-item.urgent .operations-item-icon, .operations-item.expired .operations-item-icon, .operations-item.overdue .operations-item-icon { background: var(--red-bg); color: var(--red); }
.operations-item.due-soon .operations-item-icon, .operations-item.high .operations-item-icon { background: var(--amber-bg); color: var(--amber); }
.operations-item.complete { opacity: .62; }
.operations-item.complete strong { text-decoration: line-through; }
.operations-item strong, .operations-item small { display: block; overflow: hidden; text-overflow: ellipsis; }
.operations-item strong { font-size: 10px; }
.operations-item small { margin-top: 3px; color: var(--muted); font-size: 8px; line-height: 1.4; }
.operations-item-actions { display: flex; gap: 4px; }
.operations-badge { display: inline-flex; margin-top: 5px; padding: 3px 6px; border-radius: 5px; background: var(--paper); color: var(--muted); font-size: 7px; font-weight: 800; text-transform: uppercase; }
.permission-grid { margin: 0 24px 16px; padding: 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--white); }
.permission-grid legend { padding: 0 6px; color: var(--teal-dark); font-size: 11px; font-weight: 850; letter-spacing: .04em; text-transform: uppercase; }
#userPermissionList { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.permission-check, .access-disabled-check { display: flex; align-items: flex-start; gap: 10px; padding: 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); cursor: pointer; }
.permission-check input, .access-disabled-check input { flex: 0 0 auto; width: 18px; height: 18px; margin-top: 1px; accent-color: var(--teal); }
.permission-check strong, .permission-check small { display: block; }
.permission-check strong { color: var(--ink); font-size: 10px; }
.permission-check small { margin-top: 3px; color: var(--muted); font-size: 8px; line-height: 1.35; }
.access-disabled-check { margin: 0; color: var(--ink); font-size: 11px; font-weight: 750; }
.audit-subpanel h3 { margin: 15px 20px 0; color: var(--navy-800); font-family: Georgia, serif; font-size: 17px; font-weight: 600; }
.audit-filter-bar { display: grid; grid-template-columns: minmax(220px, 320px) 1fr; gap: 12px; padding: 12px 20px 0; }
.audit-entry .audit-detail { display: block; margin-top: 6px; color: var(--ink); font-size: 9px; font-weight: 650; white-space: normal; }
.restore-backup-box { display: grid; gap: 9px; padding: 0 20px 18px; }
.restore-backup-box small { color: var(--muted); font-size: 9px; line-height: 1.4; }
.restore-backup-box .operations-actions { padding: 0; }
html.read-only .topbar-actions .primary-button,
html.read-only .topbar-actions .secondary-button,
html.read-only .emergency-button,
html.read-only form .primary-button,
html.read-only form .secondary-button,
html.read-only .quick-action-bar button,
html.read-only .row-action,
html.read-only .mini-button.danger,
html.read-only .text-button.danger-text,
html.read-only .attachment-action.remove { display: none !important; }
html.read-only .sync-status::after { content: "View only"; display: inline-flex; margin-left: auto; padding: 2px 5px; border-radius: 999px; background: rgba(232,187,103,.16); color: #e8bb67; font-size: 8px; font-weight: 850; text-transform: uppercase; }
.stats-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 15px; margin-bottom: 20px; }
.stat-card { display: flex; align-items: center; gap: 14px; min-height: 100px; padding: 20px; border: 1px solid #e3e9eb; border-radius: 12px; background: white; box-shadow: 0 3px 14px rgba(32,54,65,.035); }
.stat-icon { display: grid; place-items: center; flex: 0 0 auto; width: 44px; height: 44px; border-radius: 10px; }
.stat-icon svg { width: 23px; height: 23px; }
.stat-icon.navy { color: var(--navy-800); background: #e9eef1; }
.stat-icon.green { color: var(--green); background: var(--green-bg); }
.stat-icon.amber { color: var(--amber); background: var(--amber-bg); }
.stat-icon.blue { color: var(--blue); background: var(--blue-bg); }
.stat-icon.red { color: var(--red); background: var(--red-bg); }
.stat-card small, .stat-card strong { display: block; }
.stat-card small { margin-bottom: 4px; color: var(--muted); font-size: 12px; }
.stat-card strong { font-family: Georgia, serif; font-size: 28px; font-weight: 600; }

.panel { overflow: hidden; border: 1px solid #e0e7e9; border-radius: 12px; background: white; box-shadow: var(--shadow); }
.calendar-panel { margin-bottom: 18px; }
.outlook-sync-panel { margin-bottom: 18px; }
.outlook-sync-header { display: flex; align-items: center; gap: 18px; padding: 19px 24px 12px; }
.outlook-sync-header h2 { margin: 3px 0 0; font-family: Georgia, serif; font-size: 21px; font-weight: 600; }
.outlook-sync-header p:last-child { margin: 4px 0 0; color: var(--muted); font-size: 10px; }
.outlook-sync-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 7px; margin-left: auto; }
.outlook-sync-grid { display: grid; grid-template-columns: minmax(220px, 1fr) 150px; gap: 13px; padding: 0 24px 14px; }
.outlook-sync-status { margin: 0 24px 18px; padding: 10px 12px; border: 1px solid #d7e3e5; border-radius: 8px; background: #f5fafb; color: #50636d; font-size: 10px; font-weight: 700; }
.outlook-sync-status.success { border-color: #b8d9c8; background: var(--green-bg); color: var(--green); }
.outlook-sync-status.warning { border-color: #dfc785; background: var(--amber-bg); color: var(--amber); }
.microsoft-sync-card { margin: 0 24px 16px; border: 1px solid #cfe0e4; border-radius: 11px; background: linear-gradient(135deg, #f5fbff, #f7fbfa); }
.microsoft-sync-copy { padding: 14px 16px 4px; }
.microsoft-sync-copy strong, .microsoft-sync-copy small { display: block; }
.microsoft-sync-copy strong { color: var(--navy-800); font-family: Georgia, serif; font-size: 16px; }
.microsoft-sync-copy small { margin-top: 3px; color: var(--muted); font-size: 10px; line-height: 1.45; }
.microsoft-sync-grid { display: grid; grid-template-columns: minmax(190px, 1.2fr) minmax(150px, .8fr) 135px minmax(210px, 1fr); gap: 12px; align-items: end; padding: 10px 16px 12px; }
.microsoft-auto-check { display: flex; align-items: center; gap: 10px; min-height: 42px; padding: 10px 12px; border: 1px solid #c9dce0; border-radius: 8px; background: white; cursor: pointer; }
.microsoft-auto-check input { width: 18px; height: 18px; accent-color: var(--teal); }
.microsoft-auto-check strong, .microsoft-auto-check small { display: block; }
.microsoft-auto-check strong { color: var(--ink); font-size: 10px; }
.microsoft-auto-check small { margin-top: 2px; color: var(--muted); font-size: 8px; line-height: 1.35; }
.microsoft-redirect-row { display: grid; grid-template-columns: 155px minmax(0, 1fr); gap: 10px; align-items: center; margin: 0 16px 12px; padding: 9px 11px; border: 1px dashed #b8cdd2; border-radius: 8px; background: rgba(255,255,255,.72); }
.microsoft-redirect-row span { color: var(--muted); font-size: 9px; font-weight: 800; letter-spacing: .03em; text-transform: uppercase; }
.microsoft-redirect-row code { overflow: hidden; color: #245675; font-size: 10px; font-weight: 750; text-overflow: ellipsis; white-space: nowrap; }
.microsoft-sync-card .outlook-sync-status { margin: 0 16px 16px; }
.outlook-manual-divider { display: flex; align-items: center; gap: 10px; margin: 0 24px 13px; color: var(--muted); font-size: 9px; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.outlook-manual-divider::before, .outlook-manual-divider::after { content: ""; height: 1px; flex: 1; background: var(--line); }
.calendar-toolbar { display: flex; align-items: center; gap: 20px; padding: 21px 24px; border-bottom: 1px solid var(--line); }
.calendar-toolbar h2 { margin: 3px 0 0; font-family: Georgia, serif; font-size: 23px; font-weight: 600; }
.calendar-actions { display: flex; gap: 6px; margin-left: auto; }
.calendar-actions .secondary-button { min-width: 42px; }
.calendar-weekdays, .calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.calendar-weekdays { background: #f7f9f9; border-bottom: 1px solid var(--line); }
.calendar-weekdays span { padding: 9px; color: var(--muted); font-size: 9px; font-weight: 750; letter-spacing: .06em; text-align: center; text-transform: uppercase; }
.calendar-day { position: relative; min-width: 0; min-height: 118px; padding: 8px; border: 0; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--white); color: var(--ink); text-align: left; }
.calendar-day:nth-child(7n) { border-right: 0; }
.calendar-day:hover { z-index: 1; background: #f7fbfa; box-shadow: inset 0 0 0 2px rgba(24,122,120,.25); }
.calendar-day.outside { background: #fafbfb; color: #a2afb5; }
.calendar-day.today .calendar-number { background: var(--teal); color: white; }
.calendar-day.selected { box-shadow: inset 0 0 0 2px var(--teal); }
.calendar-number { display: grid; place-items: center; width: 25px; height: 25px; border-radius: 50%; font-size: 10px; font-weight: 800; }
.calendar-count { position: absolute; top: 9px; right: 9px; padding: 3px 6px; border-radius: 999px; background: var(--blue-bg); color: var(--blue); font-size: 8px; font-weight: 800; }
.calendar-entries { display: grid; gap: 3px; margin-top: 6px; }
.calendar-entry { overflow: hidden; padding: 4px 5px; border-left: 3px solid var(--teal); border-radius: 4px; background: #eaf3f2; color: #26444e; font-size: 8px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.calendar-entry.unassigned { border-color: var(--amber); background: var(--amber-bg); color: var(--amber); }
.calendar-entry.event { border-color: var(--event-color, var(--blue)); background: var(--event-bg, var(--blue-bg)); color: var(--event-text, #245675); cursor: pointer; }
.calendar-entry.event-training { border-color: var(--event-color, #6b55a1); background: var(--event-bg, #eee9f8); color: var(--event-text, #574184); }
.calendar-entry.event-court, .calendar-entry.event-deadline { border-color: var(--event-color, var(--red)); background: var(--event-bg, var(--red-bg)); color: var(--event-text, var(--red)); }
.calendar-entry.event-inspection { border-color: var(--event-color, var(--amber)); background: var(--event-bg, var(--amber-bg)); color: var(--event-text, var(--amber)); }
.calendar-more { color: var(--muted); font-size: 8px; font-weight: 700; }
.calendar-day-panel { margin-bottom: 18px; }
.calendar-day-toolbar { display: flex; align-items: center; gap: 20px; padding: 20px 24px; border-bottom: 1px solid var(--line); }
.calendar-day-toolbar h2 { margin: 3px 0 0; font-family: Georgia, serif; font-size: 22px; font-weight: 600; }
.calendar-day-toolbar p:last-child { margin: 4px 0 0; color: var(--muted); font-size: 10px; }
.calendar-day-actions { display: flex; gap: 6px; margin-left: auto; }
.calendar-day-actions .secondary-button { min-width: 42px; }
.calendar-all-day-lane { display: grid; grid-template-columns: 78px 1fr; min-height: 58px; border-bottom: 1px solid var(--line); background: #f8fafa; }
.calendar-all-day-label { padding: 17px 10px; border-right: 1px solid var(--line); color: var(--muted); font-size: 9px; font-weight: 800; letter-spacing: .05em; text-align: right; text-transform: uppercase; }
.calendar-all-day-items { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; padding: 8px 10px; }
.calendar-lane-empty { color: var(--muted); font-size: 10px; }
.calendar-day-scroll { overflow-y: auto; max-height: 690px; background: var(--white); }
.calendar-day-timeline { min-width: 0; }
.calendar-hour-row { display: grid; grid-template-columns: 78px minmax(0, 1fr); min-height: 64px; }
.calendar-hour-label { padding: 9px 10px 0; border-right: 1px solid var(--line); color: var(--muted); font-size: 9px; font-weight: 750; text-align: right; }
.calendar-hour-content { display: flex; align-items: flex-start; flex-wrap: wrap; gap: 6px; min-width: 0; padding: 7px 9px; border-top: 1px solid var(--line); background-image: linear-gradient(to right, rgba(24,122,120,.045) 1px, transparent 1px); background-size: 25% 100%; }
.calendar-hour-row:first-child .calendar-hour-content { border-top: 0; }
.calendar-hour-add { align-self: stretch; min-height: 40px; padding: 6px 10px; border: 1px dashed #b9c9cd; border-radius: 6px; background: transparent; color: #81929a; font-size: 9px; font-weight: 750; opacity: .55; }
.calendar-hour-content:hover .calendar-hour-add, .calendar-hour-add:focus { border-color: var(--teal); color: var(--teal-dark); opacity: 1; }
.day-agenda-card { display: grid; gap: 3px; min-width: 150px; max-width: 310px; padding: 8px 10px; border: 1px solid #b9d5d3; border-left: 4px solid var(--teal); border-radius: 6px; background: #eaf5f4; color: var(--ink); text-align: left; }
.day-agenda-card strong { overflow: hidden; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.day-agenda-card small { color: var(--muted); font-size: 8px; line-height: 1.35; }
button.day-agenda-card { cursor: pointer; }
button.day-agenda-card:hover { box-shadow: 0 3px 10px rgba(20,43,56,.12); transform: translateY(-1px); }
.day-agenda-card.event { border-color: #b9d4e5; border-left-color: var(--event-color, var(--blue)); background: var(--event-bg, var(--blue-bg)); color: var(--event-text, var(--ink)); }
.day-agenda-card.event.calendar-event-segment { position: relative; z-index: 2; width: 260px; min-width: 260px; max-width: 100%; }
.calendar-event-segment-start { height: 56px; min-height: 56px; margin-bottom: -8px; overflow: hidden; border-bottom: 0; border-radius: 7px 7px 0 0; }
.calendar-event-segment-middle { min-height: 64px; margin-top: -8px; margin-bottom: -8px; padding: 0; border-top: 0; border-bottom: 0; border-radius: 0; }
.calendar-event-segment-end { min-height: 56px; margin-top: -8px; padding: 0; border-top: 0; border-radius: 0 0 7px 7px; }
.calendar-event-segment-fill { display: block; width: 100%; height: 100%; min-height: 42px; }
.calendar-event-segment-middle:hover, .calendar-event-segment-end:hover { box-shadow: none !important; transform: none !important; }
.day-agenda-card.event-training { border-left-color: var(--event-color, #6b55a1); background: var(--event-bg, #eee9f8); }
.day-agenda-card.event-court, .day-agenda-card.event-deadline { border-left-color: var(--event-color, var(--red)); background: var(--event-bg, var(--red-bg)); }
.day-agenda-card.event-inspection { border-left-color: var(--event-color, var(--amber)); background: var(--event-bg, var(--amber-bg)); }
.day-agenda-card.assignment { border-left-color: var(--teal); }
.day-agenda-card.assignment.carryover { border-left-color: #72529a; background: #f1edf8; }
.day-agenda-card.timeoff { border-color: #cfc1df; border-left-color: #7a5aa5; background: #f3eef8; }
.upcoming-list { display: grid; padding: 0 22px 16px; }
.upcoming-row { display: grid; grid-template-columns: 95px minmax(150px, 1fr) minmax(130px, .8fr) 100px auto; align-items: center; gap: 12px; padding: 13px 2px; border-bottom: 1px solid var(--line); }
.upcoming-row:last-child { border-bottom: 0; }
.upcoming-row strong, .upcoming-row small { display: block; }
.upcoming-row strong { font-size: 11px; }
.upcoming-row small { margin-top: 3px; color: var(--muted); font-size: 9px; }
.upcoming-open { padding: 6px 8px; border: 1px solid var(--line); border-radius: 6px; background: var(--white); color: var(--teal-dark); font-size: 9px; font-weight: 750; }
.upcoming-row.event-row { border-left: 3px solid var(--event-color, var(--blue)); padding-left: 10px; }
.upcoming-row.timeoff-row-compact { border-left: 3px solid #7a5aa5; padding-left: 10px; }
.upcoming-empty { padding: 45px 20px; color: var(--muted); text-align: center; font-size: 11px; }
.timeoff-layout { display: grid; grid-template-columns: minmax(300px, .8fr) minmax(420px, 1.2fr); gap: 18px; align-items: start; }
.timeoff-list { padding: 8px 22px 18px; }
.timeoff-row { display: grid; grid-template-columns: 42px minmax(130px, 1fr) minmax(150px, .9fr) auto; align-items: center; gap: 11px; padding: 13px 2px; border-bottom: 1px solid var(--line); }
.timeoff-row:last-child { border-bottom: 0; }
.timeoff-row strong, .timeoff-row small { display: block; }
.timeoff-row strong { font-size: 11px; }
.timeoff-row small { margin-top: 3px; color: var(--muted); font-size: 9px; line-height: 1.4; }
.timeoff-status { display: inline-flex; margin-top: 4px; padding: 3px 6px; border-radius: 999px; background: var(--green-bg); color: var(--green); font-size: 8px; font-weight: 800; }
.timeoff-status.pending { background: var(--amber-bg); color: var(--amber); }
.timeoff-status.cancelled { background: var(--red-bg); color: var(--red); }
.timeoff-actions { display: flex; gap: 4px; }
.calendar-entry.timeoff { border-color: #7a5aa5; background: #f0eafa; color: #604481; }
.bulk-deputy.on-timeoff { opacity: .62; cursor: not-allowed; }
.bulk-deputy.on-timeoff small { color: var(--red); }
.panel-header { display: flex; align-items: center; gap: 20px; padding: 22px 24px; border-bottom: 1px solid var(--line); }
.panel-header h2 { margin: 0 0 5px; font-family: Georgia, serif; font-size: 21px; font-weight: 600; }
.panel-header p { margin: 0; color: var(--muted); font-size: 12px; }
.header-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.filters { margin-left: auto; display: flex; gap: 8px; }
.filters select { padding: 0 29px 0 10px; font-size: 12px; }
.search-field { display: flex; align-items: center; width: min(270px, 25vw); height: 40px; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px; background: white; }
.search-field:focus-within { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(24,122,120,.1); }
.search-field svg { flex: 0 0 auto; width: 18px; height: 18px; color: #81919a; }
.search-field input { min-width: 0; width: 100%; padding: 0 8px; border: 0; outline: 0; color: var(--ink); font-size: 12px; }
.table-wrap { min-height: 330px; }
table { width: 100%; border-collapse: collapse; }
th { padding: 11px 18px; background: #f7f9f9; color: #758690; font-size: 10px; letter-spacing: .08em; text-align: left; text-transform: uppercase; }
td { padding: 16px 18px; border-top: 1px solid #edf1f2; font-size: 13px; vertical-align: middle; }
tbody tr { transition: background .15s ease; }
tbody tr:hover { background: #fafcfc; }
.shift-group-row td { padding: 10px 16px; border-top: 3px solid var(--paper); border-bottom: 0; background: var(--navy-800); }
.shift-group-row:first-child td { border-top: 0; }
.shift-group-row:hover { background: transparent; }
.shift-group-row span { display: flex; align-items: center; gap: 8px; }
.shift-group-row strong { color: white; font-size: 10px; letter-spacing: .055em; text-transform: uppercase; }
.shift-group-row small { color: #c3d4db; font-size: 9px; }
.shift-section-row td { padding: 0; border-top: 1px solid var(--line); background: #eef3f4; }
.shift-section-row:hover { background: transparent; }
.shift-section-toggle { display: flex; align-items: center; gap: 11px; width: 100%; padding: 12px 17px; border: 0; background: transparent; color: var(--ink); text-align: left; }
.shift-section-toggle:hover { background: #e5eeee; }
.shift-section-chevron { display: grid; place-items: center; flex: 0 0 auto; width: 24px; height: 24px; border-radius: 6px; background: var(--white); color: var(--teal-dark); font-size: 15px; transform: rotate(-90deg); transition: transform .18s ease; }
.shift-section-toggle[aria-expanded="true"] .shift-section-chevron { transform: rotate(0); }
.shift-section-text { min-width: 0; }
.shift-section-text strong, .shift-section-text small { display: block; }
.shift-section-text strong { font-size: 12px; }
.shift-section-text small { margin-top: 2px; color: var(--muted); font-size: 9px; }
.shift-section-text em { color: var(--red); font-style: normal; font-weight: 850; }
.shift-section-hidden { display: none !important; }
.shift-group-row.carryover td { background: #60517e; }
.shift-group-row.carryover small { color: #ddd2ee; }
.shift-group-row.next td { background: var(--teal-dark); }
.shift-group-row.next small { color: #c7e5e2; }
.deputy-cell { display: flex; align-items: center; gap: 11px; }
.avatar { display: grid; place-items: center; flex: 0 0 auto; width: 36px; height: 36px; border-radius: 50%; background: #e5edef; color: var(--navy-800); font-size: 12px; font-weight: 800; }
.cell-title { display: block; color: var(--ink); font-weight: 720; }
.cell-subtitle { display: block; margin-top: 3px; color: var(--muted); font-size: 11px; }
.status-select { max-width: 120px; padding: 6px 24px 6px 9px; border: 1px solid transparent; border-radius: 999px; font-size: 11px; font-weight: 750; }
.status-assigned { color: var(--blue); background: var(--blue-bg); }
.status-en-route { color: var(--amber); background: var(--amber-bg); }
.status-on-post { color: var(--green); background: var(--green-bg); }
.status-break { color: #6b5a93; background: #f0ecfa; }
.status-off-duty { color: #586970; background: #e8edef; }
.status-unavailable { color: var(--red); background: var(--red-bg); }
.attendance-badge { display: inline-flex; align-items: center; padding: 6px 9px; border-radius: 999px; background: #edf1f2; color: #536670; font-size: 11px; font-weight: 750; }
.attendance-late, .attendance-no-show { color: var(--red); background: var(--red-bg); }
.late-option { color: var(--red); font-weight: 800; }
select.late-selection { border-color: var(--red); background: var(--red-bg); color: var(--red); font-weight: 800; }
.field.late-field > span { color: var(--red); }
.field.late-field input { border-color: var(--red); background: var(--red-bg); color: var(--red); font-weight: 800; }
.attendance-on-time { color: var(--green); background: var(--green-bg); }
.attendance-called-out, .attendance-excused { color: var(--amber); background: var(--amber-bg); }
.deputy-detail-row td { padding: 0 18px 15px; border-top: 0; background: #fbfcfc; }
.deputy-detail { display: grid; grid-template-columns: repeat(3, minmax(120px, auto)) minmax(220px, 1fr); gap: 14px; padding: 13px 15px; border: 1px solid #e4eaec; border-radius: 8px; background: white; }
.detail-item small, .detail-item strong { display: block; }
.detail-item small { margin-bottom: 4px; color: var(--muted); font-size: 9px; font-weight: 750; letter-spacing: .07em; text-transform: uppercase; }
.detail-item strong { font-size: 11px; font-weight: 650; line-height: 1.45; }
.detail-notes strong { font-weight: 500; }
.detail-debrief { grid-column: 1 / -1; padding-top: 11px; border-top: 1px solid var(--line); }
.detail-debrief strong { color: #713d25; font-weight: 600; }
.debrief-flag { color: #8a4c24; background: #f9ece2; }
.reassignment-log { grid-column: 1 / -1; padding-top: 11px; border-top: 1px solid var(--line); }
.reassignment-entry { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 5px; color: #51646e; font-size: 10px; line-height: 1.45; }
.reassignment-entry strong { color: var(--ink); }
.attachment-summary { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.attachment-chip { display: inline-flex; align-items: center; gap: 5px; padding: 5px 8px; border: 1px solid #d5e0e3; border-radius: 6px; background: #f5f8f8; color: var(--teal-dark); font-size: 10px; font-weight: 700; }
.attachment-chip:hover { border-color: var(--teal); background: #edf6f5; }
.row-action { width: 32px; height: 32px; border: 0; border-radius: 7px; background: transparent; color: var(--muted); font-size: 18px; }
.row-action:hover { background: #edf2f3; color: var(--ink); }
.quick-post-input { width: min(190px, 100%); height: 34px; padding: 0 28px 0 9px; border: 1px solid #cbd7da; border-radius: 7px; background: #fbfcfc; color: var(--ink); font-size: 12px; font-weight: 650; outline: 0; }
.quick-post-input:focus { border-color: var(--teal); background: white; box-shadow: 0 0 0 3px rgba(24,122,120,.1); }
.quick-post-input.unassigned { color: var(--amber); background: var(--amber-bg); border-color: #ecd4a5; }
.row-controls { display: flex; align-items: center; gap: 4px; }
.reassign-button { padding: 6px 8px; border: 1px solid #cbd8db; border-radius: 6px; background: white; color: var(--teal-dark); font-size: 9px; font-weight: 750; }
.reassign-button:hover { border-color: var(--teal); background: #eef7f6; }
.auto-status-note { display: block; margin-top: 4px; color: var(--teal); font-size: 8px; font-weight: 700; }
.overnight-note { display: inline-flex; margin-top: 5px; padding: 3px 6px; border-radius: 5px; background: #ece9f8; color: #66518f; font-size: 8px; font-weight: 750; }
.previous-shift-note { display: inline-flex; margin-top: 5px; padding: 3px 6px; border-radius: 5px; background: #fff1c9; color: #79571d; font-size: 8px; font-weight: 800; }
.empty-state { display: grid; justify-items: center; max-width: 400px; margin: 0 auto; padding: 52px 20px; text-align: center; }
.empty-state.hidden { display: none; }
.empty-icon { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: #eaf0f1; color: var(--teal); }
.empty-icon svg { width: 26px; height: 26px; }
.empty-state h3 { margin: 15px 0 6px; font-family: Georgia, serif; font-size: 19px; }
.empty-state p { margin: 0 0 18px; color: var(--muted); font-size: 13px; line-height: 1.5; }
.table-wrap.has-rows .empty-state { display: none; }
.table-wrap:not(.has-rows) table { display: none; }

.history-panel { min-height: 500px; }
.history-list { padding: 0 24px; }
.history-entry { position: relative; display: grid; grid-template-columns: 36px 1fr auto; gap: 14px; padding: 20px 0; border-bottom: 1px solid var(--line); }
.history-entry:last-child { border-bottom: 0; }
.history-dot { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: #e9f1f2; color: var(--teal); font-size: 15px; font-weight: 800; }
.history-entry p { margin: 0; font-size: 13px; line-height: 1.45; }
.history-entry small { color: var(--muted); font-size: 11px; }
.history-time { white-space: nowrap; }
.history-empty { padding: 80px 20px; color: var(--muted); text-align: center; }
.record-picker { display: grid; gap: 4px; margin-left: auto; color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.record-picker select { min-width: 230px; height: 40px; padding: 0 30px 0 11px; border: 1px solid var(--line); border-radius: 8px; background: white; color: var(--ink); }
.records-toolbar .primary-button { flex: 0 0 auto; }
.record-content { min-height: 440px; padding: 24px; }
.report-editor { margin-bottom: 20px; }
.report-editor .panel-header .secondary-button { margin-left: auto; }
.report-editor-actions { display: flex; justify-content: flex-end; padding: 0 24px 20px; }
.report-count-field { padding: 13px; border: 1px solid var(--line); border-radius: 9px; background: var(--paper); }
.report-count-field span { color: var(--teal-dark); }
.report-document { max-width: 1080px; margin: 0 auto; padding: 38px 42px; border: 1px solid var(--line); border-radius: 12px; background: var(--white); color: var(--ink); box-shadow: var(--shadow); }
.report-header { display: flex; align-items: flex-end; gap: 24px; padding-bottom: 20px; border-bottom: 3px solid var(--navy-800); }
.report-header h2 { margin: 0; font-family: Georgia, serif; font-size: 29px; }
.report-header p { margin: 5px 0 0; color: var(--muted); font-size: 11px; }
.report-generated { margin-left: auto; color: var(--muted); font-size: 9px; text-align: right; }
.report-summary-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 20px 0; }
.report-summary { padding: 11px 12px; border: 1px solid var(--line); border-radius: 7px; background: var(--paper); }
.report-summary small, .report-summary strong { display: block; }
.report-summary small { color: var(--muted); font-size: 8px; font-weight: 750; letter-spacing: .06em; text-transform: uppercase; }
.report-summary strong { margin-top: 4px; font-family: Georgia, serif; font-size: 20px; }
.report-section { margin-top: 24px; }
.report-section-title { margin: 0 0 10px; padding-bottom: 6px; border-bottom: 1px solid var(--line); font-family: Georgia, serif; font-size: 17px; }
.report-narrative-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.report-narrative { min-height: 70px; padding: 11px; border: 1px solid var(--line); border-radius: 7px; }
.report-narrative small { display: block; margin-bottom: 5px; color: var(--muted); font-size: 8px; font-weight: 750; letter-spacing: .06em; text-transform: uppercase; }
.report-narrative p { margin: 0; font-size: 10px; line-height: 1.5; white-space: pre-wrap; }
.report-table { width: 100%; border-collapse: collapse; }
.report-table th { padding: 7px 8px; background: var(--paper); font-size: 8px; }
.report-table td { padding: 8px; border: 1px solid var(--line); font-size: 9px; line-height: 1.4; }
.report-deputies { display: grid; gap: 13px; }
.report-deputy { padding: 14px; border: 1px solid var(--line); border-radius: 8px; break-inside: avoid; }
.report-deputy-header { display: flex; align-items: center; gap: 10px; padding-bottom: 9px; border-bottom: 1px solid var(--line); }
.report-deputy-header h4 { margin: 0; font-size: 13px; }
.report-deputy-header p { margin: 3px 0 0; color: var(--muted); font-size: 9px; }
.report-deputy-header .status-select { margin-left: auto; appearance: none; pointer-events: none; }
.report-detail-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; padding-top: 10px; }
.report-detail { min-width: 0; }
.report-detail.wide { grid-column: span 2; }
.report-detail.full { grid-column: 1 / -1; }
.report-detail small, .report-detail strong { display: block; }
.report-detail small { margin-bottom: 3px; color: var(--muted); font-size: 7px; font-weight: 750; letter-spacing: .05em; text-transform: uppercase; }
.report-detail strong { font-size: 9px; font-weight: 600; line-height: 1.45; white-space: pre-wrap; }
.report-sublist { display: grid; gap: 3px; }
.report-sublist span { font-size: 9px; line-height: 1.45; }
.report-empty { padding: 34px; color: var(--muted); text-align: center; font-size: 11px; }

/* Professional daily report */
.report-brand-mark, .report-kicker, .report-classification, .report-signoff, .report-footer { display: none; }
.report-title-block { min-width: 0; }
.report-generated strong, .report-generated span { display: block; }
.report-generated strong { font-size: 9px; font-weight: 650; }
@media print {
.report-document { overflow: hidden; padding: 0 42px 34px; background: #fff; color: #172832; }
.report-header { align-items: center; margin: 0 -42px; padding: 26px 42px; border: 0; background: linear-gradient(125deg, #0f2c3e 0%, #174c58 72%, #1b706b 100%); color: white; }
.report-brand-mark { display: grid; place-items: center; overflow: hidden; flex: 0 0 auto; width: 62px; height: 62px; padding: 2px; border: 2px solid #e6bd67; border-radius: 10px; background: #020402; box-shadow: 0 3px 10px rgba(0,0,0,.24); }
.report-brand-mark img { display: block; width: 100%; height: 100%; border-radius: 7px; object-fit: contain; }
.report-title-block { min-width: 0; }
.report-kicker { display: block; margin-bottom: 3px; color: #9ed4cf; font-size: 8px; font-weight: 850; letter-spacing: .16em; text-transform: uppercase; }
.report-header h2 { color: white; font-size: 27px; line-height: 1.05; }
.report-header p { margin-top: 6px; color: #c2d6dc; font-size: 9px; letter-spacing: .025em; }
.report-generated { display: grid; gap: 3px; min-width: 175px; color: #c6d9df; font-size: 8px; line-height: 1.35; }
.report-generated strong { color: white; font-family: Georgia, serif; font-size: 14px; font-weight: 600; }
.report-generated span { display: block; }
.report-classification { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin: 0 -42px; padding: 7px 42px; background: #d8ac51; color: #26343a; font-size: 7px; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; }
.report-summary-grid { gap: 9px; margin: 20px 0 24px; }
.report-summary { position: relative; overflow: hidden; min-height: 60px; padding: 12px 13px 10px; border: 1px solid #dfe7e9; border-top: 4px solid #2c6d7d; border-radius: 7px; background: #f8fafb; }
.report-summary small { color: #5d707a; font-size: 7px; letter-spacing: .085em; }
.report-summary strong { color: #173143; font-size: 21px; }
.report-summary.summary-total-book-ins, .report-summary.summary-total-releases, .report-summary.summary-courts-pulled { border-top-color: #1b7a76; background: #eff8f7; }
.report-summary.summary-on-post, .report-summary.summary-posts-covered, .report-summary.summary-deputies { border-top-color: #267956; background: #f2f8f5; }
.report-summary.summary-unavailable, .report-summary.summary-late-arrivals, .report-summary.summary-daily-alerts, .report-summary.summary-emergency-staffing { border-top-color: #ae4848; background: #fcf5f5; }
.report-summary.summary-light-duty, .report-summary.summary-time-off, .report-summary.summary-debriefs { border-top-color: #c58a28; background: #fdf9f0; }
.report-summary.summary-calendar-events, .report-summary.summary-reassignments, .report-summary.summary-open-follow-ups { border-top-color: #34779a; background: #f3f8fb; }
.report-section { margin-top: 26px; }
.report-section-title { display: flex; align-items: center; gap: 9px; margin-bottom: 11px; padding: 7px 10px; border: 0; border-left: 5px solid #1b7a76; border-radius: 3px; background: #edf4f4; color: #163447; font-size: 15px; letter-spacing: .015em; }
.report-section-title::after { content: ""; flex: 1; height: 1px; margin-left: 5px; background: #cbdadb; }
.report-narrative-grid { gap: 11px; }
.report-narrative { min-height: 78px; padding: 12px 13px; border: 1px solid #d9e3e5; border-left: 4px solid #578a96; border-radius: 5px; background: #fbfcfc; }
.report-narrative small { color: #376675; font-size: 7px; }
.report-narrative p { color: #2d414b; font-size: 9px; line-height: 1.55; }
.report-table { overflow: hidden; border: 1px solid #cddbdd; border-radius: 5px; }
.report-table th { padding: 8px 9px; border: 1px solid #1d5263; background: #17495b; color: white; font-size: 7px; letter-spacing: .07em; text-transform: uppercase; }
.report-table td { padding: 8px 9px; border-color: #dce5e7; color: #263d47; font-size: 8px; line-height: 1.45; }
.report-table tbody tr:nth-child(even) td { background: #f5f8f8; }
.report-deputies { gap: 15px; }
.report-deputy { overflow: hidden; padding: 0; border: 1px solid #cfdcde; border-radius: 7px; background: #fff; box-shadow: 0 2px 8px rgba(25,55,68,.05); }
.report-deputy-header { padding: 11px 13px; border: 0; background: #edf4f4; }
.report-deputy-header .avatar { width: 34px; height: 34px; border: 2px solid white; background: #1b6670; color: white; box-shadow: 0 1px 5px rgba(0,0,0,.12); }
.report-deputy-header h4 { color: #17384a; font-size: 12px; }
.report-deputy-header p { color: #607680; font-size: 8px; }
.report-detail-grid { gap: 0; padding: 0; border-top: 1px solid #d8e3e5; }
.report-detail { min-height: 43px; padding: 8px 10px; border-right: 1px solid #e1e8ea; border-bottom: 1px solid #e1e8ea; }
.report-detail:nth-child(4n) { border-right: 0; }
.report-detail small { color: #657a84; font-size: 6px; }
.report-detail strong { color: #243b46; font-size: 8px; line-height: 1.5; }
.report-detail.wide, .report-detail.full { background: #fbfcfc; }
.report-signoff { display: grid; grid-template-columns: 1.5fr .7fr; gap: 28px; margin-top: 34px; padding-top: 18px; border-top: 1px solid #dce5e7; }
.report-signoff div span { display: block; height: 24px; border-bottom: 1px solid #74878f; }
.report-signoff small { display: block; margin-top: 5px; color: #687b84; font-size: 7px; font-weight: 750; letter-spacing: .06em; text-transform: uppercase; }
.report-footer { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin: 28px -42px -34px; padding: 9px 42px; border-top: 1px solid #d8e2e4; background: #f3f6f6; color: #60737d; font-size: 7px; font-weight: 700; letter-spacing: .055em; text-transform: uppercase; }
}
.record-empty { display: grid; place-items: center; min-height: 390px; color: var(--muted); text-align: center; }
.record-profile { display: flex; align-items: center; gap: 15px; margin-bottom: 20px; }
.record-profile .avatar { width: 52px; height: 52px; font-size: 16px; }
.record-profile h3 { margin: 0 0 4px; font-family: Georgia, serif; font-size: 22px; }
.record-profile p { margin: 0; color: var(--muted); font-size: 12px; }
.record-stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin-bottom: 24px; }
.record-stat { padding: 14px; border: 1px solid var(--line); border-radius: 9px; background: #f9fbfb; }
.record-stat small, .record-stat strong { display: block; }
.record-stat small { color: var(--muted); font-size: 10px; }
.record-stat strong { margin-top: 4px; font-family: Georgia, serif; font-size: 22px; }
.record-log { display: grid; gap: 10px; }
.record-documents { margin-bottom: 22px; padding: 15px; border: 1px solid var(--line); border-radius: 9px; background: #f8fafa; }
.record-documents h4 { margin: 0 0 10px; font-family: Georgia, serif; font-size: 15px; }
.record-document-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
.record-document { display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: 8px; padding: 9px; border: 1px solid var(--line); border-radius: 7px; background: var(--white); }
.record-document strong, .record-document small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.record-document strong { font-size: 10px; }
.record-document small { margin-top: 2px; color: var(--muted); font-size: 8px; }
.record-document-actions { display: flex; gap: 4px; }
.record-day { display: grid; grid-template-columns: 120px 1fr auto; gap: 16px; padding: 16px; border: 1px solid var(--line); border-radius: 9px; }
.record-date strong, .record-date small { display: block; }
.record-date strong { font-size: 12px; }
.record-date small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.record-day h4 { margin: 0 0 7px; font-size: 13px; }
.record-day p { margin: 5px 0 0; color: #52646e; font-size: 11px; line-height: 1.5; }
.record-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.record-tag { padding: 4px 7px; border-radius: 5px; background: #edf2f3; color: #4d626d; font-size: 9px; font-weight: 700; }
.record-tag.late-tag { background: var(--red-bg); color: var(--red); }
.follow-up-tag { color: var(--amber); background: var(--amber-bg); }
.record-stat.injury-highlight { border-color: #8d3232; background: #fff0f0; }
.record-stat.injury-highlight strong { color: #9b3636; }
.record-injury { grid-column: 1 / -1; margin-top: 10px; padding: 11px 12px; border: 1px solid #dca6a6; border-left: 5px solid #a13d3d; border-radius: 7px; background: #fff4f4; color: #563333; }
.record-injury > strong { color: #8d3232; font-size: 11px; }
.record-injury p { margin: 4px 0 0; color: #563f3f; }

.report-summary.summary-late-arrivals { border-color: #8d3232; background: #a13d3d; }
.report-summary.summary-injuries-recorded { border-color: #8d3232; background: #a13d3d; }
.report-summary.summary-late-arrivals small { color: rgba(255,255,255,.82); }
.report-summary.summary-late-arrivals strong { color: white; }
.report-summary.summary-injuries-recorded small { color: rgba(255,255,255,.82); }
.report-summary.summary-injuries-recorded strong { color: white; }
.report-table .late-row td { border-color: #8d3232 !important; background: #a13d3d !important; color: white !important; font-weight: 750; }
.report-table .injury-row td { border-color: #762d2d !important; background: #8f3434 !important; color: white !important; font-weight: 750; }
.report-injury-section .report-section-title { border-left-color: #a13d3d; background: #fff0f0; color: #713333; }
.injury-report-table td { vertical-align: top; }
.report-detail.injury-detail { border-left: 5px solid #a13d3d; background: #fff4f4; }
.report-detail.late-detail { background: #a13d3d !important; }
.report-detail.late-detail small { color: rgba(255,255,255,.82) !important; }
.report-detail.late-detail strong { color: white !important; }
.setup-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }
.setup-panel { min-width: 0; }
.setup-form { border-bottom: 1px solid var(--line); background: #fbfcfc; }
.compact-grid { padding-bottom: 14px; }
.setup-actions { display: flex; justify-content: flex-end; gap: 8px; padding: 0 24px 20px; }
.setup-list { padding: 10px 20px 20px; }
.setup-empty { padding: 32px 10px; color: var(--muted); font-size: 12px; text-align: center; }
.roster-shift-group { overflow: hidden; margin-bottom: 9px; border: 1px solid var(--line); border-radius: 9px; background: var(--white); }
.roster-shift-toggle { display: flex; align-items: center; gap: 10px; width: 100%; padding: 11px 12px; border: 0; background: #eef3f4; color: var(--ink); text-align: left; }
.roster-shift-toggle:hover { background: #e4eeee; }
.roster-shift-toggle[aria-expanded="true"] .shift-section-chevron { transform: rotate(0); }
.roster-shift-members { padding: 0 10px; }
.roster-shift-members .setup-row:last-child { border-bottom: 0; }
.setup-row { display: grid; grid-template-columns: 42px 1fr auto; align-items: center; gap: 11px; padding: 12px 4px; border-bottom: 1px solid var(--line); }
.setup-row:last-child { border-bottom: 0; }
.setup-row .avatar { width: 40px; height: 40px; }
.setup-row-title { display: block; font-size: 12px; font-weight: 750; }
.setup-row-subtitle { display: block; margin-top: 3px; color: var(--muted); font-size: 10px; line-height: 1.4; }
.setup-row-actions { display: flex; gap: 4px; }
.mini-button { padding: 6px 8px; border: 0; border-radius: 6px; background: #edf2f3; color: #526670; font-size: 10px; font-weight: 700; }
.mini-button:hover { background: #dfe9eb; color: var(--ink); }
.mini-button.danger { color: var(--red); }
.shift-clock { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 9px; background: var(--blue-bg); color: var(--blue); }
.shift-clock svg { width: 20px; height: 20px; }
.post-pin { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 9px; background: var(--green-bg); color: var(--green); }
.post-pin svg { width: 20px; height: 20px; }

.modal-backdrop { position: fixed; inset: 0; z-index: 50; display: none; place-items: center; padding: 20px; background: rgba(5,20,29,.56); backdrop-filter: blur(3px); }
.modal-backdrop.open { display: grid; }
.modal { overflow: hidden; width: min(620px, 100%); max-height: calc(100vh - 40px); border-radius: 14px; background: white; box-shadow: 0 30px 80px rgba(0,0,0,.25); }
.modal-header { display: flex; align-items: center; padding: 22px 24px; border-bottom: 1px solid var(--line); }
.modal-header h2 { margin: 3px 0 0; font-family: Georgia, serif; font-size: 24px; font-weight: 600; }
.modal-header .icon-button { margin-left: auto; }
#assignmentForm { overflow-y: auto; max-height: calc(100vh - 130px); }
.quick-fill-box { display: grid; grid-template-columns: 1fr 1fr 1fr; align-items: end; gap: 12px; padding: 16px 24px; background: #eef5f4; border-bottom: 1px solid #d4e4e2; }
.quick-fill-box > div { align-self: center; }
.quick-fill-box strong, .quick-fill-box small { display: block; }
.quick-fill-box strong { color: var(--teal-dark); font-family: Georgia, serif; font-size: 16px; }
.quick-fill-box small { margin-top: 3px; color: var(--muted); font-size: 9px; }
.quick-fill-box label { display: grid; gap: 5px; color: #50636d; font-size: 9px; font-weight: 750; letter-spacing: .03em; }
.quick-fill-box select { min-width: 0; width: 100%; height: 40px; padding: 0 28px 0 9px; border: 1px solid #bfcfd1; border-radius: 7px; background: white; color: var(--ink); font-size: 11px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; padding: 22px 24px; }
.form-section-title { display: flex; align-items: baseline; gap: 9px; padding: 16px 24px 0; border-top: 1px solid var(--line); }
.form-section-title:first-of-type { border-top: 0; }
.form-section-title span { color: var(--navy-800); font-family: Georgia, serif; font-size: 17px; font-weight: 600; }
.form-section-title small { color: var(--muted); font-size: 10px; }
.field { display: grid; gap: 7px; }
.field.full { grid-column: 1 / -1; }
.field span { color: #50636d; font-size: 11px; font-weight: 750; letter-spacing: .03em; }
.field em { color: var(--red); font-style: normal; }
.field input, .field select, .field textarea { width: 100%; border: 1px solid #ccd7da; border-radius: 8px; background: white; color: var(--ink); outline: 0; }
.field input, .field select { height: 42px; padding: 0 11px; }
.field textarea { resize: vertical; padding: 10px 11px; }
.field input.color-input, .color-input { min-height: 42px; padding: 4px 6px; cursor: pointer; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(24,122,120,.1); }
.field input:disabled { background: #f1f4f5; color: #97a4aa; cursor: not-allowed; }
.field-help { color: var(--muted); font-size: 10px; font-weight: 500; }
.light-duty-check { grid-column: 1 / -1; display: flex; align-items: center; gap: 11px; padding: 12px 13px; border: 1px solid #d8c993; border-radius: 8px; background: #fff9e9; color: var(--ink); cursor: pointer; }
.light-duty-check input { flex: 0 0 auto; width: 18px; height: 18px; accent-color: var(--amber); }
.light-duty-check strong, .light-duty-check small { display: block; }
.light-duty-check strong { color: #76551d; font-size: 11px; }
.light-duty-check small { margin-top: 2px; color: var(--muted); font-size: 9px; }
.light-duty-source { grid-column: 1 / -1; display: flex; align-items: center; gap: 18px; margin: -8px 0 0; padding: 11px 13px; border: 1px solid #c5d8da; border-radius: 8px; background: #f1f7f7; }
.light-duty-source legend { padding: 0 5px; color: var(--teal-dark); font-size: 10px; font-weight: 800; }
.light-duty-source label { display: flex; align-items: center; gap: 6px; color: var(--ink); font-size: 10px; font-weight: 700; cursor: pointer; }
.light-duty-source input { width: 16px; height: 16px; accent-color: var(--teal); }
.light-duty-badge { display: inline-flex; margin-top: 5px; padding: 3px 6px; border-radius: 5px; background: var(--amber-bg); color: var(--amber); font-size: 8px; font-weight: 850; letter-spacing: .04em; text-transform: uppercase; }
.previous-shift-day-check { grid-column: 1 / -1; display: flex; align-items: center; gap: 11px; padding: 12px 13px; border: 1px solid #b7d3da; border-radius: 8px; background: #eef7f9; color: var(--ink); cursor: pointer; }
.previous-shift-day-check input { flex: 0 0 auto; width: 18px; height: 18px; accent-color: var(--blue); }
.previous-shift-day-check strong, .previous-shift-day-check small { display: block; }
.previous-shift-day-check strong { color: #245b72; font-size: 11px; }
.previous-shift-day-check small { margin-top: 2px; color: var(--muted); font-size: 9px; }
.previous-day-label { color: #2c6f86; font-weight: 800; }
.bulk-shift-date-notice { grid-column: 1 / -1; display: grid; gap: 3px; padding: 11px 12px; border: 1px solid #c9dadd; border-radius: 8px; background: #f3f8f9; }
.bulk-shift-date-notice strong { color: #2b586b; font-size: 11px; }
.bulk-shift-date-notice small { color: var(--muted); font-size: 9px; line-height: 1.45; }
.bulk-shift-date-notice.previous-day { border-color: #d5bc77; background: #fff8e5; }
.bulk-shift-date-notice.previous-day strong { color: #79571d; }
.emergency-badge { display: inline-flex; margin-top: 5px; padding: 3px 6px; border-radius: 5px; background: var(--red-bg); color: var(--red); font-size: 8px; font-weight: 850; letter-spacing: .04em; text-transform: uppercase; }
.injury-badge { display: inline-flex; margin-top: 5px; padding: 3px 6px; border-radius: 5px; background: #a13d3d; color: white; font-size: 8px; font-weight: 850; letter-spacing: .04em; text-transform: uppercase; }
.injury-section-title { border-top: 1px solid #ead0d0; background: #fff7f7; }
.injury-check { grid-column: 1 / -1; display: flex; align-items: center; gap: 11px; padding: 13px; border: 1px solid #d99a9a; border-radius: 8px; background: #fff0f0; color: var(--ink); cursor: pointer; }
.injury-check input { flex: 0 0 auto; width: 19px; height: 19px; accent-color: #a13d3d; }
.injury-check strong, .injury-check small { display: block; }
.injury-check strong { color: #8d3232; font-size: 11px; }
.injury-check small { margin-top: 2px; color: var(--muted); font-size: 9px; }
.injury-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; padding: 15px; border: 1px solid #e0b8b8; border-radius: 9px; background: #fffafa; }
.injury-fields > .full { grid-column: 1 / -1; }
.injury-checklist { display: flex; flex-wrap: wrap; gap: 10px 18px; padding: 11px 12px; border: 1px solid #dfc5c5; border-radius: 7px; background: white; }
.injury-checklist label { display: flex; align-items: center; gap: 6px; color: #5f4444; font-size: 10px; font-weight: 700; }
.injury-checklist input { width: 16px; height: 16px; accent-color: #a13d3d; }
.detail-injury { grid-column: 1 / -1; padding: 11px 12px; border: 1px solid #dca6a6; border-left: 5px solid #a13d3d; border-radius: 7px; background: #fff4f4; }
.detail-injury small, .detail-injury strong { display: block; }
.detail-injury small { color: #8d3232; }
.detail-injury strong { margin: 4px 0; color: #563333; }
.post-block-field { gap: 9px; }
.post-block-heading { display: flex; align-items: center; gap: 12px; }
.post-block-heading > span { color: #50636d; font-size: 11px; font-weight: 750; }
.post-block-heading .secondary-button { min-height: 34px; margin-left: auto; font-size: 10px; }
.post-block-list { display: grid; gap: 8px; }
.post-block-row { display: grid; grid-template-columns: minmax(150px, 1.4fr) 1fr 1fr 34px; align-items: end; gap: 8px; padding: 10px; border: 1px solid var(--line); border-radius: 8px; background: #f8fafa; }
.post-block-row label { display: grid; gap: 5px; color: var(--muted); font-size: 9px; font-weight: 700; }
.post-block-row select, .post-block-row input { width: 100%; height: 36px; padding: 0 8px; border: 1px solid #cbd7da; border-radius: 6px; background: white; color: var(--ink); font-size: 10px; }
.remove-block { display: grid; place-items: center; width: 34px; height: 36px; border: 0; border-radius: 6px; background: var(--red-bg); color: var(--red); font-size: 18px; }
.planned-posts { grid-column: 1 / -1; padding-top: 11px; border-top: 1px solid var(--line); }
.planned-post-line { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 5px; color: #51646e; font-size: 10px; }
.planned-post-line strong { color: var(--ink); }
.attachment-field { gap: 8px; }
.attachment-drop { display: flex; align-items: center; gap: 11px; padding: 15px; border: 1px dashed #9db7ba; border-radius: 9px; background: #f5f9f9; color: var(--teal-dark); cursor: pointer; }
.attachment-drop:hover { border-color: var(--teal); background: #edf6f5; }
.attachment-drop svg { flex: 0 0 auto; width: 24px; height: 24px; }
.attachment-drop strong, .attachment-drop small { display: block; }
.attachment-drop strong { font-size: 12px; }
.attachment-drop small { margin-top: 2px; color: var(--muted); font-size: 10px; font-weight: 500; }
.attachment-list { display: grid; gap: 6px; }
.attachment-row { display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: 9px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: white; }
.file-icon { display: grid; place-items: center; width: 31px; height: 31px; border-radius: 6px; background: #e8f0f1; color: var(--teal-dark); font-size: 9px; font-weight: 800; }
.attachment-file-info { min-width: 0; }
.attachment-row strong, .attachment-row small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.attachment-row strong { font-size: 11px; }
.attachment-row small { margin-top: 2px; color: var(--muted); font-size: 9px; }
.attachment-actions { display: flex; gap: 4px; }
.attachment-metadata { grid-column: 1 / -1; display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 7px; padding-top: 8px; border-top: 1px solid var(--line); }
.attachment-metadata label { display: grid; gap: 4px; color: var(--muted); font-size: 8px; font-weight: 700; }
.attachment-metadata label.full { grid-column: 1 / -1; }
.attachment-metadata input, .attachment-metadata select { width: 100%; height: 34px; padding: 0 8px; border: 1px solid #cbd7da; border-radius: 6px; background: var(--white); color: var(--ink); font-size: 10px; }
.attachment-action { padding: 5px 7px; border: 0; border-radius: 5px; background: #edf2f3; color: #536670; font-size: 10px; font-weight: 700; }
.attachment-action:hover { background: #dfe9eb; color: var(--ink); }
.attachment-action.remove { color: var(--red); }
.modal-footer { display: flex; align-items: center; gap: 10px; padding: 16px 24px; border-top: 1px solid var(--line); background: #f8fafa; }
.bulk-modal { width: min(650px, 100%); }
.bulk-list-header { display: flex; align-items: center; gap: 20px; padding: 15px 24px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: #f7f9f9; }
.bulk-list-header strong, .bulk-list-header small { display: block; }
.bulk-list-header strong { font-size: 12px; }
.bulk-list-header small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.check-label { margin-left: auto; display: flex; align-items: center; gap: 6px; color: #526670; font-size: 10px; font-weight: 700; white-space: nowrap; }
.check-label input { width: 16px; height: 16px; accent-color: var(--teal); }
.bulk-deputy-list { overflow-y: auto; max-height: 330px; padding: 8px 24px; }
.bulk-deputy { display: grid; grid-template-columns: 22px 38px 1fr; align-items: center; gap: 9px; padding: 10px 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.bulk-deputy:last-child { border-bottom: 0; }
.bulk-deputy input { width: 17px; height: 17px; accent-color: var(--teal); }
.bulk-deputy .avatar { width: 36px; height: 36px; }
.bulk-deputy strong, .bulk-deputy small { display: block; }
.bulk-deputy strong { font-size: 12px; }
.bulk-deputy small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.bulk-empty { padding: 45px 15px; color: var(--muted); text-align: center; font-size: 12px; }
.reassign-modal { width: min(560px, 100%); }
.reassign-current { display: flex; align-items: center; gap: 11px; padding: 17px 24px; border-bottom: 1px solid var(--line); background: #f5f9f9; }
.reassign-current strong, .reassign-current small { display: block; }
.reassign-current strong { font-size: 13px; }
.reassign-current small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.profile-document-modal { width: min(590px, 100%); }
.calendar-event-modal { width: min(610px, 100%); }
.emergency-staffing-modal { width: min(600px, 100%); }
.emergency-modal-header { border-bottom-color: #e5c2bd; }
.emergency-modal-header .eyebrow { color: #ad4b3f; }
.emergency-banner { display: flex; align-items: center; gap: 12px; padding: 14px 24px; border-bottom: 1px solid #e7cbc7; background: #fff4f2; }
.emergency-banner > span { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; background: #ad4b3f; color: white; font-size: 17px; }
.emergency-banner strong, .emergency-banner small { display: block; }
.emergency-banner strong { color: #74352d; font-size: 11px; }
.emergency-banner small { margin-top: 3px; color: #8b6762; font-size: 9px; line-height: 1.4; }
.emergency-duration { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 10px 12px; border: 1px solid #e2d2b0; border-radius: 8px; background: #fffaf0; }
.emergency-duration small { color: #7c6840; font-size: 9px; font-weight: 750; letter-spacing: .05em; text-transform: uppercase; }
.emergency-duration strong { color: #77551b; font-size: 11px; }
.event-all-day { display: flex; align-items: center; gap: 8px; align-self: end; min-height: 42px; color: var(--ink); font-size: 11px; font-weight: 700; }
.event-shared-check { padding: 9px 10px; border: 1px solid var(--line); border-radius: 9px; background: var(--paper); }
.event-all-day input { width: 17px; height: 17px; accent-color: var(--teal); }
.recurrence-interval { display: grid; grid-template-columns: 80px 1fr; align-items: center; gap: 9px; }
.recurrence-interval small { color: var(--muted); font-size: 10px; font-weight: 700; }
.recurrence-pattern { grid-column: 1 / -1; padding: 10px 12px; border: 1px solid #b9d4e5; border-radius: 7px; background: var(--blue-bg); color: #245b7b; font-size: 10px; font-weight: 750; }
.recurrence-pattern::before { content: "Monthly pattern: "; font-weight: 850; }
.document-deputy-banner { display: flex; align-items: center; gap: 11px; padding: 16px 24px; border-bottom: 1px solid var(--line); background: #f5f9f9; }
.document-deputy-banner strong, .document-deputy-banner small { display: block; }
.document-deputy-banner strong { font-size: 13px; }
.document-deputy-banner small { margin-top: 3px; color: var(--muted); font-size: 9px; }
.footer-spacer { flex: 1; }
.hidden { display: none !important; }
.toast { position: fixed; right: 24px; bottom: 24px; z-index: 80; transform: translateY(20px); padding: 12px 16px; border-radius: 8px; background: var(--navy-950); color: white; box-shadow: var(--shadow); font-size: 12px; opacity: 0; pointer-events: none; transition: .2s ease; }
.toast.show { transform: translateY(0); opacity: 1; }
.sr-only { position: absolute; overflow: hidden; width: 1px; height: 1px; padding: 0; margin: -1px; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

@media (max-width: 1050px) {
  .stats-grid { grid-template-columns: repeat(3, 1fr); }
  .command-grid, .operations-grid { grid-template-columns: 1fr; }
  .equipment-panel { grid-column: auto; }
  .panel-header { align-items: flex-start; flex-direction: column; }
  .header-actions { width: 100%; margin-left: 0; flex-wrap: wrap; justify-content: flex-start; }
  .filters { width: 100%; margin-left: 0; }
  .search-field { width: 100%; }
  .deputy-detail { grid-template-columns: repeat(3, 1fr); }
  .detail-notes { grid-column: 1 / -1; }
  .setup-grid { grid-template-columns: 1fr; }
  .timeoff-layout { grid-template-columns: 1fr; }
  .microsoft-sync-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 780px) {
  #userPermissionList { grid-template-columns: 1fr; }
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; z-index: 40; transform: translateX(-100%); width: 250px; transition: transform .2s ease; }
  .sidebar.open { transform: translateX(0); }
  .sidebar-scrim { position: fixed; inset: 0; z-index: 35; display: block; border: 0; background: rgba(5,20,29,.48); opacity: 0; pointer-events: none; transition: opacity .2s ease; }
  .menu-open .sidebar-scrim { opacity: 1; pointer-events: auto; }
  .menu-open { overflow: hidden; }
  .mobile-menu { display: block; }
  .topbar { align-items: flex-start; flex-wrap: wrap; padding: 18px 20px; }
  .command-hero, .operations-intro { align-items: flex-start; margin-bottom: 13px; padding: 19px; }
  .command-metrics { grid-template-columns: 1fr 1fr; }
  .sync-banner { align-items: stretch; flex-wrap: wrap; margin: 14px 16px 0; }
  .sync-banner div { flex-basis: calc(100% - 48px); }
  .sync-banner .secondary-button { flex: 1 1 100%; }
  .topbar-actions { width: 100%; margin-left: 0; }
  .topbar-actions { flex-wrap: wrap; }
  .topbar-actions .primary-button { margin-left: auto; }
  .view { padding: 22px 16px 40px; }
  .filters { display: grid; grid-template-columns: 1fr 1fr; }
  .search-field { grid-column: 1 / -1; }
  #attendanceFilter { grid-column: 1 / -1; }
  .table-wrap { overflow-x: auto; }
  .table-wrap table { min-width: 760px; }
  .records-toolbar { flex-direction: column; }
  .record-picker { width: 100%; margin-left: 0; }
  .record-picker select { width: 100%; }
  .record-stats { grid-template-columns: repeat(2, 1fr); }
  .record-day { grid-template-columns: 1fr; }
  .upcoming-row { grid-template-columns: 80px 1fr auto; }
  .upcoming-row > span:nth-child(3), .upcoming-row > span:nth-child(4) { display: none; }
  .record-document-list { grid-template-columns: 1fr; }
  .audit-filter-bar { grid-template-columns: 1fr; }
  .report-document { padding: 24px 20px; }
  .report-summary-grid { grid-template-columns: repeat(2, 1fr); }
  .report-detail-grid { grid-template-columns: 1fr 1fr; }
  .report-narrative-grid { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .light-duty-source { align-items: flex-start; flex-direction: column; gap: 8px; }
  .injury-fields { grid-template-columns: 1fr; padding: 12px; }
  .injury-fields > * { grid-column: 1 / -1; }
  .injury-checklist { align-items: flex-start; flex-direction: column; }
  .command-hero { flex-wrap: wrap; }
  .command-clock { width: 100%; margin-left: 0; text-align: left; }
  .command-clock strong { font-size: 24px; }
  .command-metrics { gap: 8px; }
  .command-metrics article { padding: 12px; }
  .metric-symbol { width: 30px; height: 30px; }
  .trend-grid { grid-template-columns: 1fr 1fr; padding: 0 13px 14px; }
  .attention-list, .on-duty-list, .coverage-list { padding: 3px 13px 14px; }
  .operations-list { padding: 5px 13px 14px; }
  .operations-item { grid-template-columns: 30px minmax(0, 1fr); }
  .operations-item-actions { grid-column: 2; }
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 9px; }
  .stat-card { min-height: 88px; padding: 14px; }
  .stat-icon { width: 36px; height: 36px; }
  .stat-card strong { font-size: 23px; }
  .date-control { flex: 1; }
  .date-control input { width: 100%; }
  .primary-button { padding: 0 12px; }
  button, select, input { min-height: 44px; }
  .topbar { gap: 14px; }
  .topbar h1 { font-size: 25px; }
  .calendar-toolbar { align-items: flex-start; padding: 16px; }
  .outlook-sync-header { align-items: flex-start; flex-direction: column; padding: 16px; }
  .outlook-sync-actions { justify-content: flex-start; width: 100%; margin-left: 0; }
  .microsoft-sync-card { margin: 0 14px 14px; }
  .microsoft-sync-grid,
  .outlook-sync-grid,
  .microsoft-redirect-row { grid-template-columns: 1fr; }
  .microsoft-redirect-row code { white-space: normal; word-break: break-all; }
  .outlook-manual-divider { margin: 0 14px 12px; }
  .calendar-toolbar h2 { font-size: 19px; }
  .calendar-day-toolbar { align-items: flex-start; flex-direction: column; padding: 16px; }
  .calendar-day-toolbar h2 { font-size: 19px; }
  .calendar-day-actions { flex-wrap: wrap; width: 100%; margin-left: 0; }
  .calendar-day-actions .primary-button { flex: 1; }
  .calendar-all-day-lane, .calendar-hour-row { grid-template-columns: 55px minmax(0, 1fr); }
  .calendar-all-day-label, .calendar-hour-label { padding-left: 4px; padding-right: 6px; font-size: 7px; }
  .calendar-day-scroll { max-height: 620px; }
  .calendar-hour-content { background-size: 50% 100%; }
  .day-agenda-card { min-width: min(150px, 100%); max-width: 100%; }
  .day-agenda-card.event.calendar-event-segment { width: min(230px, 100%); min-width: min(230px, 100%); }
  .calendar-weekdays span { padding: 7px 2px; font-size: 7px; }
  .calendar-day { min-height: 67px; padding: 4px; }
  .calendar-number { width: 21px; height: 21px; font-size: 9px; }
  .calendar-count { top: 5px; right: 4px; padding: 2px 4px; }
  .calendar-entries { margin-top: 3px; }
  .calendar-entry { height: 5px; padding: 0; border: 0; border-radius: 3px; background: var(--teal); color: transparent; }
  .calendar-entry.unassigned { background: var(--amber); }
  .calendar-entry.timeoff { background: #8d6bb6; }
  .calendar-entry.event { background: var(--blue); }
  .calendar-entry.event-training { background: #7c61b2; }
  .calendar-entry.event-court, .calendar-entry.event-deadline { background: var(--red); }
  .calendar-more { display: none; }
  .upcoming-list { padding: 0 14px 12px; }
  .view { padding: 15px 10px 30px; }
  .panel { border-radius: 10px; box-shadow: 0 4px 18px rgba(20,43,56,.07); }
  .panel-header { padding: 17px 15px; }
  .table-wrap { overflow: visible; padding: 0 0 1px; }
  .table-wrap table, .table-wrap tbody { display: block; min-width: 0; }
  .table-wrap thead { display: none; }
  .table-wrap tbody tr:not(.deputy-detail-row):not(.shift-group-row):not(.shift-section-row) { position: relative; display: grid; grid-template-columns: 1fr 1fr; margin: 12px 10px 0; border: 1px solid var(--line); border-bottom: 0; border-radius: 10px 10px 0 0; background: white; }
  .table-wrap tbody tr:not(.deputy-detail-row):not(.shift-group-row):not(.shift-section-row) td { display: block; padding: 9px 12px; border: 0; }
  .table-wrap tbody tr:not(.deputy-detail-row):not(.shift-group-row):not(.shift-section-row) td:first-child { grid-column: 1 / -1; padding: 13px 100px 12px 12px; border-bottom: 1px solid var(--line); }
  .table-wrap tbody tr:not(.deputy-detail-row):not(.shift-group-row):not(.shift-section-row) td:nth-child(2) { grid-column: 1 / -1; padding-top: 12px; }
  .table-wrap tbody tr:not(.deputy-detail-row):not(.shift-group-row):not(.shift-section-row) td:last-child { position: absolute; top: 10px; right: 9px; padding: 0; }
  .table-wrap .shift-group-row { display: table; width: 100%; margin-top: 10px; }
  .table-wrap .shift-group-row td { display: table-cell; padding: 10px 13px; }
  .table-wrap .shift-section-row { display: table; width: 100%; }
  .table-wrap .shift-section-row td { display: table-cell; padding: 0; }
  .shift-section-toggle { padding: 12px 13px; }
  .shift-group-row span { align-items: flex-start; flex-direction: column; gap: 2px; }
  .on-duty-date-bar { align-items: flex-start; flex-direction: column; gap: 2px; margin-left: -13px; margin-right: -13px; padding: 9px 13px; }
  .table-wrap .deputy-detail-row { display: block; margin: 0 10px 13px; }
  .table-wrap .deputy-detail-row td { display: block; padding: 0; border: 0; }
  .deputy-detail { grid-template-columns: 1fr 1fr; gap: 10px; padding: 12px; border-radius: 0 0 10px 10px; }
  .detail-notes { grid-column: 1 / -1; }
  .modal-backdrop { padding: 0; }
  .modal { width: 100%; height: 100dvh; max-height: none; border-radius: 0; }
  #assignmentForm { max-height: calc(100dvh - 82px); }
  .modal-header { padding: 17px 18px; }
  .quick-fill-box { grid-template-columns: 1fr; padding: 14px 18px; }
  .form-grid { padding: 18px; }
  .form-section-title { align-items: flex-start; flex-direction: column; gap: 3px; padding: 15px 18px 0; }
  .modal-footer { position: sticky; bottom: 0; z-index: 2; padding: 12px 18px; }
  .bulk-list-header { align-items: flex-start; padding: 13px 18px; }
  .bulk-deputy-list { max-height: calc(100dvh - 335px); padding: 8px 18px; }
  .form-grid { grid-template-columns: 1fr; }
  .post-block-row { grid-template-columns: 1fr 1fr 34px; }
  .post-block-row label:first-child { grid-column: 1 / -1; }
  .field.full { grid-column: auto; }
  .modal-footer { flex-wrap: wrap; }
}

html[data-theme="dark"] {
  color-scheme: dark;
  --paper: #0d171d;
  --white: #16242c;
  --ink: #e8eef1;
  --muted: #92a4ae;
  --line: #2b3d47;
  --teal: #4bb4af;
  --teal-dark: #77cbc7;
  --green: #61bf8e;
  --green-bg: #17372a;
  --amber: #e0aa54;
  --amber-bg: #3b2d18;
  --blue: #71b4dd;
  --blue-bg: #183044;
  --red: #e48686;
  --red-bg: #3d2426;
  --shadow: 0 14px 40px rgba(0, 0, 0, .28);
}
html[data-theme="dark"] body { background: var(--paper); color: var(--ink); }
html[data-theme="dark"] .access-login-card { border-color: rgba(232,187,103,.28); background: rgba(20,33,41,.97); }
html[data-theme="dark"] .access-login-card h1 { color: var(--ink); }
html[data-theme="dark"] .topbar { background: rgba(19, 31, 38, .9); border-color: var(--line); }
html[data-theme="dark"] .sync-banner { border-color: #6b5630; background: #352b19; color: #eed8a8; }
html[data-theme="dark"] .quick-action-bar,
html[data-theme="dark"] .command-metrics article { background: var(--white); border-color: var(--line); }
html[data-theme="dark"] .shift-section-row td { background: #17272f; border-color: var(--line); }
html[data-theme="dark"] .shift-section-toggle:hover { background: #20343d; }
html[data-theme="dark"] .roster-shift-group { background: var(--white); border-color: var(--line); }
html[data-theme="dark"] .roster-shift-toggle { background: #17272f; }
html[data-theme="dark"] .roster-shift-toggle:hover { background: #20343d; }
html[data-theme="dark"] .quick-action-bar button,
html[data-theme="dark"] .trend-grid div { background: #101c23; }
html[data-theme="dark"] .metric-symbol.purple { color: #c7ace8; background: #352849; }
html[data-theme="dark"] .date-control input,
html[data-theme="dark"] .filters select,
html[data-theme="dark"] .search-field,
html[data-theme="dark"] .secondary-button,
html[data-theme="dark"] .stat-card,
html[data-theme="dark"] .panel,
html[data-theme="dark"] .record-picker select,
html[data-theme="dark"] .field input,
html[data-theme="dark"] .field select,
html[data-theme="dark"] .field textarea,
html[data-theme="dark"] .quick-fill-box select,
html[data-theme="dark"] .attachment-row,
html[data-theme="dark"] .post-block-row select,
html[data-theme="dark"] .post-block-row input,
html[data-theme="dark"] .attachment-metadata input,
html[data-theme="dark"] .attachment-metadata select,
html[data-theme="dark"] .quick-post-input,
html[data-theme="dark"] .reassign-button,
html[data-theme="dark"] .theme-toggle { background: var(--white); color: var(--ink); border-color: var(--line); }
html[data-theme="dark"] .panel,
html[data-theme="dark"] .stat-card { border-color: var(--line); }
html[data-theme="dark"] th,
html[data-theme="dark"] .setup-form,
html[data-theme="dark"] .operations-form,
html[data-theme="dark"] .modal-footer,
html[data-theme="dark"] .bulk-list-header { background: #111f27; }
html[data-theme="dark"] .permission-grid,
html[data-theme="dark"] .permission-check,
html[data-theme="dark"] .access-disabled-check { background: #112028; border-color: var(--line); }
html[data-theme="dark"] .audit-subpanel h3 { color: #c6e4ef; }
html[data-theme="dark"] .audit-entry .audit-detail { color: #d2e0e5; }
html[data-theme="dark"] tbody tr:hover,
html[data-theme="dark"] .deputy-detail-row td { background: #101c23; }
html[data-theme="dark"] .shift-group-row td,
html[data-theme="dark"] .on-duty-date-bar { background: #25495d; }
html[data-theme="dark"] .shift-group-row.carryover td,
html[data-theme="dark"] .on-duty-date-bar.carryover { background: #51446c; }
html[data-theme="dark"] .shift-group-row.next td,
html[data-theme="dark"] .on-duty-date-bar.next { background: #155b59; }
html[data-theme="dark"] .deputy-detail,
html[data-theme="dark"] .modal { background: #16242c; border-color: var(--line); }
html[data-theme="dark"] .avatar,
html[data-theme="dark"] .history-dot,
html[data-theme="dark"] .empty-icon,
html[data-theme="dark"] .file-icon { background: #243842; color: #8fd3cf; }
html[data-theme="dark"] .record-stat,
html[data-theme="dark"] .record-documents,
html[data-theme="dark"] .post-block-row,
html[data-theme="dark"] .attachment-drop,
html[data-theme="dark"] .quick-fill-box,
html[data-theme="dark"] .reassign-current { background: #112028; border-color: var(--line); }
html[data-theme="dark"] .outlook-sync-status { border-color: #2f4650; background: #112028; color: #b9c9d0; }
html[data-theme="dark"] .outlook-sync-status.success { border-color: #315846; background: #183a2b; color: #75d6a2; }
html[data-theme="dark"] .outlook-sync-status.warning { border-color: #5f4b2b; background: #2e281b; color: #edc77f; }
html[data-theme="dark"] .microsoft-sync-card { border-color: #2d4852; background: linear-gradient(135deg, #10202a, #11251f); }
html[data-theme="dark"] .microsoft-sync-copy strong { color: #c6e4ef; }
html[data-theme="dark"] .microsoft-auto-check,
html[data-theme="dark"] .microsoft-redirect-row { border-color: #2f4650; background: #13232b; }
html[data-theme="dark"] .microsoft-redirect-row code { color: #9bd0e2; }
html[data-theme="dark"] .document-deputy-banner { background: #112028; border-color: var(--line); }
html[data-theme="dark"] .calendar-weekdays,
html[data-theme="dark"] .calendar-day.outside { background: #101c23; }
html[data-theme="dark"] .calendar-day:hover { background: #192a33; }
html[data-theme="dark"] .calendar-entry { background: #183a38; color: #b8dfdc; }
html[data-theme="dark"] .calendar-entry.timeoff { background: #3b2d51; color: #d0b9ef; }
html[data-theme="dark"] .calendar-entry.event { background: var(--event-bg, #18364a); color: var(--event-text, #a9d6f0); border-color: var(--event-color, var(--blue)); }
html[data-theme="dark"] .calendar-entry.event-training { background: var(--event-bg, #342a4b); color: var(--event-text, #c9b9ea); border-color: var(--event-color, #6b55a1); }
html[data-theme="dark"] .calendar-entry.event-court,
html[data-theme="dark"] .calendar-entry.event-deadline { background: var(--event-bg, #45272a); color: var(--event-text, #f09b9b); border-color: var(--event-color, var(--red)); }
html[data-theme="dark"] .calendar-all-day-lane { background: #101c23; }
html[data-theme="dark"] .calendar-hour-content { background-color: #142129; background-image: linear-gradient(to right, rgba(143,211,207,.055) 1px, transparent 1px); }
html[data-theme="dark"] .calendar-hour-add { border-color: #3d535d; color: #82959e; }
html[data-theme="dark"] .day-agenda-card { border-color: #31585a; background: #173432; }
html[data-theme="dark"] .day-agenda-card.event { border-color: #2f5268; border-left-color: var(--event-color, var(--blue)); background: var(--event-bg, #18364a); color: var(--event-text, var(--ink)); }
html[data-theme="dark"] .recurrence-pattern { border-color: #2f5268; background: #18364a; color: #a9d6f0; }
html[data-theme="dark"] .day-agenda-card.event-training { background: var(--event-bg, #342a4b); }
html[data-theme="dark"] .day-agenda-card.event-court,
html[data-theme="dark"] .day-agenda-card.event-deadline { background: var(--event-bg, #45272a); }
html[data-theme="dark"] .day-agenda-card.event-inspection { background: var(--event-bg, #41321b); }
html[data-theme="dark"] .day-agenda-card.assignment.carryover,
html[data-theme="dark"] .day-agenda-card.timeoff { background: #332849; }
html[data-theme="dark"] .attachment-chip,
html[data-theme="dark"] .mini-button,
html[data-theme="dark"] .attachment-action { background: #24353e; color: #b9c9d0; border-color: var(--line); }
html[data-theme="dark"] .field input:disabled { background: #1a2931; color: #6f818a; }
html[data-theme="dark"] .light-duty-check { border-color: #68532f; background: #342a19; }
html[data-theme="dark"] .light-duty-check strong { color: #edc77f; }
html[data-theme="dark"] .light-duty-source { border-color: #315457; background: #14282a; }
html[data-theme="dark"] .light-duty-source legend { color: #8bd2c9; }
html[data-theme="dark"] .previous-shift-day-check,
html[data-theme="dark"] .bulk-shift-date-notice { border-color: #31545c; background: #172a31; }
html[data-theme="dark"] .previous-shift-day-check strong,
html[data-theme="dark"] .bulk-shift-date-notice strong,
html[data-theme="dark"] .previous-day-label { color: #9bd0e2; }
html[data-theme="dark"] .bulk-shift-date-notice.previous-day { border-color: #68532f; background: #342a19; }
html[data-theme="dark"] .bulk-shift-date-notice.previous-day strong { color: #edc77f; }
html[data-theme="dark"] .previous-shift-note { background: #41321b; color: #edbd70; }
html[data-theme="dark"] .injury-section-title { border-color: #5c3434; background: #2c1d1d; }
html[data-theme="dark"] .injury-check { border-color: #704141; background: #3a2424; }
html[data-theme="dark"] .injury-check strong { color: #f0aaaa; }
html[data-theme="dark"] .injury-fields,
html[data-theme="dark"] .injury-checklist { border-color: #624040; background: #2b2020; }
html[data-theme="dark"] .injury-checklist label { color: #e0bcbc; }
html[data-theme="dark"] .detail-injury,
html[data-theme="dark"] .record-injury { border-color: #704141; background: #3a2424; color: #f0d2d2; }
html[data-theme="dark"] .record-injury p { color: #e0c2c2; }
html[data-theme="dark"] .record-stat.injury-highlight { border-color: #704141; background: #3a2424; }
html[data-theme="dark"] .record-stat.injury-highlight strong { color: #f09b9b; }
html[data-theme="dark"] .emergency-banner { border-color: #55332f; background: #2e1e1d; }
html[data-theme="dark"] .emergency-banner strong { color: #f0aaa1; }
html[data-theme="dark"] .emergency-banner small { color: #b98c86; }
html[data-theme="dark"] .emergency-duration { border-color: #5f4b2b; background: #2e281b; }
html[data-theme="dark"] .emergency-duration strong { color: #edc77f; }
html[data-theme="dark"] .status-assigned { color: #8bc8ee; background: #1a364a; }
html[data-theme="dark"] .status-en-route { color: #edbd70; background: #41321b; }
html[data-theme="dark"] .status-on-post { color: #75d6a2; background: #183a2b; }
html[data-theme="dark"] .status-break { color: #c8b3ef; background: #332849; }
html[data-theme="dark"] .status-off-duty { color: #b6c4ca; background: #26363e; }
html[data-theme="dark"] .status-unavailable { color: #f09b9b; background: #45272a; }
html[data-theme="dark"] .attendance-badge { background: #24343d; color: #bccad0; }
html[data-theme="dark"] .attendance-late,
html[data-theme="dark"] .attendance-no-show { color: #f09b9b; background: #45272a; }
html[data-theme="dark"] .attendance-on-time { color: #75d6a2; background: #183a2b; }
html[data-theme="dark"] .attendance-called-out,
html[data-theme="dark"] .attendance-excused { color: #edbd70; background: #41321b; }
html[data-theme="dark"] input::placeholder,
html[data-theme="dark"] textarea::placeholder { color: #667984; }

@media print {
  *, *::before, *::after { -webkit-print-color-adjust: exact !important; print-color-adjust: exact !important; }
  html, body { width: 100%; min-width: 0; background: white !important; color: #172832 !important; font-family: Arial, Helvetica, sans-serif; }
  .sidebar, .topbar, .topbar-actions, .filters, .row-action, .toast, .no-print, .sync-banner { display: none !important; }
  .app-shell, main { display: block; min-width: 0; }
  .view { display: none !important; padding: 0; }
  #reportView { display: block !important; }
  .report-document { overflow: visible; max-width: none; margin: 0; padding: 0 0 .18in; border: 0; border-radius: 0; background: white !important; color: #172832 !important; box-shadow: none; }
  .report-header { margin: 0; padding: .2in .22in; border-radius: 0; background: linear-gradient(125deg, #0f2c3e 0%, #174c58 72%, #1b706b 100%) !important; }
  .report-brand-mark { width: .48in; height: .48in; font-size: 14pt; }
  .report-kicker { font-size: 5.5pt; }
  .report-header h2 { font-size: 19pt; }
  .report-header p { font-size: 6.5pt; }
  .report-generated { min-width: 1.55in; font-size: 5.5pt; }
  .report-generated strong { font-size: 9pt; }
  .report-classification { margin: 0; padding: .055in .22in; background: #d8ac51 !important; font-size: 5pt; }
  .report-summary-grid { grid-template-columns: repeat(4, 1fr); gap: .07in; margin: .15in 0 .18in; }
  .report-summary { min-height: .46in; padding: .075in .09in; border-top-width: 3px; }
  .report-summary small { font-size: 5pt; }
  .report-summary strong { margin-top: 2px; font-size: 14pt; }
  .report-section { margin-top: .18in; }
  .report-section-title { margin-bottom: .075in; padding: .045in .07in; font-size: 10pt; break-after: avoid-page; page-break-after: avoid; }
  .report-narrative { min-height: .58in; padding: .08in .09in; }
  .report-narrative small { font-size: 5pt; }
  .report-narrative p { font-size: 6.5pt; line-height: 1.42; }
  .report-table { font-size: 6pt; }
  .report-table thead { display: table-header-group; }
  .report-table tr { break-inside: avoid; page-break-inside: avoid; }
  .report-table th { padding: .055in .06in; background: #17495b !important; color: white !important; font-size: 5pt; }
  .report-table td { padding: .055in .06in; font-size: 6pt; line-height: 1.35; }
  .report-table tbody tr:nth-child(even) td { background: #f5f8f8 !important; }
  .report-deputies { gap: .1in; }
  .report-deputy { break-inside: avoid-page; page-break-inside: avoid; box-shadow: none; }
  .report-deputy-header { padding: .075in .09in; background: #edf4f4 !important; }
  .report-deputy-header .avatar { width: .27in; height: .27in; font-size: 7pt; }
  .report-deputy-header h4 { font-size: 8pt; }
  .report-deputy-header p { font-size: 5.5pt; }
  .report-deputy-header .status-select { padding: 4px 7px; font-size: 6pt; }
  .report-detail { min-height: .33in; padding: .055in .065in; }
  .report-detail small { font-size: 4.5pt; }
  .report-detail strong { font-size: 5.8pt; line-height: 1.35; }
  .report-signoff { break-inside: avoid; margin-top: .28in; padding-top: .12in; }
  .report-signoff div span { height: .22in; }
  .report-signoff small { font-size: 5pt; }
  .report-footer { position: static; right: auto; bottom: auto; left: auto; break-inside: avoid; margin: .18in 0 0; padding: .06in 0 0; border-top: 1px solid #b9c9cd; background: white !important; font-size: 5pt; }
  .report-empty { padding: .25in; font-size: 7pt; }
  p, strong, td { orphans: 3; widows: 3; }
  .report-header { break-after: avoid-page; page-break-after: avoid; }
  .report-section-title { break-after: avoid-page; page-break-after: avoid; }
  @page { size: letter portrait; margin: .68in .42in .62in; }
}
