:root {
  --bg: #090b14;
  --surface: rgba(20, 24, 41, 0.78);
  --surface-strong: #15192a;
  --line: rgba(163, 178, 255, 0.14);
  --text: #f5f6ff;
  --muted: #969db5;
  --violet: #9b87ff;
  --cyan: #6ee7f2;
  --danger: #ff718c;
  --success: #76e6b1;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
}

* { box-sizing: border-box; }
html { background: var(--bg); color: var(--text); font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
body { margin: 0; min-height: 100vh; background: radial-gradient(circle at 80% 2%, rgba(94, 70, 191, 0.18), transparent 30rem), radial-gradient(circle at 30% 90%, rgba(28, 133, 147, 0.08), transparent 35rem), var(--bg); }
button, input, select { font: inherit; }
button { color: inherit; }
.noise { position: fixed; inset: 0; pointer-events: none; opacity: .22; background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.09'/%3E%3C/svg%3E"); }

.topbar { position: sticky; top: 0; z-index: 10; height: 74px; display: flex; align-items: center; justify-content: space-between; padding: 0 30px; border-bottom: 1px solid var(--line); background: rgba(9, 11, 20, .78); backdrop-filter: blur(18px); }
.brand { color: var(--text); text-decoration: none; display: flex; gap: 12px; align-items: center; }
.brand strong, .brand small { display: block; }
.brand strong { font-size: .97rem; letter-spacing: .02em; }
.brand small { color: var(--muted); margin-top: 2px; font-size: .68rem; letter-spacing: .12em; text-transform: uppercase; }
.brand-mark { width: 38px; height: 38px; position: relative; border: 1px solid rgba(155, 135, 255, .45); border-radius: 50%; box-shadow: inset 0 0 20px rgba(155, 135, 255, .14); }
.brand-mark::before, .brand-mark::after { content: ""; position: absolute; border: 1px solid rgba(110, 231, 242, .42); border-radius: 50%; transform: rotate(-28deg); }
.brand-mark::before { inset: 8px -4px; }
.brand-mark::after { inset: -4px 8px; }
.brand-mark i { position: absolute; inset: 13px; border-radius: 50%; background: linear-gradient(135deg, var(--cyan), var(--violet)); box-shadow: 0 0 16px var(--violet); }
.connection { display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: .82rem; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--danger); box-shadow: 0 0 10px rgba(255, 113, 140, .7); }
.status-dot.online { background: var(--success); box-shadow: 0 0 10px rgba(118, 230, 177, .7); }

.shell { display: grid; grid-template-columns: 235px 1fr; min-height: calc(100vh - 74px); }
.sidebar { border-right: 1px solid var(--line); padding: 28px 18px; display: flex; flex-direction: column; justify-content: space-between; background: rgba(8, 10, 18, .35); }
.sidebar nav { display: grid; gap: 5px; }
.nav-item { border: 0; background: transparent; color: var(--muted); text-align: left; padding: 11px 13px; border-radius: 10px; cursor: pointer; transition: .18s ease; }
.nav-item span { display: inline-block; width: 25px; color: #777f9b; }
.nav-item:hover { color: var(--text); background: rgba(255,255,255,.035); }
.nav-item.active { color: var(--text); background: linear-gradient(90deg, rgba(155,135,255,.16), rgba(110,231,242,.05)); box-shadow: inset 2px 0 var(--violet); }
.nav-item.active span { color: var(--cyan); }
.sidebar-note { border: 1px solid var(--line); border-radius: 12px; padding: 14px; color: var(--muted); font-size: .75rem; }
.sidebar-note span { color: var(--cyan); font-size: .65rem; letter-spacing: .12em; text-transform: uppercase; }
.sidebar-note p { margin: 5px 0 0; }

main { min-width: 0; width: 100%; max-width: 1440px; margin: 0 auto; padding: 48px clamp(25px, 5vw, 75px) 70px; }
.hero { display: flex; justify-content: space-between; align-items: flex-end; gap: 25px; margin-bottom: 34px; }
.hero h1 { margin: 6px 0 8px; font-size: clamp(2rem, 4vw, 3.4rem); letter-spacing: -.055em; font-weight: 650; }
.hero > div > p:last-child { margin: 0; color: var(--muted); max-width: 680px; line-height: 1.65; }
.eyebrow { color: var(--cyan); letter-spacing: .18em; font-size: .68rem; font-weight: 700; margin: 0; }
.button { border: 1px solid var(--line); border-radius: 9px; padding: 10px 15px; cursor: pointer; background: rgba(255,255,255,.035); transition: .18s ease; }
.button:hover { transform: translateY(-1px); border-color: rgba(155,135,255,.55); }
.button.primary { border: 0; color: #0a0b13; font-weight: 700; background: linear-gradient(110deg, var(--cyan), #b9a9ff); box-shadow: 0 9px 28px rgba(110,231,242,.15); }
.button.ghost { color: var(--muted); }
.button.small { padding: 7px 10px; font-size: .78rem; }
.summary-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.summary-card { min-height: 145px; padding: 20px; border: 1px solid var(--line); border-radius: 15px; background: linear-gradient(145deg, rgba(30,34,57,.75), rgba(16,19,33,.72)); box-shadow: var(--shadow); position: relative; overflow: hidden; }
.summary-card::after { content: ""; position: absolute; width: 100px; height: 100px; right: -45px; top: -45px; border: 1px solid rgba(155,135,255,.18); border-radius: 50%; }
.summary-card .label { color: var(--muted); font-size: .77rem; }
.summary-card strong { display: block; margin-top: 18px; font-size: 2.1rem; letter-spacing: -.05em; }
.summary-card small { color: var(--success); }
.skeleton { animation: pulse 1.4s infinite alternate; }
@keyframes pulse { to { opacity: .42; } }
.panel { border: 1px solid var(--line); border-radius: 16px; background: var(--surface); box-shadow: var(--shadow); backdrop-filter: blur(15px); }
.intro-panel { margin-top: 18px; padding: clamp(25px, 4vw, 45px); display: grid; grid-template-columns: 1.1fr 1fr; gap: 50px; }
.intro-panel h2 { margin: 9px 0 13px; font-size: 1.6rem; }
.intro-panel p:last-child { color: var(--muted); line-height: 1.7; }
.orbit-flow { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.orbit-flow li { padding: 11px 0 11px 42px; position: relative; color: #cbd0e0; border-left: 1px solid rgba(155,135,255,.3); }
.orbit-flow li:last-child { border-color: transparent; }
.orbit-flow span { position: absolute; left: -15px; top: 8px; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; background: var(--surface-strong); border: 1px solid rgba(110,231,242,.35); color: var(--cyan); font-size: .6rem; }
.table-panel { overflow: hidden; }
.table-toolbar { display: flex; justify-content: space-between; gap: 15px; padding: 14px; border-bottom: 1px solid var(--line); }
.search { flex: 1; max-width: 400px; display: flex; gap: 8px; align-items: center; border: 1px solid var(--line); border-radius: 9px; padding: 7px 11px; color: var(--muted); }
.search input { border: 0; outline: 0; background: transparent; color: var(--text); width: 100%; }
.table-scroll { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; min-width: 760px; }
th, td { text-align: left; padding: 14px 17px; border-bottom: 1px solid rgba(163,178,255,.09); font-size: .79rem; }
th { color: #707892; font-size: .64rem; letter-spacing: .11em; text-transform: uppercase; font-weight: 650; }
td { color: #cbd0e0; }
tbody tr:hover { background: rgba(155,135,255,.035); }
.pill { display: inline-flex; align-items: center; gap: 6px; border-radius: 99px; padding: 4px 8px; color: var(--success); background: rgba(118,230,177,.08); border: 1px solid rgba(118,230,177,.18); font-size: .68rem; }
.pill.inactive { color: var(--danger); background: rgba(255,113,140,.08); border-color: rgba(255,113,140,.18); }
.row-action { border: 0; color: var(--muted); background: transparent; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.row-action:hover { color: var(--text); }
.empty-state { padding: 60px 20px; text-align: center; color: var(--muted); }
.empty-state span { color: var(--violet); font-size: 2rem; }
.empty-state h3 { color: var(--text); margin: 12px 0 4px; }
.empty-state p { margin: 0; }

dialog { color: var(--text); border: 0; padding: 0; border-radius: 17px; background: transparent; width: min(520px, calc(100vw - 30px)); }
dialog::backdrop { background: rgba(3,4,9,.78); backdrop-filter: blur(7px); }
.dialog-card { margin: 0; padding: 29px; border: 1px solid rgba(163,178,255,.22); border-radius: 17px; background: #121625; box-shadow: 0 30px 90px rgba(0,0,0,.55); position: relative; }
.dialog-card h2 { margin: 7px 0 8px; }
.dialog-card > p:not(.eyebrow):not(.form-error) { color: var(--muted); line-height: 1.5; }
.dialog-close { position: absolute; right: 16px; top: 14px; border: 0; background: transparent; color: var(--muted); font-size: 1.5rem; cursor: pointer; }
.dialog-card label { display: grid; gap: 7px; color: #c6cada; font-size: .78rem; margin-top: 16px; }
.dialog-card input, .dialog-card select { width: 100%; border: 1px solid var(--line); border-radius: 9px; padding: 11px; color: var(--text); background: #0c0f1a; outline: 0; }
.dialog-card input:focus, .dialog-card select:focus { border-color: var(--violet); box-shadow: 0 0 0 3px rgba(155,135,255,.1); }
.dialog-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 23px; }
.form-error { min-height: 1.2em; color: var(--danger); font-size: .78rem; }
.key-card code { display: block; margin: 20px 0 13px; padding: 15px; border-radius: 9px; color: var(--cyan); background: #090c15; border: 1px dashed rgba(110,231,242,.3); font-size: clamp(.82rem, 4vw, 1.08rem); text-align: center; user-select: all; overflow-wrap: anywhere; }
.key-card .button { width: 100%; }
.toast { position: fixed; right: 22px; bottom: 22px; z-index: 30; max-width: 360px; padding: 12px 16px; border: 1px solid var(--line); border-radius: 10px; background: #181d30; box-shadow: var(--shadow); opacity: 0; transform: translateY(12px); pointer-events: none; transition: .22s ease; color: #d9dcec; font-size: .8rem; }
.toast.show { opacity: 1; transform: translateY(0); }

@media (max-width: 950px) {
  .shell { grid-template-columns: 74px 1fr; }
  .sidebar { padding: 22px 11px; }
  .nav-item { font-size: 0; text-align: center; padding: 13px 8px; }
  .nav-item span { font-size: 1rem; width: auto; }
  .sidebar-note { display: none; }
  .summary-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .topbar { padding: 0 15px; }
  .connection > span:not(.status-dot) { display: none; }
  .shell { display: block; }
  .sidebar { position: fixed; z-index: 9; bottom: 0; left: 0; right: 0; height: 66px; padding: 7px 6px; border: 1px solid var(--line); background: rgba(9,11,20,.94); backdrop-filter: blur(16px); }
  .sidebar nav { display: flex; justify-content: space-around; }
  .nav-item { flex: 1; padding: 11px 4px; }
  .nav-item.active { box-shadow: inset 0 -2px var(--violet); }
  main { padding: 35px 16px 100px; }
  .hero { align-items: flex-start; flex-direction: column; }
  .summary-grid { grid-template-columns: 1fr 1fr; gap: 9px; }
  .summary-card { min-height: 120px; padding: 16px; }
  .intro-panel { grid-template-columns: 1fr; gap: 20px; }
}

