:root {
  color-scheme: light;
  font-family: Calibri, Carlito, Aptos, sans-serif;
  --ink: #041c2c;
  --muted: #4d6473;
  --bg: #eef2f6;
  --paper: #fff;
  --line: #d5dfe8;
  --navy: #041c2c;
  --accent: #004b87;
  --signal: #01a8fb;
  --pale: #e8f2fb;
  --gold: #c79a3b;
  --radius: 12px;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-width: 320px; color: var(--ink); background: var(--bg); }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .55; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 2px solid #0075b4;
  outline-offset: 3px;
}
[hidden] { display: none !important; }
.visually-hidden, .skip:not(:focus) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.skip { position: fixed; z-index: 5; top: 10px; left: 10px; padding: 10px 15px; border-radius: 8px; background: var(--paper); color: var(--ink); }
.shell { display: grid; min-height: 100vh; grid-template-columns: 218px minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; padding: 26px 15px 17px; background: var(--navy); color: #f1f6fa; }
.brand { display: flex; align-items: center; gap: 11px; margin: 0 6px 35px; }
.brand img { border-radius: 8px; object-fit: contain; flex: none; }
.brand strong { display: block; font-family: Cambria, Caladea, Georgia, serif; font-size: 23px; letter-spacing: -.02em; line-height: 1.05; }
.brand div span { color: #a7c0d1; font-size: .78rem; }
.nav-caption, .list-heading { font-size: .72rem; font-weight: 700; letter-spacing: .08em; }
.nav-caption { margin: 0 9px 11px; color: #a7c0d1; }
nav { display: grid; gap: 4px; }
.nav-link { display: flex; width: 100%; align-items: center; gap: 11px; padding: 11px 10px; text-align: left; border: 1px solid transparent; border-radius: 7px; background: transparent; color: #d4e3ee; font-size: .93rem; }
.nav-link:hover { background: #102d43; }
a.nav-link { text-decoration: none; }
.nav-link[aria-current="page"] { border-color: #295b7b; background: #12354e; color: #fff; font-weight: 700; }
.nav-link[aria-current="page"] .icon { color: #64caff; }
.icon { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.sidebar-footer { margin-top: auto; }
.demo-flag { display: flex; align-items: center; gap: 7px; margin: 0 8px 9px; color: #c8d9e5; font-size: .76rem; }
.demo-flag span, .demo-label span { display: inline-block; width: 7px; height: 7px; border-radius: 100%; background: var(--signal); }
.reset { border: 0; background: transparent; color: #c8d9e5; text-decoration: underline; text-underline-offset: 3px; font-size: .78rem; padding: 2px 8px 14px; }
.profile { display: flex; align-items: center; gap: 9px; padding: 13px 7px 0; border-top: 1px solid #ffffff27; font-size: .79rem; }
.profile small { display: block; color: #aac3d6; }
.avatar { display: inline-grid; width: 34px; height: 34px; flex: none; place-items: center; border-radius: 50%; background: var(--pale); color: var(--accent); font-size: .76rem; font-weight: 700; }
.workspace { min-width: 0; }
.topbar { display: flex; justify-content: space-between; align-items: center; gap: 10px; min-height: 63px; padding: 8px clamp(18px, 3vw, 44px); border-bottom: 1px solid var(--line); background: var(--paper); font-size: .88rem; color: var(--muted); }
.topbar-controls, .role-switch { display: flex; align-items: center; gap: 8px; }
.role-switch { gap: 2px; padding: 3px; border: 1px solid var(--line); border-radius: 7px; background: var(--bg); }
.role-switch button { padding: 6px 10px; border: 0; border-radius: 4px; background: transparent; color: var(--muted); font-size: .84rem; font-weight: 700; }
.role-switch button:hover { color: var(--ink); background: var(--paper); }
.role-switch button[aria-pressed="true"] { background: var(--accent); color: #fff; }
.demo-label { display: inline-flex; align-items: center; gap: 6px; padding: 4px 8px; border: 1px solid var(--line); border-radius: 5px; color: var(--muted); white-space: nowrap; font-size: .77rem; font-weight: 700; }
main { max-width: 1420px; margin: auto; padding: 28px clamp(18px, 3vw, 44px) 42px; outline: none; }
h1, h2, h3, p { margin: 0; }
h1 { font-family: Cambria, Caladea, Georgia, serif; font-size: 2.45rem; letter-spacing: -.034em; line-height: 1.07; }
h2 { font-size: 1.14rem; letter-spacing: -.012em; }
h3 { font-size: .97rem; }
.muted, .subtitle { color: var(--muted); }
.subtitle { margin-top: 6px; font-size: .94rem; max-width: 68ch; }
.tiny { font-size: .8rem; }
.hero { display: flex; justify-content: space-between; align-items: end; gap: 22px; padding-bottom: 20px; border-bottom: 1px solid #b9cad8; }
.availability { display: grid; min-width: 154px; gap: 4px; color: var(--muted); font-size: .8rem; font-weight: 700; }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 0 0 20px; border-bottom: 1px solid #b9cad8; font-variant-numeric: tabular-nums; }
.stat { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 13px 14px; }
.stat:first-child { padding-left: 0; }
.stat + .stat { border-left: 1px solid #c8d5e1; }
.stat-icon { display: grid; flex: none; width: 35px; height: 35px; place-items: center; border: 1px solid #bfd3e3; border-radius: 7px; background: #f8fbfe; color: var(--accent); }
.stat strong { display: block; font-size: 1.49rem; font-weight: 700; line-height: 1.12; }
.stat small { color: var(--muted); }
.columns { display: grid; grid-template-columns: minmax(0, 1.8fr) minmax(215px, 1fr); gap: 15px; align-items: start; }
.stack { display: grid; gap: 13px; }
.card { padding: 18px; min-width: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); }
.card-head, .row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.card-head { margin-bottom: 12px; flex-wrap: wrap; }
.row { padding: 12px 0; border-top: 1px solid var(--line); }
.person { display: flex; min-width: 0; align-items: center; gap: 9px; }
.person small { display: block; margin-top: 2px; color: var(--muted); }
.row-details { min-width: 0; }
.row-action { display: flex; align-items: center; gap: 9px; }
.badge { display: inline-flex; align-items: center; width: fit-content; padding: 4px 8px; border-radius: 5px; background: var(--pale); color: var(--accent); font-size: .76rem; font-weight: 700; white-space: nowrap; }
.badge.urgent { background: #fbe8de; color: #85412c; }
.badge.gold { background: #f8efd7; color: #694910; border: 1px solid var(--gold); }
.badge.neutral { background: var(--bg); color: var(--muted); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 35px; padding: 7px 12px; border: 1px solid var(--line); border-radius: 6px; background: var(--paper); color: var(--ink); font-size: .86rem; font-weight: 700; white-space: nowrap; }
.btn:hover { background: #edf5fb; }
.btn.primary { border-color: var(--accent); color: white; background: var(--accent); }
.btn.primary:hover { background: #063d69; }
.btn.text { padding-inline: 4px; background: transparent; border-color: transparent; color: var(--accent); }
.btn.text:hover { text-decoration: underline; }
.list-heading { display: flex; justify-content: space-between; gap: 8px; padding: 8px 10px; border-radius: 6px; background: #f2f6fa; color: var(--muted); }
.guide { background: #f7fbff; }
.section-head { margin: 3px 0 21px; }
.section-head + .stats { border-top: 1px solid #b9cad8; }
.buttons { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.customer-head { margin: 9px 0 13px; }
.customer-head .avatar { width: 49px; height: 49px; font-size: .95rem; }
.customer-head h1 { font-size: 2.12rem; }
.customer-reference-heading { margin-bottom: 10px; }
.customer-reference-table th { overflow-wrap: anywhere; }
.customer-benefit-type { display: block; margin-bottom: 3px; color: var(--accent); font-size: .81rem; }
.customer-reference-note { margin-top: 12px; line-height: 1.45; }
.tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 13px; }
.tab { border: 1px solid transparent; border-radius: 6px; background: transparent; color: var(--muted); padding: 8px 12px; font-size: .9rem; }
.tab:hover { background: #e1eaf3; }
.tab[aria-current="page"] { border-color: #bfd3e3; background: white; color: var(--accent); font-weight: 700; }
.details { display: grid; gap: 12px; margin: 12px 0 0; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.details dt { margin-bottom: 3px; font-size: .72rem; color: var(--muted); }
.details dd { margin: 0; font-size: .85rem; overflow-wrap: anywhere; }
.soft-note { padding: 10px 12px; margin-top: 12px; border: 1px solid #d4e4f0; border-radius: 6px; color: #204960; background: #edf5fb; font-size: .88rem; }
.form { display: grid; gap: 11px; }
.form label { display: grid; gap: 5px; font-size: .78rem; font-weight: 700; }
input, select, textarea { width: 100%; border: 1px solid #b3c6d6; border-radius: 6px; color: var(--ink); background: #fff; padding: 8px 9px; caret-color: var(--accent); }
::placeholder { color: #526878; }
::selection { background: #b8e4ff; color: var(--ink); }
textarea { min-height: 66px; resize: vertical; }
.toolbar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.toolbar input { flex: 2 1 180px; width: auto; }
.toolbar select { flex: 1 1 120px; width: auto; }
.events { list-style: none; margin: 0; padding: 0; }
.event { border-left: 1px solid #caddeb; margin-left: 5px; padding: 1px 0 13px 13px; position: relative; }
.event:last-child { padding-bottom: 1px; }
.event::before { content: ""; position: absolute; top: 5px; left: -4px; width: 7px; height: 7px; border-radius: 50%; background: #477b9d; }
.event p { margin-top: 3px; font-size: .83rem; overflow-wrap: anywhere; white-space: pre-wrap; }
.toast { position: fixed; right: 20px; bottom: 19px; z-index: 3; max-width: calc(100% - 40px); padding: 11px 15px; border-radius: 7px; background: var(--navy); color: white; font-size: .9rem; }
.table-wrap { overflow-x: auto; }
.table-wrap table { width: 100%; border-collapse: collapse; text-align: left; font-size: .9rem; }
.table-wrap thead { background: #f2f6fa; color: var(--muted); }
.table-wrap th, .table-wrap td { padding: 10px 11px; border-bottom: 1px solid var(--line); }
.table-wrap th { font-weight: 700; }
.table-wrap tbody small { display: block; margin-top: 2px; color: var(--muted); font-weight: 400; }
.table-wrap tbody tr:last-child > * { border-bottom: 0; }
.table-wrap tr.current-row { background: #edf5fb; }
.table-wrap .numeric { text-align: right; font-variant-numeric: tabular-nums; }
.admin-reference td, .admin-reference th { overflow-wrap: anywhere; vertical-align: top; }
.admin-reference .badge { white-space: normal; }
.details-panel { margin-top: 14px; }
.settings-card { max-width: 560px; }
@media (max-width: 910px) {
  .shell { grid-template-columns: 178px minmax(0, 1fr); }
  .columns { grid-template-columns: 1fr; }
  .sidebar { padding-inline: 10px; }
}
@media (max-width: 650px) {
  .shell { display: block; }
  .sidebar { position: static; height: auto; padding: 11px 13px; }
  .brand { margin: 0 0 10px; }
  .brand img { width: 37px; height: 37px; }
  .nav-caption, .sidebar-footer .profile, .demo-flag { display: none; }
  nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .nav-link { white-space: normal; padding: 8px; }
  .nav-link .icon { display: none; }
  .reset { padding: 8px 0 1px; }
  .hero { align-items: flex-start; flex-direction: column; gap: 14px; padding-bottom: 15px; }
  h1 { font-size: 1.9rem; }
  .topbar { flex-wrap: wrap; }
  .topbar-controls { justify-content: space-between; }
  .availability { min-width: 135px; }
  .stat { padding: 9px 7px; gap: 5px; }
  .stat-icon { display: none; }
  .stat small { font-size: .68rem; }
  .row-action { align-items: flex-end; flex-direction: column; }
  .card { padding: 13px; }
  .table-wrap table, .table-wrap tbody { display: block; }
  .table-wrap thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .table-wrap tbody tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 10px; padding: 8px; border-top: 1px solid var(--line); }
  .table-wrap tbody th, .table-wrap tbody td { display: grid; align-content: start; gap: 4px; padding: 4px 0; border: 0; }
  .table-wrap tbody th, .table-wrap tbody td:last-child { grid-column: 1 / -1; }
  .table-wrap tbody td:last-child .btn { justify-self: start; }
  .table-wrap .numeric { text-align: left; }
  .table-wrap td[data-label]::before { content: attr(data-label); color: var(--muted); font-size: .78rem; }
}
