:root {
  --bg: #080d0c;
  --panel: #101715;
  --panel-2: #141d1a;
  --line: rgba(211, 255, 232, .1);
  --line-strong: rgba(211, 255, 232, .18);
  --text: #eff8f2;
  --muted: #84938c;
  --acid: #b9f34a;
  --mint: #58e5ae;
  --amber: #f4b95f;
  --red: #ff6b68;
  --blue: #6fa9ff;
  --shadow: 0 30px 80px rgba(0, 0, 0, .32);
  --radius: 18px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--text);
  background: var(--bg);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}

button, input { font: inherit; }
a { color: inherit; text-decoration: none; }
button { color: inherit; }
.muted { color: var(--muted); }

.kicker, .eyebrow {
  margin: 0 0 8px;
  color: var(--mint);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}

.brand > span:last-child { display: grid; line-height: 1; }
.brand strong { font-size: 15px; letter-spacing: .12em; }
.brand small { margin-top: 6px; color: var(--muted); font-size: 8px; font-weight: 700; letter-spacing: .14em; }
.brand--large strong { font-size: 18px; }
.brand--large small { font-size: 9px; }

.brand-mark {
  position: relative;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid rgba(185, 243, 74, .45);
  border-radius: 50%;
  background: rgba(185, 243, 74, .05);
  box-shadow: inset 0 0 0 5px rgba(185, 243, 74, .03);
}

.brand-mark::before,
.brand-mark::after,
.brand-mark i {
  content: "";
  position: absolute;
  border-radius: 50%;
  background: var(--acid);
}
.brand-mark::before { width: 7px; height: 7px; }
.brand-mark::after { width: 3px; height: 3px; transform: translate(9px, -7px); box-shadow: -17px 7px 0 rgba(185, 243, 74, .55); }
.brand-mark i { width: 24px; height: 1px; opacity: .4; transform: rotate(-37deg); }

.button {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 17px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel-2);
  font-weight: 750;
  cursor: pointer;
  transition: transform .18s ease, filter .18s ease, border-color .18s ease;
}

.button:hover { transform: translateY(-1px); filter: brightness(1.08); }
.button:disabled { cursor: wait; filter: grayscale(.5); opacity: .65; }
.button--primary { border-color: var(--acid); color: #10160c; background: var(--acid); }
.button--primary > span:first-child { font-size: 20px; font-weight: 400; }
.button--wide { width: 100%; min-height: 50px; justify-content: space-between; padding-inline: 20px; }
.button-spinner { width: 14px; height: 14px; border: 2px solid rgba(0,0,0,.25); border-top-color: #000; border-radius: 50%; animation: spin .75s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.field { display: grid; gap: 7px; }
.field > span { color: #b3beb8; font-size: 11px; font-weight: 750; }
.field input {
  width: 100%;
  height: 46px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  outline: 0;
  border-radius: 10px;
  color: var(--text);
  background: #0d1412;
  transition: border-color .18s, box-shadow .18s;
}
.field input:focus { border-color: rgba(185, 243, 74, .8); box-shadow: 0 0 0 3px rgba(185, 243, 74, .08); }
.field input::placeholder { color: #4f5e57; }
.field--large input { height: 58px; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 17px; letter-spacing: .03em; }

/* Login */
.login-page {
  min-height: 100vh;
  background:
    radial-gradient(circle at 18% 15%, rgba(42, 153, 116, .14), transparent 34%),
    linear-gradient(115deg, #080d0c 0 52%, #0b1210 52%);
}

.login-shell { display: grid; min-height: 100vh; grid-template-columns: minmax(0, 1.2fr) minmax(420px, .8fr); }
.login-intro { position: relative; display: flex; overflow: hidden; padding: 52px 6vw; flex-direction: column; justify-content: space-between; border-right: 1px solid var(--line); }
.login-intro::before {
  content: "";
  position: absolute;
  width: min(58vw, 780px);
  aspect-ratio: 1;
  left: -19vw;
  bottom: -48%;
  border: 1px solid rgba(185, 243, 74, .12);
  border-radius: 50%;
  box-shadow: 0 0 0 70px rgba(185, 243, 74, .018), 0 0 0 150px rgba(185, 243, 74, .014);
}
.login-copy { position: relative; max-width: 680px; margin: auto 0; padding: 12vh 0; }
.login-copy h1 { margin: 0; font-size: clamp(48px, 6vw, 86px); font-weight: 610; letter-spacing: -.065em; line-height: .98; }
.login-copy h1 em { color: var(--acid); font-family: Georgia, serif; font-weight: 400; }
.login-copy p:last-child { max-width: 520px; margin: 30px 0 0; color: var(--muted); font-size: 17px; line-height: 1.65; }
.login-signal { display: flex; height: 44px; align-items: flex-end; gap: 6px; }
.login-signal span { width: 3px; border-radius: 3px; background: var(--mint); opacity: .25; animation: signal 2.5s ease-in-out infinite; }
.login-signal span:nth-child(1) { height: 9px; }
.login-signal span:nth-child(2) { height: 17px; animation-delay: .15s; }
.login-signal span:nth-child(3) { height: 27px; animation-delay: .3s; }
.login-signal span:nth-child(4) { height: 36px; animation-delay: .45s; }
.login-signal span:nth-child(5) { height: 44px; animation-delay: .6s; }
@keyframes signal { 50% { opacity: 1; box-shadow: 0 0 14px rgba(88,229,174,.35); } }
.login-panel { display: grid; padding: 40px; place-items: center; }
.login-form { width: min(100%, 410px); padding: 32px; border: 1px solid var(--line); border-radius: 20px; background: rgba(16, 23, 21, .72); box-shadow: var(--shadow); backdrop-filter: blur(18px); }
.login-form > header { display: flex; align-items: center; gap: 8px; padding-bottom: 24px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.status-pulse { width: 7px; height: 7px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 0 5px rgba(88,229,174,.09); }
.login-form > div:nth-of-type(1) { padding: 30px 0 22px; }
.login-form h2 { margin: 0 0 8px; font-size: 28px; letter-spacing: -.035em; }
.login-form .muted { margin: 0; line-height: 1.5; }
.login-form .field { margin-bottom: 15px; }
.login-form .button { margin-top: 10px; }
.login-form footer { margin-top: 25px; color: #536159; font-size: 10px; text-align: center; }
.form-error, .dialog-message { margin-bottom: 16px; padding: 11px 13px; border: 1px solid rgba(255,107,104,.28); border-radius: 9px; color: #ff9c99; background: rgba(255,107,104,.07); font-size: 12px; line-height: 1.4; }

/* Main shell */
.app-shell { display: grid; min-height: 100vh; grid-template-columns: 224px minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; display: flex; height: 100vh; padding: 27px 20px 22px; flex-direction: column; border-right: 1px solid var(--line); background: #0b110f; }
.sidebar .brand { padding: 0 8px 29px; border-bottom: 1px solid var(--line); }
.main-nav { display: grid; gap: 5px; padding-top: 24px; }
.main-nav a, .nav-logout { display: flex; min-height: 43px; align-items: center; gap: 12px; padding: 0 12px; border: 0; border-radius: 9px; color: var(--muted); background: transparent; font-weight: 650; transition: background .18s, color .18s; }
.main-nav a:hover, .main-nav a.is-active, .nav-logout:hover { color: var(--text); background: rgba(255,255,255,.045); }
.main-nav a.is-active { box-shadow: inset 2px 0 var(--acid); }
.main-nav a > span, .nav-logout span { width: 18px; color: var(--acid); font-size: 18px; text-align: center; }
.main-nav b { margin-left: auto; padding: 3px 7px; border-radius: 20px; color: var(--muted); background: rgba(255,255,255,.05); font-size: 10px; }
.sidebar-note { display: flex; align-items: center; gap: 11px; margin-top: auto; padding: 14px 11px; border: 1px solid var(--line); border-radius: 11px; background: rgba(255,255,255,.018); }
.sidebar-note div { display: grid; gap: 4px; }
.sidebar-note strong { font-size: 10px; letter-spacing: .04em; }
.sidebar-note small { color: var(--muted); font-size: 9px; }
.signal-bars { display: flex; height: 19px; align-items: flex-end; gap: 2px; }
.signal-bars i { display: block; width: 3px; border-radius: 2px; background: var(--mint); }
.signal-bars i:nth-child(1) { height: 7px; }.signal-bars i:nth-child(2) { height: 12px; }.signal-bars i:nth-child(3) { height: 18px; }
.nav-logout { width: 100%; margin-top: 10px; cursor: pointer; }
.workspace { min-width: 0; padding: 34px clamp(22px, 3.4vw, 54px) 60px; background: radial-gradient(circle at 95% 0, rgba(60, 150, 110, .08), transparent 28%); }
.topbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 32px; }
.topbar h1 { margin: 0; font-size: clamp(25px, 3vw, 36px); font-weight: 620; letter-spacing: -.045em; }
.topbar-actions { display: flex; align-items: center; gap: 13px; }
.mobile-logout { display: none; }
.mobile-logout button { width: 42px; height: 42px; border: 1px solid var(--line); border-radius: 9px; color: var(--muted); background: var(--panel-2); cursor: pointer; }
.live-chip { display: flex; align-items: center; gap: 7px; padding: 8px 11px; border: 1px solid var(--line); border-radius: 8px; color: var(--muted); font-family: ui-monospace, monospace; font-size: 9px; letter-spacing: .12em; }
.live-chip span { width: 6px; height: 6px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 9px var(--mint); animation: live 2s infinite; }
@keyframes live { 50% { opacity: .35; } }
.summary-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 34px; }
.summary-card { position: relative; display: grid; min-height: 132px; padding: 19px; grid-template-columns: 40px 1fr; gap: 15px; overflow: hidden; border: 1px solid var(--line); border-radius: 15px; background: linear-gradient(145deg, rgba(255,255,255,.035), rgba(255,255,255,.012)); }
.summary-card::after { content: ""; position: absolute; width: 80px; height: 80px; right: -32px; bottom: -42px; border: 1px solid currentColor; border-radius: 50%; opacity: .09; box-shadow: 0 0 0 18px currentColor; }
.summary-icon { display: grid; width: 38px; height: 38px; place-items: center; border-radius: 10px; color: var(--blue); background: rgba(111,169,255,.09); font-size: 17px; }
.summary-card p { margin: 2px 0 5px; color: var(--muted); font-size: 11px; font-weight: 650; }
.summary-card strong { display: block; font-size: 31px; letter-spacing: -.04em; }
.summary-card > span { align-self: end; grid-column: 1 / -1; color: #68756f; font-size: 9px; letter-spacing: .1em; text-transform: uppercase; }
.summary-card--online { color: var(--mint); }.summary-card--online .summary-icon { color: var(--mint); background: rgba(88,229,174,.09); }
.summary-card--degraded { color: var(--amber); }.summary-card--degraded .summary-icon { color: var(--amber); background: rgba(244,185,95,.09); }
.summary-card--offline { color: var(--red); }.summary-card--offline .summary-icon { color: var(--red); background: rgba(255,107,104,.09); }
.summary-card p, .summary-card strong, .summary-card > span { color: var(--text); }
.summary-card p, .summary-card > span { color: var(--muted); }
.content-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 28px; align-items: start; }
.primary-column { min-width: 0; }
#overview, #servers, #events, #access { scroll-margin-top: 24px; }
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 15px; }
.section-heading h2 { margin: 0; font-size: 21px; letter-spacing: -.035em; }
.section-meta { color: var(--muted); font-family: ui-monospace, monospace; font-size: 9px; text-transform: uppercase; }
.server-list { display: grid; gap: 11px; }
.server-card { border: 1px solid var(--line); border-radius: 15px; background: rgba(16, 23, 21, .82); transition: border-color .18s, transform .18s; }
.server-card[data-server-card] { cursor: pointer; }
.server-card[data-server-card]:focus-visible { outline: 2px solid var(--acid); outline-offset: 2px; }
.server-card:hover { border-color: var(--line-strong); transform: translateY(-1px); }
.server-card > header { display: flex; min-height: 78px; align-items: center; justify-content: space-between; padding: 17px 19px; border-bottom: 1px solid var(--line); }
.server-identity { display: flex; min-width: 0; align-items: center; gap: 13px; }
.server-status-dot { display: block; width: 9px; height: 9px; flex: 0 0 auto; border-radius: 50%; background: var(--muted); box-shadow: 0 0 0 5px rgba(132,147,140,.08); }
.status-online { background: var(--mint); box-shadow: 0 0 0 5px rgba(88,229,174,.08), 0 0 14px rgba(88,229,174,.25); }
.status-degraded, .status-enrolling, .status-pending { background: var(--amber); box-shadow: 0 0 0 5px rgba(244,185,95,.08); }
.status-error, .status-offline { background: var(--red); box-shadow: 0 0 0 5px rgba(255,107,104,.08); }
.server-name-line { display: flex; align-items: center; gap: 8px; }
.server-name-line h3 { max-width: 400px; margin: 0 0 5px; overflow: hidden; font-size: 15px; text-overflow: ellipsis; white-space: nowrap; }
.server-identity p { margin: 0; color: var(--muted); font-family: ui-monospace, monospace; font-size: 10px; }
.version-tag { padding: 3px 6px; border: 1px solid rgba(185,243,74,.22); border-radius: 4px; color: var(--acid); font-size: 8px; font-weight: 800; }
.server-state { display: grid; gap: 5px; text-align: right; }
.server-state strong { font-size: 11px; }
.server-state small { color: var(--muted); font-size: 9px; }
.metrics-row { display: grid; padding: 17px 19px; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
.capability-row { display: flex; align-items: center; gap: 6px; padding: 12px 19px 0; flex-wrap: wrap; }
.capability-chip, .check-chip { padding: 4px 7px; border: 1px solid var(--line-strong); border-radius: 6px; color: var(--muted); background: rgba(255,255,255,.02); font-family: ui-monospace, monospace; font-size: 8px; font-weight: 800; letter-spacing: .05em; }
.capability-chip.is-ok, .check-chip.is-ok { border-color: rgba(88,229,174,.24); color: var(--mint); background: rgba(88,229,174,.05); }
.capability-chip.is-missing, .check-chip { border-color: rgba(255,107,104,.23); color: #ff9c99; background: rgba(255,107,104,.05); }
.access-chip { padding: 4px 8px; border: 1px solid var(--line-strong); border-radius: 6px; color: var(--muted); font-size: 9px; font-weight: 800; text-transform: uppercase; }
.access-chip--active { border-color: rgba(88,229,174,.24); color: var(--mint); }
.access-chip--retention, .access-chip--expired, .access-chip--purge_due { border-color: rgba(255,107,104,.28); color: var(--red); }
.access-chip--scheduled, .access-chip--unconfigured { border-color: rgba(244,185,95,.28); color: var(--amber); }
.access-section { margin-top: 34px; }
.access-list { display: grid; gap: 11px; }
.access-card { padding: 18px; border: 1px solid var(--line); border-radius: 15px; background: rgba(16,23,21,.82); }
.access-card > header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 15px; }
.access-card > header div { display: grid; gap: 4px; }
.access-card > header small { color: var(--muted); font-family: ui-monospace, monospace; }
.access-editor { display: grid; grid-template-columns: repeat(2, minmax(180px, 1fr)) auto minmax(120px, .5fr) auto; gap: 10px; align-items: end; }
.access-empty { min-height: 180px; }
.status-revoked { background: #6f7974; box-shadow: 0 0 0 5px rgba(132,147,140,.08); }
.metric { min-width: 0; }
.metric > span { display: block; margin-bottom: 6px; color: var(--muted); font-size: 8px; font-weight: 800; letter-spacing: .12em; }
.metric strong { font-size: 19px; font-weight: 620; }
.metric strong i { color: var(--muted); font-size: 10px; font-style: normal; }
.metric small { margin-left: 5px; color: var(--muted); font-size: 8px; }
.meter { height: 3px; margin-top: 9px; overflow: hidden; border-radius: 3px; background: rgba(255,255,255,.07); }
.meter i { display: block; height: 100%; max-width: 100%; border-radius: inherit; background: var(--mint); }
.server-card > footer { display: flex; min-height: 43px; align-items: center; justify-content: space-between; padding: 10px 19px; border-top: 1px solid var(--line); background: rgba(0,0,0,.08); }
.server-card > footer p { margin: 0; overflow: hidden; color: var(--muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.server-actions { display: flex; align-items: center; gap: 10px; }
.server-actions span { color: var(--muted); font-family: ui-monospace, monospace; font-size: 8px; }
.server-actions button { padding: 4px 7px; border: 1px solid var(--line-strong); border-radius: 5px; color: var(--text); background: transparent; font-size: 9px; cursor: pointer; }
.activity-panel { position: sticky; top: 25px; padding: 18px; border: 1px solid var(--line); border-radius: 15px; background: rgba(16,23,21,.62); }
.activity-list { display: grid; }
.activity-item { position: relative; display: grid; min-height: 60px; padding: 11px 0 11px 20px; grid-template-columns: 1fr; border-bottom: 1px solid var(--line); }
.activity-dot { position: absolute; top: 16px; left: 2px; width: 6px; height: 6px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 0 4px rgba(88,229,174,.06); }
.activity-item--error .activity-dot { background: var(--red); box-shadow: 0 0 0 4px rgba(255,107,104,.06); }
.activity-item strong { display: block; font-size: 10px; line-height: 1.45; }
.activity-item p { margin: 5px 0 0; color: var(--muted); font-size: 8px; }
.protocol-card { display: flex; gap: 12px; margin-top: 18px; padding: 13px; border: 1px solid rgba(185,243,74,.14); border-radius: 10px; background: rgba(185,243,74,.035); }
.protocol-card > span { display: grid; width: 30px; height: 30px; flex: 0 0 auto; place-items: center; border-radius: 8px; color: #11160e; background: var(--acid); font-size: 9px; font-weight: 900; }
.protocol-card strong { display: block; margin-bottom: 4px; font-size: 9px; }
.protocol-card p { margin: 0; color: var(--muted); font-size: 8px; line-height: 1.4; }
.empty-state { display: grid; min-height: 430px; padding: 55px 25px; place-items: center; align-content: center; border: 1px dashed var(--line-strong); border-radius: 16px; text-align: center; background: radial-gradient(circle, rgba(88,229,174,.045), transparent 48%); }
.empty-state h3 { margin: 5px 0 9px; font-size: 25px; letter-spacing: -.04em; }
.empty-state > p:not(.kicker) { max-width: 430px; margin: 0 0 22px; color: var(--muted); line-height: 1.6; }
.empty-orbit { position: relative; display: grid; width: 72px; height: 72px; margin-bottom: 20px; place-items: center; border: 1px solid rgba(185,243,74,.25); border-radius: 50%; box-shadow: 0 0 0 12px rgba(185,243,74,.025), 0 0 0 24px rgba(185,243,74,.015); }
.empty-orbit::after { content: ""; position: absolute; width: 7px; height: 7px; border-radius: 50%; background: var(--acid); animation: orbit 4s linear infinite; transform-origin: 36px 0; }
.empty-orbit span { width: 10px; height: 10px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 18px var(--mint); }
@keyframes orbit { from { transform: rotate(0deg) translateX(36px); } to { transform: rotate(360deg) translateX(36px); } }

/* Dialog */
.add-dialog { width: min(92vw, 510px); padding: 0; border: 1px solid var(--line-strong); border-radius: 20px; color: var(--text); background: #101715; box-shadow: var(--shadow); }
.add-dialog::backdrop { background: rgba(2, 5, 4, .78); backdrop-filter: blur(7px); }
.dialog-frame { position: relative; padding: 34px; }
.dialog-close { position: absolute; top: 15px; right: 15px; width: 31px; height: 31px; border: 1px solid var(--line); border-radius: 8px; color: var(--muted); background: transparent; cursor: pointer; }
.dialog-icon { display: grid; width: 45px; height: 45px; margin-bottom: 25px; place-items: center; border: 1px solid rgba(185,243,74,.22); border-radius: 12px; color: var(--acid); background: rgba(185,243,74,.06); font-size: 24px; }
.dialog-frame h2 { margin: 0 0 9px; font-size: 28px; letter-spacing: -.045em; }
.dialog-lead { margin: 0 0 25px; color: var(--muted); line-height: 1.55; }
.advanced-fields { margin: 14px 0 20px; padding: 0 2px; }
.advanced-fields summary { color: var(--muted); font-size: 11px; cursor: pointer; }
.advanced-fields[open] summary { margin-bottom: 15px; }
.field-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; margin-bottom: 11px; }
.security-note { display: flex; align-items: center; justify-content: center; gap: 7px; margin: 15px 0 0; color: #5e6b65; font-size: 9px; }
.security-note span { color: var(--mint); }
.market-options { display: flex; gap: 10px; margin-top: 14px; }
.market-options label { display: flex; min-width: 90px; align-items: center; gap: 8px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 9px; color: var(--muted); font-size: 11px; cursor: pointer; }
.market-options input { accent-color: var(--acid); }
.dialog-message.is-success { border-color: rgba(88,229,174,.28); color: #bcf4da; background: rgba(88,229,174,.07); overflow-wrap: anywhere; }
.detail-dialog { width: min(94vw, 720px); }
.detail-body { display: grid; min-width: 0; gap: 8px; max-height: min(62vh, 680px); margin-top: 22px; padding-right: 5px; overflow-x: hidden; overflow-y: auto; }
.detail-body > h3 { margin: 17px 0 2px; color: var(--muted); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; }
.detail-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: rgba(255,255,255,.018); }
.detail-row span { flex: 0 0 35%; color: var(--muted); font-size: 9px; }
.detail-row strong { min-width: 0; overflow-wrap: anywhere; font-size: 10px; font-weight: 600; line-height: 1.45; text-align: right; }
.detail-row.is-error, .detail-row.is-warning, .detail-row.is-unknown { border-color: rgba(255,107,104,.2); }
.detail-row.is-error strong, .detail-row.is-warning strong, .detail-row.is-unknown strong { color: #ffaaa7; }
.detail-row.is-ok strong { color: var(--mint); }
.detail-checks { display: grid; gap: 6px; }
.detail-actions { display: flex; gap: 7px; margin-top: 20px; flex-wrap: wrap; }
.detail-actions button { padding: 9px 11px; border: 1px solid var(--line-strong); border-radius: 8px; color: var(--text); background: var(--panel-2); font-size: 10px; cursor: pointer; }
.detail-actions button.is-danger { border-color: rgba(255,107,104,.25); color: #ffaaa7; }
.access-panel { display: grid; min-width: 0; gap: 12px; margin-top: 4px; padding: 14px; border: 1px solid var(--line); border-radius: 10px; background: rgba(255,255,255,.018); }
.access-editor-detail { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.access-editor-detail .field, .access-editor-detail input { min-width: 0; width: 100%; }
.access-editor-detail > .button { grid-column: 1 / -1; justify-self: start; }
.access-panel__extension { display: flex; min-width: 0; align-items: end; gap: 10px; }
.access-panel__extension .field { width: min(150px, 100%); margin: 0; }
.access-panel__hint { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.5; }
.access-panel__hint.is-active { color: var(--mint); }
.detail-maintenance { width: 100%; padding: 11px 13px; border: 1px solid var(--line); border-radius: 9px; }
.detail-maintenance summary { color: var(--muted); font-size: 10px; cursor: pointer; }
.detail-maintenance > p { margin: 10px 0; color: var(--muted); font-size: 9px; line-height: 1.45; }
.detail-maintenance__buttons { display: flex; gap: 7px; flex-wrap: wrap; }
.accounts-page { min-height: 100vh; background: radial-gradient(circle at 85% 10%, rgba(88,229,174,.055), transparent 34%), var(--bg); }
.accounts-workspace { width: min(1180px, calc(100% - 36px)); margin: 0 auto; padding: 34px 0 60px; }
.accounts-topbar { display: grid; align-items: start; grid-template-columns: auto minmax(0, 1fr) auto; gap: 22px; padding-bottom: 28px; border-bottom: 1px solid var(--line); }
.accounts-topbar h1 { margin: 4px 0 8px; font-size: clamp(30px, 5vw, 52px); letter-spacing: -.055em; }
.accounts-topbar p:not(.kicker) { max-width: 760px; margin: 0; color: var(--muted); line-height: 1.55; }
.accounts-summary { display: grid; margin: 24px 0 34px; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.accounts-summary article { display: grid; min-height: 112px; padding: 18px; align-content: space-between; border: 1px solid var(--line); border-radius: 14px; background: rgba(16,23,21,.82); }
.accounts-summary span { color: var(--muted); font-size: 9px; letter-spacing: .08em; text-transform: uppercase; }
.accounts-summary strong { font-size: 34px; }
.accounts-explainer { max-width: 820px; margin: 0 0 18px; color: var(--muted); line-height: 1.55; }
.manual-account { margin-bottom: 18px; border: 1px solid var(--line); border-radius: 12px; background: rgba(16,23,21,.58); }
.manual-account > summary { padding: 14px 16px; color: var(--muted); font-size: 11px; cursor: pointer; }
.manual-account .access-card { border: 0; border-top: 1px solid var(--line); border-radius: 0 0 12px 12px; }
.account-create-fields { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; gap: 10px; align-items: end; }
.account-access-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.account-access-card { min-width: 0; }
.account-access-card > header { gap: 14px; }
.account-access-card > header div { min-width: 0; }
.account-access-card > header strong, .account-access-card > header small { overflow-wrap: anywhere; }
.account-access-meta { display: flex; justify-content: space-between; gap: 12px; margin: 0 0 13px; color: var(--muted); font-size: 9px; }
.account-access-dates { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.account-access-dates > div { min-width: 0; padding: 10px 11px; border: 1px solid var(--line); border-radius: 8px; }
.account-access-dates span { display: block; margin-bottom: 5px; color: var(--muted); font-size: 8px; text-transform: uppercase; }
.account-access-dates strong { display: block; overflow-wrap: anywhere; font-size: 10px; line-height: 1.4; }
.account-access-controls { margin-top: 12px; }
.account-access-controls summary { color: var(--muted); font-size: 10px; cursor: pointer; }
.account-access-controls[open] summary { margin-bottom: 12px; }
.account-access-editor { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.account-access-editor .field, .account-access-editor input { min-width: 0; width: 100%; }
.toast { position: fixed; right: 25px; bottom: 25px; z-index: 20; max-width: min(420px, calc(100vw - 30px)); padding: 14px 17px; border: 1px solid rgba(88,229,174,.25); border-radius: 11px; color: #bcf4da; background: #12201a; box-shadow: var(--shadow); font-size: 12px; }
.toast[data-type="error"] { border-color: rgba(255,107,104,.3); color: #ffc0be; background: #251514; }

@media (max-width: 1180px) {
  .summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .content-grid { grid-template-columns: minmax(0, 1fr) 260px; gap: 18px; }
}

@media (max-width: 900px) {
  .login-shell { grid-template-columns: 1fr; }
  .login-intro { min-height: 44vh; padding: 32px; border-right: 0; border-bottom: 1px solid var(--line); }
  .login-copy { padding: 8vh 0 3vh; }
  .login-copy h1 { font-size: clamp(44px, 12vw, 70px); }
  .login-signal { display: none; }
  .login-panel { padding: 35px 20px; }
  .app-shell { grid-template-columns: 76px minmax(0, 1fr); }
  .sidebar { align-items: center; padding-inline: 10px; }
  .sidebar .brand > span:last-child, .main-nav a:not(.is-active)::after, .main-nav a { font-size: 0; }
  .sidebar .brand { padding-inline: 0; }
  .main-nav a { width: 45px; justify-content: center; padding: 0; }
  .main-nav a > span { font-size: 19px; }
  .main-nav b, .sidebar-note div, .nav-logout { display: none; }
  .sidebar-note { padding: 12px; }
  .content-grid { grid-template-columns: 1fr; }
  .activity-panel { position: static; }
  .accounts-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .account-access-list { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .app-shell { display: block; }
  .sidebar { position: static; display: flex; width: 100%; height: auto; padding: 13px 17px; flex-direction: row; align-items: center; justify-content: space-between; border-right: 0; border-bottom: 1px solid var(--line); }
  .sidebar .brand { padding: 0; border: 0; }
  .sidebar .brand > span:last-child { display: grid; }
  .main-nav { display: flex; gap: 3px; margin-left: auto; padding-top: 0; }
  .main-nav a { width: 38px; min-height: 38px; }
  .sidebar-note, .sidebar > form { display: none; }
  .mobile-logout { display: block; }
  .workspace { padding: 24px 15px 45px; }
  .topbar { align-items: flex-end; }
  .topbar .button { width: 43px; padding: 0; font-size: 0; }
  .topbar .button span { font-size: 20px; }
  .live-chip { display: none; }
  .summary-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .summary-card { min-height: 116px; padding: 14px; grid-template-columns: 33px 1fr; gap: 9px; }
  .summary-icon { width: 31px; height: 31px; }
  .summary-card strong { font-size: 25px; }
  .server-card > header { align-items: flex-start; gap: 10px; }
  .server-state small { display: none; }
  .metrics-row { grid-template-columns: repeat(2, 1fr); row-gap: 18px; }
  .server-card > footer { align-items: flex-start; gap: 8px; }
  .server-card > footer p { max-width: 70%; white-space: normal; }
  .field-pair { grid-template-columns: 1fr; }
  .dialog-frame { padding: 28px 22px; }
  .access-editor-detail { grid-template-columns: 1fr; }
  .access-editor-detail > .button { grid-column: 1; }
  .access-panel__extension { align-items: stretch; flex-direction: column; }
  .access-panel__extension .field { width: 100%; }
  .accounts-workspace { width: min(100% - 24px, 1180px); padding-top: 20px; }
  .accounts-topbar { grid-template-columns: 1fr auto; gap: 14px; }
  .accounts-topbar > div { grid-column: 1 / -1; grid-row: 2; }
  .account-create-fields, .account-access-editor, .account-access-dates { grid-template-columns: 1fr; }
}
