:root {
  color-scheme: light;
  --navy: #153950;
  --ink: #152a38;
  --muted: #506678;
  --line: #dce5eb;
  --canvas: #edf3f6;
  --surface: #fff;
  --signal: #08726c;
  --ease: 150ms ease;
  font-family: "Segoe UI", Inter, system-ui, sans-serif;
  line-height: 1.5;
  color: var(--ink);
  background: var(--canvas);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-width: 300px; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .58; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid #31a9a1;
  outline-offset: 2px;
}
h1, h2, p { margin: 0; }
h1 { font-size: clamp(2rem, 4vw, 3rem); letter-spacing: -.05em; line-height: 1.12; }
h2 { font-size: 1.2rem; letter-spacing: -.02em; line-height: 1.25; }
.muted { color: var(--muted); }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.eyebrow { display: block; font-size: .875rem; font-weight: 760; letter-spacing: .11em; text-transform: uppercase; margin-bottom: .5rem; }
.brand { display: flex; gap: .65rem; align-items: center; font-weight: 770; font-size: 1.28rem; letter-spacing: -.035em; }
.brand small { font-weight: 550; font-size: .9rem; letter-spacing: 0; color: #abc5d2; margin-left: .18rem; }
.brand-mark { display: grid; width: 2rem; height: 2rem; place-items: center; border-radius: .5rem; font-size: 1.25rem; color: #0f354c; background: #9ce1d5; }
.login-shell { display: grid; grid-template-columns: .94fr 1fr; max-width: 62rem; min-height: 34rem; margin: max(2rem, 9vh) auto; width: min(calc(100% - 2rem), 62rem); background: var(--surface); border: 1px solid #e0e9ee; border-radius: 1.3rem; overflow: hidden; box-shadow: 0 1rem 3rem #18374c19; }
.login-brand { background: radial-gradient(ellipse at 85% 100%, #286374, #153950 68%); color: white; display: flex; flex-direction: column; justify-content: space-between; gap: 2.6rem; padding: clamp(1.6rem, 4vw, 3rem); }
.login-brand h1 { font-size: clamp(2.6rem, 6vw, 4.5rem); margin-bottom: .7rem; }
.login-brand p { max-width: 25ch; color: #d5e9ec; font-size: 1.05rem; }
.login-brand .eyebrow, .brand-caption { color: #bce2e0; }
.brand-caption { font-size: .87rem; }
.login-content { display: grid; align-content: center; padding: clamp(1.6rem, 5vw, 4.1rem); }
.login-content h2 { font-size: 1.9rem; }
.login-content p.muted { margin: .45rem 0 1.35rem; }
label { display: block; font-weight: 650; margin: .9rem 0 .35rem; }
input, select, textarea { display: block; width: 100%; min-height: 2.85rem; padding: .62rem .76rem; color: var(--ink); background: #fbfdfe; border: 1px solid #b9cbd6; border-radius: .48rem; }
select { appearance: none; padding-right: 2.1rem; background: linear-gradient(45deg, transparent 50%, #3c6278 50%) right 1rem center / .33rem .33rem no-repeat, linear-gradient(135deg, #3c6278 50%, transparent 50%) right .67rem center / .33rem .33rem no-repeat, #fbfdfe; }
textarea { resize: vertical; }
.primary, .secondary { border: 1px solid transparent; border-radius: .47rem; min-height: 2.75rem; padding: .58rem .95rem; font-weight: 680; transition: background var(--ease); }
.primary { color: #fff; background: var(--navy); }
.primary:hover:not(:disabled) { background: #225873; }
.secondary { color: var(--navy); border-color: var(--line); background: #f5f8fa; }
.wide { width: 100%; margin-top: 1.25rem; }
.portal { min-height: 100vh; display: grid; grid-template-columns: minmax(13.5rem, 15.5rem) minmax(0, 1fr); }
.sidebar { display: flex; flex-direction: column; min-height: 100vh; gap: 2.55rem; padding: 1.65rem 1.1rem 1.15rem; color: #fff; background: var(--navy); }
.sidebar .brand { padding: 0 .45rem; }
nav { display: grid; gap: .35rem; }
nav button { border: 1px solid transparent; background: transparent; color: #e4f0f5; border-radius: .48rem; text-align: left; padding: .65rem .75rem; font-size: .96rem; font-weight: 630; }
nav button:hover, nav button[aria-current="page"] { background: #2b5169; }
nav button[aria-current="page"] { border-color: #648497; color: white; }
.account { margin-top: auto; display: grid; gap: .28rem; border-top: 1px solid #56798d; padding: 1rem .45rem 0; }
.account span { font-size: .9rem; color: #d1e4ec; overflow-wrap: anywhere; }
.quiet { justify-self: start; color: inherit; background: transparent; border: 0; padding: .45rem 0; text-decoration: underline; text-underline-offset: .2em; }
.workspace { width: min(100%, 92rem); padding: clamp(1.25rem, 3.2vw, 3.25rem); }
.page-header { display: flex; gap: 1rem; justify-content: space-between; align-items: end; margin-bottom: 1.4rem; }
.page-header .eyebrow { color: var(--signal); }
.page-header p { margin-top: .45rem; }
.timezone { font-size: .875rem; white-space: nowrap; color: #315666; background: #deedf0; border: 1px solid #cae1e7; padding: .3rem .68rem; border-radius: .4rem; }
.workspace-grid { display: grid; grid-template-columns: minmax(17rem, .78fr) minmax(0, 1.22fr); gap: 1rem; align-items: start; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: .72rem; padding: clamp(1rem, 2.05vw, 1.48rem); box-shadow: 0 .15rem .45rem #17334a0d; }
.card h2 + p { margin-top: .4rem; }
.section-title { display: flex; justify-content: space-between; align-items: start; gap: .55rem; }
.record-count { font-size: .9rem; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; }
.form-note { color: var(--muted); font-size: .875rem; margin: .65rem 0 .3rem; min-height: 1.3em; }
.control button { margin-top: .9rem; }
.table-wrap { overflow-x: auto; }
table { width: 100%; min-width: 22rem; border-collapse: collapse; margin-top: 1rem; font-size: .93rem; }
th, td { border-bottom: 1px solid var(--line); text-align: left; padding: .68rem .44rem; color: var(--ink); vertical-align: top; }
th { color: var(--muted); font-size: .875rem; }
td small { display: block; color: var(--muted); font-size: .875rem; }
td button { color: var(--navy); background: #eaf2f6; border: 1px solid #d5e2e9; padding: .25rem .55rem; border-radius: .35rem; font-size: .875rem; font-weight: 650; }
.accounts-table table { min-width: 0; }
.accounts-table th, .accounts-table td { overflow-wrap: anywhere; }
.account-email { display: block; color: var(--muted); font-weight: 400; overflow-wrap: anywhere; }
.account-actions { display: flex; align-items: start; flex-wrap: wrap; gap: .55rem; margin-top: .9rem; }
.account-actions button { margin: 0; }
.rule-row { min-width: 0; margin: 1rem 0 0; padding: .45rem .8rem .8rem; border: 1px solid var(--line); border-radius: .5rem; }
.rule-row legend { padding: 0 .25rem; font-weight: 650; }
.rule-list article { border-top: 1px solid var(--line); padding: .9rem 0; overflow-wrap: anywhere; }
.rule-list article:first-child { margin-top: .8rem; }
.rule-list h3 { margin: 0; font-size: 1rem; }
.rule-list ul { padding-left: 1.25rem; margin: .45rem 0 .7rem; }
.shift-history { grid-column: 1 / -1; }
.shift-history table { min-width: 0; }
.shift-history th, .shift-history td { overflow-wrap: anywhere; }
.shift-history th small { display: block; font-weight: 400; }
.record-date { max-width: 14rem; }
.record-date label { display: block; }
.password-reveal { margin-top: .75rem; }
#reset-employee-dialog .dialog-actions { flex-wrap: wrap; }
.chip { display: inline-block; padding: .16rem .48rem; font-size: .875rem; white-space: nowrap; border-radius: .35rem; background: #e8f4f1; color: #235b56; }
.chip.locked { background: #f3efe7; color: #684c20; }
#people-search { margin-top: .8rem; }
.empty { padding: .8rem .4rem; color: var(--muted); }
.message { padding: .62rem .78rem; border: 1px solid #afceca; background: #e7f6f2; color: #174d49; border-radius: .45rem; margin: .65rem 0 1rem; }
.message.error { border-color: #e2b9b5; background: #fdf0ee; color: #762d28; }
.announcement p { white-space: pre-wrap; overflow-wrap: anywhere; min-height: 4rem; }
.published-info { border-top: 1px solid var(--line); margin-top: 1.2rem; padding-top: 1rem; }
.published-info h3 { margin: 0 0 .4rem; font-size: 1rem; }
.published-info p { min-height: 0; }
.report-filters { display: grid; grid-template-columns: repeat(2, minmax(9rem, 1fr)) minmax(12rem, 1.4fr) auto; gap: .8rem; align-items: end; }
.report-filters label, .simulation-controls label { display: block; }
.report-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .8rem; margin: .9rem 0; }
.report-summary dt { color: var(--muted); font-weight: 600; font-size: .9rem; }
.report-summary dd { margin: .35rem 0 0; font-size: 1.6rem; font-weight: 700; }
.report-details { margin-top: .9rem; }
.report-details table { min-width: 50rem; }
.report-details td, .report-details th { overflow-wrap: anywhere; }
.report-cell-label { display: none; }
.report-details th small { display: block; font-weight: 400; }
.report-late-cell { color: #81501c; font-weight: 700; }
.report-pagination { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: .7rem; margin-top: 1rem; }
.report-details [role="region"]:focus-visible { outline: 2px solid var(--navy); outline-offset: 2px; }
.alert-filters { grid-template-columns: repeat(2, minmax(8.5rem, 1fr)) minmax(9rem, 1.1fr) minmax(8.5rem, 1fr) auto; }
.alert-details table { min-width: 43rem; }
.report-details td small { display: block; margin-top: .2rem; color: var(--muted); }
.active-shift-controls { display: flex; flex-wrap: wrap; gap: .8rem; align-items: end; }
.active-shift-controls > div { flex: 1 1 15rem; }
.active-shift-controls label { display: block; }
.active-shift-action { white-space: normal; }
.platform-check { display: flex; gap: .65rem; align-items: start; }
.platform-check input { width: 1rem; height: 1rem; flex: none; margin: .2rem 0 0; accent-color: var(--navy); }
.platform-contact-list { list-style: none; margin: 0; padding: 0; }
.platform-contact-list li { border-top: 1px solid var(--line); padding: .75rem 0; overflow-wrap: anywhere; }
.platform-contact-list p { margin: .25rem 0 .55rem; }
.platform-contact-actions { display: flex; flex-wrap: wrap; gap: .45rem; }
#platform-contact-form .secondary { margin-top: .5rem; }
.alert-status { display: inline-block; border-radius: .45rem; padding: .16rem .44rem; font-weight: 700; font-size: .875rem; }
.alert-status.sent { color: #145347; background: #dff2eb; }
.alert-status.unsent { color: #744519; background: #fff0d9; }
.alert-status.expired { color: #5c435a; background: #f1e8ef; }
.simulation { max-width: 52rem; }
.simulation-controls { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .85rem; margin-bottom: 1.3rem; }
.simulation-controls output { font-weight: 700; margin-left: .3rem; }
.simulation-controls input[type="range"] { padding: 0; }
.simulation-steps { padding-left: 1.4rem; margin: .8rem 0 1.15rem; }
.simulation-steps li + li { margin-top: .65rem; }
dialog { border: 1px solid var(--line); border-radius: .75rem; color: var(--ink); width: min(28rem, calc(100% - 2rem)); padding: 1.3rem; box-shadow: 0 1rem 3rem #15395035; }
dialog::backdrop { background: #14304470; }
dialog p { margin-top: .65rem; }
dialog label { display: block; margin-top: .8rem; }
.dialog-actions { display: flex; justify-content: end; flex-wrap: wrap; gap: .65rem; margin-top: 1.1rem; }
@media (max-width: 1160px) {
  .alert-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 960px) {
  .workspace-grid { grid-template-columns: minmax(0, 1fr); }
  .report-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 680px) {
  .login-shell { grid-template-columns: 1fr; margin: 1rem auto; }
  .login-brand { gap: 1rem; }
  .brand-caption { display: none; }
  .portal { display: block; }
  .sidebar { min-height: auto; gap: .85rem; padding: .8rem 1rem; }
  nav { display: flex; flex-wrap: wrap; }
  nav button { flex: 1 1 auto; text-align: center; }
  .account { display: flex; align-items: center; flex-wrap: wrap; gap: .35rem .65rem; padding: .35rem .1rem 0; }
  .account .quiet { margin-left: auto; }
  .page-header { align-items: start; flex-direction: column; }
  .report-details table { min-width: 0; display: block; }
  .report-details thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .report-details tbody { display: block; }
  .report-details tbody tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .65rem .8rem; border-top: 1px solid var(--line); padding: .85rem .15rem; }
  .report-details tbody td, .report-details tbody th { display: block; padding: 0; border: 0; }
  .report-details tbody th { grid-column: 1 / -1; order: -1; }
  .report-cell-label { display: block; font-size: .84rem; font-weight: 650; color: var(--muted); margin-bottom: .18rem; }
}
@media (max-width: 460px) {
  .report-filters, .simulation-controls { grid-template-columns: minmax(0, 1fr); }
  .report-summary { gap: .4rem; }
  .report-summary .card { padding: .65rem .55rem; }
  .report-summary dt { overflow-wrap: anywhere; }
}
