:root {
  color-scheme: dark;
  --bg: #141918;
  --rail: #101513;
  --surface: #1a201e;
  --surface-raised: #202824;
  --line: #333e38;
  --text: #edf1eb;
  --muted: #a1afa6;
  --teal: #99ddc8;
  --teal-dark: #203d33;
  --amber: #edc68b;
  --red: #f2a99f;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  font-synthesis: none;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font-size: 14px; line-height: 1.55; }
button, input { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .45; }
button, a, input, [tabindex] { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--teal); outline-offset: 4px; }
[hidden] { display: none !important; }
a { color: inherit; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 12px; font-family: Georgia, "Times New Roman", serif; font-size: clamp(34px, 3.25vw, 53px); font-weight: 400; line-height: 1.13; letter-spacing: -1.7px; }
h2 { margin-bottom: 8px; font-family: Georgia, "Times New Roman", serif; font-size: 28px; font-weight: 400; line-height: 1.25; letter-spacing: -.5px; }
h3 { margin-bottom: 10px; font-size: 18px; font-weight: 500; }
.muted, .field-help { color: var(--muted); }
.teal { color: var(--teal); }
.eyebrow { display: block; color: var(--muted); font-size: 10px; font-weight: 600; letter-spacing: 1.7px; line-height: 1.7; text-transform: uppercase; }
.lead { margin-bottom: 0; color: var(--muted); font-size: 15px; }
.mono { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 11px; }
.shell { display: grid; grid-template-columns: 222px minmax(0, 1fr); min-height: 100vh; }
.rail { position: sticky; top: 0; display: flex; height: 100vh; flex-direction: column; padding: 33px 27px 24px; background: var(--rail); border-right: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 11px; text-decoration: none; font-size: 24px; line-height: 1.1; font-weight: 600; letter-spacing: 1px; }
.brand-mark { display: flex; width: 34px; height: 41px; align-items: center; justify-content: center; border: 1px solid var(--teal); color: var(--teal); font-family: Georgia, serif; font-size: 35px; font-style: italic; font-weight: 400; line-height: 1; }
.brand-sub { display: block; margin-top: 5px; color: var(--muted); font-size: 7px; letter-spacing: 1.55px; }
.rail-context { margin-top: 69px; }
.rail-context strong { display: block; margin: 15px 0 18px; font-family: Georgia, serif; font-size: 31px; font-weight: 400; line-height: 1.18; }
.environment { display: inline-flex; align-items: center; gap: 8px; color: var(--teal); font-size: 11px; }
.status-dot { display: inline-block; flex-shrink: 0; width: 5px; height: 5px; border-radius: 50%; background: var(--teal); }
.rail-note { margin-top: 56px; padding-top: 21px; border-top: 1px solid var(--line); }
.rail-note p { margin: 12px 0; color: var(--muted); font-size: 12px; line-height: 1.9; }
.rail-footer { display: flex; flex-direction: column; gap: 15px; margin-top: auto; padding-top: 50px; color: var(--muted); font-size: 11px; }
.rail-rule { width: 29px; height: 1px; background: var(--teal); }
.version { font-size: 9px; letter-spacing: 2px; opacity: .7; }
.workspace { min-width: 0; padding: 0 44px; }
.topbar { display: flex; min-height: 82px; align-items: center; justify-content: space-between; gap: 20px; border-bottom: 1px solid var(--line); }
.breadcrumb { color: var(--muted); font-size: 11px; }
.breadcrumb span { padding: 0 10px; color: #5f7065; }
.account { display: flex; align-items: center; gap: 17px; min-width: 0; }
#owner-label { max-width: 250px; color: var(--muted); font-size: 11px; overflow-wrap: anywhere; }
#session-label { font-size: 11px; }
.prototype-banner { display: flex; align-items: center; gap: 12px; margin: 22px 0 0; padding: 10px 13px; border: 1px solid var(--line); color: var(--muted); font-size: 10px; }
.prototype-banner p { margin: 0; }
.banner-tag { flex-shrink: 0; padding-right: 13px; border-right: 1px solid var(--line); color: var(--teal); font-size: 8px; font-weight: 600; letter-spacing: 1.3px; }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin: 42px 0 30px; }
.page-heading .eyebrow { margin-bottom: 13px; }
.page-heading h1 { font-size: clamp(32px, 3vw, 48px); }
.button { display: inline-flex; min-height: 42px; align-items: center; justify-content: center; gap: 15px; padding: 9px 17px; border: 1px solid transparent; border-radius: 3px; font-size: 11px; font-weight: 600; line-height: 1.5; text-align: center; text-decoration: none; transition: background-color .15s, border-color .15s; }
.button-primary { background: var(--teal); color: #14281f; }
.button-primary:not(:disabled):hover { background: #b9ebda; }
.button-primary span { font-size: 18px; font-weight: 400; }
.button-secondary { background: transparent; color: var(--text); border-color: #536359; }
.button-secondary:not(:disabled):hover { background: var(--surface-raised); border-color: var(--muted); }
.button-quiet { min-height: 36px; padding: 6px 10px; background: transparent; color: var(--muted); }
.button-quiet:not(:disabled):hover { background: var(--surface-raised); color: var(--text); }
.button-danger { background: #56312c; color: #ffd2ca; border-color: #97635a; }
.button-danger:not(:disabled):hover { background: #704039; }
.button-wide { width: 100%; justify-content: space-between; }
.button-small { min-height: 36px; padding: 7px 11px; font-size: 10px; }
.control-banner { display: flex; align-items: center; gap: 15px; padding: 16px 18px; background: #192a23; border: 1px solid #314b3d; }
.control-icon { display: grid; width: 29px; height: 29px; flex-shrink: 0; place-content: center; border: 1px solid #527964; border-radius: 50%; color: var(--teal); font-size: 15px; }
.control-banner strong { color: #d8e8de; font-size: 12px; font-weight: 500; }
.control-banner p { margin: 3px 0 0; color: #a0b6a8; font-size: 11px; }
.on-label { margin-left: auto; color: var(--teal); font-size: 8px; letter-spacing: 1.3px; white-space: nowrap; }
.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 28px 0 32px; border: 1px solid var(--line); background: var(--surface); }
.metric { position: relative; min-width: 0; padding: 19px 23px 18px; border-right: 1px solid var(--line); }
.metric:last-child { border-right: 0; }
.metric-label { color: #c0cbc3; font-size: 11px; }
.metric strong { display: block; margin: 8px 0 3px; font-size: 43px; font-weight: 300; font-variant-numeric: tabular-nums; line-height: 1.2; letter-spacing: -1.8px; }
.metric-foot { color: var(--muted); font-size: 10px; }
.metric-accent strong { color: var(--teal); }
.metric-accent::before { position: absolute; right: 0; bottom: -1px; left: 0; height: 2px; background: var(--teal); content: ""; }
.registry { min-width: 0; border: 1px solid var(--line); background: var(--surface); }
.registry-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 0 20px; border-bottom: 1px solid var(--line); }
.tabs { display: flex; min-width: 0; align-self: stretch; gap: 27px; }
.tab { position: relative; display: flex; min-height: 58px; align-items: center; gap: 9px; padding: 0; border: 0; background: transparent; color: var(--muted); font-size: 12px; white-space: nowrap; }
.tab[aria-selected="true"] { color: var(--text); }
.tab[aria-selected="true"]::after { position: absolute; right: 0; bottom: -1px; left: 0; height: 2px; background: var(--teal); content: ""; }
.tab span { min-width: 19px; padding: 1px 4px; border: 1px solid var(--line); border-radius: 3px; color: var(--muted); font-size: 9px; text-align: center; }
.tab[aria-selected="true"] span { background: var(--teal-dark); color: var(--teal); border-color: #446352; }
.refresh-symbol { font-size: 20px; font-weight: 400; line-height: 1; }
.registry-meta { display: flex; justify-content: space-between; gap: 16px; padding: 10px 21px; background: #171d1a; color: var(--muted); font-size: 9px; }
.section-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; padding: 27px 23px 24px; }
.section-heading .eyebrow { margin-bottom: 7px; font-size: 9px; }
.section-heading h2 { margin-bottom: 0; font-size: 26px; }
.section-heading p { margin: 0 0 2px; color: var(--muted); font-size: 10px; text-align: right; }
.table-scroll { max-width: 100%; overflow-x: auto; overscroll-behavior-inline: contain; scrollbar-color: #536b5d var(--surface); scrollbar-width: thin; }
table { width: 100%; min-width: 640px; border-collapse: collapse; text-align: left; }
th { padding: 11px 22px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: #1e2621; color: var(--muted); font-size: 9px; font-weight: 500; letter-spacing: .2px; white-space: nowrap; }
td { padding: 18px 22px; border-bottom: 1px solid #2c3730; font-size: 11px; vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #1e2721; }
.cell-name { display: block; max-width: 280px; color: var(--text); font-size: 12px; font-weight: 500; overflow-wrap: anywhere; }
.cell-id { display: block; max-width: 280px; margin-top: 4px; color: var(--muted); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 9px; overflow-wrap: anywhere; }
.capacity { font-size: 18px; font-weight: 400; font-variant-numeric: tabular-nums; white-space: nowrap; }
.capacity small { color: var(--muted); font-size: 12px; }
.capacity-track { width: 78px; height: 3px; margin-top: 8px; background: #3b4840; }
.capacity-fill { display: block; height: 100%; background: var(--teal); }
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 7px; border: 1px solid #415b4b; border-radius: 3px; background: #21352b; color: var(--teal); font-size: 9px; white-space: nowrap; }
.badge-awaiting { background: #3d3425; border-color: #65563c; color: var(--amber); }
.badge-pending { color: #c1cdc3; border-color: #4a584e; background: #2b332d; white-space: normal; min-width: 130px; }
.badge-rejected, .badge-revoked { color: #d5b0a9; border-color: #60463f; background: #322924; }
.device-table { min-width: 950px; }
.device-table td { padding: 17px 16px; }
.device-table th { padding-right: 16px; padding-left: 16px; }
.fingerprint { min-width: 160px; max-width: 240px; color: #bacbc0; font-size: 10px; overflow-wrap: anywhere; }
.row-actions { display: flex; align-items: center; gap: 7px; }
.device-note { margin: 0 23px 23px; padding-left: 11px; border-left: 2px solid #536b5d; color: var(--muted); font-size: 11px; }
.device-note strong { color: #c5d1c9; font-weight: 500; }
.empty-state { padding: 35px 20px 45px; border-top: 1px solid var(--line); text-align: center; }
.empty-index { display: inline-block; margin-bottom: 15px; color: #536b5d; font-family: Georgia, serif; font-size: 34px; font-style: italic; line-height: 1; }
.empty-state p { margin-bottom: 21px; color: var(--muted); font-size: 12px; }
.workspace-footer { display: flex; justify-content: space-between; gap: 15px; padding: 22px 0 27px; color: var(--muted); font-size: 9px; }
.footer-separator { padding: 0 9px; }
.notice { margin: 20px 0; padding: 13px 16px; border: 1px solid #466451; border-left: 3px solid var(--teal); background: #203127; color: #d8e7dd; font-size: 12px; overflow-wrap: anywhere; }
.notice-error { border-color: #80574d; border-left-color: var(--red); background: #352a24; color: #f4c8be; }
.session-loading { display: flex; min-height: 320px; align-items: center; justify-content: center; gap: 12px; color: var(--muted); }
.session-loading p { margin: 0; }
.loader { width: 17px; height: 17px; border: 1px solid var(--line); border-top-color: var(--teal); border-radius: 50%; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.login-layout { display: grid; grid-template-columns: 1.2fr 1fr; align-items: center; gap: 50px; max-width: 1030px; min-height: calc(100vh - 205px); margin: 0 auto; padding: 55px 0; }
.login-intro .eyebrow { margin-bottom: 25px; }
.login-intro h1 { margin-bottom: 22px; font-size: clamp(34px, 3.8vw, 58px); }
.login-intro .lead { line-height: 1.8; }
.intro-rule { width: 45px; height: 1px; margin: 30px 0 22px; background: #536b5d; }
.login-intro > .muted { font-size: 11px; line-height: 1.8; }
.login-card { padding: 32px; border: 1px solid #405144; background: var(--surface); }
.login-card h2 { margin-top: 11px; margin-bottom: 15px; }
.login-card > .muted { margin-bottom: 27px; font-size: 12px; line-height: 1.8; }
label { display: block; margin: 20px 0 9px; font-size: 12px; }
input { width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid #536359; border-radius: 3px; background: #141b16; color: var(--text); }
input:hover { border-color: #839a89; }
input:focus { outline: 2px solid var(--teal); outline-offset: 2px; }
input::placeholder { color: #84958a; }
input[type="number"] { width: 110px; }
.field-help { margin: 10px 0 22px; font-size: 10px; line-height: 1.7; }
.login-footnote { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 19px 0 0; color: var(--muted); font-size: 9px; }
dialog { width: min(500px, calc(100% - 32px)); max-height: calc(100dvh - 40px); padding: 29px; border: 1px solid #607565; border-radius: 4px; background: #1a221c; color: var(--text); overflow-y: auto; box-shadow: 0 20px 90px #0008; }
dialog::backdrop { background: #080e0bd9; }
.dialog-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 15px; }
.icon-button { display: grid; width: 36px; height: 36px; place-items: center; border: 1px solid var(--line); border-radius: 3px; background: transparent; color: var(--muted); font-size: 24px; line-height: 1; }
.icon-button:hover { border-color: var(--muted); color: var(--text); }
dialog h2 { font-size: 30px; }
dialog .muted { font-size: 12px; line-height: 1.8; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--line); }
.confirmation-details { display: grid; grid-template-columns: 105px minmax(0, 1fr); gap: 12px; margin: 25px 0; padding: 19px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); font-size: 11px; }
.confirmation-details dt { color: var(--muted); }
.confirmation-details dd { margin: 0; overflow-wrap: anywhere; }
.form-error { margin: 15px 0; color: var(--red); font-size: 12px; }
.skip-link { position: fixed; top: -80px; left: 15px; z-index: 10; padding: 12px; background: var(--teal); color: var(--bg); }
.skip-link:focus { top: 10px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; border: 0; margin: -1px; clip: rect(0, 0, 0, 0); white-space: nowrap; overflow: hidden; }
@media (min-width: 1600px) { .workspace { padding-right: max(44px, calc((100vw - 1450px) / 2)); padding-left: max(44px, calc((100vw - 1450px) / 2)); } }
@media (max-width: 1150px) {
  .shell { grid-template-columns: 178px minmax(0, 1fr); }
  .rail { padding-right: 22px; padding-left: 22px; }
  .workspace { padding-right: 27px; padding-left: 27px; }
  .page-heading { align-items: flex-start; }
  .page-heading h1 { font-size: 38px; }
  .page-heading .button { flex-shrink: 0; }
  .metric { padding-right: 15px; padding-left: 15px; }
  .metric-label { font-size: 10px; }
  .on-label { display: none; }
  .login-layout { gap: 30px; }
  .login-card { padding: 25px; }
}
@media (max-width: 850px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .rail { position: static; height: auto; padding: 18px 25px; flex-direction: row; justify-content: space-between; align-items: center; gap: 20px; border-right: 0; border-bottom: 1px solid var(--line); }
  .brand { font-size: 21px; }
  .brand-mark { width: 29px; height: 35px; font-size: 30px; }
  .rail-context { margin: 0; }
  .rail-context .eyebrow, .rail-context strong, .rail-note, .rail-footer { display: none; }
  .workspace { padding: 0 25px; }
  .topbar { min-height: 61px; }
  .login-layout { min-height: auto; padding: 50px 0; gap: 35px; }
  .login-intro h1 { font-size: 41px; }
  .page-heading { margin-top: 32px; }
  .page-heading h1 { font-size: 36px; }
}
@media (max-width: 600px) {
  .rail { padding: 16px 18px; }
  .environment { font-size: 9px; }
  .workspace { padding: 0 16px; }
  .breadcrumb { font-size: 9px; }
  .breadcrumb span { padding: 0 5px; }
  .account { gap: 4px; }
  #owner-label { max-width: 130px; font-size: 9px; }
  #session-label { font-size: 9px; }
  .account .button { min-height: 40px; padding: 6px; font-size: 10px; }
  .prototype-banner { align-items: flex-start; margin-top: 15px; padding: 10px; gap: 9px; }
  .prototype-banner p { font-size: 9px; line-height: 1.7; }
  .banner-tag { padding-right: 9px; font-size: 7px; line-height: 2; }
  .page-heading { flex-direction: column; gap: 22px; margin: 30px 0 23px; }
  .page-heading h1 { max-width: 320px; font-size: 37px; }
  .page-heading .eyebrow { margin-bottom: 13px; font-size: 9px; }
  .page-heading .lead { font-size: 12px; }
  .page-heading .button { width: 100%; justify-content: space-between; }
  .control-banner { align-items: flex-start; padding: 14px 12px; gap: 11px; }
  .control-icon { width: 22px; height: 22px; margin-top: 1px; font-size: 12px; }
  .control-banner strong { display: block; font-size: 11px; }
  .control-banner p { font-size: 10px; line-height: 1.7; }
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 21px 0 24px; }
  .metric { padding: 17px 15px 16px; }
  .metric:nth-child(2) { border-right: 0; }
  .metric:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .metric strong { margin-top: 9px; font-size: 36px; }
  .metric-foot { font-size: 8px; }
  .metric-accent::before { height: 1px; }
  .registry-toolbar { flex-wrap: wrap; justify-content: flex-end; gap: 0; padding: 0 12px 7px; }
  .tabs { width: 100%; justify-content: space-between; gap: 10px; border-bottom: 1px solid var(--line); }
  .tab { min-height: 54px; gap: 5px; font-size: 11px; }
  .tab span { font-size: 8px; }
  #refresh-button { min-height: 40px; margin-top: 6px; padding-right: 0; }
  .registry-meta { flex-direction: column; gap: 3px; padding: 10px 13px; font-size: 9px; }
  .section-heading { flex-direction: column; align-items: flex-start; gap: 12px; padding: 24px 15px 20px; }
  .section-heading h2 { font-size: 27px; }
  .section-heading p { font-size: 10px; text-align: left; }
  .device-note { margin-right: 15px; margin-left: 15px; font-size: 10px; }
  .empty-state { padding-right: 15px; padding-left: 15px; }
  .empty-state h3 { font-size: 16px; }
  .empty-state p { font-size: 11px; }
  .empty-state br { display: none; }
  .workspace-footer { flex-direction: column; gap: 7px; font-size: 8px; }
  .login-layout { grid-template-columns: minmax(0, 1fr); gap: 28px; padding: 35px 0; }
  .login-intro h1 { font-size: 40px; }
  .login-intro .eyebrow { margin-bottom: 19px; font-size: 9px; }
  .login-intro .lead { font-size: 13px; }
  .intro-rule, .login-intro > .muted { display: none; }
  .login-card { padding: 24px 20px; }
  .login-card h2 { font-size: 28px; }
  dialog { padding: 20px; }
  dialog h2 { font-size: 27px; }
  .dialog-actions { flex-direction: column-reverse; }
  .dialog-actions .button { width: 100%; min-height: 44px; }
  .confirmation-details { grid-template-columns: minmax(0, 1fr); gap: 5px; }
  .confirmation-details dd { margin-bottom: 8px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
