
:root {
  color-scheme: dark;
  --bg: #070a12;
  --panel: rgba(14, 19, 34, .88);
  --panel-2: rgba(18, 24, 43, .92);
  --line: rgba(129, 140, 248, .14);
  --line-strong: rgba(129, 140, 248, .32);
  --text: #f5f7ff;
  --muted: #8992aa;
  --blue: #42a5ff;
  --purple: #8b5cf6;
  --green: #28d7a1;
  --yellow: #fbbf24;
  --red: #fb5577;
  --sidebar: 260px;
}
* { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 82% -5%, rgba(77, 87, 255, .17), transparent 30rem),
    radial-gradient(circle at 20% 105%, rgba(139, 92, 246, .12), transparent 28rem),
    var(--bg);
  font-size: 14px;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button, .button { cursor: pointer; }
code, .mono { font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace; }
.login-page { display: grid; place-items: center; min-height: 100vh; padding: 24px; overflow: hidden; position: relative; }
.login-page::before, .login-page::after { content: ""; position: fixed; border-radius: 50%; filter: blur(16px); pointer-events: none; }
.login-page::before { width: 420px; height: 420px; top: -170px; right: -100px; background: rgba(66, 165, 255, .09); }
.login-page::after { width: 360px; height: 360px; bottom: -170px; left: -90px; background: rgba(139, 92, 246, .1); }
.login-card { width: min(430px, 100%); padding: 40px; background: rgba(12, 16, 29, .94); border: 1px solid var(--line-strong); border-radius: 18px; box-shadow: 0 28px 100px rgba(0, 0, 0, .55), 0 0 50px rgba(79, 70, 229, .08); position: relative; z-index: 1; }
.brand-lockup { display: flex; align-items: center; gap: 13px; }
.logo { width: 42px; height: 42px; border-radius: 10px; display: grid; place-items: center; color: white; font-size: 18px; font-weight: 900; background: linear-gradient(135deg, var(--blue), var(--purple)); box-shadow: 0 0 30px rgba(93, 100, 255, .38); position: relative; }
.logo::after { content: ""; position: absolute; inset: 5px; border: 1px solid rgba(255,255,255,.35); border-radius: 6px; }
.brand-name { font-size: 17px; font-weight: 800; letter-spacing: .18em; }
.brand-sub { color: var(--muted); font-size: 10px; letter-spacing: .2em; margin-top: 3px; }
.login-card h1 { font-size: 27px; margin: 34px 0 8px; }
.login-card > p { color: var(--muted); line-height: 1.6; margin: 0 0 26px; }
.field { display: grid; gap: 8px; }
.field + .field { margin-top: 18px; }
label { color: #b7bfd3; font-size: 12px; font-weight: 650; letter-spacing: .025em; }
input, select, textarea {
  width: 100%; border: 1px solid rgba(139, 148, 177, .2); border-radius: 9px; padding: 11px 12px; color: var(--text); background: #0a0e1b; outline: none; transition: border .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus { border-color: rgba(66, 165, 255, .65); box-shadow: 0 0 0 3px rgba(66, 165, 255, .1); }
textarea { min-height: 96px; resize: vertical; }
input::placeholder, textarea::placeholder { color: #505a72; }
.button, button { border: 1px solid transparent; border-radius: 8px; padding: 9px 13px; color: #eef2ff; background: #171d30; font-weight: 700; transition: transform .12s, background .12s, border .12s; }
.button:hover, button:hover { transform: translateY(-1px); border-color: var(--line-strong); }
.button.primary, button.primary { background: linear-gradient(135deg, #167dd9, #7354e8); box-shadow: 0 9px 24px rgba(54, 92, 220, .2); }
.button.danger, button.danger { background: rgba(251, 85, 119, .1); border-color: rgba(251, 85, 119, .25); color: #ff91a8; }
.button.warning, button.warning { background: rgba(251, 191, 36, .1); border-color: rgba(251, 191, 36, .22); color: #ffd56a; }
.button.success, button.success { background: rgba(40, 215, 161, .1); border-color: rgba(40, 215, 161, .25); color: #5ce6ba; }
.button.small, button.small { padding: 6px 9px; border-radius: 6px; font-size: 11px; }
.button.full { display: block; width: 100%; text-align: center; padding: 12px; margin-top: 24px; }
.alert { border: 1px solid rgba(251, 85, 119, .3); background: rgba(251, 85, 119, .08); color: #ff9eb1; border-radius: 9px; padding: 11px 13px; margin-bottom: 18px; }
.alert.success { border-color: rgba(40, 215, 161, .28); background: rgba(40, 215, 161, .08); color: #77edc7; }
.shell { min-height: 100vh; }
.sidebar { position: fixed; z-index: 20; inset: 0 auto 0 0; width: var(--sidebar); background: rgba(7, 10, 19, .96); border-right: 1px solid var(--line); padding: 24px 16px; display: flex; flex-direction: column; backdrop-filter: blur(22px); }
.sidebar .brand-lockup { padding: 0 8px 25px; }
.nav-label { color: #515c75; font-size: 9px; font-weight: 800; letter-spacing: .19em; padding: 18px 11px 7px; }
.nav-link { display: flex; align-items: center; gap: 11px; padding: 10px 11px; border-radius: 8px; color: #8f98ae; font-size: 13px; font-weight: 650; margin: 2px 0; }
.nav-link:hover { background: rgba(129, 140, 248, .07); color: #dfe5f5; }
.nav-link.active { color: white; background: linear-gradient(90deg, rgba(40, 132, 224, .18), rgba(105, 79, 221, .12)); box-shadow: inset 3px 0 var(--blue); }
.nav-icon { width: 18px; color: #7181a5; text-align: center; }
.nav-link.active .nav-icon { color: #60b7ff; }
.admin-chip { margin-top: auto; border-top: 1px solid var(--line); padding: 18px 8px 0; display: flex; align-items: center; gap: 10px; }
.avatar { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 8px; color: #a8cfff; background: rgba(66, 165, 255, .1); border: 1px solid rgba(66,165,255,.18); font-weight: 900; }
.admin-meta b { display: block; font-size: 12px; }.admin-meta span { color: var(--muted); font-size: 10px; }
.topbar { position: fixed; z-index: 12; top: 0; left: var(--sidebar); right: 0; height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 0 28px; background: rgba(7, 10, 18, .83); border-bottom: 1px solid var(--line); backdrop-filter: blur(20px); }
.system-status { display: flex; gap: 9px; align-items: center; color: #65e4bb; font-size: 10px; font-weight: 800; letter-spacing: .12em; }
.system-status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 12px var(--green); }
.top-actions { display: flex; align-items: center; gap: 8px; }
.top-actions form { margin: 0; }
.top-user { color: #aab3c8; padding: 0 9px; font-size: 12px; }
.menu-button { display: none; }
.main { margin-left: var(--sidebar); padding: 102px 30px 44px; min-width: 0; }
.page-head { display: flex; align-items: end; justify-content: space-between; gap: 18px; margin-bottom: 24px; }
.eyebrow { color: var(--blue); font-size: 10px; font-weight: 800; letter-spacing: .16em; margin-bottom: 8px; }
h1 { margin: 0; font-size: 26px; letter-spacing: -.025em; }
.page-head p { margin: 7px 0 0; color: var(--muted); }
h2 { margin: 0; font-size: 16px; } h3 { margin: 0; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.stat-card, .panel { background: linear-gradient(145deg, rgba(19, 25, 44, .9), rgba(11, 15, 27, .9)); border: 1px solid var(--line); border-radius: 11px; box-shadow: 0 18px 45px rgba(0, 0, 0, .12); }
.stat-card { padding: 18px; min-height: 120px; position: relative; overflow: hidden; }
.stat-card::after { content: ""; position: absolute; width: 75px; height: 75px; border-radius: 50%; right: -28px; top: -28px; background: var(--glow, rgba(66,165,255,.11)); filter: blur(3px); }
.stat-card.green { --glow: rgba(40,215,161,.14); }
.stat-card.purple { --glow: rgba(139,92,246,.16); }
.stat-card.red { --glow: rgba(251,85,119,.14); }
.stat-label { color: var(--muted); font-size: 11px; font-weight: 650; }
.stat-value { font-size: 29px; font-weight: 800; margin: 17px 0 6px; }
.stat-foot { color: #59657f; font-size: 10px; }
.panel { overflow: hidden; margin-top: 16px; }
.panel-head { padding: 16px 18px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line); }
.panel-head p { margin: 4px 0 0; color: var(--muted); font-size: 11px; }
.panel-body { padding: 18px; }
.security-grid, .protection-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.security-item { padding: 14px; background: rgba(7, 11, 21, .64); border: 1px solid rgba(129,140,248,.11); border-radius: 9px; display: grid; grid-template-columns: 32px 1fr; gap: 11px; align-items: center; }
.security-icon { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 8px; color: #6fc0ff; background: rgba(66,165,255,.08); }
.security-item b { font-size: 12px; display: block; }.security-item span { color: var(--muted); font-size: 10px; display: block; margin-top: 3px; line-height: 1.45; }
.toolbar { display: flex; gap: 9px; align-items: center; flex-wrap: wrap; }
.search { display: flex; gap: 8px; width: min(460px, 100%); }.search input { min-width: 220px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 780px; }
th { padding: 11px 14px; text-align: left; color: #66718a; font-size: 9px; letter-spacing: .11em; text-transform: uppercase; background: rgba(6, 9, 17, .46); border-bottom: 1px solid var(--line); }
td { padding: 13px 14px; border-bottom: 1px solid rgba(129,140,248,.08); vertical-align: top; color: #cbd2e3; font-size: 12px; }
tbody tr:hover { background: rgba(95, 104, 219, .035); }
tbody tr:last-child td { border-bottom: 0; }
.subtext { display: block; color: #68738c; font-size: 10px; margin-top: 4px; }
.truncate { max-width: 250px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; display: block; }
.module-view { min-width: 72px; }
.module-dialog { width: min(620px, calc(100vw - 32px)); max-height: min(720px, calc(100vh - 32px)); padding: 0; color: var(--text); background: #0c1120; border: 1px solid var(--line-strong); border-radius: 13px; box-shadow: 0 30px 90px rgba(0,0,0,.65); }
.module-dialog::backdrop { background: rgba(2, 5, 12, .78); backdrop-filter: blur(5px); }
.module-dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 17px 18px; border-bottom: 1px solid var(--line); }
.module-dialog-head p { margin: 4px 0 0; color: var(--muted); font-size: 11px; }
.module-dialog-body { padding: 14px; overflow-y: auto; max-height: calc(100vh - 130px); }
.module-row { border: 1px solid rgba(129,140,248,.12); background: rgba(7,11,21,.6); border-radius: 9px; overflow: hidden; }
.module-row + .module-row { margin-top: 8px; }
.module-row-top { min-height: 48px; padding: 9px 11px 9px 14px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.module-config { padding: 3px 14px 12px; border-top: 1px solid rgba(129,140,248,.09); }
.module-config[hidden] { display: none; }
.module-config > div { display: flex; justify-content: space-between; gap: 18px; padding: 8px 0; border-bottom: 1px solid rgba(129,140,248,.07); }
.module-config > div:last-child { border-bottom: 0; }
.module-config span { color: var(--muted); }
.module-config code { color: #bcdcff; text-align: right; overflow-wrap: anywhere; }
.module-empty { color: var(--muted); text-align: center; padding: 34px 12px; }
.badge { display: inline-flex; align-items: center; gap: 5px; border-radius: 999px; padding: 4px 8px; font-size: 9px; font-weight: 800; letter-spacing: .06em; }
.badge::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.badge.active, .badge.online, .badge.info { color: #52e1b4; background: rgba(40,215,161,.09); border: 1px solid rgba(40,215,161,.18); }
.badge.revoked, .badge.offline, .badge.high, .badge.critical { color: #ff809a; background: rgba(251,85,119,.09); border: 1px solid rgba(251,85,119,.18); }
.badge.medium { color: #ffd05e; background: rgba(251,191,36,.09); border: 1px solid rgba(251,191,36,.18); }
.actions { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; }.actions form { margin: 0; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }.form-grid .wide { grid-column: 1 / -1; }
.field-help { color: #5f6a83; font-size: 10px; line-height: 1.5; }
.form-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 22px; }
.key-reveal { padding: 20px; border: 1px solid rgba(40,215,161,.25); background: rgba(40,215,161,.055); border-radius: 10px; margin-bottom: 18px; }
.key-reveal .warning-text { color: #98a3b9; font-size: 11px; line-height: 1.55; margin-bottom: 13px; }
.key-row { display: flex; align-items: center; gap: 10px; }.generated-key { flex: 1; padding: 13px; background: #070b14; border: 1px dashed rgba(40,215,161,.35); border-radius: 8px; color: #66e8bd; font-size: 15px; overflow-wrap: anywhere; }
.empty { text-align: center; color: var(--muted); padding: 36px 16px !important; }
.pipeline { border-left: 1px solid rgba(66,165,255,.25); margin-left: 12px; }
.pipeline-row { position: relative; padding: 14px 18px 14px 30px; border-bottom: 1px solid rgba(129,140,248,.07); }
.pipeline-row:last-child { border-bottom: 0; }.pipeline-row::before { content: ""; position: absolute; left: -4px; top: 20px; width: 7px; height: 7px; border-radius: 50%; background: var(--blue); box-shadow: 0 0 11px rgba(66,165,255,.7); }
.pipeline-row b { display: block; font-size: 12px; }.pipeline-row span { color: var(--muted); font-size: 10px; line-height: 1.55; display: block; margin-top: 4px; }
.notice { padding: 12px 14px; color: #9aa5bc; background: rgba(66,165,255,.05); border: 1px solid rgba(66,165,255,.14); border-radius: 8px; font-size: 11px; line-height: 1.55; }
.footer-note { color: #4d5870; font-size: 10px; margin-top: 22px; text-align: right; }
@media (max-width: 1080px) { .stats { grid-template-columns: repeat(2, 1fr); }.security-grid { grid-template-columns: 1fr; } }
@media (max-width: 760px) {
  .sidebar { transform: translateX(-100%); transition: transform .18s; box-shadow: 20px 0 50px rgba(0,0,0,.45); }.sidebar.open { transform: translateX(0); }
  .topbar { left: 0; padding: 0 16px; }.main { margin-left: 0; padding: 96px 16px 32px; }.menu-button { display: inline-flex; }.system-status, .top-user, .top-actions .secondary-action { display: none; }
  .page-head { align-items: flex-start; flex-direction: column; }.stats, .form-grid, .protection-grid { grid-template-columns: 1fr; }.form-grid .wide { grid-column: auto; }.panel-body { padding: 14px; }.key-row { align-items: stretch; flex-direction: column; }
}
