:root {
  color-scheme: dark;
  --bg: #08090d;
  --panel: rgba(18, 21, 31, 0.78);
  --panel-strong: rgba(26, 31, 46, 0.92);
  --line: rgba(255,255,255,0.10);
  --text: #f7f8ff;
  --muted: #9aa3b8;
  --accent: #8b5cf6;
  --accent-2: #22d3ee;
  --ok: #34d399;
  --warn: #fbbf24;
  --danger: #fb7185;
  --shadow: 0 28px 80px rgba(0,0,0,.45);
}
* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(139, 92, 246, .28), transparent 34rem),
    radial-gradient(circle at 80% 10%, rgba(34, 211, 238, .16), transparent 26rem),
    linear-gradient(180deg, #08090d 0%, #0d1018 100%);
}
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; }
.shell { width: min(1180px, calc(100% - 32px)); margin: 0 auto; padding: 24px 0 56px; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 28px; }
.brand { display: flex; gap: 12px; align-items: center; }
.brand-mark { width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center; background: linear-gradient(135deg, var(--accent), var(--accent-2)); box-shadow: 0 14px 32px rgba(139, 92, 246, .3); }
.brand strong, .brand small { display: block; }
.brand small, .muted, small { color: var(--muted); }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 28px; box-shadow: var(--shadow); backdrop-filter: blur(20px); }
.hero, .account-hero { padding: 34px; display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(280px, .7fr); gap: 24px; align-items: center; }
h1 { font-size: clamp(2rem, 5vw, 4.4rem); line-height: .95; letter-spacing: -0.07em; margin: 10px 0 16px; max-width: 820px; }
h2 { margin: 0; letter-spacing: -0.03em; }
.eyebrow { color: var(--accent-2); text-transform: uppercase; font-weight: 800; font-size: .76rem; letter-spacing: .16em; }
.stats-grid, .mini-metrics { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.stats-grid div, .mini-metrics div { padding: 18px; border: 1px solid var(--line); border-radius: 20px; background: rgba(255,255,255,.04); }
.stats-grid strong, .mini-metrics strong { display: block; font-size: 1.9rem; }
.stats-grid span, .mini-metrics span { color: var(--muted); font-size: .86rem; }
.metric-new { border-color: rgba(52,211,153,.36) !important; background: rgba(52,211,153,.08) !important; }
.metric-new strong { color: var(--ok); }
.metric-removed { border-color: rgba(251,113,133,.38) !important; background: rgba(251,113,133,.08) !important; }
.metric-removed strong { color: var(--danger); }
.add-panel { margin: 18px 0; padding: 18px; }
.add-form { display: grid; grid-template-columns: minmax(260px, 1fr) 190px auto; gap: 14px; align-items: end; }
label { display: grid; gap: 8px; color: var(--muted); font-size: .9rem; }
input, select { width: 100%; border: 1px solid var(--line); border-radius: 16px; background: rgba(0,0,0,.24); color: var(--text); padding: 13px 14px; outline: none; }
input:focus, select:focus { border-color: rgba(139, 92, 246, .8); box-shadow: 0 0 0 4px rgba(139, 92, 246, .12); }
button, .button { border: 0; border-radius: 16px; padding: 13px 16px; color: var(--text); cursor: pointer; display: inline-flex; justify-content: center; align-items: center; min-height: 46px; }
button:disabled { opacity: .5; cursor: not-allowed; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid rgba(34, 211, 238, .75); outline-offset: 3px; }
.primary { background: linear-gradient(135deg, var(--accent), #5b7cfa); font-weight: 800; }
.ghost, .button { background: rgba(255,255,255,.06); border: 1px solid var(--line); }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(310px, 1fr)); gap: 18px; }
.account-card { padding: 22px; display: grid; gap: 16px; }
.account-head, .status-row, .actions, .section-head, .person, .history-item { display: flex; align-items: center; gap: 12px; }
.account-head { align-items: flex-start; }
.avatar { flex: none; width: 52px; height: 52px; border-radius: 18px; display: grid; place-items: center; font-weight: 900; background: linear-gradient(135deg, rgba(139,92,246,.32), rgba(34,211,238,.22)); border: 1px solid var(--line); }
.avatar.small { width: 38px; height: 38px; border-radius: 13px; }
.status-row, .section-head { justify-content: space-between; color: var(--muted); }
.pill { display: inline-flex; align-items: center; border-radius: 999px; padding: 6px 10px; font-size: .78rem; background: rgba(255,255,255,.08); border: 1px solid var(--line); color: var(--muted); text-transform: capitalize; }
.pill.ok { color: var(--ok); background: rgba(52,211,153,.10); }
.pill.running { color: var(--accent-2); background: rgba(34,211,238,.10); }
.pill.paused { color: var(--warn); background: rgba(251,191,36,.10); }
.pill.danger-pill, .danger-pill { color: var(--danger); background: rgba(251,113,133,.10); }
.diff-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin: 18px 0; }
.diff-grid .panel, .two-col .panel, section.panel:not(.hero):not(.add-panel):not(.account-hero) { padding: 22px; }
.diff-panel-new { border-color: rgba(52,211,153,.24); box-shadow: var(--shadow), inset 0 0 0 1px rgba(52,211,153,.10); }
.diff-panel-removed { border-color: rgba(251,113,133,.26); box-shadow: var(--shadow), inset 0 0 0 1px rgba(251,113,133,.10); }
.people-list { display: grid; gap: 10px; margin-top: 16px; }
.person { justify-content: flex-start; padding: 12px; border: 1px solid var(--line); border-radius: 18px; background: rgba(255,255,255,.035); }
.person:hover, .history-item:hover { background: rgba(255,255,255,.07); }
.person-main, .history-item { min-width: 0; }
.person-main { flex: 1; }
.person strong, .person small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.person.change-added { border-color: rgba(52,211,153,.44); background: linear-gradient(90deg, rgba(52,211,153,.16), rgba(52,211,153,.045)); box-shadow: inset 4px 0 0 rgba(52,211,153,.9); }
.person.change-added:hover { background: linear-gradient(90deg, rgba(52,211,153,.22), rgba(52,211,153,.07)); }
.person.change-added .avatar { color: #bbf7d0; border-color: rgba(52,211,153,.44); background: rgba(52,211,153,.15); }
.person.change-removed { border-color: rgba(251,113,133,.48); background: linear-gradient(90deg, rgba(251,113,133,.17), rgba(251,113,133,.045)); box-shadow: inset 4px 0 0 rgba(251,113,133,.92); }
.person.change-removed:hover { background: linear-gradient(90deg, rgba(251,113,133,.23), rgba(251,113,133,.07)); }
.person.change-removed .avatar { color: #fecdd3; border-color: rgba(251,113,133,.46); background: rgba(251,113,133,.15); }
.change-badge { flex: none; border-radius: 999px; padding: 6px 9px; font-size: .72rem; font-weight: 900; letter-spacing: .02em; text-transform: uppercase; }
.change-badge.added { color: #bbf7d0; background: rgba(52,211,153,.16); border: 1px solid rgba(52,211,153,.36); }
.change-badge.removed { color: #fecdd3; background: rgba(251,113,133,.16); border: 1px solid rgba(251,113,133,.38); }
.two-col { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(300px, .95fr); gap: 18px; margin-bottom: 18px; }
.history-list { display: grid; gap: 10px; margin-top: 16px; }
.history-item { justify-content: space-between; padding: 12px; border-radius: 16px; border: 1px solid var(--line); color: var(--muted); }
.history-item.active { border-color: rgba(139,92,246,.7); background: rgba(139,92,246,.12); }
.stack { display: grid; gap: 14px; }
.login-card { width: min(560px, 100%); margin: 9vh auto 0; padding: 34px; }
.login-card h1 { font-size: clamp(2rem, 6vw, 3.4rem); }
.flash, .danger, .warning, .info { margin: 0 0 18px; padding: 14px 16px; border-radius: 18px; border: 1px solid var(--line); background: rgba(139,92,246,.12); }
.danger { color: #fecdd3; background: rgba(251,113,133,.10); }
.warning { color: #fde68a; background: rgba(251,191,36,.10); }
.info { color: #bae6fd; background: rgba(34,211,238,.10); }
.back { color: var(--muted); display: inline-flex; margin-bottom: 14px; }
.inline-form { margin: 0; }
.retry-form { margin-top: 10px; }
.check { display: flex; grid-template-columns: none; align-items: center; gap: 10px; }
.check input { width: auto; }
.danger-zone { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); }
.danger-text { color: var(--danger); }
.search-form { display: flex; gap: 10px; margin-top: 16px; }
.empty { padding: 30px; grid-column: 1 / -1; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
@media (max-width: 820px) {
  .shell { width: min(100% - 20px, 1180px); padding-top: 14px; }
  .hero, .account-hero, .add-form, .diff-grid, .two-col, .cards { grid-template-columns: minmax(0, 1fr); }
  h1 { letter-spacing: -0.055em; }
  .topbar { align-items: flex-start; }
  .actions { flex-wrap: wrap; }
  .actions > *, .actions button, .actions .button { width: 100%; }
  .history-item { align-items: flex-start; flex-direction: column; }
  .search-form { flex-direction: column; }
}
