/* ══════════════════════════════════════════════════════════════
   RainStress — Crimson & Obsidian UI
══════════════════════════════════════════════════════════════ */

:root {
  --bg:             #050507;
  --bg-elevated:    #0a0a0e;
  --bg-card:        rgba(13, 13, 18, 0.86);
  --bg-card-solid:  #0d0d12;
  --bg-hover:       rgba(239, 68, 68, 0.08);
  --bg-input:       #09090d;
  --sidebar-bg:     #07070a;
  --border:         rgba(255, 255, 255, 0.08);
  --border-dim:     rgba(255, 255, 255, 0.05);
  --border-bright:  rgba(239, 68, 68, 0.45);

  --text:           #f4f4f5;
  --text-dim:       #a1a1aa;
  --text-muted:     #52525b;

  --accent:         #ef4444;
  --accent-dark:    #b91c1c;
  --accent-soft:    rgba(239, 68, 68, 0.12);
  --emerald:        #22c55e;
  --danger:         #f87171;
  --warn:           #fbbf24;
  --white:          #ffffff;

  --font-display:   'Space Grotesk', system-ui, sans-serif;
  --font-sans:      'Inter', system-ui, -apple-system, sans-serif;
  --font-mono:      'JetBrains Mono', ui-monospace, monospace;

  --sidebar-w:      248px;
  --ease-spring:    cubic-bezier(0.22, 1, 0.36, 1);
  color-scheme:     dark;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.14); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: rgba(239, 68, 68, 0.45); }

.hidden  { display: none !important; }
.mt-auto { margin-top: auto; }

.logo-img {
  object-fit: cover;
  border-radius: 7px;
  display: block;
  flex-shrink: 0;
}

.pulse-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.7);
  animation: pulseBeacon 2.2s ease-in-out infinite;
  flex-shrink: 0;
}

@keyframes pulseBeacon {
  0%, 100% { transform: scale(1); opacity: 1; }
  50%      { transform: scale(1.22); opacity: 0.6; }
}

/* ── TOAST NOTIFICATIONS ──────────────────────── */
.toast-container {
  position: fixed;
  bottom: 22px;
  right: 22px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast-item {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 240px;
  max-width: 360px;
  padding: 11px 15px;
  border-radius: 10px;
  background: #0d0d12;
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.65);
  transform: translateY(12px);
  opacity: 0;
  transition: transform 0.28s var(--ease-spring), opacity 0.22s ease;
}

.toast-item.show {
  transform: translateY(0);
  opacity: 1;
}

.toast-icon {
  width: 20px;
  height: 20px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  background: var(--accent-soft);
  color: var(--accent);
  flex-shrink: 0;
}

.toast-success .toast-icon { background: rgba(34, 197, 94, 0.16); color: var(--emerald); }
.toast-error .toast-icon   { background: rgba(248, 113, 113, 0.16); color: var(--danger); }

/* ══════════════════════════════════════════════════════════════
   LANDING PAGE (Clean, Minimalist Red & Black)
══════════════════════════════════════════════════════════════ */
.landing-page {
  position: fixed;
  inset: 0;
  z-index: 90;
  overflow-y: auto;
  overflow-x: hidden;
  background:
    radial-gradient(ellipse 70% 45% at 50% 0%, rgba(220, 38, 38, 0.08) 0%, transparent 65%),
    var(--bg);
  scroll-behavior: smooth;
}

.globe-canvas-wrap {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.85;
}

.landing-vignette {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: radial-gradient(circle at 50% 40%, transparent 38%, rgba(5, 5, 7, 0.88) 100%);
}

/* Minimal Header */
.landing-nav-wrap {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(5, 5, 7, 0.72);
  border-bottom: 1px solid var(--border-dim);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.landing-nav {
  max-width: 1120px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 24px;
}

.landing-nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.landing-brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 17px;
  letter-spacing: -0.02em;
  color: var(--white);
}

.landing-nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-anchor {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 7px;
  transition: color 0.18s;
}
.nav-anchor:hover { color: var(--white); }

.landing-nav-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.landing-tg-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-dim);
  text-decoration: none;
  font-size: 13px;
  padding: 7px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  transition: border-color 0.2s, color 0.2s;
}
.landing-tg-link:hover {
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.2);
}

.landing-signin-btn {
  padding: 7px 16px;
  border-radius: 8px;
  border: none;
  background: var(--accent);
  color: var(--white);
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}
.landing-signin-btn:hover {
  background: #dc2626;
  transform: translateY(-1px);
}

.landing-main {
  position: relative;
  z-index: 10;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Editorial Centered Hero */
.hero-section {
  padding: 108px 0 84px;
  text-align: center;
  max-width: 720px;
  margin: 0 auto;
}

.hero-kicker {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--accent);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 18px;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(46px, 6.8vw, 76px);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.04em;
  color: var(--white);
  margin-bottom: 20px;
}

.hero-accent {
  color: var(--accent);
}

.hero-desc {
  max-width: 540px;
  margin: 0 auto 32px;
  color: var(--text-dim);
  font-size: 16px;
  line-height: 1.65;
}

.hero-btns {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 52px;
}

.hero-cta-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 9px;
  border: none;
  background: var(--accent);
  color: var(--white);
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}
.hero-cta-primary:hover {
  background: #dc2626;
  transform: translateY(-2px);
}

.hero-cta-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: rgba(13, 13, 18, 0.72);
  color: var(--text);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: border-color 0.2s, color 0.2s;
}
.hero-cta-secondary:hover {
  border-color: var(--border-bright);
  color: var(--white);
}

/* Landing Stats Row */
.landing-stats {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
  gap: 24px;
  padding: 16px 28px;
  border-radius: 12px;
  background: rgba(10, 10, 14, 0.75);
  border: 1px solid var(--border);
  backdrop-filter: blur(12px);
}

.ls-item { text-align: center; }
.ls-num {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  color: var(--white);
  line-height: 1.15;
}
.ls-label {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.ls-divider {
  width: 1px;
  height: 26px;
  background: var(--border);
}

/* Entrance animations */
.reveal-up {
  opacity: 0;
  transform: translateY(16px);
  animation: revealUp 0.65s var(--ease-spring) forwards;
  animation-delay: var(--d, 0ms);
}

@keyframes revealUp {
  to { opacity: 1; transform: translateY(0); }
}

.reveal-scroll {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s var(--ease-spring), transform 0.6s var(--ease-spring);
}
.reveal-scroll.in-view {
  opacity: 1;
  transform: translateY(0);
}

/* Capabilities */
.capabilities-section {
  padding: 24px 0 64px;
}

.landing-features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.lf-card {
  border-radius: 14px;
  padding: 26px;
  background: rgba(11, 11, 15, 0.82);
  border: 1px solid var(--border);
  backdrop-filter: blur(14px);
  transition: border-color 0.25s ease, transform 0.25s var(--ease-spring);
}
.lf-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-bright);
}

.lf-num {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent);
  margin-bottom: 14px;
}

.lf-card h3 {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 8px;
}

.lf-card p {
  color: var(--text-dim);
  font-size: 13.5px;
  line-height: 1.6;
}

/* Landing Pricing */
.landing-pricing {
  padding: 40px 0 72px;
}

.lp-header {
  text-align: center;
  margin-bottom: 36px;
}
.lp-header .hero-kicker { margin-bottom: 8px; }

.lp-title {
  font-family: var(--font-display);
  font-size: clamp(28px, 3.6vw, 38px);
  font-weight: 700;
  color: var(--white);
  letter-spacing: -0.03em;
  margin-bottom: 8px;
}
.lp-sub { color: var(--text-dim); font-size: 14.5px; }

.lp-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(205px, 1fr));
  gap: 14px;
}

.lp-card {
  position: relative;
  border-radius: 14px;
  padding: 24px 20px;
  background: rgba(11, 11, 15, 0.86);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  transition: transform 0.25s var(--ease-spring), border-color 0.25s ease;
}

.lp-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-bright);
}

.lp-card.featured {
  border-color: rgba(239, 68, 68, 0.55);
  border-top: 2px solid var(--accent);
  background: rgba(18, 10, 12, 0.9);
}

.lp-name {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 10px;
}

.lp-price {
  display: flex;
  align-items: baseline;
  gap: 3px;
  margin-bottom: 18px;
}
.lp-price .cur { font-size: 15px; color: var(--text-dim); }
.lp-price .amt { font-family: var(--font-display); font-size: 32px; font-weight: 700; color: var(--white); line-height: 1; }
.lp-price .per { font-size: 12px; color: var(--text-muted); }

.lp-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 22px;
  flex: 1;
}
.lp-features li {
  font-size: 13px;
  color: var(--text-dim);
  padding-left: 16px;
  position: relative;
}
.lp-features li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: var(--accent);
}

.lp-btn {
  display: block;
  text-align: center;
  padding: 9px 14px;
  border-radius: 8px;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  border: 1px solid var(--border);
  color: var(--white);
  background: rgba(255, 255, 255, 0.03);
  transition: all 0.2s ease;
}
.lp-btn:hover,
.lp-card.featured .lp-btn {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--white);
}

.lp-cta { text-align: center; margin-top: 28px; }

.landing-footer {
  position: relative;
  z-index: 10;
  max-width: 1120px;
  margin: 0 auto;
  padding: 24px;
  border-top: 1px solid var(--border-dim);
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--text-muted);
  font-size: 13px;
}
.landing-footer a { color: var(--accent); text-decoration: none; font-family: var(--font-mono); }

/* ══════════════════════════════════════════════════════════════
   LOGIN PAGE (Interactive Constellation + Crimson Radar HUD)
══════════════════════════════════════════════════════════════ */
.login-page {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #050507;
  padding: 20px;
}

.login-rain-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}

.login-grid-overlay {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(239, 68, 68, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(239, 68, 68, 0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(circle at 50% 50%, black 25%, transparent 85%);
}

.login-vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 50%, transparent 25%, rgba(5, 5, 7, 0.9) 100%);
  z-index: 2;
  pointer-events: none;
}

.login-back {
  position: absolute;
  top: 22px;
  left: 22px;
  z-index: 20;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  border-radius: 9px;
  background: rgba(13, 13, 18, 0.85);
  border: 1px solid var(--border);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}
.login-back:hover {
  border-color: var(--border-bright);
  color: var(--accent);
}

.login-shell {
  position: relative;
  z-index: 20;
  width: 100%;
  max-width: 800px;
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  border-radius: 18px;
  background: rgba(10, 10, 14, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.82);
  overflow: hidden;
  animation: loginFadeIn 0.45s var(--ease-spring) both;
}

@keyframes loginFadeIn {
  from { opacity: 0; transform: translateY(16px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.login-aside {
  padding: 36px 30px;
  background:
    radial-gradient(circle at 30% 20%, rgba(239, 68, 68, 0.12), transparent 65%),
    rgba(6, 6, 9, 0.9);
  border-right: 1px solid var(--border-dim);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.login-aside-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  color: var(--accent);
  padding: 4px 10px;
  border-radius: 99px;
  background: var(--accent-soft);
  border: 1px solid rgba(239, 68, 68, 0.28);
}

.login-aside h2 {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
  line-height: 1.15;
  color: var(--white);
  margin: 20px 0 10px;
}

.login-aside p {
  color: var(--text-dim);
  font-size: 13px;
  line-height: 1.6;
}

/* Radar HUD inside Login Aside */
.login-aside-hud {
  position: relative;
  width: 112px;
  height: 112px;
  margin: 22px auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hud-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid rgba(239, 68, 68, 0.25);
}
.hud-ring.inner {
  inset: 20px;
  border-style: dashed;
  border-color: rgba(255, 255, 255, 0.14);
}
.hud-sweep {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(from 0deg, rgba(239, 68, 68, 0.35), transparent 95deg);
  animation: spinHud 3.5s linear infinite;
}
.hud-center {
  position: relative;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
  color: var(--white);
  letter-spacing: 0.05em;
}
@keyframes spinHud { to { transform: rotate(360deg); } }

.login-aside-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  padding-top: 16px;
  border-top: 1px solid var(--border-dim);
}
.login-aside-stats strong {
  display: block;
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--white);
}
.login-aside-stats span {
  font-size: 11px;
  color: var(--text-muted);
}

.login-box { padding: 36px 32px; }

.login-logo {
  display: flex;
  align-items: center;
  gap: 13px;
  margin-bottom: 24px;
}

.login-brand-name {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  color: var(--white);
}

.login-sub { color: var(--text-dim); font-size: 12.5px; }

.field { margin-bottom: 15px; }
.field label,
.form-group label {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  color: var(--text-dim);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.input-icon-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.input-icon-wrap > svg {
  position: absolute;
  left: 13px;
  color: var(--text-muted);
  pointer-events: none;
}
.input-icon-wrap input {
  padding-left: 38px !important;
  padding-right: 38px !important;
}

.pass-toggle {
  position: absolute;
  right: 10px;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  display: inline-flex;
  transition: color 0.2s;
}
.pass-toggle:hover,
.pass-toggle.active { color: var(--accent); }

input[type="text"],
input[type="password"],
input[type="number"],
select,
textarea {
  width: 100%;
  padding: 10px 13px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: var(--bg-input);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 13.5px;
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

select option {
  background: #0d0d12;
  color: var(--text);
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.18);
}

.login-error,
.modal-error {
  padding: 9px 12px;
  border-radius: 8px;
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #fca5a5;
  font-size: 12.5px;
  margin-bottom: 14px;
}

.modal-ok {
  padding: 9px 12px;
  border-radius: 8px;
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.35);
  color: var(--emerald);
  font-size: 12.5px;
  margin-bottom: 10px;
}

.btn-login {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 16px;
  border-radius: 9px;
  border: none;
  background: var(--accent);
  color: var(--white);
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}
.btn-login:hover {
  background: #dc2626;
  transform: translateY(-1px);
}
.btn-login:disabled { opacity: 0.6; cursor: not-allowed; }

.login-links-row {
  display: flex;
  justify-content: flex-end;
  margin-top: 10px;
}

.btn-forgot {
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 12.5px;
  cursor: pointer;
}
.btn-forgot:hover { color: var(--accent); }

.login-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 15px 0;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 10.5px;
  text-transform: uppercase;
}
.login-divider::before,
.login-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border-dim);
}

.btn-register {
  width: 100%;
  padding: 10px 14px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.025);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}
.btn-register:hover {
  border-color: var(--border-bright);
  background: var(--bg-hover);
}

/* ══════════════════════════════════════════════════════════════
   MODALS & COMMAND PALETTE
══════════════════════════════════════════════════════════════ */
.modal-backdrop,
.cmd-backdrop {
  position: fixed;
  inset: 0;
  z-index: 500;
  background: rgba(2, 2, 4, 0.8);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-box {
  width: 100%;
  max-width: 460px;
  border-radius: 14px;
  background: #0d0d12;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.82);
  overflow: hidden;
  animation: modalPop 0.22s var(--ease-spring) both;
}

@keyframes modalPop {
  from { opacity: 0; transform: scale(0.96) translateY(6px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 20px;
  border-bottom: 1px solid var(--border-dim);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15.5px;
  color: var(--white);
}

.modal-close {
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 16px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
}
.modal-close:hover { background: rgba(255, 255, 255, 0.08); color: var(--white); }

.modal-body { padding: 20px; }
.modal-desc { color: var(--text-dim); font-size: 13px; margin-bottom: 14px; }
.form-group { margin-bottom: 14px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 20px;
  border-top: 1px solid var(--border-dim);
  background: rgba(5, 5, 7, 0.6);
}

.info-callout {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.28);
  border-radius: 9px;
  padding: 12px;
  margin-bottom: 16px;
  font-size: 13px;
  color: #fecaca;
}

.otp-input {
  letter-spacing: 6px;
  text-align: center;
  font-family: var(--font-mono) !important;
  font-size: 20px !important;
}

.qr-box {
  display: flex;
  justify-content: center;
  margin: 12px 0;
  background: #07070a;
  border: 1px solid var(--border);
  padding: 14px;
  border-radius: 10px;
}
.qr-manual { text-align: center; font-size: 11px; color: var(--text-dim); margin-bottom: 14px; }
.qr-manual code { font-family: var(--font-mono); color: var(--accent); }

.captcha-group .captcha-q { color: var(--accent); }
.captcha-row { display: flex; gap: 8px; }
.btn-captcha-refresh {
  width: 42px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: var(--bg-input);
  color: var(--text);
  font-size: 16px;
  cursor: pointer;
}
.btn-captcha-refresh:hover { border-color: var(--accent); color: var(--accent); }

/* Command Palette */
.cmd-backdrop { align-items: flex-start; padding-top: 11vh; }
.cmd-box {
  width: 100%;
  max-width: 500px;
  border-radius: 14px;
  background: #0d0d12;
  border: 1px solid rgba(239, 68, 68, 0.3);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.85);
  overflow: hidden;
  animation: modalPop 0.18s var(--ease-spring) both;
}

.cmd-input-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 16px;
  border-bottom: 1px solid var(--border-dim);
  color: var(--accent);
}
.cmd-input-row input {
  border: none;
  background: transparent;
  padding: 2px 0;
  font-size: 14px;
  box-shadow: none !important;
}
.cmd-input-row kbd {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-muted);
  border: 1px solid var(--border);
  padding: 2px 6px;
  border-radius: 5px;
}

.cmd-list { max-height: 300px; overflow-y: auto; padding: 8px; }
.cmd-item {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 12px;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}
.cmd-item:hover,
.cmd-item.active { background: rgba(239, 68, 68, 0.12); }
.cmd-title { font-weight: 600; font-size: 13.5px; }
.cmd-sub { font-size: 12px; color: var(--text-dim); }
.cmd-empty { padding: 20px; text-align: center; color: var(--text-muted); font-size: 13px; }

/* ══════════════════════════════════════════════════════════════
   APP SHELL (SIDEBAR + MAIN)
══════════════════════════════════════════════════════════════ */
.app-shell {
  position: relative;
  display: flex;
  height: 100vh;
  width: 100%;
  background:
    radial-gradient(ellipse 55% 40% at 15% 0%, rgba(220, 38, 38, 0.06) 0%, transparent 60%),
    var(--bg);
}

.app-rain-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

.mobile-overlay {
  position: fixed;
  inset: 0;
  z-index: 190;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
}

/* Sidebar */
.sidebar {
  position: relative;
  z-index: 200;
  width: var(--sidebar-w);
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  padding: 18px 14px;
  background: var(--sidebar-bg);
  border-right: 1px solid var(--border-dim);
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 6px 16px;
}
.sidebar-brand {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  color: var(--white);
}
.sidebar-close-btn {
  display: none;
  margin-left: auto;
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 16px;
  cursor: pointer;
}

.cmd-trigger {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px 11px;
  margin-bottom: 12px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
  color: var(--text-dim);
  font-family: var(--font-sans);
  font-size: 12.5px;
  cursor: pointer;
  transition: border-color 0.18s, color 0.18s;
}
.cmd-trigger:hover { border-color: var(--border-bright); color: var(--white); }
.cmd-trigger kbd {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-muted);
  border: 1px solid var(--border);
  padding: 1px 6px;
  border-radius: 5px;
}

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.nav-section-label {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 12px 10px 4px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px 12px;
  border-radius: 9px;
  border: 1px solid transparent;
  color: var(--text-dim);
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 500;
  transition: all 0.18s ease;
}

.nav-item:hover {
  color: var(--white);
  background: rgba(255, 255, 255, 0.035);
}

.nav-item.active {
  color: var(--white);
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.32);
}

.nav-item.active svg { color: var(--accent); }

.admin-nav, .admin-section { display: none; }
.admin-nav.visible, .admin-section.visible { display: flex; }
.admin-section.visible { display: block; }

.sidebar-footer {
  padding-top: 14px;
  border-top: 1px solid var(--border-dim);
}

.user-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--border-dim);
}

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--accent);
  color: var(--white);
  font-family: var(--font-display);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.user-info { min-width: 0; flex: 1; }
.user-name { font-weight: 600; font-size: 13px; color: var(--white); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-role { font-size: 11px; color: var(--text-dim); }

.logout-btn {
  background: none;
  border: 1px solid transparent;
  color: var(--text-dim);
  padding: 6px;
  border-radius: 7px;
  cursor: pointer;
  display: inline-flex;
  transition: all 0.18s;
}
.logout-btn:hover {
  color: var(--accent);
  background: rgba(239, 68, 68, 0.1);
}

/* Main Content & Topbar */
.main-content {
  position: relative;
  z-index: 10;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 15px 28px;
  border-bottom: 1px solid var(--border-dim);
  background: rgba(7, 7, 10, 0.72);
  backdrop-filter: blur(14px);
}

.topbar-left { display: flex; align-items: center; gap: 12px; min-width: 0; }
.mobile-menu-btn {
  display: none;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 7px;
  border-radius: 8px;
  cursor: pointer;
}

.page-title {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 700;
  color: var(--white);
  line-height: 1.2;
}
.breadcrumb { font-size: 12px; color: var(--text-dim); }

.topbar-right { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }

.clock-pill {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-dim);
  padding: 5px 11px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-dim);
  font-variant-numeric: tabular-nums;
}

.agent-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  border-radius: 99px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text);
  white-space: nowrap;
}

.agent-badge .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-muted);
}
.agent-badge .dot.online {
  background: var(--emerald);
  box-shadow: 0 0 8px var(--emerald);
}

/* Pages Container */
.page {
  display: none;
  flex: 1;
  overflow-y: auto;
  padding: 24px 28px 40px;
}

.page.active {
  display: block;
  animation: pageIn 0.28s var(--ease-spring) both;
}

@keyframes pageIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Cards & Buttons */
.card {
  border-radius: 14px;
  padding: 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  backdrop-filter: blur(16px);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.card-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  color: var(--white);
}

.card-badge {
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 3px 9px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  color: var(--text-dim);
}
.card-badge.live {
  background: var(--accent-soft);
  border-color: rgba(239, 68, 68, 0.35);
  color: var(--accent);
}

.btn-primary,
.btn-primary-glow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 9px;
  border: none;
  background: var(--accent);
  color: var(--white);
  font-family: var(--font-sans);
  font-size: 13.5px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.18s, transform 0.18s;
}
.btn-primary:hover,
.btn-primary-glow:hover {
  background: #dc2626;
  transform: translateY(-1px);
}
.btn-primary.btn-danger { background: #dc2626; }

.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 16px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.025);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.18s;
}
.btn-outline:hover {
  border-color: var(--border-bright);
  background: var(--bg-hover);
  color: var(--white);
}

.btn-sm {
  padding: 6px 12px;
  border-radius: 7px;
  border: 1px solid rgba(239, 68, 68, 0.35);
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
.btn-sm:hover { background: rgba(239, 68, 68, 0.22); }

.btn-xs {
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  font-size: 11.5px;
  font-weight: 500;
  cursor: pointer;
}
.btn-xs:hover { border-color: var(--accent); color: var(--accent); }
.btn-xs.danger:hover { border-color: var(--danger); color: var(--danger); background: rgba(239, 68, 68, 0.1); }

/* ══════════════════════════════════════════════════════════════
   DASHBOARD PAGE
══════════════════════════════════════════════════════════════ */
.dash-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 24px;
  border-radius: 14px;
  margin-bottom: 16px;
  background:
    radial-gradient(ellipse 55% 100% at 88% 50%, rgba(239, 68, 68, 0.12), transparent 70%),
    rgba(13, 13, 18, 0.9);
  border: 1px solid var(--border);
}

.dh-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--accent);
  letter-spacing: 0.08em;
  margin-bottom: 5px;
}

.dh-heading {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 4px;
}
.dh-heading span { color: var(--accent); }
.dh-sub { color: var(--text-dim); font-size: 13.5px; }
.dh-actions { display: flex; gap: 10px; flex-shrink: 0; }

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 16px;
}

.stat-card {
  border-radius: 14px;
  padding: 18px 18px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: transform 0.22s var(--ease-spring), border-color 0.22s ease;
  animation: cardStagger 0.4s var(--ease-spring) both;
  animation-delay: calc(var(--i, 0) * 55ms);
}

@keyframes cardStagger {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

.stat-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-bright);
}

.stat-card.highlight {
  border-color: rgba(239, 68, 68, 0.35);
  background: linear-gradient(160deg, rgba(239, 68, 68, 0.08), rgba(13, 13, 18, 0.88));
}

.stat-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.stat-icon {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: var(--accent-soft);
  border: 1px solid rgba(239, 68, 68, 0.22);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
}

.stat-badge {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--text-dim);
  padding: 2px 8px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-dim);
}
.stat-badge.running {
  background: var(--accent-soft);
  border-color: rgba(239, 68, 68, 0.35);
  color: var(--accent);
}

.stat-value {
  font-family: var(--font-display);
  font-size: 27px;
  font-weight: 700;
  color: var(--white);
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.stat-label { font-size: 12px; color: var(--text-dim); margin-top: 2px; }

.stat-spark {
  width: 100%;
  height: 22px;
  color: var(--accent);
  opacity: 0.72;
}

.dash-mid-grid {
  display: grid;
  grid-template-columns: 1.55fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

.telemetry-peak {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--accent);
  padding: 3px 10px;
  border-radius: 99px;
  background: var(--accent-soft);
  border: 1px solid rgba(239, 68, 68, 0.25);
}

.dash-chart-box {
  height: 185px;
  border-radius: 10px;
  background: #07070a;
  border: 1px solid var(--border-dim);
  overflow: hidden;
}
.dash-chart-box canvas { width: 100%; height: 100%; display: block; }

.account-card { display: flex; flex-direction: column; }
.account-rows { display: flex; flex-direction: column; gap: 9px; margin-bottom: 16px; }
.account-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 12px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--border-dim);
}
.ar-label { font-size: 12.5px; color: var(--text-dim); }
.ar-value { font-family: var(--font-mono); font-size: 13px; font-weight: 600; color: var(--white); }

.plan-badge {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 99px;
  background: var(--accent-soft);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: var(--accent);
}

.announce-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-left: 4px;
}
.announce-item { display: flex; align-items: flex-start; gap: 12px; }
.announce-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--text-muted);
  margin-top: 6px;
  flex-shrink: 0;
}
.announce-dot.active {
  background: var(--accent);
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.7);
}
.announce-title {
  font-weight: 600;
  font-size: 13.5px;
  color: var(--white);
  display: flex;
  align-items: center;
  gap: 8px;
}
.ver-pill {
  font-family: var(--font-mono);
  font-size: 9.5px;
  padding: 1px 6px;
  border-radius: 99px;
  background: var(--accent-soft);
  color: var(--accent);
}
.announce-meta { font-size: 12.5px; color: var(--text-dim); margin-top: 2px; }

/* ══════════════════════════════════════════════════════════════
   PANEL PAGE (ATTACK HUB) — FIXED DROPDOWN STACKING & CLIPPING
══════════════════════════════════════════════════════════════ */
.panel-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 18px;
  align-items: start;
}

.attack-form-card {
  position: relative;
  z-index: 30;
  overflow: visible;
}

.layer-toggle {
  display: inline-flex;
  padding: 3px;
  border-radius: 9px;
  background: #07070a;
  border: 1px solid var(--border);
}

.layer-btn {
  padding: 6px 14px;
  border-radius: 7px;
  border: none;
  background: transparent;
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}
.layer-btn.active {
  background: var(--accent);
  color: var(--white);
}

.form-grid {
  position: relative;
  z-index: 40;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 18px;
}
.form-grid .field { margin-bottom: 0; }
.form-grid .field.full { grid-column: span 2; }

.quick-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}
.q-chip {
  padding: 2px 8px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.025);
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 10.5px;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}
.q-chip:hover { border-color: var(--accent); color: var(--accent); }

/* Custom Select Dropdown — Crisp, Non-Eye-Straining, Proper Z-Index */
.cs-wrap {
  position: relative;
  z-index: 50;
  user-select: none;
}
.cs-wrap.open {
  z-index: 200;
}

.cs-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 13px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: var(--bg-input);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 13px;
  cursor: pointer;
  user-select: none;
  transition: border-color 0.18s ease, background 0.18s ease;
}
.cs-trigger:hover {
  border-color: rgba(255, 255, 255, 0.2);
}
.cs-wrap.open .cs-trigger {
  border-color: var(--accent);
  background: #0d0d13;
}

.cs-arrow {
  color: var(--text-dim);
  font-size: 12px;
  transition: transform 0.2s ease, color 0.2s ease;
}
.cs-wrap.open .cs-arrow {
  transform: rotate(180deg);
  color: var(--accent);
}

.cs-list {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 300;
  max-height: 220px;
  overflow-y: auto;
  padding: 5px;
  border-radius: 10px;
  background: #0b0b10;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.88);
}

.cs-wrap.drop-up .cs-list {
  top: auto;
  bottom: calc(100% + 6px);
}

.cs-wrap.open .cs-list {
  display: block;
  animation: modalPop 0.14s ease both;
}

.cs-item {
  padding: 8px 11px;
  border-radius: 7px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--text-dim);
  cursor: pointer;
  user-select: none;
  transition: background 0.12s ease, color 0.12s ease;
}
.cs-item:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--white);
}
.cs-item.sel {
  background: rgba(239, 68, 68, 0.14);
  color: var(--accent);
  font-weight: 600;
}

/* Launch Button */
.btn-launch {
  position: relative;
  z-index: 1;
  overflow: hidden;
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 12px 20px;
  border-radius: 10px;
  border: none;
  background: linear-gradient(135deg, #ef4444, #b91c1c);
  color: var(--white);
  font-family: var(--font-display);
  font-size: 14.5px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(239, 68, 68, 0.25);
  transition: transform 0.18s, box-shadow 0.18s;
}
.btn-launch:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 30px rgba(239, 68, 68, 0.36);
}
.btn-launch:disabled { opacity: 0.7; cursor: wait; }

.btn-launch.firing .launch-ring {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.45) 0%, transparent 70%);
  animation: launchWave 0.65s ease-out forwards;
}

@keyframes launchWave {
  from { transform: scale(0.2); opacity: 1; }
  to   { transform: scale(2.4); opacity: 0; }
}

.launch-msg {
  margin-top: 12px;
  padding: 10px 13px;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 500;
}
.launch-msg.success { background: rgba(34, 197, 94, 0.12); border: 1px solid rgba(34, 197, 94, 0.32); color: var(--emerald); }
.launch-msg.error   { background: rgba(239, 68, 68, 0.12); border: 1px solid rgba(239, 68, 68, 0.35); color: #fca5a5; }

/* Active Attacks List */
.attack-list { display: flex; flex-direction: column; gap: 11px; }
.empty-state {
  text-align: center;
  padding: 40px 16px;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.attack-item {
  padding: 14px;
  border-radius: 10px;
  background: #08080c;
  border: 1px solid var(--border);
  transition: border-color 0.2s;
}
.attack-item:hover { border-color: var(--border-bright); }

.atk-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.atk-method {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 6px;
  background: var(--accent-soft);
  color: var(--accent);
}

.atk-target {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--white);
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.atk-stop {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border-radius: 6px;
  border: 1px solid rgba(239, 68, 68, 0.35);
  background: rgba(239, 68, 68, 0.1);
  color: var(--accent);
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
}
.atk-stop:hover { background: rgba(239, 68, 68, 0.22); }

.atk-bar-wrap {
  height: 4px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
  margin-bottom: 8px;
}
.atk-bar {
  height: 100%;
  border-radius: 99px;
  background: var(--accent);
  transition: width 0.5s ease;
}

.atk-meta {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-dim);
}
.atk-rps { color: var(--accent); font-weight: 600; }

/* ══════════════════════════════════════════════════════════════
   PLANS, PAYMENTS, TOOLS, PROFILE, AI, ADMIN
══════════════════════════════════════════════════════════════ */
.plans-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(215px, 1fr));
  gap: 14px;
}
.plan-card {
  border-radius: 14px;
  padding: 24px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  animation: cardStagger 0.4s var(--ease-spring) both;
  animation-delay: calc(var(--i, 0) * 50ms);
}
.plan-card.featured { border-color: rgba(239, 68, 68, 0.55); border-top: 2px solid var(--accent); }
.plan-name { font-family: var(--font-display); font-size: 17px; font-weight: 700; color: var(--white); margin-bottom: 8px; }
.plan-price { display: flex; align-items: baseline; gap: 3px; margin-bottom: 18px; }
.plan-price .currency { color: var(--text-dim); font-size: 15px; }
.plan-price .amount { font-family: var(--font-display); font-size: 30px; font-weight: 700; color: var(--white); }
.plan-price .period { color: var(--text-muted); font-size: 12px; }
.plan-features { list-style: none; display: flex; flex-direction: column; gap: 8px; margin-bottom: 20px; flex: 1; }
.plan-features li { font-size: 13px; color: var(--text-dim); padding-left: 16px; position: relative; }
.plan-features li::before { content: '—'; position: absolute; left: 0; color: var(--accent); }
.plan-btn {
  padding: 9px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--white);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.plan-btn:hover,
.plan-card.featured .plan-btn {
  background: var(--accent);
  border-color: var(--accent);
}

/* Payments */
.payments-body {
  text-align: center;
  padding: 44px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}
.pay-icon-orb {
  width: 68px;
  height: 68px;
  border-radius: 16px;
  background: var(--accent-soft);
  border: 1px solid rgba(239, 68, 68, 0.28);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
}
.payments-body h3 { font-family: var(--font-display); font-size: 20px; color: var(--white); }
.payments-body p { color: var(--text-dim); max-width: 440px; }

/* Tools */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
.tool-input-row { display: flex; gap: 8px; margin-bottom: 12px; }
.tool-select { width: auto; min-width: 86px; }
.btn-tool {
  padding: 10px 16px;
  border-radius: 9px;
  border: none;
  background: var(--accent);
  color: var(--white);
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  flex-shrink: 0;
}
.btn-tool:hover { background: #dc2626; }
.tool-output { min-height: 50px; }
.tool-loading { font-family: var(--font-mono); font-size: 12px; color: var(--accent); }
.tool-err { font-family: var(--font-mono); font-size: 12px; color: var(--danger); }
.tool-result {
  padding: 12px;
  border-radius: 9px;
  background: #07070a;
  border: 1px solid var(--border-dim);
  font-family: var(--font-mono);
  font-size: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.tr-host { color: var(--white); font-weight: 600; margin-bottom: 2px; }
.tr-row { display: flex; gap: 10px; align-items: baseline; }
.tr-label { color: var(--text-muted); min-width: 64px; }
.tr-ok { color: var(--emerald); font-weight: 600; }
.tr-fail { color: var(--danger); font-weight: 600; }
.port-grid { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.port-badge { padding: 3px 8px; border-radius: 6px; font-size: 11px; font-weight: 600; }
.port-badge.open { background: rgba(34, 197, 94, 0.14); color: var(--emerald); border: 1px solid rgba(34, 197, 94, 0.28); }
.port-badge.closed { background: rgba(255, 255, 255, 0.04); color: var(--text-muted); }

/* Profile */
.profile-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
.twofa-section { display: flex; flex-direction: column; gap: 12px; }
.twofa-row { display: flex; justify-content: space-between; align-items: center; padding: 10px 12px; border-radius: 9px; background: rgba(255, 255, 255, 0.025); }
.twofa-badge { font-family: var(--font-mono); font-size: 12px; font-weight: 600; }
.twofa-badge.on { color: var(--emerald); }
.twofa-badge.off { color: var(--danger); }
.twofa-desc { font-size: 13px; color: var(--text-dim); }

/* AI Assistant */
.ai-shell {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 135px);
  border-radius: 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  overflow: hidden;
}
.ai-messages {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.ai-welcome {
  margin: auto;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.ai-welcome-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: var(--accent-soft);
  border: 1px solid rgba(239, 68, 68, 0.28);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}
.ai-welcome-text { font-family: var(--font-display); font-size: 19px; font-weight: 700; color: var(--white); }
.ai-welcome-sub { font-size: 13px; color: var(--text-dim); }

.ai-msg { display: flex; gap: 12px; max-width: 85%; }
.ai-msg.user-msg { align-self: flex-end; flex-direction: row-reverse; }
.ai-avatar {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 13px;
}
.ai-bubble {
  padding: 12px 15px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-dim);
  font-size: 13.5px;
  line-height: 1.6;
}
.user-msg .ai-bubble {
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.28);
}
.ai-bubble pre {
  margin: 8px 0;
  padding: 10px;
  border-radius: 8px;
  background: #050507;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 12px;
}
.ai-thinking { display: flex; gap: 5px; padding: 4px 2px; }
.ai-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); animation: pulseBeacon 1s infinite; }
.ai-dot:nth-child(2) { animation-delay: 0.2s; }
.ai-dot:nth-child(3) { animation-delay: 0.4s; }

.ai-input-wrap {
  padding: 14px 18px;
  border-top: 1px solid var(--border-dim);
  background: rgba(7, 7, 10, 0.85);
}
.ai-model-row { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.ai-textarea-row { display: flex; gap: 10px; align-items: flex-end; }
.ai-textarea { resize: none; min-height: 52px; }
.ai-send-btn {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  border: none;
  background: var(--accent);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}
.ai-send-btn:hover { background: #dc2626; }

/* Admin */
.admin-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}
.admin-tab {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-dim);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.admin-tab.active {
  background: var(--accent-soft);
  border-color: rgba(239, 68, 68, 0.38);
  color: var(--accent);
}
.tab-badge {
  font-family: var(--font-mono);
  font-size: 10.5px;
  padding: 1px 6px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.08);
}
.admin-tab-pane { display: none; }
.admin-tab-pane.active { display: block; animation: pageIn 0.22s ease both; }

.admin-list { display: flex; flex-direction: column; gap: 10px; }
.admin-agent-row,
.admin-user-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 10px;
  background: #08080c;
  border: 1px solid var(--border-dim);
}
.admin-status-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--text-muted); }
.admin-status-dot.online { background: var(--emerald); box-shadow: 0 0 8px var(--emerald); }
.admin-agent-host, .admin-user-name { font-weight: 600; color: var(--white); }
.admin-agent-url { font-family: var(--font-mono); font-size: 12px; color: var(--text-dim); flex: 1; }
.admin-agent-time, .admin-user-meta { font-family: var(--font-mono); font-size: 11.5px; color: var(--text-muted); }
.admin-user-info { display: flex; align-items: center; gap: 8px; min-width: 140px; }
.admin-user-sub { display: flex; align-items: center; gap: 10px; flex: 1; }
.admin-user-plan { font-family: var(--font-mono); font-size: 11.5px; color: var(--accent); }
.admin-user-actions { display: flex; gap: 6px; }
.admin-role-badge {
  font-family: var(--font-mono);
  font-size: 10px;
  padding: 2px 7px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  color: var(--text-dim);
}
.admin-role-badge.admin { background: var(--accent-soft); border-color: rgba(239, 68, 68, 0.35); color: var(--accent); }
.admin-role-badge.pending { background: rgba(251, 191, 36, 0.14); color: var(--warn); border-color: rgba(251, 191, 36, 0.32); }
.reset-tok-pill {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 2px 7px;
  border-radius: 6px;
}

/* ══════════════════════════════════════════════════════════════
   RESPONSIVE BREAKPOINTS
══════════════════════════════════════════════════════════════ */
@media (max-width: 1040px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .dash-mid-grid,
  .panel-grid { grid-template-columns: 1fr; }
}

@media (max-width: 820px) {
  .landing-nav-links { display: none; }
  .landing-features { grid-template-columns: 1fr; }
  .login-shell { grid-template-columns: 1fr; max-width: 410px; }
  .login-aside { display: none; }

  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    transform: translateX(-105%);
    transition: transform 0.25s var(--ease-spring);
  }
  .sidebar.open { transform: translateX(0); }
  .sidebar-close-btn,
  .mobile-menu-btn { display: inline-flex; }

  .tools-grid,
  .profile-grid { grid-template-columns: 1fr; }
  .dash-hero { flex-direction: column; align-items: flex-start; }
  .topbar { padding: 13px 16px; }
  .page { padding: 16px; }
  .clock-pill { display: none; }
}

@media (max-width: 520px) {
  .stats-grid { grid-template-columns: 1fr; }
  .landing-tg-link span { display: none; }
  .hero-section { padding: 72px 0 56px; }
}
