/* ==========================================================================
   EasySchool - Modern Dark Design System
   Theme: Obsidian Dark + Pure White Typography & Actions
   Accent: Electric Blue strictly reserved for Brand Titles & Logo
   ========================================================================== */

:root {
  /* Surface Palette */
  --bg-canvas: #09090b;
  --bg-subtle: #0f1015;
  --bg-card: #14151c;
  --bg-card-hover: #191b24;
  --bg-card-active: #1e202b;
  --bg-input: #101117;
  --bg-nav: rgba(9, 9, 11, 0.88);

  /* Border Tokens */
  --border-subtle: rgba(255, 255, 255, 0.06);
  --border: rgba(255, 255, 255, 0.12);
  --border-hover: rgba(255, 255, 255, 0.22);
  --border-focus: #ffffff;

  /* Typography Tokens */
  --text-primary: #ffffff;
  --text-secondary: #f4f4f6;
  --text-muted: #a1a1aa;
  --text-dim: #71717a;

  /* ACCENT: Electric Blue: Strictly applied to Titles, Brand Names & Logo */
  --brand-blue: #38bdf8;
  --brand-blue-deep: #0284c7;
  --brand-blue-glow: rgba(56, 189, 248, 0.25);

  /* Semantic Feedback */
  --emerald: #10b981;
  --emerald-bg: rgba(16, 185, 129, 0.1);
  --emerald-border: rgba(16, 185, 129, 0.25);

  --rose: #f43f5e;
  --rose-bg: rgba(244, 63, 94, 0.1);
  --rose-border: rgba(244, 63, 94, 0.25);

  --amber: #f59e0b;
  --amber-bg: rgba(245, 158, 11, 0.1);

  /* Shape & Elevation */
  --radius-xs: 6px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.55);
  --shadow-lg: 0 20px 48px rgba(0, 0, 0, 0.7);

  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Inter, Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", "Cascadia Code", Consolas, Menlo, monospace;
}

/* Base Reset & Typography */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--bg-canvas);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: var(--bg-canvas);
  color: var(--text-primary);
}

/* Scrollbars */
* { scrollbar-width: thin; scrollbar-color: #272836 transparent; }
*::-webkit-scrollbar { width: 8px; height: 8px; }
*::-webkit-scrollbar-thumb { background: #272836; border-radius: 4px; }
*::-webkit-scrollbar-thumb:hover { background: #3c3d52; }
*::-webkit-scrollbar-track { background: transparent; }

/* Links */
a {
  color: var(--text-primary);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--border);
  transition: text-decoration-color .15s ease, color .15s ease;
}
a:hover {
  text-decoration-color: var(--text-primary);
}
a.btn, .brand, .nav-links a, .foot-col a, .tab-btn {
  text-decoration: none;
}

/* Layout Containers */
.container {
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
}
.narrow,
.container-narrow {
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
}
.container-auth {
  width: 100%;
  max-width: 460px;
  margin: 0 auto;
}
.muted { color: var(--text-muted); }
.lead { font-size: 18px; color: var(--text-muted); line-height: 1.6; }
.mono { font-family: var(--font-mono); }
.skip-link {
  position: absolute;
  top: -100px;
  left: 20px;
  background: #ffffff;
  color: #09090b;
  padding: 8px 14px;
  font-weight: 600;
  border-radius: var(--radius-xs);
  z-index: 999;
}
.skip-link:focus {
  top: 15px;
}

/* BRAND TITLE ACCENTS - Strictly electric blue */
.brand-hl,
.title-blue,
.brand span b,
h1 .hl,
h2 .hl,
.section-title .hl {
  color: var(--brand-blue);
  text-shadow: 0 0 24px var(--brand-blue-glow);
}

/* Header & Navigation */
header.site {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-nav);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
}
.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
  gap: 20px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.3px;
  color: var(--text-primary);
  flex-shrink: 0;
}
.brand-logo-img {
  width: 30px;
  height: 30px;
  border-radius: var(--radius-sm);
  display: block;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: 16px;
}
.nav-links a {
  color: var(--text-muted);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  transition: color .15s, background-color .15s;
}
.nav-links a:hover {
  color: var(--text-primary);
  background: var(--bg-card);
}
.nav-links a.active {
  color: var(--text-primary);
  background: var(--bg-card);
  font-weight: 600;
}
.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

/* Mobile Hamburger Toggle */
.mobile-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-primary);
  padding: 8px;
  border-radius: var(--radius-sm);
  cursor: pointer;
}
.mobile-toggle svg { width: 20px; height: 20px; display: block; }
.mobile-menu {
  display: none;
  padding: 16px 24px 20px;
  background: var(--bg-canvas);
  border-bottom: 1px solid var(--border);
}
.mobile-menu.open { display: block; }
.mobile-menu a {
  display: block;
  padding: 10px 0;
  color: var(--text-muted);
  font-size: 15px;
  border-bottom: 1px solid var(--border-subtle);
}
.mobile-menu a:hover, .mobile-menu a.active { color: var(--text-primary); }

/* Language Dropdown */
.lang-dropdown { position: relative; }
.lang-dropdown summary {
  list-style: none;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
  padding: 7px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-card);
  display: flex;
  align-items: center;
  gap: 6px;
  transition: border-color .15s, color .15s;
}
.lang-dropdown summary::-webkit-details-marker { display: none; }
.lang-dropdown summary:hover, .lang-dropdown[open] summary {
  color: var(--text-primary);
  border-color: var(--border-hover);
}
.lang-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 6px;
  min-width: 140px;
  box-shadow: var(--shadow-md);
  z-index: 120;
}
.lang-menu a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: var(--radius-xs);
  color: var(--text-muted);
  font-size: 13.5px;
  font-weight: 500;
}
.lang-flag {
  display: inline-block;
  vertical-align: middle;
  border-radius: 2px;
  box-shadow: 0 0 1px rgba(255, 255, 255, 0.35);
  flex-shrink: 0;
}
.nav-discord-link {
  color: #8ea1e1 !important;
  font-weight: 600 !important;
}
.nav-discord-link:hover {
  color: #b8c4f0 !important;
}
.lang-menu a:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
}
.lang-menu a.active {
  color: var(--text-primary);
  background: var(--bg-card-hover);
  font-weight: 600;
}

/* BUTTONS - Modern High-Contrast White Primary & Sleek Dark Secondary */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-primary);
  transition: all .15s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
}
.btn:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-hover);
  color: #ffffff;
  transform: translateY(-1px);
}
.btn:active {
  transform: translateY(0);
}
.btn-sm,
.btn.small {
  padding: 7px 13px;
  font-size: 13px;
  border-radius: var(--radius-xs);
}
.btn-lg {
  padding: 13px 28px;
  font-size: 15px;
  border-radius: var(--radius-md);
}
.oauth-btn {
  width: 100%;
}

/* Primary Button: Solid Crisp White */
.btn-primary {
  background: #ffffff;
  border-color: #ffffff;
  color: #09090b;
  font-weight: 600;
  box-shadow: 0 4px 14px rgba(255, 255, 255, 0.12);
}
.btn-primary:hover {
  background: #eaeaea;
  border-color: #eaeaea;
  color: #000000;
  box-shadow: 0 6px 20px rgba(255, 255, 255, 0.22);
}

/* Ghost Button */
.btn-ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--text-secondary);
}
.btn-ghost:hover {
  background: var(--bg-card);
  border-color: var(--border-hover);
  color: var(--text-primary);
}

/* Danger Button */
.btn-danger {
  background: var(--rose-bg);
  border-color: var(--rose-border);
  color: #fda4af;
}
.btn-danger:hover {
  background: rgba(244, 63, 94, 0.2);
  border-color: #f43f5e;
  color: #ffffff;
}

.btn svg { width: 16px; height: 16px; flex-shrink: 0; }
.btn:disabled, .btn.loading {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none !important;
  pointer-events: none;
}
.spinner {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(0, 0, 0, 0.25);
  border-top-color: #000000;
  border-radius: 50%;
  animation: spin 0.65s linear infinite;
  display: inline-block;
}
.btn:not(.btn-primary) .spinner {
  border-color: rgba(255, 255, 255, 0.25);
  border-top-color: #ffffff;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Main Content Wrapper */
main {
  flex: 1;
  padding: 44px 0 80px;
}
.section {
  margin-bottom: 64px;
}
.section-header {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 40px;
}
.section-title {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.6px;
  margin-bottom: 10px;
  color: var(--text-primary);
}
.section-sub {
  font-size: 16px;
  color: var(--text-muted);
  line-height: 1.6;
}

/* Eyebrow Pill */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  background: var(--bg-card);
  border: 1px solid var(--border);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 24px;
}
.eyebrow-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--brand-blue);
  box-shadow: 0 0 10px var(--brand-blue);
}

/* Hero Section */
.hero {
  text-align: center;
  padding: 40px 0 48px;
}
.hero-content {
  max-width: 860px;
  margin: 0 auto;
}
h1.hero-title {
  font-size: 52px;
  line-height: 1.1;
  letter-spacing: -1.4px;
  font-weight: 800;
  margin-bottom: 20px;
}
p.hero-lead {
  font-size: 19px;
  color: var(--text-muted);
  line-height: 1.6;
  max-width: 660px;
  margin: 0 auto 34px;
}
.hero-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}

/* Interactive Windows Floating Bar Preview */
.interactive-preview {
  margin-top: 50px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  text-align: left;
}
.preview-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  background: var(--bg-subtle);
  border-bottom: 1px solid var(--border-subtle);
}
.preview-window-controls {
  display: flex;
  gap: 7px;
}
.window-circle {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #272836;
}
.preview-status {
  font-size: 12px;
  color: var(--text-dim);
  font-weight: 600;
  font-family: var(--font-mono);
}
.preview-tabs {
  display: flex;
  background: var(--bg-subtle);
  padding: 6px 14px;
  gap: 8px;
  border-bottom: 1px solid var(--border-subtle);
  overflow-x: auto;
}
.tab-btn {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  padding: 6px 12px;
  border-radius: var(--radius-xs);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all .15s;
}
.tab-btn:hover {
  color: var(--text-primary);
  background: var(--bg-card);
}
.tab-btn.active {
  color: var(--text-primary);
  background: var(--bg-card);
  border-color: var(--border);
}
.preview-screen {
  padding: 24px;
}
.preview-input-container {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-family: var(--font-mono);
  font-size: 14px;
}
.preview-input-container svg { width: 18px; height: 18px; color: var(--text-muted); flex-shrink: 0; }
.preview-input-text { color: var(--text-primary); flex: 1; }
.preview-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 4px 9px;
  border-radius: var(--radius-xs);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-secondary);
}
.preview-output-card {
  margin-top: 18px;
  padding: 18px 20px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  font-size: 14.5px;
  line-height: 1.6;
}
.preview-output-title {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-dim);
  font-weight: 700;
  margin-bottom: 8px;
}

/* Feature Cards Grid */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 26px;
  transition: border-color .15s, transform .15s;
}
.feature-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
}
.feature-icon-box {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}
.feature-icon-box svg { width: 22px; height: 22px; color: var(--text-primary); }
.feature-card h4 {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}
.feature-card p {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.55;
}

/* Cards (Standard SaaS Container) */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 28px;
  box-shadow: var(--shadow-sm);
}
.card + .card { margin-top: 22px; }
.card-header-flex {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.card h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}
.card p {
  color: var(--text-muted);
  font-size: 14.5px;
  line-height: 1.6;
}

/* PRICING SECTION - 4 Tiers */
.plans,
.plans-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  align-items: stretch;
}
.plan,
.plan-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 28px 22px;
  transition: border-color .15s, transform .15s, box-shadow .15s;
}
.plan:hover,
.plan-card:hover {
  border-color: var(--border-hover);
}
.plan.best,
.plan.highlight,
.plan-card.highlight {
  border-color: #ffffff;
  box-shadow: 0 0 0 1px #ffffff, var(--shadow-md);
}
.plan .tag,
.plan-badge {
  position: absolute;
  top: -11px;
  left: 20px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: #ffffff;
  color: #09090b;
  padding: 4px 11px;
  border-radius: var(--radius-full);
}
.plan .name,
.plan-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.plan .price,
.plan-price {
  font-size: 38px;
  font-weight: 800;
  letter-spacing: -1px;
  color: var(--text-primary);
  margin-bottom: 2px;
}
.plan .per,
.plan-interval {
  font-size: 13px;
  color: var(--text-dim);
  margin-bottom: 20px;
}
.plan-features {
  list-style: none;
  padding: 0;
  margin: 0 0 26px;
  flex-grow: 1;
}
.plan-features li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13.5px;
  color: var(--text-muted);
  margin-bottom: 11px;
}
.plan-features li svg {
  width: 16px;
  height: 16px;
  color: var(--emerald);
  flex-shrink: 0;
  margin-top: 3px;
}
.plan-cta-wrap {
  margin-top: auto;
}
.plan-cta-wrap .btn {
  width: 100%;
}

/* Standalone Add-on Banner */
.addon-banner {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 28px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  margin-top: 28px;
}

/* DASHBOARD PORTAL */
.dash-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 22px;
}
.stats-cards-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 20px;
}
.stat-pill-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px 18px;
}
.stat-pill-label {
  font-size: 12px;
  color: var(--text-dim);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}
.stat-pill-val {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
}

/* Monospace Access Code Box & Code helpers */
.access-code {
  background: var(--bg-input);
  border: 1px dashed var(--border-hover);
  border-radius: var(--radius-md);
  padding: 18px;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 4px;
  color: #ffffff;
  user-select: all;
  margin: 12px 0;
}
.access-code-box {
  background: var(--bg-input);
  border: 1px dashed var(--border-hover);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 2px;
  word-break: break-all;
  line-height: 1.45;
  color: #ffffff;
  margin: 12px 0;
  cursor: pointer;
  filter: blur(8px);
  user-select: none;
  transition: filter 0.2s ease, border-color 0.2s ease;
  position: relative;
}
.access-code-box:hover {
  border-color: var(--accent);
}
.access-code-box.revealed {
  filter: none;
  user-select: all;
}
.code {
  font-family: var(--font-mono);
  background: var(--bg-input);
  border: 1px solid var(--border);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: #ffffff;
}
.code-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.kv,
.key-val-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 11px 0;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 14px;
}
.kv:last-child,
.key-val-row:last-child { border-bottom: none; }
.kv span:first-child,
.key-val-row span:first-child { color: var(--text-muted); }
.kv span:last-child,
.key-val-row span:last-child { font-weight: 600; color: var(--text-primary); }

/* Status Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
  border: 1px solid transparent;
}
.badge .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}
.badge.active,
.badge-active {
  background: var(--emerald-bg);
  border-color: var(--emerald-border);
  color: #6ee7b7;
}
.badge.active .dot,
.badge-active .dot { background: var(--emerald); }
.badge.expired,
.badge-expired {
  background: var(--rose-bg);
  border-color: var(--rose-border);
  color: #fca5a5;
}
/* Dashboard Navigation Tabs */
.dash-tabs-bar {
  display: flex;
  gap: 6px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 24px;
  overflow-x: auto;
  padding-bottom: 2px;
}
.dash-tab-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: transparent;
  border: 1px solid transparent;
  border-bottom: 2px solid transparent;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: all 0.15s ease;
  font-family: inherit;
}
.dash-tab-link:hover {
  color: var(--text-primary);
  background: var(--bg-subtle);
  text-decoration: none;
}
.dash-tab-link.active {
  color: #ffffff;
  background: var(--bg-card);
  border-color: var(--border) var(--border) transparent var(--border);
  border-bottom: 2px solid var(--brand-blue);
  text-decoration: none;
}
.dash-tab-panel {
  display: none;
}
.dash-tab-panel.active {
  display: block;
  animation: fadeInTab 0.15s ease;
}
@keyframes fadeInTab {
  from { opacity: 0; transform: translateY(3px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Danger Zone Card */
.danger-zone-card {
  border: 1px solid var(--rose-border);
  background: rgba(244, 63, 94, 0.04);
  border-radius: var(--radius-md);
  padding: 24px;
}

/* Custom UI Confirmation Modal */
.custom-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(4, 5, 8, 0.78);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 10000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease;
}
.custom-modal-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}
.custom-modal-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg), 0 0 0 1px rgba(255, 255, 255, 0.04);
  width: 100%;
  max-width: 440px;
  padding: 24px 26px;
  transform: scale(0.95) translateY(8px);
  transition: transform 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}
.custom-modal-backdrop.open .custom-modal-card {
  transform: scale(1) translateY(0);
}
.custom-modal-icon-box {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.25);
  color: var(--brand-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}
.custom-modal-icon-box.danger {
  background: var(--rose-bg);
  border-color: var(--rose-border);
  color: var(--rose);
}
.custom-modal-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
  line-height: 1.3;
}
.custom-modal-msg {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.55;
  margin-bottom: 22px;
}
.custom-modal-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

/* Dedicated Trial Callout Box */
.trial-card {
  background: linear-gradient(180deg, rgba(56, 189, 248, 0.08) 0%, rgba(20, 21, 28, 0.95) 100%);
  border: 1px solid rgba(56, 189, 248, 0.28);
  border-radius: var(--radius-md);
  padding: 24px 26px;
  margin-bottom: 22px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

/* Tables */
.table-responsive {
  width: 100%;
  overflow-x: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
th, td {
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-subtle);
}
th {
  color: var(--text-dim);
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
td { color: var(--text-secondary); }

/* FORMS & INPUTS */
.form,
.form-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 32px 30px;
  box-shadow: var(--shadow-md);
}
.form-page {
  display: flex;
  justify-content: center;
  padding: 40px 0;
}
.field,
.form-field {
  margin-bottom: 18px;
}
.field label,
.form-field label {
  display: block;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 7px;
}
.field input, .form-field input,
.field textarea, .form-field textarea,
.field select, .form-field select {
  width: 100%;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-input);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 14.5px;
  outline: none;
  transition: border-color .15s, background-color .15s;
}
.field input:focus, .form-field input:focus,
.field textarea:focus, .form-field textarea:focus {
  border-color: #ffffff;
  background-color: var(--bg-canvas);
}
.field-hint,
.form-field .field-hint {
  font-size: 12px;
  color: var(--text-dim);
  margin-top: 5px;
}
.consent,
.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  color: var(--text-muted);
  cursor: pointer;
  margin: 10px 0 18px;
}
.consent input,
.checkbox-label input {
  margin-top: 3px;
  accent-color: #ffffff;
}
.divider,
.form-divider {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--text-dim);
  font-size: 12px;
  margin: 22px 0;
}
.divider::before, .divider::after,
.form-divider::before, .form-divider::after {
  content: "";
  height: 1px;
  background: var(--border-subtle);
  flex: 1;
}

/* System Alerts */
.alert {
  padding: 13px 16px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  margin-bottom: 20px;
  border: 1px solid;
}
.alert.error,
.alert-error {
  background: var(--rose-bg);
  border-color: var(--rose-border);
  color: #fda4af;
}
.alert.success,
.alert-success {
  background: var(--emerald-bg);
  border-color: var(--emerald-border);
  color: #6ee7b7;
}
.alert.info,
.alert-info {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--border);
  color: var(--text-secondary);
}

/* Step Guides */
.steps,
.step-list { counter-reset: step-idx; }
.step,
.step-item {
  position: relative;
  padding-left: 52px;
  margin-bottom: 24px;
}
.step::before,
.step-item::before {
  counter-increment: step-idx;
  content: counter(step-idx);
  position: absolute;
  left: 0;
  top: 0;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--bg-input);
  border: 1px solid var(--border);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
}
.step-item h4 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 4px;
}
.step-item p {
  color: var(--text-muted);
  font-size: 14px;
}

/* Hotkey Badges */
kbd {
  display: inline-block;
  padding: 2px 7px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}

/* Footer */
footer.site {
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-subtle);
  padding: 56px 0 36px;
  margin-top: 60px;
}
.foot-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 40px;
}
.foot-col h5 {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  margin-bottom: 16px;
}
.foot-col a {
  display: block;
  color: var(--text-muted);
  font-size: 14px;
  padding: 4px 0;
}
.foot-col a:hover {
  color: var(--text-primary);
}
.foot-bottom {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--text-dim);
}

/* Cookie Notice Banner */
.cookie-banner {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 18px;
  max-width: 680px;
  width: calc(100% - 32px);
  box-shadow: var(--shadow-lg);
  z-index: 300;
  font-size: 13.5px;
  color: var(--text-muted);
}
.cookie-banner[hidden] { display: none; }

/* Toast Notification */
.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translate(-50%, 20px);
  background: #ffffff;
  color: #09090b;
  font-size: 13.5px;
  font-weight: 600;
  padding: 10px 22px;
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s, transform .2s;
  z-index: 400;
  display: flex;
  align-items: center;
  gap: 8px;
}
.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* Status Strip (Kill Switch) */
.status-strip {
  background: #2b1114;
  color: #fecaca;
  border-bottom: 1px solid #7f1d1d;
  font-size: 13.5px;
  text-align: center;
  padding: 9px 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.status-strip-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--rose);
  flex-shrink: 0;
}

/* Legal Pages */
.narrow { max-width: 800px; }
.legal h2 { font-size: 20px; font-weight: 700; color: var(--text-primary); margin: 32px 0 10px; }
.legal h3 { font-size: 16px; font-weight: 600; color: var(--text-primary); margin: 24px 0 8px; }
.legal p, .legal li { color: var(--text-muted); font-size: 14.5px; line-height: 1.7; margin-bottom: 12px; }
.legal ul { padding-left: 22px; margin-bottom: 16px; }
.legal .meta { color: var(--text-dim); font-size: 13px; margin-bottom: 24px; }

/* Responsive Breakpoints */
@media (max-width: 1080px) {
  .plans-grid { grid-template-columns: repeat(2, 1fr); }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .dash-grid { grid-template-columns: 1fr; }
  .foot-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}

@media (max-width: 768px) {
  .nav-links, .nav-actions .btn-ghost { display: none; }
  .mobile-toggle { display: block; }
  h1.hero-title { font-size: 36px; }
  .plans-grid { grid-template-columns: 1fr; }
  .feature-grid { grid-template-columns: 1fr; }
  .stats-cards-row { grid-template-columns: 1fr; }
  .foot-grid { grid-template-columns: 1fr; }
  .container { padding: 0 18px; }
}

/* Keep hotkey combos (kbd + kbd) on one line instead of wrapping like "Alt +\nS" */
kbd { white-space: nowrap; }
.nobr, .hotkey-combo {
  white-space: nowrap !important;
  display: inline-block;
}
.table-responsive td:first-child,
.table-responsive th:first-child {
  white-space: nowrap !important;
}

/* ==========================================================================
   Hero Side-by-Side & Interactive 3D Showcase
   ========================================================================== */
.hero-side-by-side {
  padding: 60px 0 70px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  align-items: center;
  gap: 40px;
}

.hero-grid .hero-content {
  max-width: 540px;
  text-align: left;
}

.hero-grid .hero-title {
  font-size: 46px;
  line-height: 1.15;
  letter-spacing: -1.2px;
  font-weight: 800;
  margin-bottom: 18px;
}

.hero-grid .hero-lead {
  font-size: 17.5px;
  color: var(--text-muted);
  line-height: 1.6;
  margin: 0 0 32px;
}

.hero-grid .hero-cta {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 14px;
  flex-wrap: wrap;
}

.hero-foot-note {
  font-size: 12px;
  color: var(--text-dim);
  margin-top: 26px;
  letter-spacing: 0.04em;
}

.showcase-container {
  max-width: 560px;
  width: 100%;
  margin: 0 0 0 auto;
  perspective: 1400px;
}

.showcase-tilt {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: var(--bg-card);
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.8), 0 0 45px rgba(56, 189, 248, 0.15);
  transform-style: preserve-3d;
  transition: transform 0.15s cubic-bezier(0.2, 0, 0.2, 1), box-shadow 0.25s ease;
  will-change: transform;
  cursor: pointer;
}

.showcase-tilt:hover {
  box-shadow: 0 35px 80px -15px rgba(0, 0, 0, 0.9), 0 0 65px rgba(56, 189, 248, 0.28);
}

.showcase-img {
  width: 100%;
  height: auto;
  display: block;
  user-select: none;
  pointer-events: none;
}

.showcase-glare {
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: var(--radius-md);
  background: radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.18) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.25s ease;
}

@media (max-width: 960px) {
  .hero-side-by-side {
    padding: 40px 0 50px;
  }
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 36px;
    text-align: center;
  }
  .hero-grid .hero-content {
    margin: 0 auto;
    text-align: center;
  }
  .hero-grid .hero-title {
    font-size: 38px;
  }
  .hero-grid .hero-lead {
    margin: 0 auto 28px;
  }
  .hero-grid .hero-cta {
    justify-content: center;
  }
  .showcase-container {
    margin: 0 auto;
    max-width: 500px;
  }
}

kbd {
  display: inline-block;
  white-space: nowrap !important;
}

.table-responsive table td:first-child {
  white-space: nowrap !important;
}

.nobr, .hotkey-combo {
  white-space: nowrap !important;
  display: inline-block;
}
