:root {
  color-scheme: light;
  --bg: #f5f3ef;
  --sidebar: #171513;
  --surface: #fffefa;
  --surface-2: #f8f6f2;
  --surface-3: #efebe5;
  --line: #e6e0d7;
  --line-strong: #d9d0c5;
  --text: #1d1915;
  --muted: #766e65;
  --muted-2: #9a9187;
  --accent: #c65a25;
  --accent-dark: #9f431a;
  --accent-soft: #f8e7dc;
  --success: #14734a;
  --success-soft: #e4f3eb;
  --warning: #9a6512;
  --warning-soft: #fff3d7;
  --danger: #b53c35;
  --danger-soft: #fbe7e5;
  --shadow: 0 1px 2px rgb(35 25 16 / .04), 0 12px 34px rgb(43 30 19 / .055);
  --radius: 18px;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #11100f;
  --sidebar: #0c0b0a;
  --surface: #1a1816;
  --surface-2: #201e1b;
  --surface-3: #2b2723;
  --line: #302c28;
  --line-strong: #403a34;
  --text: #f4efe9;
  --muted: #aaa096;
  --muted-2: #80776e;
  --accent: #e4783f;
  --accent-dark: #ef8f5d;
  --accent-soft: #3a241a;
  --success: #6bc99c;
  --success-soft: #183327;
  --warning: #e8b35e;
  --warning-soft: #3a2d16;
  --danger: #ef7d75;
  --danger-soft: #3d211f;
  --shadow: 0 15px 45px rgb(0 0 0 / .2);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #11100f; --sidebar: #0c0b0a; --surface: #1a1816; --surface-2: #201e1b;
    --surface-3: #2b2723; --line: #302c28; --line-strong: #403a34; --text: #f4efe9;
    --muted: #aaa096; --muted-2: #80776e; --accent: #e4783f; --accent-dark: #ef8f5d;
    --accent-soft: #3a241a; --success: #6bc99c; --success-soft: #183327;
    --warning: #e8b35e; --warning-soft: #3a2d16; --danger: #ef7d75;
    --danger-soft: #3d211f; --shadow: 0 15px 45px rgb(0 0 0 / .2);
  }
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--bg); }
body { margin: 0; color: var(--text); background: var(--bg); font: 14px/1.5 Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; -webkit-font-smoothing: antialiased; }
button, input, textarea, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 28%, transparent); outline-offset: 2px; }
svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
[hidden] { display: none !important; }

.app-shell { min-height: 100dvh; display: grid; grid-template-columns: 250px minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; height: 100dvh; padding: 24px 17px 18px; background: var(--sidebar); color: #f7f2ec; display: flex; flex-direction: column; overflow-y: auto; }
.brand { color: inherit; text-decoration: none; display: flex; align-items: center; gap: 11px; padding: 0 7px; }
.brand-mark { width: 33px; height: 33px; border-radius: 11px; display: grid; place-items: center; background: linear-gradient(145deg, #e17a43, #b94e20); color: white; box-shadow: inset 0 1px 0 rgb(255 255 255 / .28), 0 8px 18px rgb(198 90 37 / .2); font: 800 20px/1 Georgia, serif; }
.brand > span:last-child { display: grid; line-height: 1.1; }
.brand strong { font-size: 15px; letter-spacing: -.01em; }
.brand small { color: #958c84; font-size: 10px; letter-spacing: .06em; text-transform: uppercase; margin-top: 4px; }
.secure-pill { margin: 25px 7px 15px; border: 1px solid #302c28; background: #1e1b18; color: #aaa198; border-radius: 11px; padding: 8px 10px; display: flex; align-items: center; gap: 8px; font-size: 11px; font-weight: 650; }
.secure-pill svg { width: 14px; height: 14px; color: #78bd94; }
.nav-label { margin: 12px 10px 7px; color: #776f68; text-transform: uppercase; letter-spacing: .12em; font-size: 9px; font-weight: 800; }
.nav { display: flex; flex-direction: column; gap: 3px; }
.nav a { display: flex; align-items: center; gap: 11px; min-height: 42px; padding: 0 12px; color: #aaa198; border-radius: 12px; text-decoration: none; font-size: 12.5px; font-weight: 600; transition: background .16s, color .16s, transform .16s; }
.nav a:hover { background: #211e1b; color: #eee8e1; }
.nav a.active { background: #2a211c; color: #f2a071; box-shadow: inset 3px 0 0 #dd6f39; }
.nav a.active svg { color: #ed8c58; }
.nav a:active { transform: translateY(1px); }
.sidebar-foot { margin-top: auto; padding: 16px 9px 2px; border-top: 1px solid #2b2724; display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 0 8px; font-size: 11px; color: #c0b7ae; }
.sidebar-foot small { grid-column: 2; color: #777069; margin-top: 2px; }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: #5fbe86; box-shadow: 0 0 0 4px rgb(95 190 134 / .1); grid-row: 1 / 3; }

.workspace { min-width: 0; }
.topbar { position: sticky; z-index: 20; top: 0; height: 70px; padding: 0 34px; display: flex; align-items: center; border-bottom: 1px solid color-mix(in srgb, var(--line) 82%, transparent); background: color-mix(in srgb, var(--bg) 86%, transparent); backdrop-filter: blur(18px); }
.topbar-copy { display: grid; line-height: 1.1; }
.topbar-copy span { color: var(--muted-2); font-size: 9px; text-transform: uppercase; letter-spacing: .12em; font-weight: 800; }
.topbar-copy strong { margin-top: 4px; font-size: 13px; }
.topbar-actions { display: flex; gap: 7px; margin-left: auto; }
.icon-button { width: 35px; height: 35px; border: 1px solid var(--line); border-radius: 11px; color: var(--muted); background: var(--surface); display: grid; place-items: center; cursor: pointer; box-shadow: 0 1px 1px rgb(0 0 0 / .025); }
.icon-button:hover { color: var(--text); border-color: var(--line-strong); background: var(--surface-2); }
.mobile-brand { display: none; }
main { max-width: 1460px; margin: 0 auto; padding: 34px 34px 80px; }
.page-head { min-height: 82px; margin-bottom: 26px; display: flex; align-items: flex-start; }
.page-head p, .panel-head p, .release-hero p, .security-hero p { margin: 0 0 5px; color: var(--accent); font-size: 9px; font-weight: 850; letter-spacing: .13em; text-transform: uppercase; }
.page-head h1 { margin: 0; font: 650 clamp(28px, 3vw, 39px)/1.1 ui-serif, Georgia, serif; letter-spacing: -.035em; }
.page-head span { display: block; max-width: 690px; margin-top: 9px; color: var(--muted); font-size: 13px; }

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.panel-head { min-height: 70px; padding: 19px 21px 14px; display: flex; align-items: flex-start; gap: 14px; }
.panel-head > :last-child { margin-left: auto; }
.panel-head h2 { margin: 0; font: 650 18px/1.2 ui-serif, Georgia, serif; letter-spacing: -.015em; }
.panel-head > span, .panel-head > small { color: var(--muted); font-size: 11px; }
.panel-head.padded { padding-left: 23px; padding-right: 23px; border-bottom: 1px solid var(--line); }
.support-copy { color: var(--muted); font-size: 12px; line-height: 1.7; margin: 0; }
.panel > .support-copy { padding: 0 21px 20px; }
.panel-foot { padding: 13px 20px; background: var(--surface-2); border-top: 1px solid var(--line); color: var(--muted); font-size: 10.5px; }

.metric-grid { display: grid; grid-template-columns: repeat(6, minmax(135px, 1fr)); gap: 12px; margin-bottom: 14px; }
.metric { position: relative; min-height: 135px; padding: 19px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); overflow: hidden; }
.metric::after { content: ""; position: absolute; width: 70px; height: 70px; border-radius: 50%; right: -30px; top: -30px; background: var(--accent-soft); opacity: .7; }
.metric > span { color: var(--muted); font-size: 10px; font-weight: 750; letter-spacing: .065em; text-transform: uppercase; }
.metric strong { display: block; margin-top: 14px; font: 650 30px/1 ui-serif, Georgia, serif; letter-spacing: -.04em; }
.metric small { display: block; color: var(--muted-2); font-size: 10px; margin-top: 10px; }
.split-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(300px, 1fr); gap: 14px; margin-bottom: 14px; }
.queue-grid { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); }
.queue-grid > div { padding: 19px 20px; display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 0 10px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.queue-grid > div:nth-child(3n) { border-right: 0; }
.queue-grid > div:nth-last-child(-n+3) { border-bottom: 0; }
.queue-grid i { width: 9px; height: 9px; border-radius: 50%; grid-row: 1 / 3; background: var(--muted-2); }
.queue-grid i.live { background: #db5d3f; box-shadow: 0 0 0 5px color-mix(in srgb, #db5d3f 12%, transparent); }
.queue-grid i.ticket { background: #d79631; }
.queue-grid i.active { background: #368dc1; }
.queue-grid i.resolved { background: #3da06d; }
.queue-grid i.closed { background: #8d8580; }
.queue-grid i.agents { background: #8b67c2; }
.queue-grid strong { font: 650 21px/1 ui-serif, Georgia, serif; }
.queue-grid span { color: var(--muted); font-size: 10px; margin-top: 5px; }
.fresh { padding: 4px 8px; border-radius: 99px; color: var(--success) !important; background: var(--success-soft); font-weight: 700; }
.health-list { border-top: 1px solid var(--line); }
.health-list > div { min-height: 51px; padding: 9px 16px; display: flex; align-items: center; gap: 11px; border-bottom: 1px solid var(--line); }
.health-list > div:last-child { border: 0; }
.health-list > div > span:nth-child(2) { display: grid; }
.health-list strong { font-size: 11px; text-transform: capitalize; }
.health-list small { color: var(--muted); font-size: 9px; }
.health-icon { width: 27px; height: 27px; border-radius: 9px; display: grid; place-items: center; }
.health-icon svg { width: 13px; height: 13px; }
.health-icon.good { color: var(--success); background: var(--success-soft); }
.health-icon.bad { color: var(--danger); background: var(--danger-soft); }
.health-list .badge { margin-left: auto; }
.endpoint-grid { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); }
.endpoint-grid > div { min-width: 0; padding: 18px 20px; border-right: 1px solid var(--line); }
.endpoint-grid > div:last-child { border-right: 0; }
.endpoint-grid span { display: block; color: var(--muted); font-size: 9px; text-transform: uppercase; font-weight: 800; letter-spacing: .07em; }
.endpoint-grid code { display: block; margin-top: 8px; overflow: hidden; text-overflow: ellipsis; font: 10.5px ui-monospace, SFMono-Regular, Menlo, monospace; }

.badge { width: max-content; display: inline-flex; align-items: center; gap: 5px; border-radius: 99px; padding: 4px 8px; font-size: 9px; font-weight: 800; text-transform: capitalize; white-space: nowrap; }
.badge.success { color: var(--success); background: var(--success-soft); }
.badge.warning { color: var(--warning); background: var(--warning-soft); }
.badge.danger { color: var(--danger); background: var(--danger-soft); }
.badge.neutral { color: var(--muted); background: var(--surface-3); }
.badge i { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }

.table-panel { overflow: hidden; }
.table-tools { min-height: 76px; padding: 16px 20px; display: flex; align-items: center; gap: 20px; border-bottom: 1px solid var(--line); }
.table-tools > div { display: grid; }
.table-tools strong { font: 650 22px/1 ui-serif, Georgia, serif; }
.table-tools span { color: var(--muted); font-size: 10px; margin-top: 5px; }
.search { margin-left: auto; width: min(330px, 45vw); }
.search > span { position: absolute; width: 1px; height: 1px; overflow: hidden; }
.search input { width: 100%; }
.table-wrap { width: 100%; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 13px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; white-space: nowrap; }
th { color: var(--muted-2); background: var(--surface-2); font-size: 8.5px; text-transform: uppercase; letter-spacing: .09em; font-weight: 850; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: color-mix(in srgb, var(--surface-2) 70%, transparent); }
td { color: var(--muted); font-size: 10.5px; }
td strong { display: block; color: var(--text); font-size: 11.5px; }
td small { display: block; color: var(--muted-2); font-size: 9.5px; margin-top: 3px; }
td code { display: block; margin-top: 3px; color: var(--muted-2); font: 9px ui-monospace, SFMono-Regular, Menlo, monospace; }
.count-pair b { color: var(--text); }
.empty-cell { text-align: center; padding: 40px; color: var(--muted); }

input, textarea, select { width: 100%; border: 1px solid var(--line-strong); background: var(--surface); color: var(--text); border-radius: 11px; padding: 10px 12px; transition: border-color .15s, box-shadow .15s; }
input:hover, textarea:hover, select:hover { border-color: color-mix(in srgb, var(--muted) 50%, var(--line)); }
input:focus, textarea:focus, select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 10%, transparent); outline: 0; }
textarea { resize: vertical; min-height: 80px; }
label > span { display: block; color: var(--text); font-size: 10.5px; font-weight: 750; margin-bottom: 6px; }
label > small { display: block; color: var(--muted); font-size: 9.5px; margin-top: 6px; }
.form-stack { display: flex; flex-direction: column; gap: 15px; padding: 0 21px 22px; }
.field-row { display: grid; grid-template-columns: 1.3fr .7fr; gap: 11px; }
.button { min-height: 39px; padding: 0 14px; border-radius: 11px; border: 1px solid transparent; display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-size: 10.5px; font-weight: 800; text-decoration: none; cursor: pointer; transition: transform .15s, background .15s, border-color .15s; }
.button:hover { transform: translateY(-1px); }
.button:active { transform: translateY(0); }
.button:disabled { opacity: .55; cursor: wait; transform: none; }
.button.primary { color: white; background: linear-gradient(150deg, var(--accent), var(--accent-dark)); box-shadow: 0 8px 18px color-mix(in srgb, var(--accent) 17%, transparent); }
.button.secondary { color: var(--text); background: var(--surface); border-color: var(--line-strong); }
.button.secondary:hover { background: var(--surface-2); }
.button.danger { color: var(--danger); background: var(--danger-soft); border-color: color-mix(in srgb, var(--danger) 20%, transparent); }
.button.full { width: 100%; min-height: 43px; }
.button.tiny { min-height: 29px; padding: 0 10px; font-size: 9px; }
.button svg { width: 15px; height: 15px; }
.form-note { margin: -4px 3px 0; color: var(--muted); text-align: center; font-size: 9px; }

.limits-layout { display: flex; flex-direction: column; gap: 14px; }
.limits-hero { min-height: 105px; padding: 20px 23px; border-radius: var(--radius); display: flex; align-items: center; gap: 17px; border: 1px solid color-mix(in srgb, var(--success) 24%, var(--line)); background: linear-gradient(110deg, var(--success-soft), var(--surface)); box-shadow: var(--shadow); }
.limits-hero > div { width: 54px; height: 54px; flex: none; border-radius: 16px; display: grid; place-items: center; color: var(--success); background: var(--surface); box-shadow: 0 8px 20px rgb(0 0 0 / .06); }
.limits-hero > div svg { width: 25px; height: 25px; }
.limits-hero p { margin: 0 0 4px; color: var(--success); font-size: 9px; font-weight: 850; letter-spacing: .13em; text-transform: uppercase; }
.limits-hero h2 { margin: 0; font: 650 21px/1.2 ui-serif, Georgia, serif; }
.limits-hero small { display: block; margin-top: 4px; color: var(--muted); font-size: 10px; }
.limits-hero > b { margin-left: auto; }
.limit-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--line); }
.limit-card { min-width: 0; padding: 18px; background: var(--surface); }
.limit-card .limit-group { margin: 0 0 8px; color: var(--accent); font-size: 8px; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; }
.limit-card > strong { display: block; font-size: 11.5px; }
.limit-card > small { display: block; min-height: 30px; margin-top: 3px; color: var(--muted); font-size: 9.5px; }
.limit-card > div { position: relative; margin-top: 12px; }
.limit-card input { padding-right: 92px; font-size: 15px; font-weight: 700; }
.limit-card > div b { position: absolute; right: 11px; top: 11px; color: var(--muted); font-size: 9px; }
.limit-card footer { margin-top: 7px; color: var(--muted-2); font-size: 8.5px; }
.fixed-limit-copy { padding-top: 17px !important; border-top: 1px solid var(--line); }
.fixed-limit-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.fixed-limit-grid > div { min-width: 0; padding: 15px 18px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.fixed-limit-grid > div:nth-child(4n) { border-right: 0; }
.fixed-limit-grid > div:nth-last-child(-n+4) { border-bottom: 0; }
.fixed-limit-grid span { display: block; color: var(--muted); font-size: 8.5px; text-transform: capitalize; }
.fixed-limit-grid strong { display: block; margin-top: 5px; font-size: 11px; }
.limits-layout .save-bar { width: 100%; }
.limits-layout .save-bar > div { margin-left: auto; display: flex; gap: 8px; }

.release-hero, .security-hero { min-height: 105px; margin-bottom: 14px; padding: 20px 23px; border-radius: var(--radius); display: flex; align-items: center; gap: 17px; border: 1px solid color-mix(in srgb, var(--accent) 25%, var(--line)); background: linear-gradient(110deg, var(--accent-soft), var(--surface)); box-shadow: var(--shadow); }
.release-icon, .security-hero > div { width: 54px; height: 54px; flex: none; border-radius: 16px; display: grid; place-items: center; color: var(--accent); background: var(--surface); box-shadow: 0 8px 20px rgb(0 0 0 / .06); }
.release-icon svg, .security-hero > div svg { width: 26px; height: 26px; }
.release-hero h2, .security-hero h2 { margin: 0; font: 650 21px/1.2 ui-serif, Georgia, serif; }
.release-hero h2 strong { color: var(--accent); }
.release-hero > div:nth-child(2) > span, .security-hero small { color: var(--muted); font-size: 10.5px; }
.release-hero .button, .security-hero .button { margin-left: auto; }
.releases-layout { grid-template-columns: minmax(360px, .95fr) minmax(260px, .65fr); }
.upload-panel .panel-head > svg { color: var(--accent); }
.file-drop { min-height: 124px; border: 1px dashed var(--line-strong); border-radius: 14px; background: var(--surface-2); display: flex; flex-direction: column; align-items: center; justify-content: center; cursor: pointer; transition: border-color .15s, background .15s; }
.file-drop:hover { border-color: var(--accent); background: var(--accent-soft); }
.file-drop input { position: absolute; opacity: 0; pointer-events: none; }
.file-drop strong { margin-top: 7px; font-size: 11px; }
.file-drop small { color: var(--muted); font-size: 9.5px; margin-top: 3px; }
.drop-icon { width: 31px; height: 31px; border-radius: 10px; color: var(--accent); background: var(--accent-soft); display: grid !important; place-items: center; margin: 0 !important; }
.drop-icon svg { width: 15px; height: 15px; }
.hash-preview { padding: 10px 12px; border-radius: 11px; background: var(--surface-2); border: 1px solid var(--line); }
.hash-preview span { display: block; color: var(--muted); font-size: 8.5px; font-weight: 800; letter-spacing: .08em; }
.hash-preview code { display: block; margin-top: 4px; color: var(--text); font: 9px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; word-break: break-all; }
.progress > div { height: 5px; overflow: hidden; border-radius: 99px; background: var(--surface-3); }
.progress > div span { display: block; width: 0; height: 100%; background: var(--accent); transition: width .15s; }
.progress small { display: block; color: var(--muted); font-size: 9px; margin-top: 6px; }
.contract-list { border-top: 1px solid var(--line); }
.contract-list > div { padding: 17px 20px; display: flex; gap: 12px; border-bottom: 1px solid var(--line); }
.contract-list > div:last-child { border: 0; }
.contract-list > div > svg { width: 18px; color: var(--success); }
.contract-list span { display: grid; }
.contract-list strong { font-size: 11px; }
.contract-list small { color: var(--muted); font-size: 9.5px; margin-top: 3px; }
.short-hash { max-width: 110px; }

.security-hero.closed { background: linear-gradient(110deg, var(--success-soft), var(--surface)); border-color: color-mix(in srgb, var(--success) 22%, var(--line)); }
.security-hero.closed > div { color: var(--success); }
.security-hero.open { background: linear-gradient(110deg, var(--warning-soft), var(--surface)); border-color: color-mix(in srgb, var(--warning) 25%, var(--line)); }
.security-hero.open > div { color: var(--warning); }
.access-layout { grid-template-columns: .9fr 1.1fr; }
.origin-list { border-top: 1px solid var(--line); }
.origin-list > div { padding: 15px 20px; display: grid; grid-template-columns: auto 1fr; gap: 3px 10px; align-items: center; border-bottom: 1px solid var(--line); }
.origin-list > div:last-child { border: 0; }
.origin-list svg { width: 15px; color: var(--success); grid-row: 1 / 3; }
.origin-list code { font-size: 10px; overflow-wrap: anywhere; }
.origin-list span { color: var(--muted); font-size: 8.5px; }
.guardrails > div:nth-child(2) { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); }
.guardrails > div:nth-child(2) span { min-height: 72px; padding: 16px; display: flex; align-items: center; gap: 9px; border-right: 1px solid var(--line); font-size: 10px; font-weight: 700; }
.guardrails > div:nth-child(2) span:last-child { border: 0; }
.guardrails > div:nth-child(2) svg { color: var(--success); flex: none; width: 15px; }
.guardrails footer { padding: 10px 18px; border-top: 1px solid var(--line); color: var(--muted); font-size: 9px; }

.settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.setting-section { padding-bottom: 20px; }
.setting-section > label:not(.switch) { display: block; padding: 0 21px; }
.setting-section.wide { grid-column: 1 / -1; }
.retention-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; padding: 0 21px; }
.retention-grid label { padding: 14px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 13px; }
.retention-grid label > div { position: relative; }
.retention-grid input { padding-right: 50px; }
.retention-grid label b { position: absolute; right: 11px; top: 10px; color: var(--muted); font-size: 9px; }
.switch { position: relative; width: 42px; height: 24px; flex: none; }
.switch input { position: absolute; opacity: 0; }
.switch span { width: 42px; height: 24px; margin: 0; border-radius: 99px; background: var(--surface-3); cursor: pointer; transition: background .2s; }
.switch span::after { content: ""; position: absolute; width: 18px; height: 18px; left: 3px; top: 3px; border-radius: 50%; background: white; box-shadow: 0 2px 5px rgb(0 0 0 / .18); transition: transform .2s; }
.switch input:checked + span { background: var(--success); }
.switch input:checked + span::after { transform: translateX(18px); }
.intake-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; padding: 0 21px; }
.intake-grid > label { min-height: 86px; padding: 15px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface-2); display: flex; align-items: center; gap: 18px; }
.intake-grid > label > span:first-child { margin: 0; }
.intake-grid > label > span:first-child strong { display: block; font-size: 11px; }
.intake-grid > label > span:first-child small { display: block; margin-top: 4px; color: var(--muted); font-size: 9.5px; font-weight: 400; line-height: 1.5; }
.intake-grid > label > .switch { margin-left: auto; }
.save-bar { grid-column: 1 / -1; position: sticky; bottom: 14px; z-index: 5; padding: 13px 15px 13px 19px; border: 1px solid var(--line-strong); border-radius: 14px; background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(15px); box-shadow: 0 12px 35px rgb(0 0 0 / .1); display: flex; align-items: center; }
.save-bar span { color: var(--muted); font-size: 10px; }
.save-bar .button { margin-left: auto; }

.audit-list { border-top: 1px solid var(--line); }
.audit-list article { min-height: 76px; padding: 14px 20px; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 13px; border-bottom: 1px solid var(--line); }
.audit-list article:last-child { border: 0; }
.audit-mark { width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; color: var(--accent); background: var(--accent-soft); }
.audit-mark svg { width: 15px; }
.audit-list article > div > div { display: flex; align-items: center; gap: 8px; }
.audit-list strong { font-size: 11px; }
.audit-list p { margin: 4px 0 0; color: var(--muted); font-size: 9.5px; }
.audit-list time { color: var(--muted); font-size: 9.5px; }

.modal-backdrop { position: fixed; z-index: 100; inset: 0; padding: 24px; background: rgb(20 15 11 / .56); backdrop-filter: blur(6px); display: grid; place-items: center; animation: modal-in .16s ease-out; }
.modal { width: min(900px, 100%); max-height: min(880px, calc(100dvh - 48px)); overflow: auto; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 21px; box-shadow: 0 30px 90px rgb(0 0 0 / .3); }
.modal > header { position: sticky; z-index: 2; top: 0; min-height: 76px; padding: 18px 21px; border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--surface) 94%, transparent); backdrop-filter: blur(16px); display: flex; align-items: center; gap: 14px; }
.modal > header p { margin: 0 0 3px; color: var(--accent); font-size: 9px; font-weight: 850; letter-spacing: .13em; text-transform: uppercase; }
.modal > header h2 { margin: 0; font: 650 21px/1.2 ui-serif, Georgia, serif; }
.modal-close { margin-left: auto; font-size: 22px; line-height: 1; }
.modal-body { padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.detail-hero { padding: 18px; border-radius: 15px; background: linear-gradient(120deg, var(--surface-2), var(--accent-soft)); border: 1px solid var(--line); display: grid; grid-template-columns: minmax(230px, 1fr) minmax(320px, 1.1fr); gap: 20px; align-items: center; }
.detail-hero h3 { margin: 10px 0 3px; font-size: 13px; word-break: break-word; }
.detail-hero p { margin: 0; color: var(--muted); font-size: 10px; }
.detail-hero dl { margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; overflow: hidden; border-radius: 11px; border: 1px solid var(--line); background: var(--line); }
.detail-hero dl div { padding: 11px; background: var(--surface); }
.detail-hero dt { color: var(--muted); font-size: 8.5px; }
.detail-hero dd { margin: 5px 0 0; font: 650 18px ui-serif, Georgia, serif; }
.control-alert { padding: 15px 17px; border: 1px solid color-mix(in srgb, var(--danger) 20%, var(--line)); background: var(--danger-soft); border-radius: 14px; display: flex; align-items: center; gap: 14px; }
.control-alert.safe { border-color: color-mix(in srgb, var(--success) 20%, var(--line)); background: var(--success-soft); }
.control-alert strong { font-size: 11px; }
.control-alert p { flex: 1; margin: 2px 0 0; color: var(--muted); font-size: 9.5px; }
.control-card { padding: 16px; border: 1px solid var(--line); background: var(--surface-2); border-radius: 14px; display: grid; grid-template-columns: minmax(210px, 1fr) minmax(180px, .75fr) 150px auto; align-items: end; gap: 12px; }
.control-card > div strong { font-size: 11px; }
.control-card > div p { margin: 4px 0 0; color: var(--muted); font-size: 9.5px; line-height: 1.55; }
.control-card textarea { min-height: 63px; }
.compact-control { grid-template-columns: 1fr auto; align-items: center; }
.detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.detail-grid > section, .detail-section { min-width: 0; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.detail-grid h3, .detail-section > h3 { margin: 0; padding: 13px 15px; border-bottom: 1px solid var(--line); background: var(--surface-2); font: 650 13px ui-serif, Georgia, serif; }
.compact-list > div { min-height: 50px; padding: 10px 14px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 10px; }
.compact-list > div:last-child { border-bottom: 0; }
.compact-list > div > span { display: grid; min-width: 0; }
.compact-list strong { font-size: 10.5px; overflow: hidden; text-overflow: ellipsis; }
.compact-list small { margin-top: 2px; color: var(--muted); font-size: 9px; overflow: hidden; text-overflow: ellipsis; }
.compact-list b { margin-left: auto; }
.compact-list code { color: var(--muted); font-size: 9.5px; overflow-wrap: anywhere; }
.modal-empty { margin: 0; padding: 18px; color: var(--muted); font-size: 10px; }
@keyframes modal-in { from { opacity: 0; } }

.notice { margin: -10px 0 18px; min-height: 46px; padding: 11px 14px; border-radius: 13px; display: flex; align-items: center; gap: 10px; font-size: 11px; font-weight: 650; }
.notice svg { flex: none; width: 17px; }
.notice.success { color: var(--success); background: var(--success-soft); border: 1px solid color-mix(in srgb, var(--success) 18%, transparent); }
.notice.danger { color: var(--danger); background: var(--danger-soft); border: 1px solid color-mix(in srgb, var(--danger) 18%, transparent); }
.empty-state { min-height: 330px; padding: 30px; border: 1px dashed var(--line-strong); border-radius: var(--radius); display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.empty-state > svg { width: 31px; height: 31px; color: var(--muted); }
.empty-state h2 { margin: 14px 0 5px; font: 650 20px ui-serif, Georgia, serif; }
.empty-state p { max-width: 420px; margin: 0 0 18px; color: var(--muted); font-size: 11px; }
.empty-state.danger > svg { color: var(--danger); }
.loading { min-height: 330px; display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--muted); }
.loading span { width: 25px; height: 25px; border: 2px solid var(--line-strong); border-top-color: var(--accent); border-radius: 50%; animation: spin .75s linear infinite; }
.loading p { font-size: 10px; margin-top: 11px; text-transform: capitalize; }
@keyframes spin { to { transform: rotate(360deg); } }
.boot-block { min-height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 30px; }
.boot-block h1 { margin: 18px 0 5px; font: 650 27px ui-serif, Georgia, serif; }
.boot-block p { color: var(--muted); margin: 0 0 20px; }

@media (max-width: 1180px) {
  .metric-grid { grid-template-columns: repeat(3, 1fr); }
  .endpoint-grid { grid-template-columns: repeat(2, 1fr); }
  .endpoint-grid > div:nth-child(2) { border-right: 0; }
  .endpoint-grid > div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .limit-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 880px) {
  .app-shell { display: block; }
  .sidebar { position: fixed; z-index: 40; left: 10px; right: 10px; bottom: 10px; top: auto; width: auto; height: 62px; padding: 7px; border: 1px solid #332e2a; border-radius: 17px; box-shadow: 0 14px 45px rgb(0 0 0 / .34); overflow-x: auto; overflow-y: hidden; }
  .sidebar .brand, .sidebar .secure-pill, .sidebar .nav-label, .sidebar-foot { display: none; }
  .nav { flex-direction: row; height: 100%; }
  .nav a { flex: 1 0 62px; min-height: 46px; padding: 0 8px; justify-content: center; }
  .nav a span { display: none; }
  .nav a.active { box-shadow: inset 0 -3px 0 #dd6f39; }
  .topbar { padding: 0 19px; }
  .mobile-brand { display: flex; align-items: center; gap: 8px; }
  .mobile-brand .brand-mark { width: 28px; height: 28px; border-radius: 9px; font-size: 17px; }
  .mobile-brand strong { font-size: 12px; }
  .topbar-copy { display: none; }
  main { padding: 27px 18px 100px; }
  .split-grid, .releases-layout, .access-layout { grid-template-columns: 1fr; }
  .release-hero, .security-hero { align-items: flex-start; flex-wrap: wrap; }
  .fixed-limit-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fixed-limit-grid > div:nth-child(2n) { border-right: 0; }
  .fixed-limit-grid > div:nth-last-child(-n+4) { border-bottom: 1px solid var(--line); }
  .fixed-limit-grid > div:nth-last-child(-n+2) { border-bottom: 0; }
  .release-hero .button, .security-hero .button { width: 100%; margin-left: 71px; }
  .guardrails > div:nth-child(2) { grid-template-columns: repeat(2, 1fr); }
  .guardrails > div:nth-child(2) span:nth-child(2) { border-right: 0; }
  .guardrails > div:nth-child(2) span:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
}

@media (max-width: 620px) {
  .page-head { min-height: auto; margin-bottom: 22px; }
  .page-head h1 { font-size: 29px; }
  .metric-grid { grid-template-columns: repeat(2, 1fr); }
  .metric { min-height: 120px; padding: 16px; }
  .queue-grid { grid-template-columns: repeat(2, 1fr); }
  .queue-grid > div:nth-child(3n) { border-right: 1px solid var(--line); }
  .queue-grid > div:nth-child(2n) { border-right: 0; }
  .queue-grid > div:nth-last-child(-n+3) { border-bottom: 1px solid var(--line); }
  .queue-grid > div:nth-last-child(-n+2) { border-bottom: 0; }
  .endpoint-grid { grid-template-columns: 1fr; }
  .endpoint-grid > div { border-right: 0; border-bottom: 1px solid var(--line); }
  .endpoint-grid > div:nth-child(2) { border-bottom: 1px solid var(--line); }
  .endpoint-grid > div:last-child { border-bottom: 0; }
  .table-tools { align-items: flex-start; }
  .search { width: 60%; }
  .field-row, .settings-grid, .retention-grid, .intake-grid, .detail-grid, .detail-hero { grid-template-columns: 1fr; }
  .limit-grid, .fixed-limit-grid { grid-template-columns: 1fr; }
  .fixed-limit-grid > div { border-right: 0; border-bottom: 1px solid var(--line) !important; }
  .fixed-limit-grid > div:last-child { border-bottom: 0 !important; }
  .limits-hero { align-items: flex-start; }
  .limits-hero > b { margin-left: 0; }
  .limits-layout .save-bar > div { margin-left: 0; display: grid; }
  .setting-section.wide, .save-bar { grid-column: auto; }
  .save-bar { align-items: stretch; flex-direction: column; gap: 9px; }
  .save-bar .button { margin: 0; }
  .audit-list article { grid-template-columns: auto 1fr; }
  .audit-list time { grid-column: 2; }
  .release-hero .button, .security-hero .button { margin-left: 0; }
  .release-icon, .security-hero > div { width: 47px; height: 47px; }
  .release-hero > div:nth-child(2), .security-hero > span { flex: 1; }
  .guardrails > div:nth-child(2) { grid-template-columns: 1fr; }
  .guardrails > div:nth-child(2) span { border-right: 0; border-bottom: 1px solid var(--line); }
  .modal-backdrop { padding: 0; place-items: end center; }
  .modal { max-height: 94dvh; border-radius: 20px 20px 0 0; border-bottom: 0; }
  .modal-body { padding: 14px; }
  .detail-hero dl { grid-template-columns: repeat(2, 1fr); }
  .control-card { grid-template-columns: 1fr; align-items: stretch; }
  .control-alert { align-items: flex-start; flex-direction: column; }
}
