:root {
  --bg: #050d19;
  --bg-2: #0a1424;
  --panel: rgba(255, 255, 255, 0.06);
  --panel-2: rgba(255, 255, 255, 0.04);
  --text: #f5f7fb;
  --muted: #9fb0c9;
  --accent: #58b6ff;
  --accent-2: #2a72ff;
  --danger: #ff8d8d;
  --warning: #ffd36a;
  --border: rgba(255, 255, 255, 0.11);
  --shadow: 0 24px 72px rgba(0, 0, 0, 0.35);
  --radius: 28px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  overscroll-behavior-x: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  background:
    radial-gradient(circle at top left, rgba(88, 182, 255, 0.18), transparent 25%),
    radial-gradient(circle at top right, rgba(42, 114, 255, 0.18), transparent 24%),
    linear-gradient(180deg, #050d19 0%, #0a1424 100%);
}

a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button { cursor: pointer; }
img { max-width: 100%; display: block; }
.hidden { display: none !important; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; }

.container { width: min(1200px, calc(100% - 32px)); margin: 0 auto; }
.page-shell { padding: 26px 0 64px; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(16px);
  background: rgba(5, 13, 25, 0.84);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 92px;
}

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

.brand-logo {
  width: 46px;
  height: 46px;
  object-fit: contain;
}

.brand-text-group {
  display: grid;
  gap: 2px;
}

.brand-text-group strong { font-size: 18px; }
.brand-text-group span { font-size: 13px; color: var(--muted); }

.main-nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.nav-link, .chip, .outline-btn, .primary-btn, .ghost-btn, .mini-btn, .danger-btn, .text-btn, .icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform .18s ease, opacity .18s ease, background .18s ease, border-color .18s ease;
}

.nav-link:hover, .chip:hover, .outline-btn:hover, .primary-btn:hover, .ghost-btn:hover, .mini-btn:hover, .danger-btn:hover, .text-btn:hover, .icon-btn:hover {
  transform: translateY(-1px);
  opacity: .98;
}

.nav-link, .chip {
  padding: 12px 16px;
  border-radius: 999px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  font-weight: 700;
  color: var(--text);
}
.nav-link.active { background: linear-gradient(135deg, var(--accent), #8ecbff); color: #08111d; border-color: transparent; }

.nav-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: flex-end; }
.user-chip {
  display: grid;
  gap: 2px;
  padding: 12px 16px;
  text-align: left;
}
.user-chip-name { font-weight: 800; }
.user-chip-id { font-size: 12px; color: var(--muted); }

.outline-btn, .ghost-btn, .primary-btn, .mini-btn, .danger-btn {
  border-radius: 16px;
  padding: 14px 18px;
  font-weight: 800;
  border: 1px solid var(--border);
}
.outline-btn, .ghost-btn, .mini-btn {
  background: rgba(255,255,255,0.05);
  color: var(--text);
}
.primary-btn {
  background: linear-gradient(135deg, var(--accent), #8ecbff);
  color: #07111f;
  border-color: transparent;
}
.danger-btn {
  background: rgba(255, 124, 124, 0.14);
  color: #ffdede;
  border-color: rgba(255, 124, 124, 0.22);
}
.text-btn {
  border: 0;
  background: transparent;
  color: #8abfff;
  font-weight: 700;
  padding: 6px 0;
}
.icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.04);
  color: var(--text);
  font-size: 17px;
}
.wide { width: 100%; }

.hero-section {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 20px;
  align-items: stretch;
}

.hero-card, .stats-card, .panel-card, .tariff-card, .admin-user-card, .inbox-item {
  background: linear-gradient(180deg, rgba(255,255,255,0.08), rgba(255,255,255,0.04));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.hero-card, .stats-card, .panel-card, .tariff-card, .admin-user-card, .inbox-item { padding: 26px; }

.eyebrow {
  display: inline-flex;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 16px;
}

.hero-logo-row { display: flex; align-items: center; gap: 20px; margin-bottom: 14px; }
.hero-logo { width: 88px; height: 88px; object-fit: contain; }
.hero-subtitle { font-size: 18px; color: var(--muted); margin-top: 6px; }
.hero-text, .section-text { color: var(--muted); line-height: 1.8; }
h1 { margin: 0; font-size: clamp(38px, 6vw, 62px); letter-spacing: -1.8px; line-height: 1.02; }
h2 { margin: 0 0 10px; font-size: clamp(30px, 4vw, 42px); }
h3 { margin: 0 0 12px; font-size: 28px; }
h4 { margin: 0 0 8px; font-size: 20px; }
p { margin: 0; line-height: 1.7; color: var(--muted); }

.button-row { display: flex; gap: 12px; flex-wrap: wrap; }
.top-gap { margin-top: 18px; }
.bottom-gap { margin-bottom: 18px; }

.stat-line, .data-line {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.stat-line:last-child, .data-line:last-child { border-bottom: 0; }
.stat-line strong { color: #bfe0ff; }
.data-line strong { text-align: right; }
.data-line.with-action { grid-template-columns: 120px 1fr auto; display: grid; align-items: center; }
.data-line.with-action span { color: var(--muted); }

.page-intro { padding: 6px 0 20px; }
.page-grid { display: grid; gap: 18px; }
.page-grid.two { grid-template-columns: repeat(2, 1fr); }
.page-grid.three { grid-template-columns: repeat(3, 1fr); }
.page-grid.four { grid-template-columns: repeat(4, 1fr); }
.tariffs-section { padding-top: 12px; }
.tariff-group-grid { align-items: stretch; }
.top-gap-large { margin-top: 28px; }
.card-top { display: flex; justify-content: space-between; align-items: start; gap: 14px; margin-bottom: 14px; }
.status-badge, .price-badge {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}
.feature-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; color: var(--muted); }
.feature-list.compact { margin: 16px 0 18px; }
.feature-list li::before { content: "• "; color: #7dd8ff; }
.tariff-card h3 span { font-size: 18px; color: var(--muted); }

.notice, .auth-message, .dev-code {
  border-radius: 18px;
  padding: 14px 16px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.05);
  line-height: 1.6;
}
.notice { color: #dfe8f9; }
.notice-success, .auth-message.success { border-color: rgba(99, 255, 210, 0.25); background: rgba(99, 255, 210, 0.08); color: #d6fff1; }
.notice-error, .auth-message.error { border-color: rgba(255, 124, 124, 0.25); background: rgba(255, 124, 124, 0.08); color: #ffdede; }
.dev-code { border-color: rgba(255, 211, 106, 0.26); background: rgba(255, 211, 106, 0.08); color: #ffefc4; }
.stack-list { display: grid; gap: 16px; }
.admin-user-head { display: flex; justify-content: space-between; gap: 12px; align-items: start; margin-bottom: 14px; }
.admin-user-meta { display: grid; gap: 0; }
.admin-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.inbox-item-title { display: flex; justify-content: space-between; gap: 12px; align-items: start; margin-bottom: 10px; }
.kind-pill { padding: 6px 10px; border-radius: 999px; font-size: 12px; border: 1px solid var(--border); background: rgba(255,255,255,0.05); color: var(--muted); }
.kind-pill.warning { color: #ffefc4; border-color: rgba(255,211,106,0.24); }
.kind-pill.error { color: #ffdede; border-color: rgba(255,124,124,0.24); }
.kind-pill.success { color: #d8fff0; border-color: rgba(99,255,210,0.24); }


.info-section, .legal-section { padding-top: 18px; }
.legal-grid { align-items: stretch; }
.legal-card, .proxy-card { height: 100%; }
.legal-copy { display: grid; gap: 12px; }
.compact-stack { gap: 0; }

.auth-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(4, 8, 15, 0.78);
  backdrop-filter: blur(8px);
}
.auth-card {
  width: min(520px, 100%);
  background: linear-gradient(180deg, rgba(12, 23, 39, 0.98), rgba(10, 20, 36, 0.98));
  border: 1px solid var(--border);
  border-radius: 30px;
  box-shadow: var(--shadow);
  padding: 24px;
}
.small-card { width: min(500px, 100%); }
.auth-topbar, .auth-top-actions, .verify-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.auth-topbar { margin-bottom: 16px; }
.auth-badge { color: var(--muted); font-size: 14px; }
.auth-head h2 { margin: 0 0 8px; font-size: 32px; }
.auth-head p { margin-bottom: 18px; }
.auth-tabs { display: flex; gap: 10px; margin-bottom: 16px; }
.auth-tab {
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.05);
  color: var(--muted);
  padding: 12px 16px;
  border-radius: 14px;
  font-weight: 700;
}
.auth-tab.active { background: linear-gradient(135deg, var(--accent), #8ecbff); color: #08111d; border-color: transparent; }
.auth-pane { display: none; }
.auth-pane.active { display: block; }
.field { display: grid; gap: 8px; margin-bottom: 14px; }
.field span { color: var(--muted); font-size: 14px; }
.field input {
  width: 100%;
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  color: var(--text);
  outline: none;
}
.password-wrap { position: relative; }
.password-wrap input { padding-right: 54px; }
.password-toggle {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 38px;
  height: 38px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.05);
  color: var(--text);
}
.code-input { letter-spacing: 6px; font-weight: 800; text-align: center; }
.verify-label { font-size: 18px; font-weight: 800; }
.verify-email { font-size: 14px; color: var(--muted); }

@media (max-width: 1180px) {
  .page-grid.four { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 1024px) {
  .hero-section, .page-grid.two, .page-grid.three, .page-grid.four { grid-template-columns: 1fr; }
}


@media (max-width: 640px) {
  .container { width: min(100% - 24px, 1200px); }
  .hero-logo-row { flex-direction: column; align-items: start; }
  .button-row, .admin-actions { flex-direction: column; }
  .data-line.with-action { grid-template-columns: 1fr auto; }
  .data-line.with-action span { grid-column: 1 / -1; margin-bottom: 6px; }
  .auth-card { padding: 20px; border-radius: 24px; }
  .auth-head h2 { font-size: 28px; }
}

.mobile-nav-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex: 1;
}
.mobile-nav-head { display: none; }
.nav-toggle {
  display: none;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.06);
  color: var(--text);
  font-size: 22px;
}
.mobile-nav-overlay {
  position: fixed;
  inset: 0;
  background: rgba(2, 8, 16, 0.72);
  z-index: 48;
}
.inbox-link { position: relative; gap: 10px; padding-right: 40px; }
.inbox-badge {
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: #ff4b4b;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 20px rgba(255, 75, 75, 0.35);
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
}
.hero-copy { display: grid; gap: 12px; margin-top: 8px; }
.proxy-card { justify-content: space-between; }
.compact-eyebrow { margin-bottom: 12px; }
.no-margin { margin-bottom: 0; }
.unread-item {
  border-color: rgba(83, 180, 255, 0.22);
  box-shadow: 0 18px 40px rgba(0,0,0,0.28);
}
body.nav-open { overflow: hidden; }

@media (max-width: 1100px) {
  .nav-row {
    min-height: 84px;
    position: relative;
    flex-direction: row;
    align-items: center;
    padding: 14px 0;
  }
  .nav-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .mobile-nav-panel {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(360px, 88vw);
    padding: 22px 18px 28px;
    background: linear-gradient(180deg, rgba(10, 20, 36, 0.99), rgba(6, 14, 26, 0.99));
    border-left: 1px solid rgba(255,255,255,0.08);
    z-index: 49;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 18px;
    transform: translate3d(110%, 0, 0);
    transition: transform .18s ease;
    will-change: transform;
    box-shadow: var(--shadow);
  }
  .mobile-nav-panel.is-open { transform: translate3d(0, 0, 0); }
  .site-header { backdrop-filter: none; }
  .inbox-link { padding-right: 52px; }
  .mobile-nav-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 6px;
  }
  .mobile-brand { justify-content: flex-start; }
  .main-nav {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  .main-nav .nav-link {
    width: 100%;
    justify-content: flex-start;
    padding: 14px 16px;
  }
  .main-nav .inbox-badge { right: 14px; top: 14px; transform: none; }
  .nav-actions {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
  }
  .nav-actions > * { width: 100%; }
  .user-chip { text-align: left; }
}

@media (max-width: 640px) {
  .site-header { position: sticky; backdrop-filter: none; }
  .page-shell { padding-top: 18px; }
  .brand-text-group span { font-size: 12px; }
  .brand-logo { width: 42px; height: 42px; }
  .hero-card, .stats-card, .panel-card, .tariff-card, .admin-user-card, .inbox-item { padding: 20px; }
  .hero-logo { width: 74px; height: 74px; }
  .hero-section { gap: 16px; }
  .button-row > * { width: 100%; }
  .user-chip { padding: 10px 14px; }
  .brand-text-group strong { font-size: 16px; }
}


.site-footer {
  border-top: 1px solid rgba(255,255,255,0.08);
  background: rgba(3, 9, 18, 0.86);
  margin-top: 56px;
}

.footer-wrap {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr 1.15fr;
  gap: 24px;
  padding: 24px 0 30px;
  align-items: center;
}

.footer-brand {
  align-items: center;
}

.footer-logo {
  width: 52px;
  height: 52px;
}

.footer-note {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.footer-title {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--muted);
  margin-bottom: 12px;
  font-weight: 700;
}

.footer-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.footer-pill {
  padding: 12px 16px;
  border-radius: 999px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  font-weight: 700;
}

.footer-email-text {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.6;
}

.footer-email-text a {
  color: var(--text);
}

.footer-doc-links {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.footer-doc-links a {
  color: var(--text);
  opacity: 0.92;
}

.footer-doc-links a:hover,
.footer-pill:hover {
  opacity: 1;
}

.legal-doc-shell {
  display: grid;
  gap: 18px;
}

.legal-doc-card h3 {
  margin-top: 0;
  margin-bottom: 12px;
}

.legal-doc-card p {
  margin: 0 0 12px;
  line-height: 1.75;
}

@media (max-width: 980px) {
  .footer-wrap {
    grid-template-columns: 1fr;
    align-items: start;
  }
}

@media (max-width: 760px) {
  .footer-buttons {
    flex-direction: column;
    align-items: stretch;
  }

  .footer-pill {
    width: 100%;
  }

  .site-footer {
    margin-top: 42px;
  }
}
