/* ============================================
   YouTube to Transcript — Global Stylesheet
   Pick 3 MVP Series for Michael Decker
   ============================================ */

/* ---------- CSS Variables ---------- */
:root {
  /* Primary palette */
  --color-primary: #2563eb;
  --color-primary-dark: #1d4ed8;
  --color-primary-light: #3b82f6;
  --color-primary-lighter: #dbeafe;
  --color-accent: #06b6d4;

  /* Neutrals */
  --color-bg: #f8fafc;
  --color-surface: #ffffff;
  --color-surface-alt: #f1f5f9;
  --color-border: #e2e8f0;
  --color-text: #1e293b;
  --color-text-muted: #64748b;
  --color-text-light: #94a3b8;

  /* Status */
  --color-success: #16a34a;
  --color-success-bg: #dcfce7;
  --color-warning: #d97706;
  --color-warning-bg: #fef3c7;
  --color-danger: #dc2626;
  --color-danger-bg: #fee2e2;

  /* Typography */
  --font-sans: 'Segoe UI', system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;
  --font-mono: 'SF Mono', 'Fira Code', 'Consolas', monospace;
  --fs-xs: 0.75rem;
  --fs-sm: 0.875rem;
  --fs-base: 1rem;
  --fs-lg: 1.125rem;
  --fs-xl: 1.25rem;
  --fs-2xl: 1.5rem;
  --fs-3xl: 1.875rem;
  --fs-4xl: 2.25rem;
  --fs-hero: 3rem;

  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;

  /* Radii */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.08), 0 2px 4px -2px rgba(0,0,0,0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.08), 0 4px 6px -4px rgba(0,0,0,0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.10), 0 8px 10px -6px rgba(0,0,0,0.05);

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
  --transition-slow: 400ms ease;

  /* Layout */
  --max-width: 1200px;
  --header-height: 64px;
  --sidebar-width: 280px;
}

/* ---------- Dark Mode ---------- */
@media (prefers-color-scheme: dark) {
  :root {
    --color-primary: #3b82f6;
    --color-primary-dark: #2563eb;
    --color-primary-light: #60a5fa;
    --color-primary-lighter: #1e3a5f;
    --color-bg: #0f172a;
    --color-surface: #1e293b;
    --color-surface-alt: #334155;
    --color-border: #334155;
    --color-text: #f1f5f9;
    --color-text-muted: #94a3b8;
    --color-text-light: #64748b;
    --color-success-bg: #14532d;
    --color-warning-bg: #78350f;
    --color-danger-bg: #7f1d1d;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.3);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.4);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.4);
    --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.5);
  }
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-sans);
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
}

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--color-primary-dark);
}

img {
  max-width: 100%;
  height: auto;
}

ul, ol {
  list-style: none;
}

/* ---------- Layout Utilities ---------- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.section {
  padding: var(--space-3xl) 0;
}

.section-sm {
  padding: var(--space-2xl) 0;
}

.text-center { text-align: center; }
.text-muted { color: var(--color-text-muted); }
.text-light { color: var(--color-text-light); }
.text-danger { color: var(--color-danger); }
.text-success { color: var(--color-success); }

.hidden { display: none !important; }
.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;
}

/* ---------- Header / Navbar ---------- */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  height: var(--header-height);
  display: flex;
  align-items: center;
  box-shadow: var(--shadow-sm);
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: var(--fs-xl);
  font-weight: 700;
  color: var(--color-text);
}

.navbar-brand:hover {
  color: var(--color-text);
}

.navbar-brand .logo-icon {
  width: 32px;
  height: 32px;
  background: var(--color-primary);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.2rem;
}

.navbar-nav {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
}

.navbar-nav a {
  color: var(--color-text-muted);
  font-weight: 500;
  font-size: var(--fs-sm);
}

.navbar-nav a:hover {
  color: var(--color-primary);
}

.navbar-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--color-text);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: 0.625rem 1.5rem;
  font-size: var(--fs-base);
  font-weight: 600;
  font-family: inherit;
  border: 2px solid transparent;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-base);
  text-decoration: none;
  white-space: nowrap;
  line-height: 1.4;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

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

.btn-primary:hover:not(:disabled) {
  background: var(--color-primary-dark);
  border-color: var(--color-primary-dark);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background: transparent;
  color: var(--color-primary);
  border-color: var(--color-primary);
}

.btn-secondary:hover:not(:disabled) {
  background: var(--color-primary-lighter);
}

.btn-outline {
  background: transparent;
  color: var(--color-text);
  border-color: var(--color-border);
}

.btn-outline:hover:not(:disabled) {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.btn-ghost {
  background: transparent;
  color: var(--color-text-muted);
  border: none;
  padding: 0.5rem 1rem;
}

.btn-ghost:hover:not(:disabled) {
  color: var(--color-primary);
  background: var(--color-surface-alt);
}

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

.btn-danger:hover:not(:disabled) {
  opacity: 0.9;
}

.btn-sm {
  padding: 0.375rem 0.875rem;
  font-size: var(--fs-sm);
}

.btn-lg {
  padding: 0.875rem 2.5rem;
  font-size: var(--fs-lg);
}

.btn-block {
  width: 100%;
}

/* ---------- Hero Section ---------- */
.hero {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
  color: #fff;
  padding: var(--space-3xl) 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -10%;
  width: 500px;
  height: 500px;
  background: rgba(255,255,255,0.05);
  border-radius: 50%;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: -5%;
  width: 300px;
  height: 300px;
  background: rgba(255,255,255,0.05);
  border-radius: 50%;
}

.hero .container {
  position: relative;
  z-index: 1;
}

.hero h1 {
  font-size: var(--fs-hero);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: var(--space-md);
  letter-spacing: -0.02em;
}

.hero p {
  font-size: var(--fs-xl);
  opacity: 0.9;
  max-width: 640px;
  margin: 0 auto var(--space-xl);
}

.hero-buttons {
  display: flex;
  gap: var(--space-md);
  justify-content: center;
  flex-wrap: wrap;
}

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

.hero .btn-primary:hover {
  background: var(--color-surface-alt);
}

.hero .btn-secondary {
  background: transparent;
  color: #fff;
  border-color: rgba(255,255,255,0.5);
}

.hero .btn-secondary:hover {
  background: rgba(255,255,255,0.1);
  border-color: #fff;
}

/* ---------- Feature Cards ---------- */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--space-xl);
}

.feature-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  text-align: center;
  transition: all var(--transition-base);
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--color-primary-light);
}

.feature-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto var(--space-md);
  background: var(--color-primary-lighter);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
}

.feature-card h3 {
  font-size: var(--fs-lg);
  margin-bottom: var(--space-sm);
}

.feature-card p {
  color: var(--color-text-muted);
  font-size: var(--fs-sm);
}

/* ---------- Section Heading ---------- */
.section-heading {
  text-align: center;
  margin-bottom: var(--space-2xl);
}

.section-heading h2 {
  font-size: var(--fs-3xl);
  font-weight: 700;
  margin-bottom: var(--space-sm);
}

.section-heading p {
  font-size: var(--fs-lg);
  color: var(--color-text-muted);
}

/* ---------- How It Works ---------- */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--space-xl);
}

.step-card {
  text-align: center;
  position: relative;
  padding: var(--space-xl);
}

.step-number {
  width: 48px;
  height: 48px;
  margin: 0 auto var(--space-md);
  background: var(--color-primary);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--fs-lg);
  font-weight: 700;
}

.step-card h3 {
  font-size: var(--fs-lg);
  margin-bottom: var(--space-sm);
}

.step-card p {
  color: var(--color-text-muted);
  font-size: var(--fs-sm);
}

/* ---------- Pricing ---------- */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--space-lg);
  max-width: 1000px;
  margin: 0 auto;
}

.pricing-card {
  background: var(--color-surface);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  text-align: center;
  transition: all var(--transition-base);
  display: flex;
  flex-direction: column;
}

.pricing-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.pricing-card.featured {
  border-color: var(--color-primary);
  position: relative;
}

.pricing-card.featured::before {
  content: 'Most Popular';
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--color-primary);
  color: #fff;
  font-size: var(--fs-xs);
  font-weight: 700;
  padding: 4px 14px;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.pricing-card h3 {
  font-size: var(--fs-lg);
  font-weight: 700;
  margin-bottom: var(--space-sm);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.pricing-price {
  font-size: var(--fs-3xl);
  font-weight: 800;
  margin-bottom: var(--space-xs);
}

.pricing-price .period {
  font-size: var(--fs-base);
  font-weight: 400;
  color: var(--color-text-muted);
}

.pricing-card p.plan-desc {
  color: var(--color-text-muted);
  font-size: var(--fs-sm);
  margin-bottom: var(--space-lg);
}

.pricing-features {
  text-align: left;
  margin-bottom: var(--space-lg);
  flex-grow: 1;
}

.pricing-features li {
  padding: var(--space-sm) 0;
  font-size: var(--fs-sm);
  color: var(--color-text-muted);
  border-bottom: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.pricing-features li::before {
  content: '✓';
  color: var(--color-success);
  font-weight: 700;
  flex-shrink: 0;
}

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

/* ---------- Footer ---------- */
.footer {
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  padding: var(--space-2xl) 0 var(--space-xl);
  margin-top: var(--space-3xl);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  gap: var(--space-xl);
  margin-bottom: var(--space-xl);
}

.footer-brand p {
  color: var(--color-text-muted);
  font-size: var(--fs-sm);
  margin-top: var(--space-sm);
  max-width: 300px;
}

.footer-col h4 {
  font-size: var(--fs-sm);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--space-md);
  color: var(--color-text);
}

.footer-col ul li {
  margin-bottom: var(--space-sm);
}

.footer-col ul li a {
  color: var(--color-text-muted);
  font-size: var(--fs-sm);
}

.footer-col ul li a:hover {
  color: var(--color-primary);
}

.footer-bottom {
  border-top: 1px solid var(--color-border);
  padding-top: var(--space-lg);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: var(--fs-sm);
  color: var(--color-text-muted);
}

/* ---------- Auth Pages ---------- */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-xl);
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
}

.auth-card {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: var(--space-2xl);
  max-width: 440px;
  width: 100%;
  box-shadow: var(--shadow-xl);
}

.auth-card .navbar-brand {
  justify-content: center;
  margin-bottom: var(--space-lg);
}

.auth-card h2 {
  text-align: center;
  font-size: var(--fs-2xl);
  margin-bottom: var(--space-xs);
}

.auth-card .auth-subtitle {
  text-align: center;
  color: var(--color-text-muted);
  margin-bottom: var(--space-xl);
}

.auth-footer {
  text-align: center;
  margin-top: var(--space-lg);
  font-size: var(--fs-sm);
  color: var(--color-text-muted);
}

/* ---------- Forms ---------- */
.form-group {
  margin-bottom: var(--space-lg);
}

.form-group label {
  display: block;
  font-size: var(--fs-sm);
  font-weight: 600;
  margin-bottom: var(--space-sm);
  color: var(--color-text);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.625rem 0.875rem;
  font-size: var(--fs-base);
  font-family: inherit;
  color: var(--color-text);
  background: var(--color-surface);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-md);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(37,99,235,0.15);
}

.form-group input::placeholder {
  color: var(--color-text-light);
}

.form-hint {
  font-size: var(--fs-xs);
  color: var(--color-text-muted);
  margin-top: var(--space-xs);
}

.form-error {
  font-size: var(--fs-sm);
  color: var(--color-danger);
  margin-top: var(--space-sm);
  display: none;
}

.form-error.visible {
  display: block;
}

.form-success {
  font-size: var(--fs-sm);
  color: var(--color-success);
  background: var(--color-success-bg);
  padding: var(--space-md);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-lg);
  display: none;
}

.form-success.visible {
  display: block;
}

/* ---------- App Page ---------- */
.app-layout {
  display: flex;
  gap: var(--space-xl);
  padding: var(--space-xl) 0;
  align-items: flex-start;
}

.app-main {
  flex: 1;
  min-width: 0;
}

.app-sidebar {
  width: var(--sidebar-width);
  flex-shrink: 0;
}

.url-input-wrapper {
  display: flex;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
}

.url-input-wrapper input {
  flex: 1;
  padding: 0.875rem 1rem;
  font-size: var(--fs-base);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-md);
  transition: border-color var(--transition-fast);
}

.url-input-wrapper input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(37,99,235,0.15);
}

/* ---------- Usage Indicator ---------- */
.usage-bar {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  margin-bottom: var(--space-lg);
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.usage-bar .usage-label {
  font-size: var(--fs-sm);
  font-weight: 600;
  white-space: nowrap;
}

.usage-track {
  flex: 1;
  height: 8px;
  background: var(--color-surface-alt);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.usage-fill {
  height: 100%;
  background: var(--color-primary);
  border-radius: var(--radius-full);
  transition: width var(--transition-slow);
}

.usage-fill.warning { background: var(--color-warning); }
.usage-fill.danger { background: var(--color-danger); }

.usage-text {
  font-size: var(--fs-sm);
  color: var(--color-text-muted);
  white-space: nowrap;
}

/* ---------- Transcript Display ---------- */
.transcript-result {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-top: var(--space-lg);
  display: none;
}

.transcript-result.visible {
  display: block;
}

.transcript-header {
  padding: var(--space-lg);
  border-bottom: 1px solid var(--color-border);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-md);
  flex-wrap: wrap;
}

.transcript-meta h3 {
  font-size: var(--fs-lg);
  margin-bottom: var(--space-xs);
}

.transcript-meta .meta-info {
  font-size: var(--fs-sm);
  color: var(--color-text-muted);
  display: flex;
  gap: var(--space-md);
  flex-wrap: wrap;
}

.transcript-actions {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
}

.transcript-body {
  max-height: 500px;
  overflow-y: auto;
  padding: var(--space-lg);
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
  line-height: 1.8;
  white-space: pre-wrap;
  word-break: break-word;
}

.transcript-body p {
  margin-bottom: var(--space-sm);
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  line-height: 1.7;
}

/* ---------- Loading Spinner ---------- */
.spinner-overlay {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-3xl);
  gap: var(--space-md);
}

.spinner-overlay.visible {
  display: flex;
}

.spinner {
  width: 48px;
  height: 48px;
  border: 4px solid var(--color-surface-alt);
  border-top-color: var(--color-primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

.spinner-text {
  color: var(--color-text-muted);
  font-size: var(--fs-sm);
}

/* ---------- Language Selector ---------- */
.lang-selector {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
}

.lang-selector label {
  font-size: var(--fs-sm);
  font-weight: 600;
  white-space: nowrap;
}

.lang-selector select {
  padding: 0.375rem 0.75rem;
  font-size: var(--fs-sm);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  color: var(--color-text);
  cursor: pointer;
}

/* ---------- Sidebar ---------- */
.sidebar-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  margin-bottom: var(--space-lg);
}

.sidebar-card h4 {
  font-size: var(--fs-sm);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--space-md);
  color: var(--color-text-muted);
}

.history-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.history-item {
  padding: var(--space-md);
  background: var(--color-surface-alt);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
  border: 1px solid transparent;
}

.history-item:hover {
  border-color: var(--color-primary);
  background: var(--color-surface);
}

.history-item .history-title {
  font-size: var(--fs-sm);
  font-weight: 600;
  margin-bottom: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.history-item .history-date {
  font-size: var(--fs-xs);
  color: var(--color-text-muted);
}

.history-empty {
  text-align: center;
  color: var(--color-text-light);
  font-size: var(--fs-sm);
  padding: var(--space-lg) 0;
}

/* ---------- Dashboard ---------- */
.dashboard-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: var(--space-xl);
  padding: var(--space-xl) 0;
  align-items: flex-start;
}

.dashboard-sidebar {
  position: sticky;
  top: calc(var(--header-height) + var(--space-lg));
}

.dashboard-nav {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-md);
}

.dashboard-nav a {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 0.625rem var(--space-md);
  border-radius: var(--radius-md);
  color: var(--color-text-muted);
  font-size: var(--fs-sm);
  font-weight: 500;
  transition: all var(--transition-fast);
  margin-bottom: 2px;
}

.dashboard-nav a:hover,
.dashboard-nav a.active {
  background: var(--color-primary-lighter);
  color: var(--color-primary);
}

.dashboard-content {
  min-width: 0;
}

.dashboard-section {
  display: none;
}

.dashboard-section.visible {
  display: block;
}

.dashboard-section h2 {
  font-size: var(--fs-2xl);
  margin-bottom: var(--space-lg);
}

/* ---------- Stat Cards ---------- */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: var(--space-md);
  margin-bottom: var(--space-xl);
}

.stat-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
}

.stat-card .stat-label {
  font-size: var(--fs-sm);
  color: var(--color-text-muted);
  margin-bottom: var(--space-xs);
}

.stat-card .stat-value {
  font-size: var(--fs-2xl);
  font-weight: 700;
}

.stat-card .stat-sub {
  font-size: var(--fs-xs);
  color: var(--color-text-light);
  margin-top: 2px;
}

/* ---------- Plan Card ---------- */
.plan-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  margin-bottom: var(--space-xl);
}

.plan-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
}

.plan-card-header h3 {
  font-size: var(--fs-xl);
}

.plan-badge {
  display: inline-block;
  padding: 4px 14px;
  background: var(--color-primary-lighter);
  color: var(--color-primary);
  border-radius: var(--radius-full);
  font-size: var(--fs-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.plan-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-md);
}

.plan-option {
  border: 2px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  text-align: center;
  transition: all var(--transition-base);
}

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

.plan-option.current {
  border-color: var(--color-primary);
  background: var(--color-primary-lighter);
}

.plan-option h4 {
  font-size: var(--fs-base);
  margin-bottom: var(--space-xs);
}

.plan-option .plan-price {
  font-size: var(--fs-xl);
  font-weight: 700;
  margin-bottom: var(--space-sm);
}

.plan-option .plan-limit {
  font-size: var(--fs-sm);
  color: var(--color-text-muted);
  margin-bottom: var(--space-md);
}

/* ---------- Data Table ---------- */
.table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  background: var(--color-surface);
}

table.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--fs-sm);
}

table.data-table th {
  text-align: left;
  padding: var(--space-md);
  font-weight: 700;
  color: var(--color-text-muted);
  text-transform: uppercase;
  font-size: var(--fs-xs);
  letter-spacing: 0.05em;
  border-bottom: 2px solid var(--color-border);
  white-space: nowrap;
}

table.data-table td {
  padding: var(--space-md);
  border-bottom: 1px solid var(--color-border);
  color: var(--color-text);
}

table.data-table tr:last-child td {
  border-bottom: none;
}

table.data-table tbody tr {
  transition: background var(--transition-fast);
}

table.data-table tbody tr:hover {
  background: var(--color-surface-alt);
}

.table-empty {
  text-align: center;
  padding: var(--space-2xl);
  color: var(--color-text-muted);
}

/* ---------- Settings ---------- */
.settings-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  margin-bottom: var(--space-lg);
}

.settings-card h3 {
  font-size: var(--fs-lg);
  margin-bottom: var(--space-lg);
  padding-bottom: var(--space-md);
  border-bottom: 1px solid var(--color-border);
}

.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-md) 0;
  border-bottom: 1px solid var(--color-border);
  flex-wrap: wrap;
  gap: var(--space-md);
}

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

.settings-row .settings-label {
  font-weight: 500;
}

.settings-row .settings-value {
  color: var(--color-text-muted);
  font-size: var(--fs-sm);
}

/* ---------- Alert / Banner ---------- */
.alert {
  padding: var(--space-md) var(--space-lg);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-lg);
  font-size: var(--fs-sm);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.alert-info {
  background: var(--color-primary-lighter);
  color: var(--color-primary);
}

.alert-success {
  background: var(--color-success-bg);
  color: var(--color-success);
}

.alert-warning {
  background: var(--color-warning-bg);
  color: var(--color-warning);
}

.alert-danger {
  background: var(--color-danger-bg);
  color: var(--color-danger);
}

/* ---------- Toast Notification ---------- */
.toast {
  position: fixed;
  bottom: var(--space-xl);
  right: var(--space-xl);
  background: var(--color-text);
  color: var(--color-surface);
  padding: var(--space-md) var(--space-lg);
  border-radius: var(--radius-md);
  font-size: var(--fs-sm);
  box-shadow: var(--shadow-xl);
  z-index: 1000;
  opacity: 0;
  transform: translateY(20px);
  transition: all var(--transition-base);
  pointer-events: none;
}

.toast.visible {
  opacity: 1;
  transform: translateY(0);
}

.toast.success { background: var(--color-success); color: #fff; }
.toast.error { background: var(--color-danger); color: #fff; }

/* ---------- Responsive ---------- */
@media (max-width: 968px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .footer-brand {
    grid-column: 1 / -1;
  }

  .dashboard-layout {
    grid-template-columns: 1fr;
  }

  .dashboard-sidebar {
    position: static;
  }

  .dashboard-nav {
    display: flex;
    overflow-x: auto;
    gap: var(--space-xs);
    padding: var(--space-sm);
  }

  .dashboard-nav a {
    white-space: nowrap;
    margin-bottom: 0;
  }

  .app-layout {
    flex-direction: column;
  }

  .app-sidebar {
    width: 100%;
  }
}

@media (max-width: 768px) {
  :root {
    --fs-hero: 2.25rem;
    --fs-3xl: 1.75rem;
  }

  .navbar-nav {
    display: none;
    position: absolute;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: var(--color-surface);
    flex-direction: column;
    padding: var(--space-lg);
    border-bottom: 1px solid var(--color-border);
    box-shadow: var(--shadow-md);
    gap: var(--space-md);
  }

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

  .navbar-toggle {
    display: block;
  }

  .hero-buttons {
    flex-direction: column;
    align-items: center;
  }

  .hero-buttons .btn {
    width: 100%;
    max-width: 280px;
  }

  .url-input-wrapper {
    flex-direction: column;
  }

  .url-input-wrapper .btn {
    width: 100%;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .footer-bottom {
    flex-direction: column;
    gap: var(--space-sm);
    text-align: center;
  }

  .transcript-actions {
    width: 100%;
  }

  .transcript-actions .btn {
    flex: 1;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 var(--space-md);
  }

  .section {
    padding: var(--space-2xl) 0;
  }

  .pricing-grid {
    grid-template-columns: 1fr;
  }

  .auth-card {
    padding: var(--space-xl);
  }
}