:root {
  color-scheme: light;
  --navy: #17333f;
  --page: #f2f6f8;
  --surface: #fff;
  --soft: #f8fafb;
  --text: #203c4b;
  --muted: #516a78;
  --line: #dce6eb;
  --primary: #11786a;
  --primary-hover: #0b655a;
  --accent: #146b5b;
  --mint: #e5f3ee;
  --warn: #805619;
  --warm: #fff0d6;
  --danger: #a83f36;
  --focus: #339b8b;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  font-synthesis: none;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    color-scheme: dark;
    --page: #101e26;
    --surface: #192b35;
    --soft: #20333e;
    --text: #e2edf1;
    --muted: #adbfca;
    --line: #354b58;
    --accent: #9be0cf;
    --mint: #25433d;
    --warn: #f2cb8c;
    --warm: #453727;
    --danger: #ffaaa3;
    --focus: #72cab9;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --page: #101e26;
  --surface: #192b35;
  --soft: #20333e;
  --text: #e2edf1;
  --muted: #adbfca;
  --line: #354b58;
  --accent: #9be0cf;
  --mint: #25433d;
  --warn: #f2cb8c;
  --warm: #453727;
  --danger: #ffaaa3;
  --focus: #72cab9;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; color: var(--text); background: var(--page); font-size: 14px; line-height: 1.5; }
h1, h2, p { margin: 0; }
h1 { font-size: 31px; line-height: 1.2; letter-spacing: -1.1px; font-weight: 650; }
h2 { font-size: 17px; letter-spacing: -.3px; font-weight: 650; }
a { color: var(--accent); font-weight: 600; }
button, input, select { font: inherit; }
button { border: 1px solid transparent; border-radius: 6px; cursor: pointer; padding: .65rem 1rem; font-weight: 600; font-size: 10px; line-height: 15px; }
button:disabled { cursor: default; opacity: .55; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
.primary { color: white; background: var(--primary); }
.primary:hover:not(:disabled) { background: var(--primary-hover); }
.secondary { color: var(--text); background: var(--surface); border-color: var(--line); }
.secondary:hover:not(:disabled) { background: var(--soft); }
.compact { padding: .38rem .72rem; }
input, select { color: var(--text); background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: .59rem .72rem; min-width: 0; font-size: 13px; }
input::placeholder { color: var(--muted); }
select {
  appearance: none;
  padding-right: 2rem;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 14px) 53%, calc(100% - 9px) 53%;
  background-size: 5px 5px;
  background-repeat: no-repeat;
}
label { display: grid; gap: .35rem; font-size: 12px; font-weight: 550; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; clip-path: inset(50%); overflow: hidden; white-space: nowrap; }
.full-width { width: 100%; }
.feedback { margin-top: .75rem; color: var(--danger); font-size: 12px; }
.feedback:empty { display: none; }
.feedback[data-success] { color: var(--accent); }

.sign-in { display: grid; grid-template-columns: 1fr 1fr; min-height: 100vh; background: var(--surface); }
.sign-in-main { display: grid; align-items: center; padding: clamp(1.5rem, 5vw, 4.5rem); }
.auth-card { max-width: 420px; width: 100%; margin: auto; }
.brand { display: flex; gap: .85rem; align-items: center; font-size: 24px; font-weight: 650; line-height: 1.1; margin-bottom: 3.1rem; }
.auth-card h1 { font-size: 37px; letter-spacing: -1.4px; max-width: 400px; }
.auth-card > p:not(.feedback) { color: var(--muted); line-height: 1.8; margin: 1rem 0 1.65rem; }
.auth-card form { display: grid; gap: .9rem; }
.auth-card .primary { min-height: 3.1rem; }
.auth-help { border-top: 1px solid var(--line); margin-top: 2rem; padding-top: 1.3rem; font-size: 11px; line-height: 1.8; }
.auth-help p { color: var(--muted); margin: .4rem 0; }
.auth-aside { color: #f3fbff; background: var(--navy); display: grid; align-content: center; padding: clamp(2rem, 7vw, 7.5rem); }
.auth-aside .brand-name { color: #a4e0d0; font-size: 9px; font-weight: 650; }
.auth-aside h2 { font-size: clamp(32px, 3.5vw, 53px); letter-spacing: -1.8px; line-height: 1.12; max-width: 520px; margin: .8rem 0 1.15rem; }
.auth-aside p:last-child { color: #bed2db; font-size: 13px; line-height: 1.9; }
.signal-grid { display: grid; grid-template-columns: repeat(3, 43px); gap: 10px; margin: 0 0 2.7rem .35rem; transform: rotate(-8deg); width: max-content; }
.signal-grid i { width: 43px; height: 43px; border: 1px solid #567584; border-radius: 9px; background: #244653; }
.signal-grid i:nth-child(2) { background: #1d786d; }
.signal-grid i:nth-child(5) { background: #b9dcd0; border-color: #b9dcd0; }
.signal-grid i:nth-child(6) { background: #345d69; }

#workspace { --rail-width: 230px; }
#workspace.sidebar-collapsed { --rail-width: 64px; }
.rail { position: fixed; inset: 0 auto 0 0; width: var(--rail-width); display: flex; flex-direction: column; padding: 23px 18px 12px; background: #102a37; color: #b5c6cf; }
.rail-heading { width: 100%; padding: 0 4px 20px; border-bottom: 1px solid #2b4653; }
.rail-brand { display: flex; align-items: center; gap: 10px; padding: 0; border: 0; background: transparent; color: #fff; text-align: left; font-size: 23px; font-weight: 650; letter-spacing: -.7px; line-height: 1.1; }
.rail-brand:hover .rail-brand-mark { background: var(--primary-hover); }
.rail-brand-mark { display: grid; place-items: center; flex: none; width: 36px; height: 38px; border-radius: 8px; background: #127c70; font-size: 12px; font-weight: 800; letter-spacing: -.6px; }
.rail-brand-subtitle { display: block; margin-top: 7px; color: #a0b6c2; font-size: 9px; letter-spacing: .6px; }
.rail nav { flex: 1; min-height: 0; overflow-y: auto; scrollbar-width: thin; }
.rail-footer { display: flex; align-items: center; justify-content: center; gap: .55rem; padding-top: .55rem; border-top: 1px solid #2b4653; color: #a0b6c2; font-size: 11px; white-space: nowrap; }
.rail-release { display: grid; justify-items: end; padding: 2px 4px; background: transparent; color: inherit; font-size: 10px; line-height: 1.25; font-weight: 400; text-align: right; }
#release-revision { text-decoration: underline; }
.rail-release:hover { color: #fff; }
.rail-group { display: grid; gap: 5px; padding: 16px 0; }
.rail-group + .rail-group { border-top: 1px solid #2b4653; }
.rail-group-label { padding: 5px 14px 7px; color: #9bb8c6; font-size: 11px; font-weight: 700; letter-spacing: 1.4px; }
.rail nav .rail-link { display: flex; align-items: center; gap: 13px; padding: 10px 14px; font-size: 12px; font-weight: 400; }
.rail-link { display: grid; place-items: center; width: 100%; min-height: 42px; color: inherit; background: transparent; border: 0; border-radius: 6px; text-decoration: none; }
.rail-link > svg { width: 19px; height: 19px; flex: none; color: #82a3b1; }
.rail-link:hover, .rail-link[aria-current="page"] { background: #234451; color: #fff; }
.rail-link[aria-current="page"] { box-shadow: inset 3px 0 #45b5a0; }
.rail-link[aria-current="page"] > svg { color: #68c6b2; }
.rail nav .rail-link:focus-visible { outline-offset: -2px; }
.sidebar-collapsed .rail { padding: 16px 8px 12px; }
.sidebar-collapsed .rail-heading { display: flex; justify-content: center; padding-inline: 0; }
.sidebar-collapsed :is(.rail-brand-text, .rail-label, .rail-group-label) { display: none; }
.sidebar-collapsed .rail-group { gap: 2px; padding: 8px 0; }
.sidebar-collapsed .rail nav .rail-link { justify-content: center; padding-inline: 0; }
.sidebar-collapsed :is(.rail-address, #release-lines) { display: none; }
.shell { margin-left: var(--rail-width); }
.topbar { min-height: 62px; display: flex; justify-content: space-between; align-items: center; gap: .8rem; padding: .55rem clamp(1rem, 3vw, 2.7rem); background: var(--surface); border-bottom: 1px solid var(--line); font-size: 11px; color: var(--muted); }
.topbar p span { margin: 0 .4rem; }
.topbar p strong { color: var(--text); }
.topbar-actions { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.theme { display: grid; place-items: center; flex: none; width: 38px; height: 38px; padding: 0; background: transparent; color: var(--text); font-size: 1.15rem; }
.theme:hover { background: var(--soft); }
.identity { display: flex; align-items: center; gap: 9px; padding: 4px 8px; border-radius: 6px; color: var(--muted); font-weight: 400; text-decoration: none; }
.identity:hover, .identity[aria-current="page"] { background: var(--soft); }
.identity strong, .identity small { display: block; line-height: 1.3; }
.identity strong { color: var(--text); font-weight: 700; }
.identity small { font-size: 10px; }
.avatar { display: grid; place-items: center; flex: none; background: var(--mint); color: var(--accent); border-radius: 50%; height: 30px; width: 30px; font-weight: 700; }
#content { padding: clamp(1rem, 3vw, 2.7rem); max-width: 1590px; margin-inline: auto; }
.page-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.65rem; }
.page-actions { display: flex; flex-wrap: wrap; gap: .55rem; }
.page-heading p, .sessions p { color: var(--muted); margin-top: .5rem; font-size: 12px; }
.panel { border: 1px solid var(--line); border-radius: 10px; background: var(--surface); margin-bottom: 1.25rem; }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: .7rem; padding: 1rem 1.2rem; }
.toolbar input { width: min(100%, 330px); }
.toolbar :is(input, select) { font-size: 12px; line-height: 17px; }
.count { margin-left: auto; color: var(--muted); font-size: 10px; }
.table-scroll { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 12px; }
th, td { text-align: left; padding: .82rem 1.2rem; border-bottom: 1px solid var(--line); }
th { color: var(--muted); background: var(--soft); border-top: 1px solid var(--line); font-size: 10px; font-weight: 500; white-space: nowrap; }
.table-scroll.panel th { border-top: 0; }
td strong, td small { display: block; }
td strong { font-weight: 550; }
td small { color: var(--muted); margin-top: .1rem; font-size: 10px; }
td:last-child { text-align: right; white-space: nowrap; }
.empty-row td { text-align: center; padding: 2rem 1.2rem; color: var(--muted); }
.badge { display: inline-block; color: var(--muted); background: var(--soft); border-radius: 5px; padding: .22rem .5rem; white-space: nowrap; font-size: 9px; }
.badge.good { background: var(--mint); color: var(--accent); }
.badge.pending { background: var(--warm); color: var(--warn); }
.table-footer, .sessions { display: flex; align-items: center; justify-content: space-between; padding: .9rem 1.2rem; gap: .7rem; }
.table-footer { color: var(--muted); font-size: 10px; }
.notice { background: var(--mint); color: var(--accent); border: 1px solid var(--line); border-radius: 9px; padding: 1rem 1.2rem; }
.notice p { margin-top: .3rem; font-size: 12px; }
.loading { padding: 2rem; }
dialog { color: var(--text); background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 0; width: min(480px, calc(100% - 2rem)); box-shadow: 0 20px 75px #102a3745; }
dialog::backdrop { background: #102a377d; }
#release-details { width: min(580px, calc(100% - 2rem)); }
#release-entries { padding: 0 1.2rem; }
.release-entry { padding-block: .85rem; }
.release-entry + .release-entry { border-top: 1px solid var(--line); }
.release-entry h3 { margin: 0 0 .25rem; font-size: 14px; }
.release-entry ul { margin: .5rem 0 0; padding-inline-start: 1.25rem; }
.modal-heading { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .9rem 1.2rem; border-bottom: 1px solid var(--line); }
.modal-heading h2 { font-size: 19px; }
#modal-form { padding: 1.1rem 1.2rem; }
#modal-fields { display: grid; gap: .8rem; }
#modal-fields p { color: var(--muted); }
.modal-actions { display: flex; justify-content: end; margin-top: 1rem; }
.nac-scope { display: flex; flex-wrap: wrap; align-items: end; gap: .65rem 1rem; margin-bottom: 1rem; }
.nac-scope label { max-width: 24rem; }
.local-search { margin-inline-start: auto; width: min(100%, 22rem); }
.section-heading { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .9rem 1.2rem; }
.section-heading h2 { font-size: 15px; }
.section-heading p { color: var(--muted); margin-top: .3rem; font-size: 12px; }
.table-actions { display: flex; flex-wrap: wrap; justify-content: end; gap: .35rem; }
#users-view .users-section-label { margin: 0 0 .65rem; color: var(--accent); font-size: 10px; font-weight: 700; letter-spacing: .15em; text-transform: uppercase; }
#users-view .toolbar input { width: min(100%, 600px); }
#user-rows td:first-child :is(strong, small) { display: inline; }
#user-rows td:first-child small { margin-inline-start: .6rem; }
.user-action { display: grid; place-items: center; width: 30px; height: 30px; padding: 0; }
.edit-action, .delete-action, .device-block { display: inline-grid; place-items: center; width: 30px; height: 30px; padding: 0; }
.delete-action, .device-block { color: var(--danger); }
#devices-rows .table-actions { flex-wrap: nowrap; }
.user-pagination { display: flex; align-items: center; gap: .7rem; }
#audit-details { width: min(660px, calc(100% - 2rem)); }
.audit-details-body { display: grid; gap: 1rem; padding: 1.1rem 1.2rem; }
#audit-detail-fields { display: grid; grid-template-columns: minmax(6rem, 1fr) minmax(0, 3fr); gap: .45rem 1rem; margin: 0; }
#audit-detail-fields dt { color: var(--muted); }
#audit-detail-fields dd { margin: 0; overflow-wrap: anywhere; }
#audit-diff :is(th, td) { padding: .6rem; text-align: left; white-space: pre-line; overflow-wrap: anywhere; }
#audit-diff tbody th { background: transparent; }
.tenant-assignments { display: grid; gap: .4rem; margin: 0; padding: .65rem; border: 1px solid var(--line); border-radius: 6px; }
.radius-secret-field { display: grid; gap: .35rem; }
.radius-secret-row { display: flex; flex-wrap: wrap; gap: .4rem; }
.radius-secret-row input { flex: 1 1 10rem; }
.radius-secret-eye { display: grid; place-items: center; min-width: 42px; }
.radius-secret-eye[aria-pressed="false"] .eye-slash { display: none; }
#modal-fields .radius-secret-feedback { font-size: 12px; }
.radius-secret-feedback:empty { display: none; }
.radsec-option { display: flex; align-items: center; gap: .55rem; }
.radsec-option input { width: 1rem; height: 1rem; accent-color: var(--primary); }
.device-metrics { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 1rem; margin-bottom: 1.4rem; }
.device-metric { --bar: var(--primary); display: grid; gap: .4rem; align-content: start; min-height: 10rem; padding: 1rem 1.15rem; text-align: left; background: var(--surface); color: var(--text); border: 1px solid var(--line); border-radius: 10px; }
.device-metric:hover, .device-metric[aria-pressed="true"], #attention-filter[aria-pressed="true"] { border-color: var(--focus); background: var(--soft); }
.device-metric .metric-label { font-size: 11px; font-weight: 400; }
.device-metric strong { font-size: 31px; line-height: 1.3; letter-spacing: -1px; font-weight: 650; font-variant-numeric: tabular-nums; }
.device-metric small { font-size: 10px; font-weight: 400; color: var(--muted); }
.device-metric progress { appearance: none; width: 100%; height: .5rem; border: 0; border-radius: 10px; background: var(--line); color: var(--bar); overflow: hidden; }
.device-metric progress::-webkit-progress-bar { background: var(--line); }
.device-metric progress::-webkit-progress-value { background: var(--bar); }
.device-metric progress::-moz-progress-bar { background: var(--bar); }
.metric-unknown { --bar: #a76622; }
.metric-stale { --bar: #557f9c; }
.muted-note { color: var(--muted); font-size: 10px; }
#event-details { width: min(600px, calc(100% - 2rem)); }
.event-details-body { display: grid; gap: 1rem; padding: 1.1rem 1.2rem; }
#event-fields { display: grid; grid-template-columns: minmax(7rem, 1fr) minmax(0, 2fr); gap: .45rem 1rem; margin: 0; }
#event-fields dt { color: var(--muted); }
#event-fields dd { margin: 0; overflow-wrap: anywhere; }
#event-log h3 { margin: 0; font-size: 1em; }
#event-log-entry { margin: .45rem 0 0; padding: .75rem; border: 1px solid var(--line); border-radius: 8px; background: var(--soft); white-space: pre-wrap; overflow-wrap: anywhere; }
@media (max-width: 680px) { .device-metrics { grid-template-columns: 1fr; } .device-metric { min-height: auto; } }
@media (min-width: 1600px) { .device-metric strong { font-size: 37px; } }
@media (max-width: 1200px) { .device-metric strong { font-size: 28px; } }
@media (max-width: 800px) { .device-metric strong { font-size: 27px; } }
@media (max-width: 760px) {
  h1 { font-size: 25px; letter-spacing: -.7px; }
  .auth-card h1 { font-size: 34px; }
  :is(.auth-card, .topbar, #content, dialog) button:not(.device-metric) { font-size: 12px; }
  :is(.auth-card, #content, dialog) :is(input, select) { font-size: 16px; }
  .modal-heading h2 { font-size: 18px; }
  .count { font-size: 13px; }
  .device-metric .metric-label { font-size: 10px; }
  .device-metric small { font-size: 9px; }
  .sign-in { grid-template-columns: 1fr; }
  .auth-aside { display: none; }
  .sign-in-main { min-height: 100vh; }
  .rail, .sidebar-collapsed .rail { position: static; width: 100%; min-height: 54px; display: grid; grid-template-columns: minmax(0, 1fr); gap: .4rem; padding: .38rem .75rem; }
  .rail-heading { display: contents; }
  .rail-brand { grid-column: 1; grid-row: 1; font-size: 20px; }
  .rail nav { grid-row: 2; grid-column: 1 / -1; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 10rem), 1fr)); }
  .rail .rail-group { display: contents; }
  .rail-group-label { display: none; }
  .sidebar-collapsed .rail { grid-template-columns: auto minmax(0, 1fr); }
  .sidebar-collapsed .rail-heading { display: contents; }
  .sidebar-collapsed .rail nav { grid-column: 2; grid-row: 1; display: flex; overflow: auto; }
  .sidebar-collapsed .rail nav .rail-link { flex: 0 0 45px; }
  .rail-footer { grid-column: 1 / -1; }
  .shell { margin-left: 0; }
  .topbar { flex-wrap: wrap; }
  .topbar .theme { width: 44px; height: 44px; font-size: 1.15rem; }
  .toolbar input { width: 100%; }
  .page-heading { align-items: start; flex-wrap: wrap; }
  .section-heading { align-items: start; flex-wrap: wrap; }
}
