/**
 * app.css — ClickShield Design System v4.0
 * Modern Corporate · Geometric · Confident
 */

/* ============================================================
   FONTS
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;0,9..40,800;1,9..40,400&family=DM+Mono:wght@400;500&display=swap');

/* ============================================================
   DESIGN TOKENS
   ============================================================ */
:root {
  /* Fonts */
  --font-display: 'DM Sans', system-ui, -apple-system, sans-serif;
  --font-body:    'DM Sans', system-ui, -apple-system, sans-serif;
  --font-mono:    'DM Mono', ui-monospace, monospace;

  /* Brand — Deep Teal */
  --brand-50:  #e6faf8;
  --brand-100: #b0f0e8;
  --brand-200: #5cdfd0;
  --brand-300: #08cfc0;
  --brand-400: #00bead;
  --brand-500: #009d8f;
  --brand-600: #007c71;
  --brand-700: #005b52;
  --brand-800: #003c36;
  --brand-900: #001f1c;

  /* Neutral */
  --n0:   #ffffff;
  --n50:  #f7f9fc;
  --n100: #eef2f7;
  --n150: #e4eaf3;
  --n200: #d8e0ed;
  --n300: #b8c4d8;
  --n400: #8a9ab5;
  --n500: #5f718f;
  --n600: #3f526e;
  --n700: #293650;
  --n800: #182033;
  --n900: #0c1420;
  --n950: #060c15;

  /* Status */
  --success:        #0ea572;
  --success-soft:   #f0fdf9;
  --success-border: #6ee7c7;
  --warning:        #f59e0b;
  --warning-soft:   #fffbeb;
  --warning-border: #fcd34d;
  --danger:         #f03d3d;
  --danger-soft:    #fff1f1;
  --danger-border:  #fca5a5;
  --info:           #3b82f6;
  --info-soft:      #eff6ff;
  --info-border:    #93c5fd;

  /* Public Layer */
  --pub-bg:      #ffffff;
  --pub-surface: #ffffff;
  --pub-border:  rgba(12,20,32,.09);
  --pub-text:    #0c1420;
  --pub-muted:   #3f526e;
  --pub-subtle:  #8a9ab5;

  /* Panel Layer */
  --pan-sidebar-bg:    #070e1c;
  --pan-sidebar-bdr:   rgba(255,255,255,.07);
  --pan-sidebar-text:  #c2d3ee;
  --pan-sidebar-muted: #3d5270;
  --pan-bg:            #edf1f8;
  --pan-surface:       #ffffff;
  --pan-border:        #dde4ef;

  /* Admin Layer */
  --adm-sidebar-bg: #0d0818;
  --adm-accent:     #e03030;

  /* Layout */
  --sidebar-w:  272px;
  --topbar-h:   64px;

  /* Radius */
  --r-xs:   4px;
  --r-sm:   8px;
  --r-md:   12px;
  --r-lg:   16px;
  --r-xl:   22px;
  --r-2xl:  30px;
  --r-3xl:  44px;
  --r-full: 9999px;

  /* Shadows */
  --shadow-xs:    0 1px 3px rgba(6,12,21,.06), 0 1px 2px rgba(6,12,21,.04);
  --shadow-sm:    0 2px 10px rgba(6,12,21,.08), 0 1px 4px rgba(6,12,21,.05);
  --shadow-md:    0 8px 30px rgba(6,12,21,.10), 0 3px 9px rgba(6,12,21,.06);
  --shadow-lg:    0 22px 70px rgba(6,12,21,.14), 0 8px 24px rgba(6,12,21,.07);
  --shadow-xl:    0 40px 110px rgba(6,12,21,.20), 0 16px 48px rgba(6,12,21,.10);
  --shadow-brand: 0 8px 36px rgba(0,158,142,.38);
  --shadow-glow:  0 0 0 3px rgba(0,190,173,.18);

  /* Motion */
  --ease:      cubic-bezier(.22,.68,0,1.2);
  --ease-out:  cubic-bezier(0,0,.2,1);
  --dur-fast:  .12s;
  --dur:       .20s;
  --dur-slow:  .36s;

  /* Compatibility aliases — used by page-level CSS files */
  --ui-border:      rgba(216, 224, 237, 0.95);
  --ui-gap:         20px;
  --ui-gap-lg:      28px;
  --ui-shadow-soft: 0 4px 16px rgba(15, 23, 42, .06);
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.65;
  color: var(--pub-text);
  background: var(--pub-bg);
}

a { text-decoration: none; color: inherit; }
img { display: block; max-width: 100%; }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  line-height: 1.1;
  letter-spacing: -.03em;
  color: var(--n900);
}

p { color: var(--pub-muted); line-height: 1.75; }

code, .mono {
  font-family: var(--font-mono);
  font-size: .82rem;
}

code {
  display: inline-block;
  padding: 2px 9px;
  border-radius: var(--r-sm);
  background: var(--n100);
  border: 1px solid var(--pub-border);
  color: var(--brand-700);
  word-break: break-all;
}

/* ============================================================
   UTILITIES
   ============================================================ */
.container { width: min(1200px, calc(100% - 48px)); margin: 0 auto; }
.narrow    { width: min(480px,  calc(100% - 48px)); margin: 0 auto; }

.muted  { color: var(--pub-muted); }
.subtle { color: var(--pub-subtle); }

.mt-4  { margin-top: 4px; }   .mt-8  { margin-top: 8px; }
.mt-12 { margin-top: 12px; }  .mt-16 { margin-top: 16px; }
.mt-20 { margin-top: 20px; }  .mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }  .mt-40 { margin-top: 40px; }

.top-gap    { margin-top: 24px; }
.top-gap-sm { margin-top: 12px; }
.top-gap-lg { margin-top: 40px; }

.stack    { display: grid; gap: 16px; }
.stack-sm { display: grid; gap: 10px; }
.stack-lg { display: grid; gap: 24px; }
.stack.compact { gap: 8px; }

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

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

.gap-8  { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }

.text-center { text-align: center; }
.text-right  { text-align: right; }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 24px;
  border-radius: var(--r-md);
  font-family: var(--font-body);
  font-size: .875rem;
  font-weight: 600;
  letter-spacing: .008em;
  border: 1.5px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: all var(--dur) var(--ease-out);
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}

.btn:active { transform: scale(.976); }

/* Primary */
.btn-primary {
  background: linear-gradient(135deg, var(--brand-600) 0%, var(--brand-400) 100%);
  border-color: var(--brand-500);
  color: #fff;
  box-shadow: 0 4px 20px rgba(0,158,142,.30), 0 1px 5px rgba(0,158,142,.18);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 36px rgba(0,158,142,.42), 0 2px 10px rgba(0,158,142,.24);
  background: linear-gradient(135deg, var(--brand-500) 0%, var(--brand-300) 100%);
}

/* Secondary */
.btn-secondary {
  background: #fff;
  border-color: var(--n200);
  color: var(--n700);
  box-shadow: var(--shadow-xs);
}

.btn-secondary:hover {
  border-color: var(--brand-300);
  color: var(--brand-600);
  background: var(--brand-50);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

/* Ghost */
.btn-ghost {
  background: transparent;
  border-color: transparent;
  color: var(--n600);
}

.btn-ghost:hover {
  background: var(--n100);
  color: var(--n900);
}

/* Danger */
.btn-danger {
  background: linear-gradient(135deg, var(--danger) 0%, #f87171 100%);
  border-color: #f87171;
  color: #fff;
  box-shadow: 0 4px 18px rgba(240,61,61,.28);
}

.btn-danger:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 28px rgba(240,61,61,.38);
}

.btn-danger-outline {
  background: transparent;
  border-color: rgba(240,61,61,.36);
  color: var(--danger);
}

.btn-danger-outline:hover {
  background: rgba(240,61,61,.08);
  border-color: rgba(240,61,61,.6);
  color: var(--danger);
}

/* Sizes */
.btn-sm  { padding: 7px 16px; font-size: .82rem; border-radius: var(--r-sm); }
.btn-lg  { padding: 14px 32px; font-size: .95rem; border-radius: var(--r-lg); }
.btn-xl  { padding: 17px 44px; font-size: 1.02rem; border-radius: var(--r-xl); }
.btn-full { width: 100%; justify-content: center; margin-top: 16px; }

/* Panel white */
.btn-panel-white {
  background: rgba(255,255,255,.12);
  border: 1.5px solid rgba(255,255,255,.20);
  color: #fff;
  backdrop-filter: blur(8px);
}

.btn-panel-white:hover {
  background: rgba(255,255,255,.20);
  border-color: rgba(255,255,255,.34);
  transform: translateY(-1px);
}

/* ============================================================
   BADGES
   ============================================================ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: var(--r-full);
  font-size: .70rem;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.badge-success  { background: var(--success-soft);  color: #065f46;  border: 1px solid var(--success-border); }
.badge-warning  { background: var(--warning-soft);  color: #92400e;  border: 1px solid var(--warning-border); }
.badge-danger   { background: var(--danger-soft);   color: #991b1b;  border: 1px solid var(--danger-border);  }
.badge-info     { background: var(--info-soft);     color: #1d4ed8;  border: 1px solid var(--info-border);    }
.badge-neutral  { background: var(--n100);          color: var(--n600); border: 1px solid var(--n200);        }
.badge-brand    { background: var(--brand-50);      color: var(--brand-700); border: 1px solid var(--brand-200); }
.badge-allow    { background: var(--success-soft);  color: #065f46;  border: 1px solid var(--success-border); }
.badge-challenge { background: var(--warning-soft); color: #92400e;  border: 1px solid var(--warning-border); }
.badge-deny     { background: var(--danger-soft);   color: #991b1b;  border: 1px solid var(--danger-border);  }

/* ============================================================
   ALERTS
   ============================================================ */
.alert {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-radius: var(--r-lg);
  font-size: .875rem;
  font-weight: 500;
  margin: 12px 0;
  border: 1.5px solid transparent;
}

.alert.success { background: var(--success-soft); border-color: var(--success-border); color: #065f46; }
.alert.error   { background: var(--danger-soft);  border-color: var(--danger-border);  color: #991b1b; }

/* ============================================================
   FORMS
   ============================================================ */
.form-grid { display: grid; gap: 16px; }

label {
  display: grid;
  gap: 6px;
  font-size: .84rem;
  font-weight: 600;
  color: var(--n700);
  letter-spacing: .01em;
}

input[type=text],
input[type=email],
input[type=password],
input[type=number],
input[type=url],
select,
textarea {
  width: 100%;
  padding: 11px 15px;
  border: 1.5px solid var(--n200);
  border-radius: var(--r-md);
  background: #fff;
  font-family: var(--font-body);
  font-size: .9rem;
  color: var(--n900);
  transition: all var(--dur-fast) var(--ease-out);
  outline: none;
  appearance: none;
}

input:hover, select:hover, textarea:hover { border-color: var(--n300); }

input:focus, select:focus, textarea:focus {
  border-color: var(--brand-400);
  box-shadow: 0 0 0 3px rgba(0,158,142,.14);
}

input::placeholder { color: var(--n400); font-weight: 400; }
textarea { resize: vertical; min-height: 100px; line-height: 1.6; }

select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%235f718f' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
  cursor: pointer;
}

.form-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.helper-links {
  margin-top: 16px;
  font-size: .85rem;
  text-align: center;
  color: var(--n500);
}

.helper-links a { color: var(--brand-600); font-weight: 600; }
.helper-links a:hover { text-decoration: underline; }

/* ============================================================
   CARDS & SURFACES
   ============================================================ */
.card {
  background: var(--pub-surface);
  border: 1px solid var(--pub-border);
  border-radius: var(--r-xl);
  padding: 24px;
  box-shadow: var(--shadow-xs);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--pub-border);
  gap: 12px;
}

.card-header h3 {
  font-size: 1rem;
  color: var(--n900);
  letter-spacing: -.025em;
}

.panel-card {
  background: #fff;
  border: 1px solid var(--pub-border);
  border-radius: var(--r-2xl);
  padding: 44px 40px;
  box-shadow: var(--shadow-md);
}

/* ============================================================
   TABLES
   ============================================================ */
.table-shell {
  overflow-x: auto;
  border-radius: var(--r-lg);
  border: 1px solid var(--pub-border);
}

/* When card and table-shell are combined, let the table go edge-to-edge */
.card.table-shell {
  padding: 0;
  overflow-x: auto;
  overflow-y: hidden;
}

.card.table-shell > h3,
.card.table-shell > h2,
.card.table-shell > .card-header {
  padding: 18px 20px;
  border-bottom: 1px solid var(--pub-border);
  margin: 0;
  font-size: 1rem;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: .875rem;
}

thead tr {
  background: var(--n50);
  border-bottom: 1px solid var(--n150);
}

thead th {
  padding: 12px 16px;
  font-size: .70rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--n500);
  white-space: nowrap;
  text-align: left;
}

tbody tr {
  border-bottom: 1px solid var(--n100);
  transition: background var(--dur-fast);
}

tbody tr:last-child { border-bottom: none; }
tbody tr:hover { background: var(--brand-50); }

tbody td {
  padding: 13px 16px;
  color: var(--n700);
  vertical-align: middle;
}

.list-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 0;
  border-bottom: 1px solid var(--n100);
  font-size: .875rem;
  gap: 12px;
}

.list-row:last-child { border-bottom: none; }

/* ============================================================
   STATS GRID & STAT CARD
   ============================================================ */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.stat-card strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.9rem;
  font-weight: 800;
  color: var(--n900);
  letter-spacing: -.06em;
  line-height: 1;
}

.stat-card span {
  display: block;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--n500);
}

@media (max-width: 1240px) { .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px)  { .stats-grid { grid-template-columns: 1fr; } }

/* ============================================================
   PILL — inline role/status label
   ============================================================ */
.pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: var(--r-full);
  font-size: .70rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  background: var(--n100);
  color: var(--n600);
  border: 1px solid var(--n200);
  white-space: nowrap;
}

/* ============================================================
   PUBLIC TOPBAR
   ============================================================ */
.public-topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,.94);
  backdrop-filter: blur(28px) saturate(200%);
  -webkit-backdrop-filter: blur(28px) saturate(200%);
  border-bottom: 1px solid rgba(12,20,32,.07);
  box-shadow: 0 1px 0 rgba(0,0,0,.04), 0 4px 30px rgba(6,12,21,.05);
}

.public-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 72px;
}

/* Logo */
.public-brand {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.08rem;
  color: var(--n900);
  display: flex;
  align-items: center;
  gap: 11px;
  flex-shrink: 0;
  letter-spacing: -.035em;
  transition: opacity var(--dur-fast);
}

.public-brand:hover { opacity: .8; }

.public-brand-icon {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: linear-gradient(140deg, var(--brand-700) 0%, var(--brand-400) 100%);
  display: grid;
  place-items: center;
  color: #fff;
  font-size: .85rem;
  box-shadow: var(--shadow-brand);
  flex-shrink: 0;
}

/* Nav links */
.public-nav nav {
  display: flex;
  gap: 2px;
  align-items: center;
}

.public-nav nav a {
  padding: 7px 14px;
  border-radius: var(--r-sm);
  font-size: .875rem;
  font-weight: 500;
  color: var(--n600);
  transition: all var(--dur-fast) var(--ease-out);
}

.public-nav nav a:hover {
  color: var(--brand-600);
  background: var(--brand-50);
}

.public-nav nav a.active {
  color: var(--brand-700);
  background: var(--brand-50);
  font-weight: 600;
}

.public-nav-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

/* Mobile toggle */
.nav-toggle {
  display: none;
  background: none;
  border: 1.5px solid var(--n200);
  border-radius: var(--r-sm);
  padding: 8px 11px;
  cursor: pointer;
  color: var(--n700);
  font-size: .9rem;
  transition: all var(--dur-fast);
}

.nav-toggle:hover { background: var(--n50); }

/* Mobile nav */
.mobile-nav {
  display: none;
  flex-direction: column;
  gap: 4px;
  padding: 12px 16px;
  background: #fff;
  border-bottom: 1px solid var(--pub-border);
  box-shadow: 0 8px 30px rgba(6,12,21,.08);
}

.mobile-nav.open { display: flex; }

.mobile-nav a {
  padding: 11px 14px;
  border-radius: var(--r-sm);
  font-size: .92rem;
  font-weight: 500;
  color: var(--n700);
  transition: all var(--dur-fast);
}

.mobile-nav a:hover { background: var(--brand-50); color: var(--brand-700); }

.mobile-actions {
  display: flex;
  gap: 10px;
  padding: 10px 0 4px;
  border-top: 1px solid var(--pub-border);
  margin-top: 6px;
}

/* ============================================================
   HERO SECTION
   ============================================================ */
.hero {
  padding: 108px 0 96px;
  position: relative;
  overflow: hidden;
  background: #fff;
}

/* Geometric dot grid */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(0,158,142,.10) 1px, transparent 1px);
  background-size: 44px 44px;
  pointer-events: none;
  mask-image: radial-gradient(ellipse 80% 80% at 70% 40%, black 30%, transparent 70%);
}

/* Ambient glow */
.hero::after {
  content: '';
  position: absolute;
  right: -8%;
  top: -15%;
  width: 64%;
  height: 130%;
  background:
    radial-gradient(ellipse 55% 48% at 58% 42%, rgba(0,158,142,.09) 0%, transparent 60%),
    radial-gradient(ellipse 28% 28% at 82% 78%, rgba(14,212,196,.06) 0%, transparent 50%);
  pointer-events: none;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 72px;
  align-items: center;
  position: relative;
  z-index: 1;
}

/* Eyebrow */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 26px;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .20em;
  text-transform: uppercase;
  color: var(--brand-700);
  background: var(--brand-50);
  border: 1px solid var(--brand-200);
  padding: 5px 14px 5px 5px;
  border-radius: var(--r-full);
}

.eyebrow-dot {
  width: 22px;
  height: 22px;
  border-radius: var(--r-full);
  background: linear-gradient(135deg, var(--brand-500), var(--brand-400));
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.eyebrow-dot::after {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #fff;
}

/* Hero headline */
.hero h1 {
  font-size: clamp(2.8rem, 5.2vw, 4.8rem);
  color: var(--n950);
  line-height: 1.03;
  max-width: 16ch;
  letter-spacing: -.055em;
  font-weight: 800;
}

.hero h1 .accent {
  background: linear-gradient(135deg, var(--brand-600) 0%, var(--brand-400) 50%, #00d4bf 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero .lead {
  margin-top: 24px;
  max-width: 52ch;
  font-size: 1.05rem;
  line-height: 1.85;
  color: var(--n600);
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin: 36px 0 32px;
}

/* Stats bar */
.stats-inline {
  display: flex;
  gap: 0;
  flex-wrap: wrap;
  padding-top: 28px;
  border-top: 1px solid var(--pub-border);
}

.stats-inline-item {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 0 36px 0 0;
}

.stats-inline-item:not(:last-child) {
  margin-right: 36px;
  padding-right: 36px;
  border-right: 1px solid var(--pub-border);
}

.stats-inline-item strong {
  font-family: var(--font-display);
  font-size: 1.7rem;
  font-weight: 800;
  color: var(--n900);
  line-height: 1;
  letter-spacing: -.05em;
}

.stats-inline-item span {
  font-size: .75rem;
  color: var(--n500);
  font-weight: 500;
}

/* Hero Card */
.hero-card {
  background: linear-gradient(160deg, var(--n900) 0%, var(--n950) 100%);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: var(--r-2xl);
  padding: 28px;
  box-shadow:
    var(--shadow-xl),
    0 0 0 1px rgba(0,158,142,.12),
    inset 0 1px 0 rgba(255,255,255,.06);
  position: relative;
  overflow: hidden;
}

.hero-card::before {
  content: '';
  position: absolute;
  top: -60px; right: -60px;
  width: 220px; height: 220px;
  background: radial-gradient(circle, rgba(0,158,142,.18) 0%, transparent 65%);
  pointer-events: none;
}

.hero-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(255,255,255,.07);
}

.hero-card-title {
  font-weight: 600;
  font-size: .9rem;
  color: rgba(255,255,255,.9);
  display: flex;
  align-items: center;
  gap: 8px;
}

.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 10px rgba(34,197,94,.7);
  animation: livepulse 1.8s ease-in-out infinite;
  flex-shrink: 0;
}

@keyframes livepulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 10px rgba(34,197,94,.7); }
  50%       { opacity: .5; box-shadow: 0 0 4px rgba(34,197,94,.2); }
}

.metric-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 0;
  border-bottom: 1px solid rgba(255,255,255,.05);
}

.metric-row:last-of-type { border-bottom: none; }

.metric-row-label {
  font-size: .84rem;
  color: rgba(255,255,255,.5);
  display: flex;
  align-items: center;
  gap: 9px;
}

.metric-row-label i {
  color: var(--brand-400);
  width: 16px;
  text-align: center;
  font-size: .82rem;
}

.metric-row-val {
  font-size: .92rem;
  font-weight: 700;
  color: rgba(255,255,255,.85);
  font-variant-numeric: tabular-nums;
}

.metric-row-val.allow     { color: #34d399; }
.metric-row-val.challenge { color: #fbbf24; }
.metric-row-val.deny      { color: #f87171; }

/* Mini chart */
.mini-chart {
  display: flex;
  align-items: flex-end;
  gap: 5px;
  height: 68px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid rgba(255,255,255,.06);
}

.mini-chart div {
  flex: 1;
  border-radius: 3px 3px 2px 2px;
  background: rgba(0,158,142,.25);
  transition: opacity var(--dur-fast);
}

.mini-chart div:hover { opacity: .7; cursor: pointer; }
.mini-chart div:nth-child(1) { height: 28%; }
.mini-chart div:nth-child(2) { height: 48%; }
.mini-chart div:nth-child(3) { height: 36%; }
.mini-chart div:nth-child(4) { height: 62%; }
.mini-chart div:nth-child(5) { height: 44%; }
.mini-chart div:nth-child(6) { height: 72%; }
.mini-chart div:nth-child(7) { height: 56%; }

.mini-chart div:last-child {
  background: linear-gradient(180deg, var(--brand-400) 0%, var(--brand-600) 100%);
  height: 92%;
  box-shadow: 0 4px 12px rgba(0,158,142,.4);
}

/* ============================================================
   SECTIONS
   ============================================================ */
.section { padding: 96px 0; }
.section.pricing-page-section { padding-top: 56px; }

.section.alt-bg {
  background: var(--n50);
  border-top: 1px solid var(--pub-border);
  border-bottom: 1px solid var(--pub-border);
}

.section-heading { margin-bottom: 60px; }
.section-heading.text-center { text-align: center; }
.section-heading.text-center p { margin: 16px auto 0; }

.section-heading h2 {
  font-size: clamp(2rem, 3.8vw, 3.2rem);
  letter-spacing: -.05em;
  font-weight: 800;
}

.section-heading p {
  margin-top: 18px;
  max-width: 56ch;
  font-size: 1.03rem;
  line-height: 1.85;
}

.section-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--brand-600);
  margin-bottom: 16px;
}

.section-label::before {
  content: '';
  width: 22px;
  height: 2px;
  background: linear-gradient(90deg, var(--brand-500), var(--brand-300));
  border-radius: var(--r-full);
  flex-shrink: 0;
}

/* ============================================================
   FEATURE CARDS
   ============================================================ */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.feature-card {
  background: #fff;
  border: 1px solid var(--pub-border);
  border-radius: var(--r-xl);
  padding: 32px;
  box-shadow: var(--shadow-xs);
  transition: all var(--dur) var(--ease-out);
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--brand-400), transparent);
  opacity: 0;
  transition: opacity var(--dur);
}

.feature-card:hover {
  border-color: var(--brand-200);
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
}

.feature-card:hover::before { opacity: 1; }

.feature-icon {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: var(--r-md);
  background: linear-gradient(140deg, var(--brand-50), var(--brand-100));
  color: var(--brand-600);
  font-size: 1.1rem;
  margin-bottom: 22px;
  border: 1px solid var(--brand-200);
  transition: all var(--dur);
}

.feature-icon--number {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--brand-700);
}

.feature-card:hover .feature-icon {
  background: linear-gradient(140deg, var(--brand-500), var(--brand-400));
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 18px rgba(0,158,142,.35);
  transform: scale(1.05);
}

.feature-card h3 {
  font-size: 1rem;
  margin-bottom: 12px;
  color: var(--n900);
  letter-spacing: -.025em;
}

.feature-card p { font-size: .875rem; line-height: 1.78; }

/* ============================================================
   PRICING CARDS
   ============================================================ */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  align-items: start;
}

.price-card {
  background: #fff;
  border: 1.5px solid var(--pub-border);
  border-radius: var(--r-2xl);
  padding: 36px 32px;
  box-shadow: var(--shadow-xs);
  transition: all var(--dur);
  position: relative;
  overflow: hidden;
}

.price-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--brand-500), var(--brand-400));
  opacity: 0;
  transition: opacity var(--dur);
}

.price-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-3px);
  border-color: var(--brand-200);
}

.price-card:hover::before { opacity: 1; }

.price-card.featured {
  background: linear-gradient(160deg, #f0fdfb 0%, #e5f9f7 100%);
  border-color: var(--brand-400);
  box-shadow: 0 0 0 2px rgba(0,158,142,.10), var(--shadow-lg);
  transform: scale(1.02);
}

.price-card.featured::before {
  background: linear-gradient(90deg, var(--brand-600), var(--brand-400), var(--brand-300));
  opacity: 1;
}

.price-card.featured:hover { transform: scale(1.02) translateY(-4px); }
.price-card.featured .price-name   { color: var(--brand-700); }
.price-card.featured .price-amount { color: var(--n900); }
.price-card.featured .price-desc   { color: var(--n600); }
.price-card.featured .price-feature { color: var(--n800); }
.price-card.featured .price-feature i { color: var(--brand-500); }

.price-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: var(--r-full);
  background: var(--n100);
  color: var(--n600);
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  margin-bottom: 20px;
}

.price-name {
  font-size: .78rem;
  font-weight: 700;
  color: var(--n700);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: .12em;
  font-family: var(--font-mono);
}

.price-amount {
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: 800;
  color: var(--n900);
  line-height: 1;
  margin: 12px 0 6px;
  letter-spacing: -.07em;
}

.price-amount small {
  font-size: 1rem;
  font-weight: 500;
  color: var(--n400);
  letter-spacing: 0;
}

.price-desc {
  font-size: .84rem;
  color: var(--n500);
  margin-bottom: 24px;
  line-height: 1.6;
}

.price-divider {
  height: 1px;
  background: var(--pub-border);
  margin: 22px 0;
}

.price-features { display: grid; gap: 12px; margin-bottom: 28px; }

.price-feature {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: .875rem;
  color: var(--n600);
}

.price-feature i {
  color: var(--brand-500);
  width: 16px;
  text-align: center;
  flex-shrink: 0;
  font-size: .82rem;
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  margin-top: 96px;
  padding: 80px 0 40px;
  background: var(--n950);
  border-top: 1px solid rgba(255,255,255,.04);
  position: relative;
  overflow: hidden;
}

.site-footer::before {
  content: '';
  position: absolute;
  top: -100px; left: 50%;
  transform: translateX(-50%);
  width: 800px; height: 300px;
  background: radial-gradient(ellipse, rgba(0,158,142,.07) 0%, transparent 70%);
  pointer-events: none;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 56px;
  margin-bottom: 56px;
}

.footer-brand {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.1rem;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  letter-spacing: -.03em;
}

.footer-brand-icon {
  width: 34px;
  height: 34px;
  border-radius: var(--r-sm);
  background: linear-gradient(140deg, var(--brand-700), var(--brand-500));
  display: grid;
  place-items: center;
  color: #fff;
  font-size: .85rem;
  box-shadow: 0 4px 16px rgba(0,158,142,.36);
}

.footer-desc {
  font-size: .86rem;
  color: rgba(255,255,255,.3);
  line-height: 1.8;
  max-width: 30ch;
}

.footer-grid-col strong {
  display: block;
  margin-bottom: 18px;
  font-size: .62rem;
  font-weight: 700;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: rgba(255,255,255,.2);
}

.footer-grid-col a {
  display: block;
  margin-bottom: 12px;
  font-size: .875rem;
  color: rgba(255,255,255,.4);
  transition: color var(--dur-fast);
}

.footer-grid-col a:hover { color: var(--brand-400); }

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 28px;
  border-top: 1px solid rgba(255,255,255,.05);
  font-size: .82rem;
  color: rgba(255,255,255,.2);
}

/* ============================================================
   AUTH PAGES
   ============================================================ */
.auth-shell {
  min-height: calc(100vh - 72px);
  display: flex;
  align-items: center;
  padding: 48px 0;
  background:
    radial-gradient(ellipse 50% 40% at 50% 0%, rgba(0,158,142,.07) 0%, transparent 60%),
    var(--n50);
}

.auth-shell .panel-card h1 {
  font-size: 1.9rem;
  margin: 8px 0 28px;
  letter-spacing: -.05em;
}

.auth-shell .eyebrow {
  background: none;
  border: none;
  padding: 0;
}

/* ============================================================
   IMPERSONATION BANNER
   ============================================================ */
.impersonation-banner {
  position: sticky;
  top: 72px;
  z-index: 80;
  background: linear-gradient(90deg, #431407, #5c1a06);
  border-bottom: 1px solid rgba(255,120,50,.2);
  color: #fed7aa;
}

.app-banner-row {
  width: min(1380px, calc(100% - 40px));
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0;
  font-size: .875rem;
}

/* ============================================================
   PANEL SHELL
   ============================================================ */
.app-shell-body { background: var(--pan-bg); min-height: 100vh; }

.app-shell {
  display: grid;
  grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
  min-height: 100vh;
}

/* Sidebar */
.app-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  overflow-x: hidden;
  background: var(--pan-sidebar-bg);
  background-image:
    radial-gradient(ellipse 80% 40% at 50% 0%, rgba(0,158,142,.08) 0%, transparent 60%),
    linear-gradient(180deg, rgba(255,255,255,.015) 0%, transparent 30%);
  border-right: 1px solid var(--pan-sidebar-bdr);
  display: flex;
  flex-direction: column;
  scrollbar-width: none;
}

.app-sidebar::-webkit-scrollbar { display: none; }

.sidebar-brand-wrap {
  padding: 22px 20px 18px;
  border-bottom: 1px solid var(--pan-sidebar-bdr);
  flex-shrink: 0;
}

.sidebar-brand-mark {
  display: flex;
  align-items: center;
  gap: 11px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.05rem;
  color: #fff;
  letter-spacing: -.03em;
}

.brand-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--r-md);
  background: linear-gradient(140deg, var(--brand-700), var(--brand-400));
  display: grid;
  place-items: center;
  color: #fff;
  font-size: .9rem;
  flex-shrink: 0;
  box-shadow: 0 4px 18px rgba(0,158,142,.42);
  position: relative;
  overflow: hidden;
}

.brand-icon::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,.18) 0%, transparent 60%);
}

.brand-dot {
  width: 7px;
  height: 7px;
  border-radius: var(--r-full);
  background: var(--brand-400);
  box-shadow: 0 0 10px rgba(0,158,142,.7);
  animation: sidepulse 2.6s ease-in-out infinite;
  margin-left: auto;
  flex-shrink: 0;
}

@keyframes sidepulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 10px rgba(0,158,142,.7); }
  50%       { opacity: .3; box-shadow: 0 0 4px rgba(0,158,142,.2); }
}

.sidebar-brand-wrap p {
  margin-top: 4px;
  padding-left: 49px;
  font-size: .7rem;
  color: var(--pan-sidebar-muted);
}

/* Sidebar user card */
.sidebar-user-card {
  display: flex;
  align-items: center;
  gap: 11px;
  margin: 14px 12px 4px;
  padding: 11px 13px;
  background: rgba(255,255,255,.04);
  border: 1px solid var(--pan-sidebar-bdr);
  border-radius: var(--r-lg);
  transition: background var(--dur-fast);
  cursor: pointer;
}

.sidebar-user-card:hover { background: rgba(255,255,255,.08); }

.sidebar-user-avatar {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: var(--r-md);
  background: linear-gradient(140deg, var(--brand-700), var(--brand-500));
  color: #fff;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: .84rem;
  flex-shrink: 0;
}

.sidebar-user-card strong {
  display: block;
  font-size: .84rem;
  color: #fff;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}

.sidebar-user-card span {
  display: block;
  font-size: .68rem;
  color: var(--pan-sidebar-muted);
  margin-top: 2px;
}

/* Sidebar nav */
.sidebar-nav-wrap {
  flex: 1;
  padding: 12px 10px;
  overflow-y: auto;
  scrollbar-width: none;
}

.sidebar-nav-wrap::-webkit-scrollbar { display: none; }

.sidebar-section-title {
  padding: 18px 10px 6px;
  font-size: .6rem;
  font-weight: 700;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--pan-sidebar-muted);
}

.sidebar-nav { display: grid; gap: 2px; }

.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px 12px;
  border-radius: var(--r-md);
  color: var(--pan-sidebar-muted);
  font-size: .84rem;
  font-weight: 500;
  transition: all var(--dur-fast) var(--ease-out);
  border: 1px solid transparent;
  position: relative;
}

.sidebar-nav a i {
  width: 18px;
  text-align: center;
  font-size: .86rem;
  flex-shrink: 0;
  opacity: .55;
  transition: opacity var(--dur-fast), color var(--dur-fast), transform var(--dur-fast);
}

.sidebar-nav a:hover {
  background: rgba(255,255,255,.055);
  color: var(--pan-sidebar-text);
  border-color: var(--pan-sidebar-bdr);
}

.sidebar-nav a:hover i { opacity: 1; color: var(--brand-300); transform: scale(1.1); }

.sidebar-nav a.active {
  background: linear-gradient(135deg, rgba(0,158,142,.18), rgba(0,158,142,.07));
  color: var(--brand-300);
  border-color: rgba(0,158,142,.22);
  font-weight: 600;
}

.sidebar-nav a.active i { opacity: 1; color: var(--brand-400); }

.sidebar-nav a.active::before {
  content: '';
  position: absolute;
  left: -10px; top: 50%;
  transform: translateY(-50%);
  width: 3px; height: 20px;
  background: linear-gradient(180deg, var(--brand-400), var(--brand-600));
  border-radius: 0 3px 3px 0;
}

.sidebar-nav a .nav-badge {
  margin-left: auto;
  padding: 2px 8px;
  border-radius: var(--r-full);
  background: rgba(0,158,142,.18);
  border: 1px solid rgba(0,158,142,.22);
  color: var(--brand-400);
  font-size: .6rem;
  font-weight: 700;
  letter-spacing: .05em;
}

/* Sidebar footer */
.sidebar-footer-actions {
  padding: 10px;
  border-top: 1px solid var(--pan-sidebar-bdr);
  display: grid;
  gap: 2px;
  flex-shrink: 0;
}

.sidebar-footer-actions a {
  display: flex;
  gap: 11px;
  align-items: center;
  padding: 9px 12px;
  border-radius: var(--r-md);
  color: var(--pan-sidebar-muted);
  font-size: .84rem;
  font-weight: 500;
  transition: all var(--dur-fast);
}

.sidebar-footer-actions a:hover {
  background: rgba(255,255,255,.055);
  color: var(--pan-sidebar-text);
}

.sidebar-footer-actions a i { width: 18px; text-align: center; opacity: .5; }
.sidebar-footer-actions a:hover i { opacity: 1; }

/* ============================================================
   PANEL MAIN CONTENT
   ============================================================ */
.app-main { min-height: 100vh; display: flex; flex-direction: column; }

.app-topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  height: var(--topbar-h);
  background: rgba(255,255,255,.94);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border-bottom: 1px solid var(--pan-border);
  display: flex;
  align-items: center;
  padding: 0 32px;
  gap: 16px;
  box-shadow: 0 1px 0 rgba(0,0,0,.04);
}

.topbar-title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--n900);
  letter-spacing: -.025em;
}

.topbar-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }

.page-body { flex: 1; padding: 32px; max-width: 100%; }

.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}

.page-header-text h1 {
  font-size: 1.6rem;
  color: var(--n900);
  letter-spacing: -.045em;
}

.page-header-text p { margin-top: 5px; font-size: .88rem; color: var(--n500); }

/* ============================================================
   DASHBOARD WELCOME HERO
   ============================================================ */
.welcome-hero {
  background: linear-gradient(135deg, var(--n900) 0%, var(--n850, #152030) 60%, #0d2040 100%);
  border-radius: var(--r-2xl);
  padding: 40px 44px;
  margin-bottom: 28px;
  position: relative;
  overflow: hidden;
}

.welcome-hero::before {
  content: '';
  position: absolute;
  right: -60px; top: -60px;
  width: 320px; height: 320px;
  background: radial-gradient(circle, rgba(0,158,142,.18) 0%, transparent 65%);
  pointer-events: none;
}

.welcome-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.018) 1px, transparent 1px);
  background-size: 44px 44px;
  pointer-events: none;
}

.hero-grid-pattern { display: none; }
.welcome-hero-inner { position: relative; z-index: 1; }

.welcome-hero h2 {
  font-size: 1.7rem;
  color: #fff;
  letter-spacing: -.045em;
  font-weight: 800;
}

.welcome-hero p {
  margin-top: 8px;
  font-size: .9rem;
  color: rgba(255,255,255,.5);
  max-width: 60ch;
}

.welcome-hero-actions {
  display: flex;
  gap: 10px;
  margin-top: 24px;
  flex-wrap: wrap;
}

/* ============================================================
   KPI CARDS
   ============================================================ */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.kpi-card {
  background: var(--pan-surface);
  border: 1px solid var(--pan-border);
  border-radius: var(--r-xl);
  padding: 22px 24px;
  box-shadow: var(--shadow-xs);
  transition: all var(--dur) var(--ease-out);
  position: relative;
  overflow: hidden;
}

.kpi-card::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--brand-500), var(--brand-300));
  opacity: 0;
  transition: opacity var(--dur);
}

.kpi-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--brand-200);
  transform: translateY(-2px);
}

.kpi-card:hover::after { opacity: 1; }

.kpi-icon {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: var(--r-md);
  background: linear-gradient(140deg, var(--brand-50), var(--brand-100));
  color: var(--brand-600);
  font-size: .9rem;
  margin-bottom: 16px;
  border: 1px solid var(--brand-200);
}

.kpi-card span {
  display: block;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--n500);
  margin-bottom: 6px;
}

.kpi-card strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.9rem;
  font-weight: 800;
  color: var(--n900);
  letter-spacing: -.06em;
  line-height: 1;
}

/* ============================================================
   PANEL CARDS & MODULES
   ============================================================ */
.dashboard-grid { display: grid; gap: 24px; }
.dashboard-grid.two-col { grid-template-columns: 1fr 1.4fr; }

.module-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  align-content: start;
}

.module-card {
  background: var(--pan-surface);
  border: 1px solid var(--pan-border);
  border-radius: var(--r-xl);
  padding: 24px;
  box-shadow: var(--shadow-xs);
  transition: all var(--dur) var(--ease-out);
  position: relative;
  overflow: hidden;
}

.module-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--brand-400), var(--brand-200));
  opacity: 0;
  transition: opacity var(--dur);
}

.module-card:hover {
  border-color: var(--brand-200);
  box-shadow: var(--shadow-sm);
  transform: translateY(-2px);
}

.module-card:hover::before { opacity: 1; }

.module-card h3 { font-size: .95rem; margin-bottom: 8px; letter-spacing: -.025em; }
.module-card p  { font-size: .84rem; line-height: 1.7; }

.app-shell-body .card {
  border-color: var(--pan-border);
  box-shadow: var(--shadow-xs);
}

.app-shell-body .card:hover { box-shadow: var(--shadow-sm); }

/* ============================================================
   ADMIN PANEL
   ============================================================ */
.adm-shell { grid-template-columns: var(--sidebar-w) minmax(0, 1fr); }

.adm-sidebar {
  background: var(--adm-sidebar-bg);
  background-image: linear-gradient(180deg, rgba(224,48,48,.05) 0%, transparent 40%);
  border-right-color: rgba(255,255,255,.04);
}

.adm-sidebar .sidebar-nav a.active {
  background: linear-gradient(135deg, rgba(224,48,48,.18), rgba(224,48,48,.07));
  color: #fc8181;
  border-color: rgba(224,48,48,.22);
}

.adm-sidebar .sidebar-nav a.active i { color: #fc8181; }
.adm-sidebar .sidebar-nav a.active::before { background: linear-gradient(180deg, #fc8181, #ef4444); }
.adm-sidebar .sidebar-nav a:hover i { color: #fc8181; }

.adm-sidebar .brand-icon {
  background: linear-gradient(140deg, #7f1d1d, var(--adm-accent));
  box-shadow: 0 4px 18px rgba(224,48,48,.42);
}

/* ============================================================
   BLOCKED PAGE
   ============================================================ */
.blocked-shell-minimal {
  min-height: calc(100vh - 180px);
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.10), transparent 28%),
    radial-gradient(circle at 82% 18%, rgba(14, 165, 233, 0.08), transparent 22%),
    linear-gradient(180deg, #020817 0%, #07111f 100%);
  padding: 56px 0;
}

.blocked-container { position: relative; z-index: 2; }

.blocked-noise {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(rgba(255,255,255,.02) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.02) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: radial-gradient(circle at center, black 34%, transparent 90%);
  opacity: .22;
}

.blocked-card-minimal {
  max-width: 700px;
  margin: 0 auto;
  padding: 34px 34px 30px;
  border-radius: 28px;
  text-align: center;
  background: linear-gradient(180deg, rgba(10, 18, 34, .94), rgba(7, 14, 28, .92));
  border: 1px solid rgba(148, 163, 184, .14);
  box-shadow: 0 30px 80px rgba(2, 6, 23, .52), inset 0 1px 0 rgba(255,255,255,.05);
  color: #dbe7ff;
}

.blocked-mark {
  display: flex;
  justify-content: center;
  margin-bottom: 18px;
}

.blocked-mark span {
  width: 72px;
  height: 72px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(37, 99, 235, .22), rgba(14, 165, 233, .14));
  border: 1px solid rgba(96, 165, 250, .22);
  color: #bfdbfe;
  font-size: 1.5rem;
}

.blocked-badge-minimal {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(15, 23, 42, .78);
  border: 1px solid rgba(148, 163, 184, .14);
  color: #cbd5e1;
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  margin-bottom: 18px;
}

.blocked-card-minimal h1 {
  color: #f8fafc;
  font-size: clamp(2rem, 4vw, 2.9rem);
  line-height: 1.06;
  letter-spacing: -.04em;
  max-width: 540px;
  margin: 0 auto 14px;
}

.blocked-intro {
  max-width: 560px;
  margin: 0 auto 26px;
  color: #b8c7e3;
  font-size: 1rem;
  line-height: 1.75;
}

.blocked-mini-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  text-align: left;
  margin-bottom: 18px;
}

.blocked-mini-item {
  padding: 18px;
  border-radius: 20px;
  background: rgba(15, 23, 42, .64);
  border: 1px solid rgba(148, 163, 184, .11);
}

.blocked-mini-label {
  display: inline-block;
  margin-bottom: 10px;
  color: #7dd3fc;
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.blocked-mini-item strong {
  display: block;
  color: #f8fafc;
  font-size: 1rem;
  margin-bottom: 8px;
}

.blocked-mini-item p {
  margin: 0;
  color: #9fb0cc;
  font-size: .92rem;
  line-height: 1.65;
}

.blocked-inline-note {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 10px;
  max-width: 620px;
  margin: 0 auto 24px;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(8, 15, 29, .72);
  border: 1px solid rgba(96, 165, 250, .12);
  color: #aac0e6;
  text-align: left;
  line-height: 1.65;
}

.blocked-inline-note i { color: #7dd3fc; margin-top: 2px; }

.blocked-action-row-compact {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ============================================================
   MISC COMPONENTS
   ============================================================ */
.inline-form-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.soft-note-grid { display: grid; gap: 12px; }

.soft-note-item {
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(15, 23, 42, .05);
  border: 1px solid var(--pan-border);
}

.soft-note-item strong { display: block; margin-bottom: 4px; color: var(--n900); }
.soft-note-item span  { color: var(--n600); line-height: 1.65; font-size: .92rem; }

.policy-list div {
  padding: 12px 0;
  border-bottom: 1px solid var(--pan-border);
  color: var(--n700);
  line-height: 1.7;
}
.policy-list div:last-child { border-bottom: 0; }
.policy-list strong { color: var(--n900); }

.info-tip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  margin-left: 6px;
  border-radius: 999px;
  background: rgba(96,165,250,.12);
  color: #93c5fd;
  border: 1px solid rgba(96,165,250,.25);
  font-size: .78rem;
  vertical-align: middle;
  cursor: help;
  position: relative;
  top: -1px;
}

.auth-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 18px 0;
  color: var(--n500);
  font-size: .9rem;
}

.auth-divider::before, .auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--pan-border);
}

.sample-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 86px;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: .74rem;
  font-weight: 800;
  letter-spacing: .04em;
}

.sample-badge.allow     { color: #86efac; background: rgba(34,197,94,.12);  border: 1px solid rgba(34,197,94,.28);  }
.sample-badge.challenge { color: #fcd34d; background: rgba(245,158,11,.12); border: 1px solid rgba(245,158,11,.28); }
.sample-badge.deny      { color: #fda4af; background: rgba(244,63,94,.12);  border: 1px solid rgba(244,63,94,.28);  }

.price-subtitle { margin: -2px 0 12px; color: var(--n600); font-size: .8rem; font-weight: 600; }
.price-card.featured .price-subtitle { color: var(--brand-600); }

.term-chip-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.term-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(12,20,32,.08);
  background: rgba(255,255,255,.92);
  color: var(--n700);
  font-size: .82rem;
  font-weight: 600;
}

.feature-state {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: .78rem;
  font-weight: 700;
  line-height: 1;
  border: 1px solid transparent;
}

.feature-state.is-active  { background: #ecfdf5; color: #166534; border-color: #bbf7d0; }
.feature-state.is-passive { background: #f8fafc; color: #475569; border-color: #cbd5e1; }

/* testimonials / panel-preview live data */
.testimonial-section { padding-top: 24px; }
.testimonial-marquee {
  position: relative;
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

.testimonial-track {
  display: flex;
  gap: 18px;
  width: max-content;
  animation: testimonial-marquee 32s linear infinite;
}

.testimonial-marquee:hover .testimonial-track { animation-play-state: paused; }

.testimonial-card {
  width: 360px;
  flex: 0 0 360px;
  background: #fff;
  border: 1px solid rgba(12, 20, 32, .08);
  border-radius: 24px;
  padding: 18px;
  box-shadow: 0 10px 30px rgba(6,12,21,.08);
}

.testimonial-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}

.testimonial-head strong { display: block; font-size: .98rem; color: var(--n900); }
.testimonial-head span  { display: block; font-size: .82rem; color: var(--n500); }

.testimonial-avatar {
  width: 60px;
  height: 60px;
  flex-shrink: 0;
  border-radius: 20px;
  box-shadow: 0 12px 24px rgba(6,12,21,.18);
}

.testimonial-stars { display: flex; gap: 4px; color: #f59e0b; margin-bottom: 12px; }
.testimonial-card p { margin: 0; color: var(--n600); line-height: 1.78; font-size: .95rem; }

@keyframes testimonial-marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(calc(-50% - 9px)); }
}

/* Panel preview section */
.panel-preview-section { background: linear-gradient(180deg, #020617 0%, #04102a 100%); color: #fff; }
.panel-preview-section .section-label,
.panel-preview-section .section-heading h2 { color: #fff; }
.panel-preview-section .section-heading p  { color: rgba(255,255,255,.68); }

.panel-preview-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) minmax(280px, .82fr);
  gap: 24px;
  align-items: start;
}

.panel-preview-card,
.panel-chart-card {
  background: rgba(7, 18, 54, .76);
  border: 1px solid rgba(59,130,246,.16);
  box-shadow: 0 18px 50px rgba(2,6,23,.36);
  border-radius: 24px;
  padding: 18px;
}

.panel-preview-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
}

.panel-preview-toolbar input,
.panel-preview-toolbar span {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(6,14,39,.62);
  color: rgba(255,255,255,.78);
  padding: 0 14px;
  font-size: .84rem;
}

.panel-preview-toolbar input { min-width: 180px; color: rgba(255,255,255,.48); }
.panel-live-pill { gap: 8px; margin-left: auto; color: #dbeafe !important; }

.panel-preview-table {
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 18px;
  overflow: hidden;
  background: rgba(3, 8, 28, .44);
}

.panel-preview-head,
.panel-preview-row {
  display: grid;
  grid-template-columns: 1fr 1.25fr .7fr 1fr .65fr .8fr;
  gap: 16px;
  align-items: center;
}

.panel-preview-head {
  padding: 14px 16px;
  font-weight: 700;
  font-size: .82rem;
  color: #dbeafe;
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.panel-preview-scroll {
  height: 376px;
  overflow: hidden;
  position: relative;
}

.panel-preview-track {
  display: flex;
  flex-direction: column;
  animation: panel-live-scroll 22s linear infinite;
}

.panel-preview-scroll:hover .panel-preview-track { animation-play-state: paused; }

.panel-preview-row {
  padding: 14px 16px;
  color: rgba(255,255,255,.78);
  border-bottom: 1px solid rgba(255,255,255,.05);
  font-size: .84rem;
}

.panel-preview-note { margin: 12px 4px 0; color: rgba(191,219,254,.74); font-size: .82rem; }

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

.panel-chart-head h3 { margin: 0; font-size: 1.05rem; color: #f8fafc; }

.panel-chart-svg {
  width: 100%;
  height: auto;
  padding: 12px;
  border-radius: 18px;
  background: rgba(3,8,28,.44);
  border: 1px solid rgba(255,255,255,.08);
}

.panel-chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 14px;
  color: #0f172a;
  font-size: .84rem;
  font-weight: 700;
}

.panel-chart-legend span { display: inline-flex; align-items: center; gap: 8px; }
.panel-chart-legend i   { width: 10px; height: 10px; border-radius: 999px; display: inline-block; }

@keyframes panel-live-scroll {
  from { transform: translateY(0); }
  to   { transform: translateY(-50%); }
}

/* FAQ */
.faq-section-light { background: linear-gradient(180deg, #f9fcff 0%, #eef8f6 100%); }
.faq-accordion { display: grid; gap: 14px; max-width: 980px; margin: 0 auto; }
.faq-item { background: #fff; border: 1px solid rgba(12,20,32,.08); border-radius: 20px; overflow: hidden; box-shadow: 0 8px 24px rgba(6,12,21,.06); }
.faq-trigger { width: 100%; border: 0; background: transparent; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 24px 28px; font-size: 1.05rem; font-weight: 700; color: var(--n900); text-align: left; cursor: pointer; font-family: var(--font-display); }
.faq-trigger i { color: var(--brand-600); transition: transform .2s ease; }
.faq-item.open .faq-trigger i { transform: rotate(180deg); }
.faq-answer { padding: 0 28px 24px; }
.faq-answer p { margin: 0; color: var(--n600); font-size: .98rem; }

/* Public dashboard live */
.public-dashboard-live {
  background: #ffffff;
  border: 1px solid rgba(12, 20, 32, .08);
  border-radius: 28px;
  padding: 22px 24px;
  box-shadow: 0 16px 40px rgba(6, 12, 21, .08);
}

.public-dashboard-live .dashboard-live-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(12, 20, 32, .08);
  flex-wrap: wrap;
}

.public-dashboard-live .dashboard-live-head h3,
.public-dashboard-live .dashboard-chart-head h3 { color: var(--n900); }
.public-dashboard-live .dashboard-live-head p,
.public-dashboard-live .dashboard-live-updated { color: var(--n500); }
.public-dashboard-live .dashboard-live-status { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.public-dashboard-live .dashboard-live-grid { display: grid; grid-template-columns: minmax(0,1.8fr) minmax(280px,.82fr); gap: 24px; align-items: start; }
.public-dashboard-live .dashboard-live-card,
.public-dashboard-live .dashboard-chart-card { background: #f8fafc; border: 1px solid rgba(12,20,32,.08); border-radius: 22px; overflow: hidden; }
.public-dashboard-live .dashboard-live-toolbar { display: flex; flex-wrap: wrap; gap: 10px; margin: 0; padding: 12px 14px; background: #fff; border-bottom: 1px solid rgba(12,20,32,.08); }
.public-dashboard-live .dashboard-live-toolbar input,
.public-dashboard-live .dashboard-live-toolbar select { min-height: 42px; border-radius: 12px; border: 1px solid var(--n200); background: #fff; color: var(--n700); padding: 0 14px; font-size: .84rem; }
.public-dashboard-live .dashboard-live-table { border: 0; border-radius: 0; overflow: hidden; background: transparent; }
.public-dashboard-live .dashboard-live-head-row,
.public-dashboard-live .dashboard-live-row { display: grid; grid-template-columns: 80px 110px 1fr 90px 60px 90px; gap: 0; align-items: center; }
.public-dashboard-live .dashboard-live-head-row { padding: 10px 14px; font-weight: 700; font-size: .7rem; color: var(--n500); background: #e2e8f0; border-bottom: 1px solid rgba(12,20,32,.08); letter-spacing: .08em; text-transform: uppercase; }
.public-dashboard-live .dashboard-live-scroll { max-height: 320px; overflow: auto; }
.public-dashboard-live .dashboard-live-row { padding: 10px 14px; color: var(--n700); border-bottom: 1px solid rgba(12,20,32,.06); font-size: .84rem; background: #f8fafc; }
.public-dashboard-live .dashboard-live-row:hover { background: #ecfeff; }
.public-dashboard-live .dashboard-stream-summary { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; margin: 0 0 16px; padding: 18px; }
.public-dashboard-live .stream-chip { border-radius: 18px; padding: 14px 16px; border: 1px solid rgba(12,20,32,.08); background: #ffffff; color: var(--n700); display: flex; justify-content: space-between; align-items: center; }
.public-dashboard-live .stream-chip strong { font-size: 1.2rem; color: var(--n900); }
.public-dashboard-live .stream-chip.allow strong { color: #1d4ed8; }
.public-dashboard-live .stream-chip.challenge strong { color: #0891b2; }
.public-dashboard-live .stream-chip.deny strong { color: #15803d; }
.public-dashboard-live .dashboard-live-note { padding: 10px 14px; background: #fff; color: var(--n500); border-top: 1px solid rgba(12,20,32,.08); margin: 0; }
.public-dashboard-live .dashboard-chart-head { display: flex; justify-content: space-between; align-items: center; padding: 18px 18px 0; }
.public-dashboard-live .dashboard-chart-svg { padding: 0 18px 12px; }
.public-dashboard-live .panel-chart-legend { padding: 0 18px 18px; color: var(--n900); }

/* ============================================================
   EXPLAINER / HOW-IT-WORKS
   ============================================================ */
.explainer-hero {
  background:
    radial-gradient(circle at 12% 18%, rgba(0,158,142,.10), transparent 28%),
    radial-gradient(circle at 88% 22%, rgba(59,130,246,.10), transparent 24%),
    linear-gradient(180deg, #fbfcfe 0%, #f4f7fb 100%);
}

.explainer-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, .8fr);
  gap: 28px;
  align-items: stretch;
}

.explainer-chip-row { display: flex; flex-wrap: wrap; gap: 10px; }

.explainer-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: var(--r-full);
  border: 1px solid rgba(0,158,142,.16);
  background: rgba(255,255,255,.92);
  color: var(--n700);
  font-weight: 600;
  font-size: .92rem;
  box-shadow: var(--shadow-xs);
}

.explainer-summary-card {
  background: linear-gradient(180deg, rgba(7,13,24,.98), rgba(17,25,42,.98));
  color: #fff;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 24px;
  padding: 24px;
  box-shadow: var(--shadow-lg);
}

.explainer-summary-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.explainer-summary-label {
  display: inline-flex;
  margin-bottom: 10px;
  color: rgba(255,255,255,.72);
  font-size: .74rem;
  text-transform: uppercase;
  letter-spacing: .16em;
  font-weight: 700;
}

.explainer-summary-top h2 { color: #fff; font-size: clamp(1.3rem, 1.8vw, 1.8rem); line-height: 1.18; }
.explainer-summary-list { display: grid; gap: 16px; margin-top: 18px; }
.explainer-summary-item { padding: 14px 0 0; }
.explainer-summary-item + .explainer-summary-item { border-top: 1px solid rgba(255,255,255,.08); }
.explainer-summary-item strong { display: block; color: #fff; margin-bottom: 6px; font-size: 1rem; }
.explainer-summary-item p { color: rgba(255,255,255,.72); }

.explainer-benefit-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.explainer-benefit-card,
.explainer-step-card {
  background: rgba(255,255,255,.92);
  border: 1px solid var(--pub-border);
  border-radius: 20px;
  padding: 22px;
  box-shadow: var(--shadow-sm);
}

.explainer-step-card { position: relative; padding-top: 68px; }

.explainer-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.explainer-step-no {
  position: absolute;
  top: 18px; left: 18px;
  width: 36px; height: 36px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--brand-500), var(--brand-300));
  color: #fff;
  font-weight: 800;
  font-family: var(--font-display);
  box-shadow: var(--shadow-brand);
}

.explainer-two-col {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, .9fr);
  gap: 24px;
  align-items: stretch;
}

.explainer-prose-card, .explainer-cta-card { border-radius: 24px; }

.explainer-cta-card {
  background: linear-gradient(180deg, #ffffff 0%, #f7fbfb 100%);
  padding: 28px;
  border: 1px solid rgba(0,158,142,.16);
  box-shadow: var(--shadow-md);
}

.seo-cta-actions {
  justify-content: center;
}

.central-hero .lead { max-width: 64ch; }
.central-summary-card { background: linear-gradient(180deg, #ffffff 0%, #f7fafc 100%); color: var(--n900); border: 1px solid rgba(12,20,32,.08); box-shadow: 0 18px 42px rgba(6,12,21,.08); }
.central-summary-card .explainer-summary-label { color: var(--brand-600); background: rgba(0,158,142,.08); }
.central-summary-card .explainer-summary-top { border-bottom-color: rgba(12,20,32,.08); }
.central-summary-card .explainer-summary-top h2, .central-summary-card .explainer-summary-item strong { color: var(--n900); }
.central-summary-card .explainer-summary-item p { color: var(--n600); }
.central-summary-card .explainer-summary-item + .explainer-summary-item { border-top-color: rgba(12,20,32,.08); }
.central-steps-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.central-two-col { align-items: stretch; }
.central-cta-card {
  background: linear-gradient(145deg, #0f172a 0%, #13233f 100%);
  color: #e2e8f0;
  border-color: rgba(0,158,142,.18);
}
.central-cta-card h3, .central-cta-card p, .central-cta-card .section-label { color: inherit; }

/* ============================================================
   RESPONSIVE — Comprehensive
   ============================================================ */

/* ---- Extra Large (1440px+) ---- */
@media (min-width: 1440px) {
  .page-body { padding: 40px 48px; }
}

/* ---- Large Desktop (1240px) ---- */
@media (max-width: 1240px) {
  .hero-grid { grid-template-columns: 1fr; gap: 48px; }
  .hero h1 { max-width: 100%; }
  .hero { padding: 80px 0 72px; }
  .hero-card { display: none; }
  .feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pricing-grid { grid-template-columns: 1fr; max-width: 480px; margin: 0 auto; }
  .price-card.featured { transform: none; }
  .price-card.featured:hover { transform: translateY(-3px); }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 36px; }
  .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dashboard-grid.two-col { grid-template-columns: 1fr; }
  .central-steps-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .explainer-hero-grid, .explainer-two-col { grid-template-columns: 1fr; }
  .explainer-benefit-grid, .explainer-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---- Tablet (1024px) ---- */
@media (max-width: 1024px) {
  :root { --sidebar-w: 0px; }
  .app-shell { grid-template-columns: 1fr; }
  .app-sidebar { display: none; }
  .page-body { padding: 24px; }
  .module-grid { grid-template-columns: 1fr 1fr; }
  .panel-preview-grid { grid-template-columns: 1fr; }
  .public-dashboard-live .dashboard-live-grid { grid-template-columns: 1fr; }
}

/* ---- Large Mobile (768px) ---- */
@media (max-width: 768px) {
  :root { --sidebar-w: 0px; }

  .container { width: calc(100% - 32px); }

  /* Nav */
  .public-nav nav { display: none; }
  .public-nav-actions { display: none; }
  .nav-toggle { display: flex; }

  /* Hero */
  .hero { padding: 64px 0 56px; }
  .hero h1 { font-size: clamp(2.2rem, 7vw, 3.2rem); }
  .hero-actions { flex-direction: column; }
  .hero-actions .btn { width: 100%; }
  .stats-inline { gap: 0; }
  .stats-inline-item {
    padding: 12px 0;
    border-right: none !important;
    margin-right: 0 !important;
    border-bottom: 1px solid var(--pub-border);
  }
  .stats-inline-item:last-child { border-bottom: none; }

  /* Sections */
  .section { padding: 64px 0; }
  .section-heading { margin-bottom: 40px; }

  /* Features */
  .feature-grid { grid-template-columns: 1fr; }
  .explainer-benefit-grid, .explainer-steps { grid-template-columns: 1fr; }
  .central-steps-grid { grid-template-columns: 1fr; }

  /* Footer */
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .footer-bottom { flex-direction: column; text-align: center; gap: 8px; }

  /* Panel */
  .app-shell { grid-template-columns: 1fr; }
  .app-sidebar { display: none; }
  .page-body { padding: 18px 16px; }
  .kpi-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .module-grid { grid-template-columns: 1fr; }
  .panel-card { padding: 28px 22px; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .welcome-hero { padding: 28px 24px; }
  .welcome-hero h2 { font-size: 1.4rem; }
  .app-topbar { padding: 0 20px; }
  .blocked-mini-grid { grid-template-columns: 1fr; }
}

/* ---- Small Mobile (480px) ---- */
@media (max-width: 480px) {
  .kpi-grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: 2rem; letter-spacing: -.04em; }
  .page-header { flex-direction: column; }
  .welcome-hero { padding: 24px 20px; }
  .welcome-hero h2 { font-size: 1.2rem; }
  .kpi-card strong { font-size: 1.7rem; }
  .welcome-hero-actions { flex-direction: column; }
  .welcome-hero-actions .btn { width: 100%; justify-content: center; }
  .hero-actions .btn { width: 100%; justify-content: center; }
  .mobile-actions { flex-direction: column; }
  .panel-card { padding: 24px 18px; }
  .blocked-card-minimal { padding: 24px 18px 20px; border-radius: 22px; }
  .blocked-action-row-compact { flex-direction: column; }
  .blocked-action-row-compact .btn { width: 100%; }
}

/* ---- Tiny (360px) ---- */
@media (max-width: 360px) {
  .container { width: calc(100% - 24px); }
  .hero h1 { font-size: 1.8rem; }
}

/* ---- Print ---- */
@media print {
  .app-sidebar, .public-topbar, .site-footer { display: none; }
  .app-shell { grid-template-columns: 1fr; }
}

/* ---- Reduced Motion ---- */
@media (prefers-reduced-motion: reduce) {
  .brand-dot, .live-dot { animation: none; }
  .feature-card, .price-card, .kpi-card, .module-card { animation: none; }
  .testimonial-track, .panel-preview-track { animation: none; }
}

/* ============================================================
   MOTION — Scroll-triggered reveals
   ============================================================ */
@media (prefers-reduced-motion: no-preference) {
  .feature-card,
  .price-card,
  .kpi-card,
  .module-card {
    animation: fadeUp .5s var(--ease-out) both;
  }

  .feature-card:nth-child(1) { animation-delay: .05s; }
  .feature-card:nth-child(2) { animation-delay: .10s; }
  .feature-card:nth-child(3) { animation-delay: .15s; }
  .feature-card:nth-child(4) { animation-delay: .20s; }
  .feature-card:nth-child(5) { animation-delay: .25s; }
  .feature-card:nth-child(6) { animation-delay: .30s; }

  .kpi-card:nth-child(1) { animation-delay: .04s; }
  .kpi-card:nth-child(2) { animation-delay: .08s; }
  .kpi-card:nth-child(3) { animation-delay: .12s; }
  .kpi-card:nth-child(4) { animation-delay: .16s; }

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

  .welcome-hero { animation: fadeUp .4s var(--ease-out) .05s both; }

  .hero-card { animation: fadeRight .6s var(--ease-out) .1s both; }

  @keyframes fadeRight {
    from { opacity: 0; transform: translateX(24px); }
    to   { opacity: 1; transform: translateX(0); }
  }

  .hero > .container > div:first-child {
    animation: fadeUp .5s var(--ease-out) both;
  }
}

/* ============================================================
   SCROLLBAR
   ============================================================ */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: var(--n300);
  border-radius: var(--r-full);
}
::-webkit-scrollbar-thumb:hover { background: var(--n400); }

/* ============================================================
   FOCUS VISIBLE
   ============================================================ */
:focus-visible {
  outline: 2px solid var(--brand-400);
  outline-offset: 2px;
  border-radius: var(--r-sm);
}

/* ============================================================
   v4.1 AUTH + INTERACTION FIXES
   ============================================================ */
.auth-grid {
  width: min(620px, 100%);
  margin: 0 auto;
}

.auth-card {
  max-width: 560px;
  margin: 0 auto;
  border-radius: 28px;
  padding: clamp(24px, 3vw, 34px);
  box-shadow: 0 24px 56px rgba(15,23,42,.08);
}

.auth-card h1,
.auth-shell .card h1,
.auth-shell .panel-card h1 {
  font-size: clamp(1.48rem, 2vw, 2rem);
  margin-bottom: 12px;
}

.auth-shell .card p,
.auth-shell .panel-card p {
  color: var(--n600);
}

.btn-small {
  min-height: 36px;
  padding: 8px 14px;
  border-radius: 12px;
  font-size: .8rem;
}

.btn-dark {
  background: linear-gradient(135deg, var(--n900), #1e293b);
  border-color: rgba(15,23,42,.94);
  color: #fff;
  box-shadow: 0 16px 36px rgba(15,23,42,.18);
}

.btn-dark:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 42px rgba(15,23,42,.24);
}

.text-muted { color: var(--n500); }

.checkbox-row,
.inline-check {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.checkbox-row input[type="checkbox"],
.inline-check input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--brand-500);
}

.password-field {
  position: relative;
}

.password-field > input {
  padding-right: 50px !important;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 10px;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(216,224,237,.95);
  border-radius: 12px;
  background: linear-gradient(180deg, #fff, #f8fbff);
  color: var(--n500);
  cursor: pointer;
  transition: all var(--dur-fast) var(--ease-out);
}

.password-toggle:hover {
  color: var(--brand-600);
  border-color: rgba(0,190,173,.24);
  background: var(--brand-50);
}

.password-toggle:focus-visible {
  outline: 2px solid rgba(0,158,142,.34);
  outline-offset: 2px;
}

.mobile-nav-open,
.sidebar-open {
  overflow: hidden;
}

.mobile-nav {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  margin-inline: auto;
  width: min(100%, 1200px);
  border-radius: 0 0 22px 22px;
}

.mobile-nav .btn { width: 100%; }

.nav-toggle[aria-expanded="true"] {
  border-color: rgba(0,190,173,.24);
  color: var(--brand-700);
  background: var(--brand-50);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 900px) {
  .public-nav nav,
  .public-nav-actions {
    display: none;
  }

  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
}

@media (max-width: 720px) {
  .auth-card,
  .auth-shell .card,
  .auth-shell .panel-card {
    padding: 24px 18px;
    border-radius: 24px;
  }

  .mobile-nav {
    padding: 12px;
  }
}
