﻿/* ============================================================
   Codeweb Portal - NexusIoT dark theme (teal accent #00d4aa)
   Adapted from template.html. Styles all pages (landing, auth,
   dashboard) plus the portal's forms/tables/cards.
   ============================================================ */

:root {
  --bg-deep: #070b10;
  --bg-main: #0d1117;
  --bg-card: #161b22;
  --bg-elevated: #1c2128;
  --fg: #e6edf3;
  --fg-muted: #7d8590;
  --accent: #00d4aa;
  --accent-glow: rgba(0, 212, 170, 0.3);
  --accent-secondary: #ff9500;
  --border: #30363d;
  --danger: #f85149;
  --success: #3fb950;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg-deep);
  color: var(--fg);
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 { font-family: 'Space Grotesk', sans-serif; }

a { color: inherit; }

/* Custom Scrollbar */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-main); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--fg-muted); }

/* Layout utilities (replace Tailwind classes used in markup) */
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 2rem; }
.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.flex-wrap { flex-wrap: wrap; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.gap-12 { gap: 3rem; }

/* Particle Canvas */
#particle-canvas {
  position: fixed; top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 0; pointer-events: none;
}

/* Gradient Overlays */
.gradient-overlay {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  background:
    radial-gradient(ellipse 80% 50% at 20% 40%, rgba(0, 212, 170, 0.08) 0%, transparent 50%),
    radial-gradient(ellipse 60% 40% at 80% 20%, rgba(255, 149, 0, 0.05) 0%, transparent 50%);
  pointer-events: none; z-index: 1;
}

.content-wrapper { position: relative; z-index: 2; }

/* Navigation */
.nav-container {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  padding: 1rem 2rem;
  background: linear-gradient(to bottom, var(--bg-deep) 0%, transparent 100%);
  transition: background 0.3s ease;
}

.nav-container.scrolled,
.nav-container.open {
  background: rgba(7, 11, 16, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.logo {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700; font-size: 1.5rem; color: var(--fg);
  display: flex; align-items: center; gap: 0.5rem;
  text-decoration: none;
}

.logo-sub { color: var(--fg-muted); font-weight: 500; font-size: 0.9rem; }

.logo-icon {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, var(--accent) 0%, #00a080 100%);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  position: relative; flex-shrink: 0;
}

.logo-icon::before {
  content: '';
  width: 8px; height: 8px;
  background: var(--bg-deep);
  border-radius: 50%;
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.5); opacity: 0.7; }
}

.nav-link {
  color: var(--fg-muted); font-weight: 500;
  padding: 0.5rem 1rem; border-radius: 6px;
  transition: all 0.2s ease;
  cursor: pointer; text-decoration: none;
  display: inline-block;
}

.nav-link:hover { color: var(--fg); background: rgba(255, 255, 255, 0.05); }
.nav-link.active { color: var(--accent); }

/* Buttons */
.btn-primary {
  background: linear-gradient(135deg, var(--accent) 0%, #00a080 100%);
  color: var(--bg-deep); font-weight: 600;
  padding: 0.85rem 1.75rem; border-radius: 10px; border: none;
  cursor: pointer; transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative; overflow: hidden;
  text-decoration: none; display: inline-flex; align-items: center; justify-content: center;
  font-size: 0.95rem;
  box-shadow: 0 4px 12px rgba(0, 212, 170, 0.3);
}

.btn-primary::before {
  content: '';
  position: absolute; top: 0; left: -100%; width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  transition: left 0.5s ease;
}

.btn-primary:hover::before { left: 100%; }
.btn-primary:hover { 
  transform: translateY(-2px); 
  box-shadow: 0 8px 24px rgba(0, 212, 170, 0.4);
}
.btn-primary:active {
  transform: translateY(0);
  box-shadow: 0 4px 12px rgba(0, 212, 170, 0.3);
}

.btn-secondary {
  background: transparent; color: var(--fg); font-weight: 500;
  padding: 0.85rem 1.75rem; border-radius: 10px;
  border: 1.5px solid var(--border); cursor: pointer; transition: all 0.3s ease;
  text-decoration: none; display: inline-flex; align-items: center; justify-content: center;
  font-size: 0.95rem;
}

.btn-secondary:hover { 
  border-color: var(--accent); 
  color: var(--accent); 
  background: rgba(0, 212, 170, 0.05);
  transform: translateY(-1px);
}
.btn-secondary { cursor: pointer; font: inherit; }

.download-dialog { width: min(520px, calc(100vw - 28px)); max-height: min(680px, calc(100vh - 28px)); margin: auto; padding: 0; overflow: hidden; border: 1px solid rgba(0,212,170,.28); border-radius: 14px; background: linear-gradient(145deg, #18232a 0%, var(--bg-card) 42%, #10161d 100%); color: var(--fg); box-shadow: 0 28px 90px rgba(0,0,0,.68), 0 0 0 1px rgba(255,255,255,.03) inset; }
.download-dialog::backdrop { background: rgba(2,6,10,.78); backdrop-filter: blur(7px); }
.download-dialog[open] { animation: download-dialog-in .2s ease-out both; }
.download-dialog-head { display: flex; justify-content: space-between; gap: 20px; align-items: flex-start; padding: 26px 28px 22px; border-bottom: 1px solid rgba(255,255,255,.08); background: linear-gradient(135deg, rgba(0,212,170,.13), transparent 58%); }
.download-dialog-head p { color: var(--accent); font-size: .7rem; letter-spacing: .16em; font-weight: 700; }
.download-dialog-head h2 { margin-top: 7px; font-size: 1.45rem; letter-spacing: 0; }
.download-dialog-head div::after { content: '选择适合你设备的版本'; display: block; margin-top: 7px; color: var(--fg-muted); font-size: .82rem; }
.download-close { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 34px; width: 34px; height: 34px; border: 1px solid rgba(255,255,255,.1); border-radius: 50%; background: rgba(255,255,255,.04); color: var(--fg-muted); font-size: 1.35rem; line-height: 1; cursor: pointer; transition: .18s ease; }
.download-close:hover { border-color: rgba(0,212,170,.55); background: rgba(0,212,170,.12); color: var(--accent); transform: rotate(90deg); }
.download-list { display: grid; gap: 9px; max-height: min(510px, calc(100vh - 190px)); overflow-y: auto; padding: 18px; }
.download-link { display: flex; align-items: center; justify-content: space-between; gap: 18px; min-height: 72px; padding: 14px 16px; border: 1px solid rgba(255,255,255,.08); border-radius: 9px; background: rgba(255,255,255,.035); text-decoration: none; color: var(--fg); transition: border-color .18s ease, background .18s ease, transform .18s ease; }
.download-link:hover { border-color: rgba(0,212,170,.55); background: rgba(0,212,170,.09); color: var(--fg); transform: translateY(-1px); }
.download-link > span:first-child { min-width: 0; }
.download-link b, .download-link small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.download-link b { font-size: .95rem; }
.download-link small { margin-top: 5px; color: var(--fg-muted); font-size: .78rem; }
.download-link > span:last-child { display: inline-flex; align-items: center; gap: 6px; flex: 0 0 auto; color: var(--accent); font-size: .82rem; font-weight: 600; }
.download-link > span:last-child::after { content: '↓'; font-size: 1.05rem; }
.download-empty { padding: 28px 12px; color: var(--fg-muted); text-align: center; }
@keyframes download-dialog-in { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: translateY(0) scale(1); } }

@media (max-width: 520px) {
  .download-dialog-head { padding: 22px 20px 18px; }
  .download-list { padding: 12px; }
  .download-link { min-height: 66px; padding: 12px 13px; }
}

.mobile-menu-btn {
  display: none; flex-direction: column; gap: 4px;
  background: none; border: none; cursor: pointer; padding: 0.5rem;
}

.mobile-menu-btn span { width: 24px; height: 2px; background: var(--fg); transition: all 0.2s ease; }

/* Hero Section */
.hero-section {
  min-height: 100vh;
  display: flex; align-items: center;
  padding: 8rem 0 4rem; position: relative;
}

.hero-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 4rem; width: 100%;
}

.hero-content { flex: 1; max-width: 640px; }

.hero-title {
  font-size: clamp(2.8rem, 6vw, 4.8rem);
  font-weight: 700; line-height: 1.15; margin-bottom: 1.75rem;
  letter-spacing: -0.02em;
}

.hero-title .accent { 
  color: var(--accent); position: relative;
  background: linear-gradient(135deg, var(--accent) 0%, #00ffc8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-title .accent::after {
  content: '';
  position: absolute; bottom: -8px; left: 0; width: 100%; height: 6px;
  background: linear-gradient(90deg, var(--accent), transparent);
  border-radius: 3px;
  opacity: 0.5;
  animation: glow-pulse 2s ease-in-out infinite;
}

@keyframes glow-pulse {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 0.8; box-shadow: 0 0 20px var(--accent-glow); }
}

.hero-subtitle {
  font-size: 1.15rem; color: var(--fg-muted);
  max-width: 560px; line-height: 1.8; margin-bottom: 2.75rem;
}

/* Hero Visual Window (howone.ai style) */
.core-slide-visual-wrap { display: flex; justify-content: center; width: 100%; max-width: 540px; }

.win-window {
  width: 440px; max-width: 100%; height: 300px;
  background: linear-gradient(145deg, rgba(22, 27, 34, 0.8) 0%, rgba(13, 17, 23, 0.95) 100%);
  border: 1px solid rgba(0, 212, 170, 0.2);
  border-radius: 18px;
  backdrop-filter: blur(12px);
  overflow: hidden;
  padding: 1.5rem;
  font-family: 'Space Grotesk', monospace;
  font-size: 12px;
  display: flex; flex-direction: column;
  box-shadow: 0 20px 60px rgba(0, 212, 170, 0.15), 0 0 1px rgba(0, 212, 170, 0.3) inset;
}

.win-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; }
.win-label { color: var(--fg-muted); font-weight: 500; }
.win-stat { 
  color: var(--accent); 
  font-weight: 700;
  padding: 4px 10px;
  background: rgba(0, 212, 170, 0.15);
  border-radius: 6px;
  border: 1px solid rgba(0, 212, 170, 0.25);
}

.win-items { display: flex; flex-direction: column; gap: 0.65rem; }

.win-item { 
  display: flex; justify-content: space-between; align-items: center; 
  font-size: 11.5px;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 6px;
  transition: background 0.3s ease;
}

.win-item:hover {
  background: rgba(0, 212, 170, 0.08);
}

.win-item span:first-child { color: var(--fg); }
.win-item span:last-child { color: var(--fg-muted); }

.win-tag {
  flex: none; margin-left: 1rem; padding: 3px 9px;
  font-size: 10px; color: var(--accent);
  background: rgba(0, 212, 170, 0.12);
  border: 1px solid rgba(0, 212, 170, 0.3);
  border-radius: 999px;
  font-weight: 600;
}

.win-foot {
  margin-top: auto; padding-top: 1rem;
  border-top: 1px solid rgba(0, 212, 170, 0.15);
  font-size: 10.5px; display: flex; justify-content: space-between;
  color: var(--fg-muted);
}

@keyframes win-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes win-scale { from { opacity: 0; transform: scale(0.95); } to { opacity: 1; transform: scale(1); } }
@keyframes win-left { from { opacity: 0; transform: translateX(-12px); } to { opacity: 1; transform: translateX(0); } }
.win-anim { animation: win-fade 0.75s cubic-bezier(0.16, 1, 0.3, 1) both; }
.win-anim-scale { animation: win-scale 0.85s cubic-bezier(0.16, 1, 0.3, 1) 0.36s both; }
.win-anim-left { animation: win-left 0.78s cubic-bezier(0.16, 1, 0.3, 1) both; }

/* Stats Section */
.stats-section { padding: 4rem 0; position: relative; }

.stats-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem; max-width: 1200px; margin: 0 auto; padding: 0 2rem;
}

.stat-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 16px; padding: 2rem; text-align: center;
  position: relative; overflow: hidden; transition: all 0.3s ease;
}

.stat-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent-secondary));
  transform: scaleX(0); transition: transform 0.3s ease;
}

.stat-card:hover::before { transform: scaleX(1); }
.stat-card:hover { transform: translateY(-4px); border-color: var(--accent); }

.stat-value {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 2.5rem; font-weight: 700; color: var(--accent);
  margin-bottom: 0.5rem;
}

.stat-label { color: var(--fg-muted); font-size: 0.9rem; }

/* Features Section */
.features-section { padding: 6rem 0; background: linear-gradient(180deg, transparent 0%, var(--bg-main) 50%, transparent 100%); }

.section-title { 
  font-size: clamp(2.2rem, 4vw, 3.2rem); 
  text-align: center; 
  margin-bottom: 1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.section-subtitle {
  color: var(--fg-muted); 
  text-align: center;
  font-size: 1.05rem;
  max-width: 640px; 
  margin: 0 auto 4.5rem; 
  line-height: 1.75;
}

.features-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem; max-width: 1200px; margin: 0 auto; padding: 0 2rem;
}

.feature-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 16px; padding: 2rem;
  transition: all 0.3s ease; position: relative; overflow: hidden;
}

.feature-card::after {
  content: '';
  position: absolute; top: 0; left: 0; width: 100%; height: 100%;
  background: radial-gradient(circle at top left, var(--accent-glow) 0%, transparent 50%);
  opacity: 0; transition: opacity 0.3s ease;
}

.feature-card:hover::after { opacity: 1; }
.feature-card:hover { transform: translateY(-8px); border-color: rgba(0, 212, 170, 0.3); }

.feature-icon {
  width: 56px; height: 56px;
  background: rgba(0, 212, 170, 0.1); border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 1.5rem; position: relative; z-index: 1;
}

.feature-icon svg { width: 28px; height: 28px; color: var(--accent); }

.feature-title { font-size: 1.25rem; font-weight: 600; margin-bottom: 0.75rem; position: relative; z-index: 1; }
.feature-desc { color: var(--fg-muted); line-height: 1.6; position: relative; z-index: 1; }

.feature-list { list-style: none; margin: 0.75rem 0 0; position: relative; z-index: 1; }
.feature-list li {
  position: relative; padding: 0.25rem 0 0.25rem 1.1rem;
  color: var(--fg-muted); font-size: 0.85rem; line-height: 1.6;
}
.feature-list li::before {
  content: '';
  position: absolute; left: 0; top: 0.65rem;
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 6px var(--accent);
}

/* Dashboard Preview Section */
.dashboard-preview { padding: 6rem 0; }

.preview-container {
  max-width: 1200px; margin: 0 auto; padding: 0 2rem;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 20px; overflow: hidden; position: relative;
}

.preview-header {
  display: flex; align-items: center; gap: 0.5rem;
  padding: 1rem 1.5rem; background: var(--bg-elevated); border-bottom: 1px solid var(--border);
}

.preview-dot { width: 12px; height: 12px; border-radius: 50%; }

.preview-body { padding: 2rem; display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }

.preview-chart { background: var(--bg-elevated); border-radius: 12px; padding: 1.5rem; height: 200px; position: relative; overflow: hidden; }

.chart-title { font-size: 0.875rem; color: var(--fg-muted); margin-bottom: 1rem; }

.chart-bars { display: flex; align-items: flex-end; gap: 8px; height: calc(100% - 2rem); }

.chart-bar {
  flex: 1;
  background: linear-gradient(to top, var(--accent), rgba(0, 212, 170, 0.3));
  border-radius: 4px 4px 0 0;
  transition: height 0.5s ease;
  animation: bar-grow 2s ease-out forwards;
}

@keyframes bar-grow { from { height: 0; } }

.preview-metrics { display: flex; flex-direction: column; gap: 1rem; }

.metric-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 1rem; background: var(--bg-elevated); border-radius: 10px;
  transition: all 0.2s ease;
}

.metric-row:hover { background: rgba(0, 212, 170, 0.05); }

.metric-label { display: flex; align-items: center; gap: 0.75rem; }

.metric-dot { width: 10px; height: 10px; border-radius: 50%; }

.metric-value { font-family: 'Space Grotesk', sans-serif; font-weight: 600; font-size: 1.1rem; }

.efficiency-list { list-style: none; display: flex; flex-direction: column; gap: 1.1rem; }

.efficiency-list li {
  display: flex; align-items: flex-start; gap: 0.75rem;
  color: var(--fg); font-size: 0.95rem; line-height: 1.6;
}

.efficiency-list li::before {
  content: '✓';
  flex-shrink: 0; width: 18px; height: 18px; margin-top: 0.1rem;
  background: rgba(0, 212, 170, 0.15); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--accent); font-size: 0.7rem; line-height: 1;
}

/* Footer */
footer { padding: 4rem 2rem 0; border-top: 1px solid var(--border); }

.footer-inner { max-width: 900px; margin: 0 auto; text-align: center; padding-bottom: 0; }

.footer-brand {
  display: inline-flex; align-items: center; gap: 0.6rem;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700; font-size: 1.4rem; margin-bottom: 0.75rem;
}

.footer-brand .logo-icon { width: 34px; height: 34px; }

.footer-tagline { color: var(--fg-muted); font-size: 0.95rem; margin-bottom: 1.75rem; line-height: 1.7; }

.footer-links {
  display: flex; flex-wrap: wrap; justify-content: center;
  gap: 0.5rem 1.75rem; margin-bottom: 2.5rem;
}

.footer-links a {
  color: var(--fg-muted); font-size: 0.85rem;
  text-decoration: none; transition: color 0.2s ease;
}

.footer-links a:hover { color: var(--accent); }

.footer-copy {
  border-top: 1px solid var(--border); padding: 1.5rem 0;
  color: var(--fg-muted); font-size: 0.8rem;
}

/* Plans Section (landing) */
.plans-section { padding: 5rem 0 3rem; }

.plans-grid {
  display: grid; 
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem; 
  max-width: 1200px; 
  margin: 0 auto; 
  padding: 0 2rem;
}

.plan-card {
  background: linear-gradient(145deg, var(--bg-card) 0%, rgba(22, 27, 34, 0.8) 100%);
  border: 1px solid var(--border);
  border-radius: 20px; 
  padding: 2.25rem; 
  text-align: center;
  display: flex; 
  flex-direction: column; 
  align-items: stretch;
  gap: 0;
  position: relative; 
  overflow: hidden; 
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.plan-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 4px;
  background: linear-gradient(90deg, var(--accent), var(--accent-secondary));
  transform: scaleX(0); 
  transform-origin: left;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.plan-card::after {
  content: '';
  position: absolute; top: 0; left: 0; width: 100%; height: 100%;
  background: radial-gradient(circle at top, rgba(0, 212, 170, 0.08) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.plan-card:hover::before { transform: scaleX(1); }
.plan-card:hover::after { opacity: 1; }
.plan-card:hover { 
  transform: translateY(-8px) scale(1.02); 
  border-color: rgba(0, 212, 170, 0.4);
  box-shadow: 0 20px 40px rgba(0, 212, 170, 0.2);
}

.plan-badge {
  font-size: 0.7rem; 
  letter-spacing: 0.08em; 
  text-transform: uppercase;
  color: var(--accent); 
  background: linear-gradient(135deg, rgba(0, 212, 170, 0.15), rgba(0, 212, 170, 0.08));
  padding: 0.35rem 0.9rem; 
  border-radius: 20px;
  border: 1px solid rgba(0, 212, 170, 0.25);
  font-weight: 600;
  display: inline-block;
}

.plan-name { 
  font-size: 1.4rem; 
  font-weight: 700;
  margin: 0 0 0.5rem;
  line-height: 1.2;
}

.plan-card-top { 
  display: none;
}

.plan-vip-mark { 
  display: none;
}

.plan-intro { 
  min-height: 0;
  margin: 0 0 1.5rem; 
  color: var(--fg-muted); 
  font-size: 0.88rem; 
  line-height: 1.55; 
}

.plan-token-display { 
  margin: 0 0 1.25rem;
  padding: 0.9rem 1.5rem; 
  border: 1px solid rgba(0, 212, 170, 0.25); 
  border-radius: 10px; 
  background: linear-gradient(135deg, rgba(0, 212, 170, 0.08), rgba(0, 212, 170, 0.03));
}

.plan-token-display strong { 
  display: inline; 
  color: var(--accent); 
  font-family: 'Space Grotesk', sans-serif; 
  font-size: 1.5rem; 
  line-height: 1;
  font-weight: 700;
}

.plan-token-display span { 
  color: var(--fg-muted); 
  font-size: 0.88rem; 
  display: inline;
  margin-left: 0.3rem;
}

.plan-price-highlight {
  margin: 0 0 1.5rem;
  padding: 0.75rem 1.25rem;
  background: linear-gradient(135deg, rgba(0, 212, 170, 0.2), rgba(0, 212, 170, 0.08));
  border: 2px solid rgba(0, 212, 170, 0.4);
  border-radius: 12px;
  text-align: center;
  box-shadow: 0 0 24px rgba(0, 212, 170, 0.2);
  position: relative;
  overflow: hidden;
}

.plan-price-highlight::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  animation: price-shine 3s ease-in-out infinite;
}

@keyframes price-shine {
  0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
  100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

.plan-price-highlight .price-number {
  display: block;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 2.2rem;
  font-weight: 900;
  line-height: 1;
  color: var(--accent);
  text-shadow: 0 0 24px rgba(0, 212, 170, 0.6);
  position: relative;
  z-index: 1;
}

.plan-price-highlight .price-label {
  display: block;
  margin-top: 0.3rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--fg);
  letter-spacing: 0.05em;
  position: relative;
  z-index: 1;
}

.plan-specs { 
  display: flex;
  justify-content: center;
  color: var(--fg-muted); 
  font-size: 0.85rem;
  width: 100%;
  margin: 0 0 1rem;
}

.plan-specs span { 
  padding: 0.4rem 1rem;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 8px;
  border: 1px solid var(--border);
}

.plan-specs b { 
  color: var(--accent); 
  font-family: 'Space Grotesk', sans-serif; 
  font-size: 1rem;
  font-weight: 700;
}

.plan-feature-pills { 
  display: flex;
  flex-direction: column;
  gap: 0.5rem; 
  margin: 0 0 1.25rem;
  width: 100%;
  text-align: left;
}

.plan-feature-pills span { 
  position: relative; 
  padding-left: 24px; 
  color: var(--fg-muted); 
  font-size: 0.85rem; 
  line-height: 1.4;
}

.plan-feature-pills span::before { 
  content: '✓'; 
  position: absolute; 
  left: 0; 
  top: 50%;
  transform: translateY(-50%);
  width: 16px; 
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  color: var(--accent);
  background: rgba(0, 212, 170, 0.12);
  border-radius: 50%;
}

.plan-card .btn-primary { 
  width: 100%; 
  margin-top: auto;
  padding: 0.75rem 1.5rem;
  font-size: 0.95rem;
}

/* ============================================================
   DASHBOARD LAYOUT (sidebar + main)
   ============================================================ */
.dashboard-layout { min-height: 100vh; }

.sidebar {
  background: var(--bg-main);
  border-right: 1px solid var(--border);
  padding: 1.5rem;
  position: fixed; top: 0; left: 0;
  width: 260px; height: 100vh; overflow-y: auto;
}

.sidebar-logo {
  display: flex; align-items: center; gap: 0.75rem;
  margin-bottom: 2rem; padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
  font-family: 'Space Grotesk', sans-serif; font-weight: 600;
  text-decoration: none; color: var(--fg);
}

.sidebar-nav { display: flex; flex-direction: column; gap: 0.5rem; }

.sidebar-link {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.875rem 1rem; color: var(--fg-muted);
  border-radius: 8px; transition: all 0.2s ease;
  cursor: pointer; text-decoration: none; font-size: 0.9rem;
}

.sidebar-link:hover { background: rgba(255, 255, 255, 0.05); color: var(--fg); }
.sidebar-link.active { background: rgba(0, 212, 170, 0.1); color: var(--accent); }

.sidebar-link svg { width: 20px; height: 20px; flex-shrink: 0; }

.sidebar-section { margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid var(--border); }

.sidebar-section-title {
  font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--fg-muted); margin-bottom: 1rem;
}

.dashboard-main { margin-left: 260px; padding: 2rem; min-height: 100vh; }

.dashboard-mobile-header { display: none; }

.dashboard-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 2rem; gap: 1rem; flex-wrap: wrap;
}

.dashboard-title { font-size: 1.5rem; font-weight: 600; }

.dashboard-actions { display: flex; align-items: center; gap: 1rem; }

.search-box {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 8px; padding: 0.5rem 1rem;
  display: flex; align-items: center; gap: 0.5rem;
}

.search-box input {
  background: transparent; border: none; color: var(--fg);
  outline: none; width: 200px;
}

.search-box input::placeholder { color: var(--fg-muted); }

.user-chip {
  display: flex; align-items: center; gap: 0.6rem;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 8px; padding: 0.35rem 0.9rem 0.35rem 0.35rem;
  font-size: 0.85rem;
}

.user-avatar {
  width: 32px; height: 32px; border-radius: 8px;
  background: rgba(0, 212, 170, 0.15); color: var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-weight: 600; font-family: 'Space Grotesk', sans-serif;
}

/* Dashboard Stats */
.dash-stats {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem; margin-bottom: 2rem;
}

.dash-stat-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 12px; padding: 1.5rem; position: relative; overflow: hidden;
}

.dash-stat-card::before { content: ''; position: absolute; top: 0; left: 0; width: 4px; height: 100%; }
.dash-stat-card.green::before { background: var(--success); }
.dash-stat-card.blue::before { background: var(--accent); }
.dash-stat-card.orange::before { background: var(--accent-secondary); }
.dash-stat-card.red::before { background: var(--danger); }

.dash-stat-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 1rem; }
.dash-stat-title { color: var(--fg-muted); font-size: 0.875rem; }

.dash-stat-icon {
  width: 40px; height: 40px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
}

.dash-stat-card.green .dash-stat-icon { background: rgba(63, 185, 80, 0.1); color: var(--success); }
.dash-stat-card.blue .dash-stat-icon { background: rgba(0, 212, 170, 0.1); color: var(--accent); }
.dash-stat-card.orange .dash-stat-icon { background: rgba(255, 149, 0, 0.1); color: var(--accent-secondary); }
.dash-stat-card.red .dash-stat-icon { background: rgba(248, 81, 73, 0.1); color: var(--danger); }

.dash-stat-value { font-family: 'Space Grotesk', sans-serif; font-size: 2rem; font-weight: 700; }
.dash-stat-change { font-size: 0.8rem; display: flex; align-items: center; gap: 0.25rem; margin-top: 0.5rem; }
.dash-stat-change.up { color: var(--success); }
.dash-stat-change.down { color: var(--danger); }

.dashboard-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 1.5rem; }

.dash-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.dash-card-header { padding: 1.25rem 1.5rem; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; }
.dash-card-title { font-weight: 600; }
.dash-card-body { padding: 1.5rem; }

/* ============================================================
   PORTAL - auth (centered card)
   ============================================================ */
.auth-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 2rem; }

.auth-card {
  width: 100%; max-width: 400px;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 20px; padding: 2.5rem 2.25rem;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.auth-logo { display: flex; align-items: center; justify-content: center; gap: 0.6rem; margin-bottom: 1.75rem; font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 1.1rem; }
.auth-logo .logo-icon { width: 40px; height: 40px; }

.auth-card h2 { font-size: 1.4rem; margin-bottom: 0.35rem; text-align: center; }
.auth-card .sub { color: var(--fg-muted); font-size: 0.85rem; margin-bottom: 1.75rem; line-height: 1.6; text-align: center; }
.auth-card .switch { text-align: center; color: var(--fg-muted); font-size: 0.85rem; margin-top: 1.25rem; }
.auth-card .switch a { color: var(--accent); text-decoration: none; }

/* ============================================================
   PORTAL - forms, cards, tables, tags
   ============================================================ */
.ma-form { display: flex; flex-direction: column; gap: 1rem; }
.ma-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

.ma-field { display: flex; flex-direction: column; gap: 0.4rem; }
.ma-field label { font-size: 0.8rem; color: var(--fg-muted); }

.ma-input, .ma-select {
  background: var(--bg-elevated); border: 1px solid var(--border);
  border-radius: 8px; color: var(--fg);
  padding: 0.6rem 0.8rem; font-size: 0.9rem; outline: none;
  transition: border-color 0.2s ease; font-family: 'DM Sans', sans-serif;
}

.ma-input:focus, .ma-select:focus { border-color: var(--accent); }
.ma-input::placeholder { color: var(--fg-muted); }

.ma-check { display: flex; align-items: center; gap: 0.5rem; font-size: 0.85rem; color: var(--fg-muted); cursor: pointer; }
.ma-check input { accent-color: var(--accent); }

.ma-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  background: var(--bg-elevated); border: 1px solid var(--border);
  color: var(--fg); padding: 0.6rem 1.1rem; border-radius: 8px;
  font-size: 0.9rem; font-weight: 500; cursor: pointer;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1); text-decoration: none;
}

.ma-btn:hover { 
  border-color: var(--accent); 
  color: var(--accent);
  background: rgba(0, 212, 170, 0.05);
  transform: translateY(-1px);
}

.ma-btn.primary {
  background: linear-gradient(135deg, var(--accent) 0%, #00a080 100%);
  color: var(--bg-deep); border: none; font-weight: 600;
  box-shadow: 0 2px 8px rgba(0, 212, 170, 0.25);
}

.ma-btn.primary:hover { 
  transform: translateY(-2px); 
  box-shadow: 0 6px 20px rgba(0, 212, 170, 0.35);
  color: var(--bg-deep); 
}

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

.ma-btn.block { width: 100%; }
.ma-btn.sm { padding: 0.4rem 0.8rem; font-size: 0.8rem; }

.ma-card {
  background: linear-gradient(145deg, var(--bg-card) 0%, rgba(22, 27, 34, 0.8) 100%);
  border: 1px solid var(--border);
  border-radius: 16px; padding: 1.5rem;
  transition: all 0.3s ease;
}

.ma-card:hover {
  border-color: rgba(0, 212, 170, 0.2);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.ma-card-title { font-size: 1rem; margin: 0 0 1rem; font-weight: 600; }
.ma-panel { margin-top: 1.5rem; }

.ma-page-head { 
  display: flex; 
  flex-direction: column; 
  gap: 0.5rem; 
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}
.ma-page-head h1 { 
  font-size: 1.75rem; 
  font-weight: 700;
  letter-spacing: -0.02em;
}
.ma-page-head p { 
  color: var(--fg-muted); 
  font-size: 0.95rem;
  line-height: 1.6;
}

.ma-tag {
  display: inline-flex; align-items: center;
  padding: 0.25rem 0.7rem; border-radius: 20px;
  font-size: 0.72rem; font-weight: 600; white-space: nowrap;
  border: 1px solid transparent;
}

.ma-tag.green { 
  background: rgba(63, 185, 80, 0.15); 
  color: var(--success);
  border-color: rgba(63, 185, 80, 0.25);
}
.ma-tag.blue { 
  background: rgba(0, 212, 170, 0.15); 
  color: var(--accent);
  border-color: rgba(0, 212, 170, 0.25);
}
.ma-tag.gray { 
  background: rgba(125, 133, 144, 0.15); 
  color: var(--fg-muted);
  border-color: rgba(125, 133, 144, 0.2);
}
.ma-tag.red { 
  background: rgba(248, 81, 73, 0.15); 
  color: var(--danger);
  border-color: rgba(248, 81, 73, 0.25);
}

.ma-table { width: 100%; border-collapse: collapse; }
.ma-table th, .ma-table td { padding: 0.9rem 1rem; text-align: left; border-bottom: 1px solid var(--border); font-size: 0.85rem; }
.ma-table th { color: var(--fg-muted); font-weight: 500; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; }
.ma-table tr:last-child td { border-bottom: none; }
.ma-table tr:hover td { background: rgba(255, 255, 255, 0.02); }
.ma-table code { color: var(--accent); background: var(--bg-elevated); padding: 0.15rem 0.4rem; border-radius: 4px; font-size: 0.8rem; }

.ma-list { display: flex; flex-direction: column; gap: 0.5rem; }

.ma-row {
  display: flex; align-items: center; gap: 1rem;
  padding: 0.8rem 1rem; background: var(--bg-elevated);
  border: 1px solid var(--border); border-radius: 10px; flex-wrap: wrap;
}

.ma-row .grow { flex: 1; min-width: 0; }
.ma-row b { display: block; font-size: 0.9rem; }
.ma-row small { color: var(--fg-muted); font-size: 0.75rem; }
.ma-row .ma-user-usage { margin-top: 0.25rem; line-height: 1.45; }
.ma-user-row { gap: 0.5rem; }
.ma-user-row form { margin: 0; }

.ma-empty { color: var(--fg-muted); text-align: center; padding: 2rem; font-size: 0.9rem; }

.ma-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.5rem; margin-bottom: 2rem; }
.ma-stat { background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px; padding: 1.5rem; }
.ma-stat small { color: var(--fg-muted); font-size: 0.8rem; display: block; margin-bottom: 0.4rem; }
.ma-stat strong { font-family: 'Space Grotesk', sans-serif; font-size: 2rem; font-weight: 700; color: var(--accent); display: block; }
.ma-stat em { font-style: normal; font-size: 0.75rem; color: var(--fg-muted); font-weight: 400; display: block; margin-top: 0.2rem; }

.ma-balance {
  display: flex; align-items: center; gap: 2.5rem;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 16px; padding: 1.75rem 2rem; margin-bottom: 2rem; flex-wrap: wrap;
}

.ma-balance .txt { display: flex; flex-direction: column; gap: 0.3rem; }
.ma-balance .txt small { color: var(--fg-muted); font-size: 0.8rem; }
.ma-balance .txt strong { font-family: 'Space Grotesk', sans-serif; font-size: 2.2rem; color: var(--accent); }
.ma-balance .txt strong span { font-size: 0.9rem; color: var(--fg-muted); font-weight: 400; }
.ma-balance .right { margin-left: auto; }

.ma-dashboard { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; margin-bottom: 1.5rem; }

.ma-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1.5rem; }

.plan-dashboard-grid { align-items: stretch; }
.plan-card-dashboard { 
  display: flex; 
  flex-direction: column; 
  gap: 0; 
  margin: 0; 
  padding: 2rem;
  background: linear-gradient(145deg, var(--bg-card) 0%, rgba(22, 27, 34, 0.8) 100%);
  border: 1px solid var(--border);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

.plan-card-dashboard::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 4px;
  background: linear-gradient(90deg, var(--accent), var(--accent-secondary));
  transform: scaleX(0); 
  transform-origin: left;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.plan-card-dashboard::after {
  content: '';
  position: absolute; top: 0; left: 0; width: 100%; height: 100%;
  background: radial-gradient(circle at top left, rgba(0, 212, 170, 0.06) 0%, transparent 50%);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.plan-card-dashboard:hover::before { transform: scaleX(1); }
.plan-card-dashboard:hover::after { opacity: 1; }
.plan-card-dashboard:hover { 
  transform: translateY(-8px); 
  border-color: rgba(0, 212, 170, 0.4);
  box-shadow: 0 20px 40px rgba(0, 212, 170, 0.2);
}

.plan-card-dashboard h2 { 
  margin: 0 0 0.5rem; 
  font-size: 1.4rem;
  font-weight: 700;
  line-height: 1.2;
}

.plan-card-dashboard .plan-intro {
  min-height: 0;
  margin: 0 0 1.5rem;
}

.plan-card-dashboard .plan-token-display {
  margin: 0 0 1.25rem;
  padding: 0.9rem 1.5rem;
}

.plan-card-dashboard .plan-token-display strong {
  font-size: 1.5rem;
}

.plan-card-dashboard .plan-token-display span {
  font-size: 0.88rem;
  margin-top: 0;
}

.plan-card-dashboard .plan-price-highlight {
  margin: 0 0 1.5rem;
}

.plan-card-dashboard .plan-specs-single {
  display: flex;
  justify-content: center;
  margin: 0 0 1.5rem;
}

.plan-card-dashboard .plan-specs-single span {
  padding: 0.4rem 1rem;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 8px;
  border: 1px solid var(--border);
  color: var(--fg-muted);
  font-size: 0.85rem;
}

.plan-card-dashboard .plan-specs-single b {
  color: var(--accent);
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1rem;
  font-weight: 700;
}

.plan-card-dashboard .plan-feature-pills {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin: 0 0 1.25rem;
  text-align: left;
}

.plan-card-dashboard .plan-feature-pills span {
  position: relative;
  padding-left: 24px;
  color: var(--fg-muted);
  font-size: 0.85rem;
  line-height: 1.4;
}

.plan-card-dashboard .plan-feature-pills span::before {
  content: '✓';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  color: var(--accent);
  background: rgba(0, 212, 170, 0.12);
  border-radius: 50%;
}

.plan-dashboard-price { font-family: 'Space Grotesk', sans-serif; font-size: 2rem; font-weight: 700; color: var(--accent); }
.plan-dashboard-price span { font-family: 'DM Sans', sans-serif; font-size: 0.82rem; color: var(--fg-muted); font-weight: 400; }
.plan-actions { margin-top: auto; display: flex; flex-direction: column; gap: 0.75rem; padding-top: 0.75rem; }
.plan-action-separator { display: flex; align-items: center; gap: 8px; color: var(--fg-muted); font-size: 12px; }
.plan-action-separator span { flex: 1; height: 1px; background: rgba(125, 133, 144, 0.25); }

.plan-specs-single {
  display: flex;
  justify-content: center;
  color: var(--fg-muted);
  font-size: 0.85rem;
  width: 100%;
  margin: 0 0 1.5rem;
}

.plan-specs-single span {
  padding: 0.5rem 1rem;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 8px;
  border: 1px solid var(--border);
}

.plan-specs-single b {
  color: var(--accent);
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
}

.ma-inline-form { display: flex; gap: 0.75rem; flex-wrap: wrap; align-items: center; }
.ma-check-row { display: flex; gap: 0.5rem; align-items: center; }
.ma-check-row .ma-input { flex: 1; min-width: 0; }
.ma-note { color: var(--fg-muted); font-size: 0.8rem; margin: 0.75rem 0 0; }

.ma-admin { display: grid; grid-template-columns: 220px 1fr; gap: 1.5rem; align-items: start; }
.ma-admin-nav { display: flex; flex-direction: column; gap: 0.35rem; position: sticky; top: 2rem; }
.ma-admin-nav a { display: block; padding: 0.65rem 0.9rem; border-radius: 8px; color: var(--fg-muted); font-size: 0.9rem; transition: all 0.2s ease; text-decoration: none; }
.ma-admin-nav a:hover { background: rgba(255, 255, 255, 0.05); color: var(--fg); }
.ma-admin-nav a.active { background: rgba(0, 212, 170, 0.1); color: var(--accent); }

.ma-model {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.7rem 0.8rem; border: 1px solid var(--border);
  border-radius: 10px; margin-bottom: 0.5rem; background: var(--bg-elevated); flex-wrap: wrap;
}

.ma-model .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--success); box-shadow: 0 0 8px var(--success); flex-shrink: 0; }
.ma-model.locked { opacity: 0.55; }
.ma-model.locked .dot { background: var(--fg-muted); box-shadow: none; }
.ma-model b { font-size: 0.9rem; }
.ma-model em { font-style: normal; font-size: 0.75rem; color: var(--fg-muted); flex: 1; }

.flash {
  background: rgba(0, 212, 170, 0.1); border: 1px solid rgba(0, 212, 170, 0.3);
  color: var(--accent); border-radius: 10px;
  padding: 0.8rem 1rem; font-size: 0.9rem; margin-bottom: 1.5rem;
}

.flash.error {
  background: rgba(245, 108, 108, 0.1); border: 1px solid rgba(245, 108, 108, 0.35);
  color: #f56c6c;
}

/* Reveal Animations */
.reveal { opacity: 0; transform: translateY(30px); transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1); }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Mobile Responsive */
@media (max-width: 1024px) {
  .sidebar { display: none; }
  .dashboard-mobile-header {
    position: sticky; top: 0; z-index: 100;
    display: flex; align-items: center; justify-content: space-between;
    min-height: 62px; padding: 0.65rem 1rem;
    background: rgba(7, 11, 16, 0.96); backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
  }
  .dashboard-mobile-header .sidebar-logo { margin: 0; padding: 0; border: 0; }
  .dashboard-mobile-menu-btn {
    display: flex; flex-direction: column; gap: 4px; padding: 0.5rem;
    background: transparent; border: 0; color: var(--fg); cursor: pointer;
  }
  .dashboard-mobile-menu-btn span { width: 24px; height: 2px; background: currentColor; }
  .dashboard-mobile-menu {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    padding: 0.75rem 1rem 1rem; background: rgba(7, 11, 16, 0.98);
    border-bottom: 1px solid var(--border);
  }
  .dashboard-mobile-header.open .dashboard-mobile-menu { display: block; }
  .dashboard-mobile-links { display: flex; flex-direction: column; gap: 0.35rem; }
  .dashboard-mobile-links .sidebar-link { padding: 0.75rem 0.9rem; }
  .dashboard-mobile-links .console-menu-popover { position: static; margin: 0.25rem 0 0; }
  .dashboard-main { margin-left: 0; padding: 1.25rem 1rem 2rem; }
  .dashboard-grid { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  .ma-dashboard { grid-template-columns: 1fr; }
  .ma-admin { grid-template-columns: 1fr; }
  .ma-admin-nav { position: static; flex-direction: row; flex-wrap: wrap; }
  .ma-form-row { grid-template-columns: 1fr; }
  .plans-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
    padding: 0 1rem;
  }
  .plan-card, .plan-card-dashboard {
    min-height: auto;
  }
}

.mobile-nav-action { display: none; }

@media (max-width: 768px) {
  .hero-section { padding-top: 6rem; }
  .hero-inner { flex-direction: column; text-align: center; }
  .hero-subtitle { margin-left: auto; margin-right: auto; }
  .core-slide-visual-wrap { margin-top: 3rem; }
  .preview-body { grid-template-columns: 1fr; }
  .nav-container { padding: 0.75rem 1rem; }
  .nav-container .logo { font-size: 1.15rem; }
  .nav-container .logo-sub { display: none; }
  .mobile-menu-btn { display: flex; }
  .nav-cta { display: none; }
  .mobile-nav-action { display: block; }
  .nav-links {
    display: none;
    position: absolute; top: 100%; left: 0; right: 0;
    background: rgba(7, 11, 16, 0.98); border-bottom: 1px solid var(--border);
    flex-direction: column; padding: 1rem; gap: 0.5rem;
  }
  .nav-container.open .nav-links { display: flex; }
  
  .plan-card, .plan-card-dashboard {
    padding: 1.5rem;
  }
  
  .plan-name, .plan-card-dashboard h2 {
    font-size: 1.3rem;
  }
  
  .plan-token-display strong,
  .plan-card-dashboard .plan-token-display strong {
    font-size: 1.8rem;
  }
  
  .plan-price-highlight .price-number {
    font-size: 2.8rem;
  }
  
  .ma-grid {
    grid-template-columns: 1fr;
  }
}
.console-menu { position: relative; }
.console-menu summary { list-style: none; cursor: pointer; }
.console-menu summary::-webkit-details-marker { display: none; }
.console-menu-popover { position: absolute; z-index: 20; top: calc(100% + 8px); right: 0; min-width: 118px; padding: 6px; border: 1px solid var(--border); border-radius: 6px; background: var(--bg-elevated); box-shadow: 0 12px 28px rgba(0,0,0,.28); }
.console-menu-popover a { display: block; padding: 8px 10px; border-radius: 4px; color: var(--fg); text-decoration: none; font-size: .88rem; }
.console-menu-popover a:hover { background: var(--bg-main); color: var(--accent); }
.sidebar-console-menu .console-menu-popover { top: auto; right: auto; bottom: calc(100% + 4px); left: 8px; }

/* ============================================================
   Pagination for payments table
   ============================================================ */
.pay-pager {
  display: flex; align-items: center; justify-content: center; gap: 0.5rem;
  margin-top: 1.25rem; padding-top: 1rem; border-top: 1px solid var(--border);
}
.pay-pager-btn {
  padding: 0.5rem 0.75rem; border: 1px solid var(--border); border-radius: 6px;
  background: var(--bg-card); color: var(--fg); text-decoration: none;
  font-size: 0.875rem; transition: all 0.2s;
}
.pay-pager-btn:hover { background: var(--bg-elevated); border-color: var(--accent); color: var(--accent); }
.pay-pager-btn.active { background: var(--accent); border-color: var(--accent); color: var(--bg-deep); font-weight: 600; }
.pay-pager-ellipsis { padding: 0 0.25rem; color: var(--fg-muted); }
.pay-pager-info { margin-left: 0.5rem; font-size: 0.8rem; color: var(--fg-muted); }
