@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&family=Space+Grotesk:wght@500;600;700&display=swap');

/* ==================================================================
   DOLUNAY AC — modern design system
   ================================================================== */

:root {
  --bg: #05070d;
  --bg-soft: #080c15;
  --bg-deep: #03050a;
  --surface: rgba(17, 24, 39, .66);
  --surface-2: rgba(10, 16, 27, .82);
  --surface-solid: #0d1421;
  --line: rgba(148, 163, 184, .14);
  --line-strong: rgba(148, 163, 184, .24);

  --text: #eef4ff;
  --muted: #94a6c0;
  --muted-2: #6f819c;

  --accent: #7c5cff;
  --accent-2: #22d3ee;
  --accent-3: #ff7ac8;
  --gold: #e8c877;
  --gold-2: #f5dfa3;
  --ok: #34e6b4;
  --warn: #ffc66d;
  --danger: #ff5f7a;

  --grad: linear-gradient(135deg, #7c5cff 0%, #22d3ee 100%);
  --grad-soft: linear-gradient(135deg, rgba(124,92,255,.18), rgba(34,211,238,.08));
  --grad-gold: linear-gradient(135deg, #f5dfa3 0%, #e8c877 55%, #b98d2f 100%);
  --grad-text: linear-gradient(100deg, #ffffff 0%, #c9d6ff 45%, #7c5cff 100%);

  --radius: 18px;
  --radius-sm: 12px;
  --radius-xs: 9px;
  --shadow: 0 24px 70px rgba(0, 0, 0, .46);
  --shadow-soft: 0 12px 36px rgba(0, 0, 0, .28);
  --ring: 0 0 0 3px rgba(124, 92, 255, .18);

  --mono: "JetBrains Mono", "Cascadia Code", Consolas, monospace;
  --font: "Manrope", "Segoe UI", system-ui, -apple-system, sans-serif;
  --display: "Space Grotesk", "Manrope", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  max-width: 100%;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
  font: 14px/1.55 var(--font);
  min-height: 100%;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  background:
    radial-gradient(1000px 520px at 8% -12%, rgba(124, 92, 255, .16), transparent 60%),
    radial-gradient(900px 480px at 96% 0%, rgba(34, 211, 238, .10), transparent 58%),
    radial-gradient(800px 500px at 50% 120%, rgba(255, 122, 200, .06), transparent 60%),
    var(--bg);
  background-attachment: fixed;
}

::selection { background: rgba(124, 92, 255, .35); color: #fff; }

a { color: #9db8ff; text-decoration: none; }
a:hover { color: #c7d6ff; text-decoration: none; }

img, svg { max-width: 100%; }

h1, h2, h3, h4 {
  font-family: var(--display);
  letter-spacing: -.02em;
}

pre { overflow: auto; }

/* ---------------- app shell ---------------- */

.app { display: flex; min-height: 100vh; width: 100%; }

.sidebar {
  width: 264px;
  flex: 0 0 264px;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(16, 24, 39, .92), rgba(5, 8, 14, .97));
  border-right: 1px solid var(--line);
  backdrop-filter: blur(18px);
  z-index: 30;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 22px 18px;
  border-bottom: 1px solid var(--line);
  flex: 0 0 auto;
}

.brand-mark {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-family: var(--display);
  font-weight: 700;
  font-size: 18px;
  color: #06070c;
  background: var(--grad);
  box-shadow: 0 10px 30px rgba(124, 92, 255, .35), inset 0 1px 0 rgba(255,255,255,.35);
}

.brand strong {
  display: block;
  font-family: var(--display);
  font-size: 13px;
  letter-spacing: .22em;
}
.brand span {
  display: block;
  color: var(--muted-2);
  font-size: 9px;
  letter-spacing: .24em;
  text-transform: uppercase;
  margin-top: 2px;
}

.nav {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 14px 10px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  scrollbar-width: thin;
  scrollbar-color: rgba(148,163,184,.25) transparent;
}

.nav::-webkit-scrollbar { width: 7px; }
.nav::-webkit-scrollbar-track { background: transparent; }
.nav::-webkit-scrollbar-thumb {
  background: rgba(148,163,184,.22);
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: padding-box;
}
.nav::-webkit-scrollbar-thumb:hover { background: rgba(148,163,184,.4); background-clip: padding-box; }

.nav a {
  display: flex;
  align-items: center;
  gap: 11px;
  flex: 0 0 auto;
  padding: 10px 12px;
  border-radius: 12px;
  color: var(--muted);
  font-weight: 600;
  font-size: 12.5px;
  border: 1px solid transparent;
  position: relative;
  transition: background .16s ease, color .16s ease, border-color .16s ease, transform .16s ease;
}

.nav a:hover {
  background: rgba(255, 255, 255, .035);
  color: var(--text);
  transform: translateX(2px);
}

.nav a.active {
  color: #fff;
  background: linear-gradient(90deg, rgba(124, 92, 255, .22), rgba(34, 211, 238, .06));
  border-color: rgba(124, 92, 255, .35);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06), 0 8px 22px rgba(124,92,255,.12);
}

.nav a.active::before {
  content: "";
  position: absolute;
  left: -10px;
  top: 9px;
  bottom: 9px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--grad);
  box-shadow: 0 0 14px rgba(124, 92, 255, .7);
}

.nav svg { width: 17px; height: 17px; flex: 0 0 17px; opacity: .9; }

.nav-sep {
  height: 1px;
  background: var(--line);
  margin: 8px 6px;
}

.side-foot {
  flex: 0 0 auto;
  padding: 12px;
  border-top: 1px solid var(--line);
  background: rgba(5, 8, 14, .92);
  backdrop-filter: blur(10px);
}

.side-foot .who {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, .025);
}

.who b { display: block; color: var(--text); font-size: 12px; }
.badge-role {
  display: inline-block;
  margin-top: 2px;
  font-size: 9px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #a993ff;
}

/* ---------------- main ---------------- */

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px clamp(18px, 3.2vw, 42px);
  border-bottom: 1px solid var(--line);
  background: rgba(5, 8, 14, .72);
  backdrop-filter: blur(18px);
}

.topbar h1 {
  margin: 0;
  font-size: clamp(18px, 2vw, 24px);
  font-weight: 700;
  letter-spacing: -.02em;
}
.topbar .sub {
  color: var(--muted-2);
  font-size: 11.5px;
  margin-top: 3px;
  letter-spacing: .02em;
}

.topbar .row { flex-wrap: wrap; justify-content: flex-end; }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 32px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .025);
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
}

.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--muted-2);
  flex: 0 0 7px;
}
.dot.live {
  background: var(--ok);
  box-shadow: 0 0 0 0 rgba(52, 230, 180, .65);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(52, 230, 180, .55); }
  70% { box-shadow: 0 0 0 8px rgba(52, 230, 180, 0); }
  100% { box-shadow: 0 0 0 0 rgba(52, 230, 180, 0); }
}

.content {
  width: 100%;
  min-width: 0;
  padding: 28px clamp(18px, 3.2vw, 42px) 64px;
}

.flash {
  margin: 18px clamp(18px, 3.2vw, 42px) 0;
  padding: 13px 16px;
  border-radius: 14px;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, .035);
  font-size: 13px;
  box-shadow: var(--shadow-soft);
}
.flash-ok {
  border-color: rgba(52, 230, 180, .35);
  background: rgba(52, 230, 180, .07);
  color: #c9ffef;
}
.flash-error {
  border-color: rgba(255, 95, 122, .4);
  background: rgba(255, 95, 122, .07);
  color: #ffd2d9;
}

/* ---------------- layout ---------------- */

.grid { display: grid; gap: 18px; }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.section { margin-bottom: 22px; }

.row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.spacer { flex: 1 1 auto; }

/* ---------------- page hero ---------------- */

.page-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 22px;
  padding: clamp(24px, 3vw, 34px);
  border-radius: 24px;
  border: 1px solid rgba(124, 92, 255, .22);
  background:
    radial-gradient(700px 300px at 0% 0%, rgba(124, 92, 255, .20), transparent 60%),
    radial-gradient(600px 280px at 100% 100%, rgba(34, 211, 238, .10), transparent 60%),
    linear-gradient(180deg, rgba(17, 25, 40, .72), rgba(6, 10, 17, .85));
  box-shadow: var(--shadow-soft);
}
.page-hero h1 { margin: 12px 0 6px; font-size: clamp(26px, 3.2vw, 40px); line-height: 1.06; }
.page-hero p { margin: 0; max-width: 640px; color: var(--muted); font-size: 12.5px; }
.page-hero .row { justify-content: flex-end; }

/* ---------------- cards ---------------- */

.card {
  position: relative;
  min-width: 0;
  padding: 22px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background:
    radial-gradient(700px 200px at 100% 0%, rgba(124, 92, 255, .08), transparent 60%),
    linear-gradient(180deg, rgba(20, 29, 45, .72), rgba(8, 13, 22, .86));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .045), var(--shadow-soft);
}

.card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(255, 255, 255, .035), transparent 28%);
}

.card > * { position: relative; z-index: 1; }

.card h2, .card h3 {
  margin: 0 0 14px;
  font-family: var(--font);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
}

.stat { padding: 20px 22px; }
.stat .label { color: var(--muted); font-size: 11.5px; font-weight: 600; }
.stat .value {
  margin-top: 8px;
  font-family: var(--display);
  font-size: 34px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -.04em;
  background: var(--grad-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.stat .hint { margin-top: 9px; color: var(--muted-2); font-size: 10.5px; }
.stat.danger .value { background: linear-gradient(90deg, #ffd0d8, #ff5f7a); -webkit-background-clip: text; background-clip: text; }
.stat.warn .value { background: linear-gradient(90deg, #ffe7b3, #ffc66d); -webkit-background-clip: text; background-clip: text; }
.stat.ok .value { background: linear-gradient(90deg, #ccfff0, #34e6b4); -webkit-background-clip: text; background-clip: text; }

.stat::before {
  content: "";
  position: absolute;
  left: 22px;
  right: 22px;
  top: 0;
  height: 2px;
  border-radius: 0 0 3px 3px;
  background: var(--grad);
  opacity: .7;
}

/* ---------------- chart ---------------- */

.chart {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 176px;
  padding-top: 10px;
}
.chart .bar {
  flex: 1;
  min-width: 4px;
  border-radius: 6px 6px 2px 2px;
  background: linear-gradient(180deg, var(--accent-2), rgba(34, 211, 238, .06));
  position: relative;
  transition: filter .15s ease;
}
.chart .bar.severe { background: linear-gradient(180deg, var(--danger), rgba(255, 95, 122, .06)); }
.chart .bar:hover { filter: brightness(1.35); }
.chart .bar:hover::after {
  content: attr(data-tip);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  margin-bottom: 6px;
  padding: 5px 8px;
  border-radius: 8px;
  background: #070b13;
  border: 1px solid var(--line-strong);
  color: var(--text);
  font-size: 10.5px;
  white-space: nowrap;
  z-index: 4;
  box-shadow: var(--shadow-soft);
}
.chart-legend { display: flex; gap: 16px; margin-top: 12px; color: var(--muted-2); font-size: 11px; }
.chart-legend i { display: inline-block; width: 9px; height: 9px; border-radius: 3px; margin-right: 6px; }

/* ---------------- tables ---------------- */

.table-wrap {
  width: 100%;
  overflow-x: auto;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(5, 9, 15, .45);
}

table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 12.5px; }

th, td {
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(148, 163, 184, .09);
  vertical-align: middle;
}

th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #0a101a;
  color: var(--muted-2);
  font-size: 9.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .14em;
  white-space: nowrap;
  border-bottom: 1px solid var(--line);
}

tbody tr { transition: background .14s ease; }
tbody tr:hover { background: rgba(124, 92, 255, .055); }
tbody tr:last-child td { border-bottom: 0; }

td .muted, .muted { color: var(--muted); }
.mono { font-family: var(--mono); font-size: 11.5px; }
.nowrap { white-space: nowrap; }
.truncate { max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------------- badges ---------------- */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 9px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, .03);
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 700;
  white-space: nowrap;
  letter-spacing: .02em;
}

.badge.info { color: #a8dcff; border-color: rgba(34, 211, 238, .35); background: rgba(34, 211, 238, .08); }
.badge.low, .badge.online, .badge.active, .badge.accepted { color: #b9ffea; border-color: rgba(52, 230, 180, .35); background: rgba(52, 230, 180, .08); }
.badge.medium, .badge.suspicious, .badge.open { color: #ffe2ae; border-color: rgba(255, 198, 109, .35); background: rgba(255, 198, 109, .08); }
.badge.high, .badge.banned { color: #ffc0ca; border-color: rgba(255, 95, 122, .4); background: rgba(255, 95, 122, .09); }
.badge.critical { color: #fff; border-color: var(--danger); background: linear-gradient(135deg, rgba(255,95,122,.5), rgba(255,95,122,.2)); }
.badge.offline, .badge.expired, .badge.lifted, .badge.rejected { color: var(--muted-2); }

/* ---------------- forms ---------------- */

.filters {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px;
  margin-bottom: 18px;
  padding: 16px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: rgba(10, 16, 27, .6);
}

.field { display: flex; flex-direction: column; gap: 6px; min-width: 150px; }
.field.grow { flex: 1 1 240px; }
.field label {
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted-2);
}

input, select, textarea {
  width: 100%;
  padding: 11px 13px;
  border-radius: 12px;
  border: 1px solid var(--line-strong);
  background: rgba(4, 8, 14, .82);
  color: var(--text);
  font: inherit;
  font-size: 13px;
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}

input::placeholder, textarea::placeholder { color: #5c6d86; }
input:focus, select:focus, textarea:focus {
  border-color: rgba(124, 92, 255, .65);
  background: rgba(7, 12, 20, .95);
  box-shadow: var(--ring);
}

select { cursor: pointer; }
textarea { min-height: 92px; resize: vertical; }
input:disabled { opacity: .55; cursor: not-allowed; }

.check-row {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin: 10px 0 14px;
  color: var(--muted);
  font-size: 12px;
}
.check-row input { width: auto; margin-top: 2px; accent-color: var(--accent); }

/* ---------------- buttons ---------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 38px;
  padding: 9px 16px;
  border-radius: 12px;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, .035);
  color: var(--text);
  font: inherit;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: transform .14s ease, border-color .14s ease, background .14s ease, box-shadow .14s ease;
}
.btn:hover {
  border-color: rgba(124, 92, 255, .5);
  background: rgba(124, 92, 255, .09);
  transform: translateY(-1px);
}
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }

.btn.primary {
  border-color: transparent;
  background: var(--grad);
  color: #fff;
  box-shadow: 0 10px 28px rgba(124, 92, 255, .28), inset 0 1px 0 rgba(255,255,255,.28);
}
.btn.primary:hover { filter: brightness(1.08); box-shadow: 0 14px 34px rgba(124, 92, 255, .38); }

.btn-gold {
  border-color: transparent;
  background: var(--grad-gold);
  color: #1b1405;
  box-shadow: 0 10px 28px rgba(232, 200, 119, .2), inset 0 1px 0 rgba(255,255,255,.4);
}
.btn-gold:hover { filter: brightness(1.06); }

.btn.danger {
  border-color: rgba(255, 95, 122, .38);
  background: rgba(255, 95, 122, .08);
  color: #ffc3cc;
}
.btn.danger:hover { background: rgba(255, 95, 122, .16); border-color: rgba(255, 95, 122, .6); }

.btn.ghost { background: transparent; border-color: var(--line); color: var(--muted); }
.btn.ghost:hover { color: var(--text); }
.btn.sm { min-height: 30px; padding: 6px 11px; font-size: 11.5px; border-radius: 9px; }

/* ---------------- pager ---------------- */

.pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 16px;
  color: var(--muted-2);
  font-size: 11.5px;
}
.pager .pages { display: flex; gap: 6px; }
.pager a, .pager span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  height: 30px;
  padding: 0 9px;
  border-radius: 8px;
  border: 1px solid var(--line);
  color: var(--muted);
}
.pager a:hover { border-color: rgba(124, 92, 255, .5); color: var(--text); }
.pager span.current { border-color: transparent; background: var(--grad); color: #fff; font-weight: 700; }

/* ---------------- misc ---------------- */

.hidden { display: none !important; }
.empty { padding: 28px; text-align: center; color: var(--muted-2); font-size: 12.5px; }
hr.sep { border: 0; border-top: 1px solid var(--line); margin: 18px 0; }
.section > .card:last-child { margin-bottom: 0; }

.kv { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 9px 16px; font-size: 12.5px; }
.kv dt { color: var(--muted-2); }
.kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }

details > summary { cursor: pointer; color: var(--muted); font-size: 12px; }
details > summary:hover { color: var(--text); }
pre.details {
  margin: 10px 0 0;
  padding: 13px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #060a12;
  color: #b9cbe0;
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 320px;
}

.copy-wrap { position: relative; }
.copy-wrap .details { padding-right: 84px; }
.copy-wrap .btn { margin-top: 8px; }

/* ---------------- error / auth ---------------- */

.auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: 28px; }
.auth-card {
  width: 100%;
  max-width: 430px;
  padding: 32px;
  border-radius: 22px;
  border: 1px solid var(--line);
  background:
    radial-gradient(500px 220px at 100% 0%, rgba(124, 92, 255, .16), transparent 60%),
    linear-gradient(180deg, rgba(20, 29, 45, .85), rgba(7, 11, 18, .95));
  box-shadow: var(--shadow);
}
.auth-card .brand { padding: 0 0 22px; border: 0; }
.auth-card h1 { margin: 0 0 6px; font-size: 22px; }
.auth-card p.sub { margin: 0 0 22px; color: var(--muted); font-size: 13px; }
.auth-card .btn { width: 100%; margin-top: 6px; }

/* ==================================================================
   PUBLIC SITE
   ================================================================== */

.site-body {
  background:
    radial-gradient(1100px 620px at 8% -10%, rgba(124, 92, 255, .20), transparent 62%),
    radial-gradient(900px 520px at 100% 0%, rgba(34, 211, 238, .12), transparent 58%),
    radial-gradient(800px 520px at 50% 120%, rgba(255, 122, 200, .08), transparent 60%),
    var(--bg);
}

.site-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--line);
  background: rgba(5, 7, 13, .74);
  backdrop-filter: blur(20px);
}
.site-nav-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 14px clamp(18px, 3vw, 32px);
  display: flex;
  align-items: center;
  gap: 26px;
}
.site-brand { display: flex; align-items: center; gap: 11px; color: var(--text); }
.site-brand:hover { color: var(--text); }
.site-brand-text strong {
  display: block;
  font-family: var(--display);
  font-size: 12px;
  letter-spacing: .24em;
}
.site-brand-text small {
  display: block;
  margin-top: 1px;
  font-size: 8.5px;
  letter-spacing: .28em;
  color: #a993ff;
}

.site-links { display: flex; align-items: center; gap: 24px; flex: 1; margin-left: 6px; }
.site-links a { color: var(--muted); font-size: 12.5px; font-weight: 600; }
.site-links a:hover { color: #fff; }
.site-actions { display: flex; align-items: center; gap: 8px; }

.site-flash {
  max-width: 1280px;
  margin: 16px auto 0;
  padding: 13px 16px;
  border-radius: 14px;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, .04);
  font-size: 13px;
}
.site-flash-ok { border-color: rgba(52, 230, 180, .35); color: #c9ffef; }
.site-flash-error { border-color: rgba(255, 95, 122, .4); color: #ffd2d9; }

.site-main {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 clamp(18px, 3vw, 32px) 84px;
}

.hero { position: relative; padding: clamp(56px, 8vw, 104px) 0 40px; overflow: hidden; }
.hero-glow {
  position: absolute;
  width: 560px;
  height: 560px;
  border-radius: 50%;
  filter: blur(110px);
  pointer-events: none;
  opacity: .4;
}
.hero-glow-a { background: #7c5cff; top: -260px; left: -160px; }
.hero-glow-b { background: #22d3ee; top: -300px; right: -180px; opacity: .22; }

.hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: 1.12fr .88fr;
  gap: clamp(32px, 5vw, 64px);
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 11px;
  border-radius: 999px;
  border: 1px solid rgba(124, 92, 255, .35);
  background: rgba(124, 92, 255, .08);
  color: #c9bcff;
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 20px 0 18px;
  font-size: clamp(42px, 6.4vw, 76px);
  line-height: .98;
  letter-spacing: -.045em;
  font-weight: 700;
}
.grad {
  background: linear-gradient(100deg, #ffffff 0%, #c9d6ff 35%, #7c5cff 70%, #22d3ee 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-lead {
  max-width: 580px;
  color: var(--muted);
  font-size: clamp(14px, 1.4vw, 16px);
  line-height: 1.75;
}
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin: 28px 0 20px; }
.hero-trust { display: flex; gap: 18px; flex-wrap: wrap; color: var(--muted-2); font-size: 11.5px; }

.hero-card {
  padding: 24px;
  border-radius: 24px;
  border: 1px solid rgba(124, 92, 255, .22);
  background:
    radial-gradient(500px 220px at 100% 0%, rgba(34, 211, 238, .12), transparent 60%),
    linear-gradient(180deg, rgba(19, 27, 43, .9), rgba(7, 11, 18, .95));
  box-shadow: var(--shadow), 0 0 0 1px rgba(255,255,255,.03) inset;
}
.hero-card-top { display: flex; align-items: center; gap: 9px; margin-bottom: 16px; color: var(--muted); font-size: 11.5px; }
.hero-metric {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px dashed rgba(148, 163, 184, .13);
  font-size: 12.5px;
}
.hero-metric span { color: var(--muted); }
.hero-metric b { color: var(--text); }
.hero-metric b.gold { color: var(--gold-2); }
.hero-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 16px; font-size: 11px; }

.stat-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin-top: 26px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: var(--line);
  overflow: hidden;
}
.stat-strip > div { padding: 20px 22px; background: rgba(7, 11, 18, .82); }
.stat-strip b { display: block; font-family: var(--display); font-size: 19px; letter-spacing: -.02em; }
.stat-strip span { color: var(--muted-2); font-size: 10.5px; }

.site-main .section { padding: 76px 0 0; margin: 0; }
.section-alt {
  margin-top: 76px;
  padding: clamp(32px, 4vw, 56px);
  border-radius: 26px;
  border: 1px solid var(--line);
  background:
    radial-gradient(700px 320px at 100% 0%, rgba(124, 92, 255, .10), transparent 60%),
    linear-gradient(180deg, rgba(16, 24, 39, .68), rgba(6, 10, 17, .8));
}
.section-head { max-width: 760px; margin-bottom: 32px; }
.section-head h2 { margin: 14px 0 10px; font-size: clamp(28px, 3.6vw, 44px); line-height: 1.08; }
.section-head p { margin: 0; color: var(--muted); font-size: 14px; }

.feature-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.feature {
  padding: 24px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(17, 25, 40, .72), rgba(7, 11, 18, .82));
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.feature:hover {
  transform: translateY(-4px);
  border-color: rgba(124, 92, 255, .4);
  box-shadow: 0 18px 44px rgba(124, 92, 255, .12);
}
.feature-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  margin-bottom: 16px;
  border-radius: 13px;
  background: var(--grad-soft);
  border: 1px solid rgba(124, 92, 255, .25);
  color: #c9bcff;
  font-size: 18px;
}
.feature h3 { margin: 0 0 8px; font-size: 15px; }
.feature p { margin: 0; color: var(--muted); font-size: 12.5px; line-height: 1.7; }

.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.step {
  padding: 26px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(7, 11, 18, .55);
}
.step-no {
  color: #a993ff;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .18em;
}
.step h3 { margin: 12px 0 6px; font-size: 18px; }
.step p { margin: 0; color: var(--muted); font-size: 12.5px; }

.pricing-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; align-items: stretch; }
.pricing-grid-wide { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.price-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 26px;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(19, 27, 43, .78), rgba(7, 11, 18, .9));
  transition: transform .18s ease, border-color .18s ease;
}
.price-card:hover { transform: translateY(-3px); border-color: rgba(148, 163, 184, .3); }
.price-card.featured {
  border-color: rgba(232, 200, 119, .45);
  box-shadow: 0 24px 70px rgba(232, 200, 119, .08), inset 0 1px 0 rgba(255,255,255,.06);
}
.price-badge {
  position: absolute;
  top: -12px;
  left: 24px;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--grad-gold);
  color: #1b1405;
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.price-card h3 { margin: 4px 0 6px; font-size: 19px; }
.price-card > .muted { font-size: 12.5px; }
.price { display: flex; align-items: baseline; gap: 7px; margin: 14px 0 18px; }
.price-value { font-family: var(--display); font-size: 44px; font-weight: 700; letter-spacing: -.045em; }
.price-cur { color: var(--muted-2); font-size: 11.5px; }
.price-cur small { display: block; }
.price-list { margin: 12px 0; border-top: 1px dashed var(--line); }
.price-list > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px dashed rgba(148,163,184,.09);
  font-size: 12.5px;
}
.price-list span { color: var(--muted-2); }
.price-features { list-style: none; padding: 0; margin: 12px 0 20px; flex: 1; }
.price-features li { padding: 5px 0; color: #c6d4e6; font-size: 12.5px; }
.price-features li::first-letter { color: var(--ok); }
.cycle-actions { display: flex; gap: 6px; flex-wrap: wrap; }

.cta-band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  margin-top: 76px;
  padding: clamp(28px, 4vw, 44px);
  border-radius: 24px;
  border: 1px solid rgba(124, 92, 255, .3);
  background:
    radial-gradient(600px 260px at 0% 0%, rgba(124, 92, 255, .22), transparent 60%),
    radial-gradient(600px 260px at 100% 100%, rgba(34, 211, 238, .12), transparent 60%),
    rgba(9, 14, 23, .8);
}
.cta-band h2 { margin: 0 0 6px; font-size: clamp(22px, 3vw, 32px); }
.cta-band p { margin: 0; color: var(--muted); font-size: 13px; }

.faq { display: grid; gap: 10px; max-width: 880px; }
.faq details {
  padding: 16px 18px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(7, 11, 18, .52);
}
.faq summary { font-weight: 700; }
.faq p { margin: 10px 0 0; color: var(--muted); font-size: 12.5px; line-height: 1.7; }

.page-head { padding: clamp(48px, 6vw, 76px) 0 28px; max-width: 820px; }
.page-head h1 { margin: 14px 0 8px; font-size: clamp(32px, 4.6vw, 54px); }
.page-head p { margin: 0; color: var(--muted); }

/* ---------------- auth ---------------- */

.auth-page { max-width: 1160px; margin: 0 auto; padding: clamp(36px, 5vw, 64px) clamp(18px, 3vw, 32px) 88px; }
.auth-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 560px;
  border-radius: 26px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: rgba(7, 11, 18, .65);
  box-shadow: var(--shadow);
}
.auth-side {
  padding: clamp(32px, 4vw, 52px);
  background:
    radial-gradient(600px 360px at 0% 0%, rgba(124, 92, 255, .22), transparent 60%),
    radial-gradient(500px 300px at 100% 100%, rgba(34, 211, 238, .12), transparent 60%),
    linear-gradient(160deg, #0b111c, #05070d);
  border-right: 1px solid var(--line);
}
.auth-side h1 { margin: 16px 0; font-size: clamp(34px, 4vw, 52px); line-height: 1.02; }
.auth-side p { color: var(--muted); line-height: 1.75; }
.auth-points { list-style: none; padding: 0; margin: 26px 0 0; color: #c6d4e6; font-size: 12.5px; }
.auth-points li { padding: 7px 0; }
.auth-panel { padding: clamp(30px, 4vw, 46px); background: rgba(5, 8, 14, .72); }
.auth-panel h2 { margin: 0 0 6px; font-size: 24px; }
.auth-panel .muted { font-size: 12.5px; }
.auth-panel form { margin-top: 20px; }
.auth-panel .field { margin-bottom: 13px; }
.auth-panel .btn { width: 100%; }
.auth-alt { margin-top: 18px; text-align: center; color: var(--muted-2); font-size: 12px; }

/* ==================================================================
   CUSTOMER AREA
   ================================================================== */

.customer-shell {
  max-width: 1440px;
  margin: 0 auto;
  padding: 28px clamp(18px, 3vw, 34px) 76px;
  display: grid;
  grid-template-columns: 264px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.customer-nav {
  position: sticky;
  top: 96px;
  padding: 18px;
  border-radius: 20px;
  border: 1px solid var(--line);
  background:
    radial-gradient(400px 200px at 100% 0%, rgba(124, 92, 255, .10), transparent 60%),
    rgba(8, 13, 22, .75);
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow-soft);
}

.customer-nav-user {
  display: flex;
  align-items: center;
  gap: 11px;
  padding-bottom: 16px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--line);
}
.avatar {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  font-family: var(--display);
  font-weight: 700;
  color: #06070c;
  background: var(--grad);
  box-shadow: 0 8px 22px rgba(124, 92, 255, .3);
}
.customer-nav-user b { display: block; font-size: 12.5px; }
.customer-nav-user span { display: block; margin-top: 2px; }

.customer-nav nav { display: flex; flex-direction: column; gap: 3px; }
.customer-nav nav a {
  padding: 10px 12px;
  border-radius: 11px;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 600;
  border: 1px solid transparent;
}
.customer-nav nav a:hover { color: var(--text); background: rgba(255,255,255,.035); }
.customer-nav nav a.active {
  color: #fff;
  border-color: rgba(124,92,255,.35);
  background: linear-gradient(90deg, rgba(124,92,255,.2), rgba(34,211,238,.05));
}

.customer-main { min-width: 0; }

.customer-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}
.customer-head h1 { margin: 12px 0 5px; font-size: clamp(26px, 3.2vw, 40px); line-height: 1.08; }
.customer-head p { margin: 0; color: var(--muted); font-size: 13px; }

.server-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.server-card {
  padding: 17px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(6, 10, 17, .5);
  transition: border-color .16s ease, transform .16s ease;
}
.server-card:hover { border-color: rgba(124, 92, 255, .35); transform: translateY(-2px); }
.server-card h3 { margin: 0 0 3px; font-size: 15px; }
.server-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  color: var(--muted-2);
  font-size: 11.5px;
}
.server-meta b { color: var(--text); font-family: var(--mono); font-weight: 500; }

.list-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(148, 163, 184, .09);
}
.list-row:last-child { border-bottom: 0; }
.list-link { color: inherit; padding-left: 8px; padding-right: 8px; margin-left: -8px; margin-right: -8px; border-radius: 10px; }
.list-link:hover { color: inherit; background: rgba(255,255,255,.03); }

.summary-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 0;
  border-bottom: 1px dashed rgba(148,163,184,.1);
  font-size: 12.5px;
}
.summary-row span { color: var(--muted-2); }

.thread { display: flex; flex-direction: column; gap: 12px; }
.msg {
  max-width: 84%;
  padding: 13px 15px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(7, 12, 20, .55);
}
.msg-customer { align-self: flex-start; border-color: rgba(34, 211, 238, .2); background: rgba(34, 211, 238, .055); }
.msg-admin { align-self: flex-end; border-color: rgba(124, 92, 255, .3); background: rgba(124, 92, 255, .09); }
.msg-meta { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 6px; color: var(--muted-2); font-size: 10.5px; }
.msg-body { white-space: pre-wrap; font-size: 12.5px; line-height: 1.65; }

/* ---------------- setup page ---------------- */

.setup-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, .8fr);
  gap: 22px;
  padding: clamp(24px, 3vw, 36px);
  border-radius: 24px;
  border: 1px solid rgba(124, 92, 255, .25);
  background:
    radial-gradient(700px 320px at 0% 0%, rgba(124, 92, 255, .22), transparent 60%),
    radial-gradient(600px 300px at 100% 100%, rgba(34, 211, 238, .12), transparent 60%),
    linear-gradient(180deg, rgba(17, 25, 40, .78), rgba(6, 10, 17, .9));
  box-shadow: var(--shadow-soft);
  margin-bottom: 22px;
}
.setup-hero h1 { margin: 12px 0 8px; font-size: clamp(28px, 3.4vw, 42px); line-height: 1.06; }
.setup-hero p { margin: 0; color: var(--muted); font-size: 13px; max-width: 640px; }

.download-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 20px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(4, 8, 14, .62);
}
.download-card .file-name { font-family: var(--mono); font-size: 12px; color: var(--text); word-break: break-all; }
.download-card .file-meta { display: flex; flex-wrap: wrap; gap: 8px; }
.download-card .btn { width: 100%; }
.download-card .sha {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--muted-2);
  word-break: break-all;
  line-height: 1.5;
}

.step-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.step-card {
  position: relative;
  padding: 22px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(17, 25, 40, .6), rgba(7, 11, 18, .75));
}
.step-card h2 { margin: 10px 0 8px; font-size: 17px; font-family: var(--display); letter-spacing: -.01em; }
.step-card p { margin: 0 0 10px; color: var(--muted); font-size: 12.5px; line-height: 1.7; }
.step-num {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  border: 1px solid rgba(124, 92, 255, .35);
  background: rgba(124, 92, 255, .12);
  color: #c9bcff;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
}
.step-card .copy-wrap { margin-top: 10px; }
.step-card.wide { grid-column: 1 / -1; }

.pill-row { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------------- footer ---------------- */

.site-footer {
  margin-top: 56px;
  border-top: 1px solid var(--line);
  background: rgba(3, 5, 10, .72);
}
.site-footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 48px clamp(18px, 3vw, 32px);
  display: flex;
  justify-content: space-between;
  gap: 42px;
  flex-wrap: wrap;
}
.site-footer-cols { display: flex; gap: 56px; flex-wrap: wrap; }
.site-footer-cols h4 {
  margin: 0 0 12px;
  color: var(--muted-2);
  font-size: 9.5px;
  letter-spacing: .18em;
  text-transform: uppercase;
}
.site-footer-cols a { display: block; padding: 4px 0; color: #b9c6d6; font-size: 12.5px; }
.site-footer-cols a:hover { color: #fff; }
.site-footer-bottom {
  max-width: 1280px;
  margin: 0 auto;
  padding: 16px clamp(18px, 3vw, 32px) 28px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  color: var(--muted-2);
  font-size: 10.5px;
}

/* ==================================================================
   RESPONSIVE
   ================================================================== */

@media (max-width: 1280px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pricing-grid-wide { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .setup-hero { grid-template-columns: 1fr; }
}

@media (max-width: 1080px) {
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .hero-inner { grid-template-columns: 1fr; }
  .feature-grid, .pricing-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps { grid-template-columns: 1fr; }
  .stat-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .customer-shell { grid-template-columns: 1fr; }
  .customer-nav { position: static; }
  .customer-nav nav { flex-direction: row; flex-wrap: wrap; }
  .customer-nav nav a { flex: 1 1 auto; text-align: center; }
  .server-grid { grid-template-columns: 1fr; }
  .step-grid { grid-template-columns: 1fr; }
}

@media (min-width: 821px) {
  [data-nav-toggle] { display: none; }
}

@media (max-width: 820px) {
  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    transform: translateX(-105%);
    transition: transform .22s ease;
    box-shadow: 30px 0 80px rgba(0, 0, 0, .6);
  }
  .sidebar.open { transform: none; }
  .main { width: 100%; }
  .topbar { padding: 15px 18px; }
  .content { padding: 20px 16px 56px; }
  .flash { margin: 14px 16px 0; }
  .grid-4 { grid-template-columns: 1fr; }
  .pricing-grid, .pricing-grid-wide, .feature-grid { grid-template-columns: 1fr; }
  .site-links { display: none; }
  .site-nav-inner { gap: 12px; }
  .site-actions { margin-left: auto; }
  .auth-split { grid-template-columns: 1fr; }
  .auth-side { display: none; }
  .customer-head { flex-direction: column; align-items: flex-start; }
  .cta-band { flex-direction: column; align-items: flex-start; }
  .msg { max-width: 100%; }
  .kv { grid-template-columns: 1fr; }
  .topbar .pill { display: none; }
}

@media (max-width: 560px) {
  .hero h1 { font-size: 40px; }
  .site-actions .btn.ghost { display: none; }
  .site-footer-cols { gap: 28px; }
  .site-footer-inner { padding-top: 34px; }
  .card { padding: 18px; }
  .stat .value { font-size: 30px; }
  .btn { width: auto; }
  .filters { padding: 14px; }
  .filters .field { min-width: 100%; }
  .pager { flex-direction: column; align-items: flex-start; }
}
