/* ============================================================
   GrokEngine — Landing & Auth Pages (Flat Theme)
   Matches the admin panel design system
   ============================================================ */

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

:root {
  --primary:          #EF5B25;
  --primary-hover:    #d94f1f;
  --background:       #F5F5F5;
  --card:             #FFFFFF;
  --border:           #E1E2E5;
  --foreground:       #333333;
  --muted:            #F0F0F0;
  --muted-foreground: #5B5F66;
  --destructive:      #DC2626;
  --success:          #16A34A;
  --warning:          #F59E0B;
  --info:             #3B82F6;

  --font: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --nav-h: 56px;
  --max-w: 1100px;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--background);
  color: var(--foreground);
  font-size: 14px;
  line-height: 1.6;
  overflow-x: hidden;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
::selection { background: var(--primary); color: #fff; }

/* ---------- Utility ---------- */
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 24px; }
.text-center { text-align: center; }
.text-muted { color: var(--muted-foreground); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 24px;
  border: 1px solid var(--border);
  font-family: var(--font);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background .15s, border-color .15s;
  text-decoration: none;
  line-height: 1.4;
}
.btn:hover { text-decoration: none; }

.btn-primary {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
.btn-primary:hover {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
  color: #fff;
}

.btn-outline {
  background: var(--card);
  color: var(--foreground);
}
.btn-outline:hover {
  background: var(--muted);
}

.btn-ghost {
  background: transparent;
  color: var(--muted-foreground);
  border-color: transparent;
  padding: 8px 14px;
}
.btn-ghost:hover { color: var(--foreground); background: var(--muted); }

.btn-lg { padding: 12px 32px; font-size: 14px; }
.btn-sm { padding: 6px 14px; font-size: 12px; }
.btn-full { width: 100%; }

.btn:disabled, .btn.loading {
  opacity: .6;
  cursor: not-allowed;
  pointer-events: none;
}

.btn .spinner {
  width: 16px; height: 16px;
  border: 2px solid #fff4;
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .6s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Navigation ---------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  z-index: 100;
  background: var(--card);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  font-weight: 700;
  color: var(--foreground);
}
.nav-logo:hover { text-decoration: none; color: var(--foreground); }

.nav-logo .logo-icon {
  width: 34px;
  height: 34px;
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 16px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
}

.nav-links a {
  color: var(--muted-foreground);
  font-size: 13px;
  font-weight: 500;
}
.nav-links a:hover { color: var(--foreground); text-decoration: none; }

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

.nav-mobile-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--foreground);
  font-size: 22px;
  cursor: pointer;
  padding: 6px;
}

/* ---------- Hero ---------- */
.hero {
  padding-top: calc(var(--nav-h) + 64px);
  padding-bottom: 64px;
  background: var(--card);
  border-bottom: 1px solid var(--border);
}

.hero-content {
  text-align: center;
  max-width: 700px;
  margin: 0 auto;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 14px;
  background: var(--muted);
  border: 1px solid var(--border);
  font-size: 12px;
  font-weight: 500;
  color: var(--muted-foreground);
  margin-bottom: 24px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.hero-badge .dot {
  width: 6px; height: 6px;
  background: var(--success);
  border-radius: 50%;
}

.hero h1 {
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 16px;
  color: var(--foreground);
}

.hero h1 .highlight {
  color: var(--primary);
}

.hero p {
  font-size: 16px;
  color: var(--muted-foreground);
  max-width: 520px;
  margin: 0 auto 32px;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.hero-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 48px;
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}

.hero-stat { text-align: center; }
.hero-stat .num {
  font-size: 28px;
  font-weight: 700;
  color: var(--foreground);
}
.hero-stat .label {
  font-size: 11px;
  color: var(--muted-foreground);
  margin-top: 2px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ---------- Preview Window ---------- */
.hero-preview {
  max-width: 860px;
  margin: 48px auto 0;
}

.preview-window {
  background: var(--card);
  border: 1px solid var(--border);
  overflow: hidden;
}

.preview-titlebar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: var(--muted);
  border-bottom: 1px solid var(--border);
}

.preview-dots { display: flex; gap: 6px; }
.preview-dots span { width: 10px; height: 10px; border-radius: 50%; }
.preview-dots span:nth-child(1) { background: #ef4444; }
.preview-dots span:nth-child(2) { background: #f59e0b; }
.preview-dots span:nth-child(3) { background: #10b981; }

.preview-body {
  padding: 48px;
  min-height: 240px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--background);
}

.preview-placeholder { text-align: center; color: var(--muted-foreground); }
.preview-placeholder .icon { font-size: 40px; margin-bottom: 12px; }

/* ---------- Sections ---------- */
.section {
  padding: 80px 0;
}

.section-label {
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--primary);
  margin-bottom: 8px;
}

.section-title {
  font-size: clamp(24px, 3.5vw, 36px);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 12px;
  color: var(--foreground);
}

.section-desc {
  font-size: 15px;
  color: var(--muted-foreground);
  max-width: 500px;
  margin: 0 auto;
  line-height: 1.7;
}

.section-divider {
  border: none;
  height: 1px;
  background: var(--border);
  margin: 0;
}

/* ---------- Features ---------- */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin-top: 40px;
}

.feature-card {
  background: var(--card);
  border: 1px solid var(--border);
  padding: 28px 24px;
  transition: border-color .2s, transform .2s;
}

.feature-card:hover {
  border-color: var(--primary);
  transform: translateY(-3px);
}

.feature-icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  margin-bottom: 16px;
  background: var(--muted);
  color: var(--foreground);
}

.feature-icon.orange { background: #fef3c7; color: #d97706; }
.feature-icon.blue   { background: #dbeafe; color: #2563eb; }
.feature-icon.green  { background: #dcfce7; color: #15803d; }
.feature-icon.red    { background: #fee2e2; color: #dc2626; }
.feature-icon.purple { background: #ede9fe; color: #7c3aed; }
.feature-icon.cyan   { background: #cffafe; color: #0891b2; }

.feature-card h3 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--foreground);
}

.feature-card p {
  font-size: 13px;
  color: var(--muted-foreground);
  line-height: 1.7;
}

/* ---------- Steps / How It Works ---------- */
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
  margin-top: 40px;
}

.step {
  text-align: center;
  transition: transform .2s;
}
.step:hover { transform: translateY(-2px); }

.step-number {
  width: 48px;
  height: 48px;
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 700;
  margin: 0 auto 16px;
}

.step h3 {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--foreground);
}

.step p {
  font-size: 13px;
  color: var(--muted-foreground);
  line-height: 1.6;
}

/* ---------- Pricing ---------- */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 40px;
  align-items: start;
}

.pricing-card {
  background: var(--card);
  border: 1px solid var(--border);
  padding: 32px 28px;
  position: relative;
  transition: border-color .2s, transform .2s;
}

.pricing-card:hover {
  border-color: var(--primary);
  transform: translateY(-3px);
}

.pricing-card.featured {
  border-color: var(--primary);
  border-width: 2px;
}

.pricing-badge {
  position: absolute;
  top: -11px;
  right: 20px;
  background: var(--primary);
  color: #fff;
  font-size: 10px;
  font-weight: 500;
  padding: 3px 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.pricing-card h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 4px;
}

.pricing-card .price {
  font-size: 36px;
  font-weight: 700;
  margin-bottom: 2px;
  color: var(--foreground);
}
.pricing-card .price span {
  font-size: 14px;
  font-weight: 400;
  color: var(--muted-foreground);
}

.pricing-card .price-alt {
  font-size: 12px;
  color: var(--muted-foreground);
  margin-bottom: 20px;
}

.pricing-features {
  list-style: none;
  margin-bottom: 24px;
}
.pricing-features li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  font-size: 13px;
  color: var(--muted-foreground);
}
.pricing-features li .check {
  color: var(--success);
  font-size: 14px;
  flex-shrink: 0;
}

/* ---------- CTA ---------- */
.cta-section {
  padding: 80px 0;
  text-align: center;
}

.cta-box {
  background: var(--card);
  border: 1px solid var(--border);
  padding: 48px 40px;
  border-top: 3px solid var(--primary);
}

/* ---------- Footer ---------- */
.footer {
  border-top: 1px solid var(--border);
  padding: 32px 0;
  background: var(--card);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-copy {
  font-size: 12px;
  color: var(--muted-foreground);
}

.footer-links {
  display: flex;
  gap: 20px;
  list-style: none;
}
.footer-links a {
  font-size: 12px;
  color: var(--muted-foreground);
}
.footer-links a:hover { color: var(--foreground); }

/* ============================================================
   AUTH PAGES
   ============================================================ */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: var(--background);
}

.auth-container {
  width: 100%;
  max-width: 440px;
}

.auth-header {
  text-align: center;
  margin-bottom: 32px;
}

.auth-header .auth-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 700;
  color: var(--foreground);
  margin-bottom: 28px;
}
.auth-header .auth-logo:hover { text-decoration: none; }

.auth-header .auth-logo .logo-icon {
  width: 40px;
  height: 40px;
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 20px;
}

.auth-header h1 {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 6px;
}

.auth-header p {
  font-size: 14px;
  color: var(--muted-foreground);
}

.auth-card {
  background: var(--card);
  border: 1px solid var(--border);
  padding: 32px;
}

/* ---------- Forms ---------- */
.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted-foreground);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.form-input {
  width: 100%;
  padding: 10px 12px;
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--foreground);
  font-family: var(--font);
  font-size: 14px;
  outline: none;
  transition: border-color .15s;
}

.form-input:focus {
  border-color: var(--primary);
}

.form-input::placeholder {
  color: #999;
}

.form-input.error {
  border-color: var(--destructive);
}

.input-wrapper {
  position: relative;
}

.input-wrapper .toggle-password {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #999;
  cursor: pointer;
  padding: 4px;
  font-size: 14px;
}
.input-wrapper .toggle-password:hover { color: var(--muted-foreground); }

.form-error {
  font-size: 12px;
  color: var(--destructive);
  margin-top: 4px;
  display: none;
}
.form-error.visible { display: block; }

/* Password Strength */
.password-strength { margin-top: 6px; }

.strength-bar {
  height: 3px;
  background: var(--border);
  overflow: hidden;
  margin-bottom: 4px;
}

.strength-fill {
  height: 100%;
  transition: all .3s;
  width: 0;
}
.strength-fill.weak   { width: 25%;  background: var(--destructive); }
.strength-fill.fair   { width: 50%;  background: var(--warning); }
.strength-fill.good   { width: 75%;  background: var(--info); }
.strength-fill.strong { width: 100%; background: var(--success); }

.strength-text {
  font-size: 11px;
  color: var(--muted-foreground);
}

/* Checkbox */
.form-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  cursor: pointer;
  font-size: 13px;
  color: var(--muted-foreground);
  line-height: 1.5;
}

.form-checkbox input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border: 1px solid var(--border);
  background: var(--card);
  flex-shrink: 0;
  cursor: pointer;
  position: relative;
  margin-top: 2px;
  transition: all .15s;
}

.form-checkbox input[type="checkbox"]:checked {
  background: var(--primary);
  border-color: var(--primary);
}

.form-checkbox input[type="checkbox"]:checked::after {
  content: '';
  position: absolute;
  top: 2px; left: 4px;
  width: 5px; height: 8px;
  border: 2px solid #fff;
  border-top: none;
  border-left: none;
  transform: rotate(45deg);
}

/* Alerts */
.alert {
  padding: 10px 14px;
  border: 1px solid;
  font-size: 13px;
  margin-bottom: 16px;
  display: none;
  align-items: center;
  gap: 8px;
}
.alert.visible { display: flex; }

.alert-error {
  background: #fee2e2;
  border-color: #fecaca;
  color: #dc2626;
}

.alert-success {
  background: #dcfce7;
  border-color: #bbf7d0;
  color: #15803d;
}

/* Auth Footer */
.auth-footer {
  text-align: center;
  margin-top: 20px;
  font-size: 13px;
  color: var(--muted-foreground);
}
.auth-footer a { font-weight: 500; }

/* Success State */
.auth-success {
  text-align: center;
  padding: 16px 0;
  display: none;
}
.auth-success.visible { display: block; }

.auth-success .success-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 20px;
  background: #dcfce7;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  color: #15803d;
}

.auth-success h2 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 6px;
}

.auth-success p {
  color: var(--muted-foreground);
  font-size: 13px;
  margin-bottom: 20px;
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 768px) {
  :root { --nav-h: 52px; }

  .nav-links { display: none; }
  .nav-mobile-toggle { display: block; }
  .nav-actions .btn-ghost { display: none; }

  .hero { padding-top: calc(var(--nav-h) + 40px); padding-bottom: 40px; }
  .hero-stats { gap: 24px; flex-wrap: wrap; }
  .hero-preview { margin-top: 32px; }
  .preview-body { padding: 24px; }

  .section { padding: 48px 0; }
  .features-grid { grid-template-columns: 1fr; }
  .pricing-grid { grid-template-columns: 1fr; }
  .cta-box { padding: 32px 20px; }

  .auth-card { padding: 24px 20px; }

  .footer-inner { flex-direction: column; text-align: center; }
  .footer-links { justify-content: center; }
}

@media (max-width: 480px) {
  .hero-actions { flex-direction: column; width: 100%; }
  .hero-actions .btn { width: 100%; }
  .hero-stat .num { font-size: 22px; }
  .steps { grid-template-columns: 1fr; }
}

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* Scroll-reveal */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .6s ease-out, transform .6s ease-out;
}
.animate-on-scroll.animate-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger delays */
.stagger-1 { transition-delay: .1s; }
.stagger-2 { transition-delay: .2s; }
.stagger-3 { transition-delay: .3s; }
.stagger-4 { transition-delay: .35s; }
.stagger-5 { transition-delay: .4s; }
.stagger-6 { transition-delay: .45s; }

/* Hero entrance (page load) */
.hero-badge   { opacity: 0; animation: fadeInUp .6s ease-out .1s forwards; }
.hero h1      { opacity: 0; animation: fadeInUp .6s ease-out .25s forwards; }
.hero-content > p { opacity: 0; animation: fadeInUp .6s ease-out .4s forwards; }
.hero-actions { opacity: 0; animation: fadeInUp .6s ease-out .55s forwards; }
.hero-stats   { opacity: 0; animation: fadeInUp .6s ease-out .7s forwards; }
.hero-preview { opacity: 0; animation: fadeInUp .8s ease-out .85s forwards; }

/* Nav scroll */
.nav { transition: background .3s, border-color .3s; }
.nav.nav-scrolled { background: rgba(255,255,255,.97); }

/* Auth page entrance */
.auth-container { opacity: 0; animation: fadeInUp .5s ease-out .1s forwards; }

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
  .animate-on-scroll { opacity: 1; transform: none; transition: none; }
  .hero-badge, .hero h1, .hero-content > p,
  .hero-actions, .hero-stats, .hero-preview,
  .auth-container { opacity: 1; animation: none; }
  .feature-card:hover, .pricing-card:hover, .step:hover { transform: none; }
}

/* ============================================================
   SECURITY — Password requirements, alerts
   ============================================================ */
.pw-requirements {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
}
.pw-requirements li {
  font-size: 12px;
  color: var(--muted-foreground);
  padding: 2px 0;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: color .2s;
}
.pw-requirements li .pw-req-icon {
  font-size: 11px;
  color: var(--destructive);
  width: 14px;
  text-align: center;
  flex-shrink: 0;
}
.pw-requirements li.met { color: var(--success); }
.pw-requirements li.met .pw-req-icon { color: var(--success); }

.alert-warning {
  background: #fef3c7;
  border-color: #fde68a;
  color: #92400e;
}

/* Honeypot (screen-reader hidden) */
.hp-field {
  position: absolute;
  left: -9999px;
  top: -9999px;
}

/* ============================================================
   DASHBOARD PAGE
   ============================================================ */

/* Loading state */
.dash-loading {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  color: var(--muted-foreground);
  font-size: 14px;
}

.dash-loading .spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin .6s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* App container */
.dash-app {
  min-height: 100vh;
  background: var(--background);
}

/* Top bar */
.dash-topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
  padding: 0 24px;
  background: var(--card);
  border-bottom: 1px solid var(--border);
}

.dash-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  font-weight: 700;
  color: var(--foreground);
  text-decoration: none;
}
.dash-logo:hover { text-decoration: none; color: var(--foreground); }

.dash-logo .logo-icon {
  width: 34px;
  height: 34px;
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 16px;
}

.dash-topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.dash-user-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--muted-foreground);
}

/* Content area */
.dash-content {
  max-width: 900px;
  margin: 0 auto;
  padding: 24px;
  opacity: 0;
  animation: fadeInUp .4s ease-out .05s forwards;
}

/* Tab navigation */
.dash-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 24px;
  overflow-x: auto;
}

.dash-tab {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 12px 20px;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted-foreground);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  font-family: var(--font);
  transition: color .15s, border-color .15s;
  white-space: nowrap;
}

.dash-tab:hover {
  color: var(--foreground);
}

.dash-tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.dash-tab svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
}

/* Panels */
.dash-panel {
  display: none;
}

.dash-panel.active {
  display: block;
  animation: fadeIn .2s ease-out;
}

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* Dashboard cards */
.dash-app .card {
  background: var(--card);
  border: 1px solid var(--border);
  padding: 20px;
  margin-bottom: 20px;
}

.dash-app .card-header {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Stats row */
.dash-app .stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.dash-app .stat-card {
  background: var(--card);
  border: 1px solid var(--border);
  padding: 20px;
}

.dash-app .stat-card .stat-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--muted-foreground);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.dash-app .stat-card .stat-value {
  font-size: 24px;
  font-weight: 700;
  color: var(--foreground);
}

.dash-app .stat-card .stat-sub {
  font-size: 12px;
  color: var(--muted-foreground);
  margin-top: 4px;
}

/* Quick actions */
.dash-quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* Dashboard tables */
.dash-app table {
  width: 100%;
  border-collapse: collapse;
}

.dash-app table th,
.dash-app table td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}

.dash-app table th {
  font-weight: 500;
  color: var(--muted-foreground);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: var(--muted);
}

.dash-app table tbody tr:hover {
  background: var(--muted);
}

/* Badges */
.dash-app .badge {
  display: inline-block;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.dash-app .badge-active { background: #dcfce7; color: #15803d; }
.dash-app .badge-expired { background: var(--muted); color: var(--muted-foreground); }
.dash-app .badge-suspended { background: #fef3c7; color: #d97706; }

/* Mono text */
.dash-app .mono {
  font-family: 'Roboto Mono', monospace;
  font-size: 12px;
}

/* Text helpers */
.dash-app .text-muted { color: var(--muted-foreground); }

/* Welcome card */
#welcomeCard h2 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 4px;
}

#welcomeCard p {
  font-size: 14px;
}

/* Toast container */
.toast-container {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  min-width: 280px;
  max-width: 420px;
  padding: 12px 16px;
  font-size: 13px;
  font-weight: 500;
  border: 1px solid;
  display: flex;
  align-items: center;
  gap: 8px;
  animation: toastIn .25s ease-out;
  cursor: pointer;
}

.toast-success { background: #dcfce7; border-color: #bbf7d0; color: #15803d; }
.toast-error { background: #fee2e2; border-color: #fecaca; color: #dc2626; }

.toast.removing { animation: toastOut .2s ease-in forwards; }

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

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

/* Confirm dialog */
.confirm-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: confirmFadeIn .15s ease-out;
}
.confirm-overlay.removing { animation: confirmFadeOut .12s ease-in forwards; }

.confirm-box {
  background: var(--card);
  border: 1px solid var(--border);
  width: 400px;
  max-width: 90vw;
}

.confirm-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 20px 0;
  font-size: 15px;
  font-weight: 700;
}

.confirm-body {
  padding: 12px 20px 20px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--muted-foreground);
}

.confirm-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 0 20px 16px;
}

@keyframes confirmFadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes confirmFadeOut { from { opacity: 1; } to { opacity: 0; } }

/* Plans grid */
.plans-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}

.plan-card {
  position: relative;
  background: var(--card);
  border: 2px solid var(--border);
  padding: 24px 20px;
  text-align: center;
  transition: border-color .15s;
}

.plan-card:hover {
  border-color: var(--primary);
}

.plan-card.plan-current {
  border-color: var(--primary);
}

.plan-badge {
  position: absolute;
  top: -1px;
  right: 16px;
  background: var(--primary);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.plan-card h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
}

.plan-price {
  font-size: 36px;
  font-weight: 700;
  color: var(--foreground);
  margin-bottom: 4px;
}

.plan-price span {
  font-size: 14px;
  font-weight: 400;
  color: var(--muted-foreground);
}

.plan-price-alt {
  font-size: 13px;
  color: var(--muted-foreground);
  margin-bottom: 16px;
}

.plan-features {
  list-style: none;
  text-align: left;
  margin-bottom: 20px;
  padding: 0;
}

.plan-features li {
  padding: 6px 0;
  font-size: 13px;
  color: var(--foreground);
  border-bottom: 1px solid var(--border);
}

.plan-features li:last-child {
  border-bottom: none;
}

/* Dashboard responsive */
@media (max-width: 768px) {
  .dash-topbar { padding: 0 16px; }
  .dash-content { padding: 16px; }
  .dash-tab { padding: 10px 14px; font-size: 12px; }
  .dash-app .stats-row { grid-template-columns: 1fr 1fr; }
  .dash-user-name { display: none; }
  .plans-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .dash-app .stats-row { grid-template-columns: 1fr; }
  .dash-quick-actions { flex-direction: column; }
  .dash-quick-actions .btn { width: 100%; }
}
