/* =========================================================
   Hidraa TTS — Global Styles
   Design: Dark premium, squared buttons, teal/purple palette
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Oswald:wght@300;400;500;600;700&family=Inter:wght@300;400;500;600;700;800&display=swap');

/* ── Variables ── */
:root {
  --bg:          #07070f;
  --surface:     #0f0f1e;
  --surface-2:   #151526;
  --surface-3:   #1a1a30;
  --border:      #1e1e3c;
  --border-light:#252545;

  --primary:     #00d4b1;
  --primary-dark:#00b89a;
  --primary-glow:rgba(0,212,177,0.18);
  --primary-glow-strong:rgba(0,212,177,0.35);

  --accent:      #7c3aed;
  --accent-dark: #6d28d9;
  --accent-glow: rgba(124,58,237,0.18);

  --text:        #e2e8f0;
  --text-muted:  #94a3b8;
  --text-dim:    #64748b;

  --success:     #10b981;
  --error:       #ef4444;
  --warning:     #f59e0b;
  --info:        #3b82f6;

  --radius:      4px;
  --radius-md:   6px;
  --radius-lg:   8px;
  --radius-xl:   12px;

  --transition:  all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --shadow:      0 4px 24px rgba(0,0,0,0.5);
  --shadow-glow: 0 0 24px var(--primary-glow), 0 4px 16px rgba(0,0,0,0.4);
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
a { color: var(--primary); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--primary-dark); }
img { max-width: 100%; height: auto; display: block; }
input, textarea, select, button { font-family: inherit; }
::selection { background: var(--primary); color: var(--bg); }

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--surface); }
::-webkit-scrollbar-thumb { background: var(--border-light); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary); }

/* ── Typography ── */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Oswald', sans-serif;
  font-weight: 600;
  letter-spacing: 0.5px;
  color: var(--text);
  line-height: 1.2;
}

/* ── Layout ── */
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.container-sm { max-width: 800px; margin: 0 auto; padding: 0 24px; }
.section { padding: 80px 0; }

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.3px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  white-space: nowrap;
  text-decoration: none;
  user-select: none;
}
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn:active:not(:disabled) { transform: scale(0.97); }

/* Shimmer effect */
.btn::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -75%;
  width: 50%;
  height: 200%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.12), transparent);
  transform: skewX(-20deg);
  transition: left 0.4s;
}
.btn:hover::after:not(:disabled) { left: 150%; }

.btn-primary {
  background: linear-gradient(135deg, var(--primary), #00b8d9);
  color: var(--bg);
  font-weight: 700;
}
.btn-primary:hover:not(:disabled) {
  background: linear-gradient(135deg, var(--primary-dark), #009ec0);
  box-shadow: 0 0 20px var(--primary-glow-strong), 0 4px 16px rgba(0,0,0,0.4);
  transform: translateY(-1px);
}

.btn-accent {
  background: linear-gradient(135deg, var(--accent), #9333ea);
  color: #fff;
  font-weight: 700;
}
.btn-accent:hover:not(:disabled) {
  box-shadow: 0 0 20px var(--accent-glow), 0 4px 16px rgba(0,0,0,0.4);
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 1.5px solid var(--primary);
}
.btn-outline:hover:not(:disabled) {
  background: var(--primary-glow);
  box-shadow: 0 0 12px var(--primary-glow);
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border: 1.5px solid var(--border);
}
.btn-ghost:hover:not(:disabled) {
  color: var(--text);
  border-color: var(--border-light);
  background: var(--surface-2);
}

.btn-danger {
  background: transparent;
  color: var(--error);
  border: 1.5px solid var(--error);
}
.btn-danger:hover:not(:disabled) { background: rgba(239,68,68,0.1); }

.btn-sm { padding: 8px 16px; font-size: 13px; }
.btn-lg { padding: 16px 36px; font-size: 16px; }
.btn-xl { padding: 18px 48px; font-size: 17px; font-weight: 800; letter-spacing: 0.5px; }
.btn-full { width: 100%; }
.btn-icon { width: 40px; height: 40px; padding: 0; }
.btn-icon-sm { width: 32px; height: 32px; padding: 0; }

/* ── Form Elements ── */
.form-group { margin-bottom: 20px; }
.form-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.form-input, .form-textarea, .form-select {
  width: 100%;
  padding: 12px 16px;
  background: var(--surface-2);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 14px;
  transition: var(--transition);
  outline: none;
}
.form-input:focus, .form-textarea:focus, .form-select:focus {
  border-color: var(--primary);
  background: var(--surface-3);
  box-shadow: 0 0 0 3px var(--primary-glow);
}
.form-input::placeholder, .form-textarea::placeholder { color: var(--text-dim); }
.form-select { appearance: none; cursor: pointer; }
.form-textarea { resize: vertical; min-height: 140px; line-height: 1.6; }
.form-select option { background: var(--surface-2); }
.form-hint { font-size: 12px; color: var(--text-dim); margin-top: 6px; }
.form-error { font-size: 12px; color: var(--error); margin-top: 6px; }

/* Range input */
input[type="range"] {
  -webkit-appearance: none;
  width: 100%;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  outline: none;
  cursor: pointer;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 8px var(--primary-glow);
  transition: var(--transition);
}
input[type="range"]::-webkit-slider-thumb:hover {
  box-shadow: 0 0 16px var(--primary-glow-strong);
  transform: scale(1.2);
}

/* ── Cards ── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: var(--transition);
}
.card:hover { border-color: var(--border-light); }
.card-glow:hover { box-shadow: 0 0 24px var(--primary-glow); border-color: var(--primary); }

/* ── Badges ── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 10px;
  border-radius: 2px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.badge-primary { background: var(--primary-glow); color: var(--primary); }
.badge-accent { background: var(--accent-glow); color: var(--accent); }
.badge-success { background: rgba(16,185,129,0.15); color: var(--success); }
.badge-error { background: rgba(239,68,68,0.12); color: var(--error); }
.badge-warning { background: rgba(245,158,11,0.12); color: var(--warning); }

/* ── Alerts ── */
.alert {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 18px;
  border-radius: var(--radius);
  border-left: 3px solid;
  font-size: 14px;
  margin-bottom: 16px;
}
.alert-success { background: rgba(16,185,129,0.08); border-color: var(--success); color: var(--success); }
.alert-error { background: rgba(239,68,68,0.08); border-color: var(--error); color: var(--error); }
.alert-warning { background: rgba(245,158,11,0.08); border-color: var(--warning); color: var(--warning); }
.alert-info { background: rgba(59,130,246,0.08); border-color: var(--info); color: var(--info); }

/* ── Navigation ── */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: 64px;
  background: rgba(7,7,15,0.9);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
}
.navbar-inner {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 24px;
}
.navbar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}
.navbar-logo-mark {
  width: 34px;
  height: 34px;
  background: linear-gradient(135deg, var(--primary), #00b8d9);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 900;
  color: var(--bg);
  font-family: 'Oswald', sans-serif;
  letter-spacing: -1px;
  box-shadow: 0 0 16px var(--primary-glow);
}
.navbar-logo-text {
  font-family: 'Oswald', sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 1px;
  text-transform: uppercase;
}
.navbar-logo-text span { color: var(--primary); }
.navbar-nav { display: flex; align-items: center; gap: 4px; flex: 1; }
.nav-link {
  padding: 8px 14px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  transition: var(--transition);
  text-decoration: none;
}
.nav-link:hover, .nav-link.active {
  color: var(--text);
  background: var(--surface-2);
}
.nav-link.active { color: var(--primary); }
.navbar-actions { display: flex; align-items: center; gap: 12px; margin-left: auto; }

/* Token widget in navbar */
.nav-token-widget {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 7px 14px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition);
  min-width: 160px;
}
.nav-token-widget:hover { border-color: var(--primary); background: var(--primary-glow); }
.ntw-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.ntw-total {
  font-size: 13px;
  font-weight: 700;
  color: var(--primary);
  font-family: 'Oswald', sans-serif;
  letter-spacing: 0.5px;
}
.ntw-label { font-size: 10px; color: var(--text-dim); font-weight: 500; }
.ntw-bar-wrap {
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
  display: flex;
}
.ntw-bar-used {
  height: 100%;
  background: var(--primary);
  border-radius: 2px;
  transition: width 0.5s ease;
  flex-shrink: 0;
}
.ntw-bar-purchased {
  height: 100%;
  background: var(--accent);
  opacity: 0.6;
  border-radius: 0 2px 2px 0;
  transition: width 0.5s ease;
  flex-shrink: 0;
}
.ntw-sub {
  display: flex;
  gap: 8px;
  align-items: center;
}
.ntw-sub-item {
  font-size: 10px;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  gap: 3px;
}
.ntw-dot { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }
.ntw-dot-monthly { background: var(--primary); }
.ntw-dot-purchased { background: var(--accent); }

/* legacy compat */
.token-chip { display: none; }

/* ── App Layout ── */
.app-layout {
  display: flex;
  min-height: 100vh;
  padding-top: 64px;
}
.sidebar {
  width: 240px;
  flex-shrink: 0;
  background: var(--surface);
  border-right: 1px solid var(--border);
  position: fixed;
  top: 64px;
  bottom: 0;
  left: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  padding: 20px 12px;
  gap: 4px;
}
.sidebar-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  transition: var(--transition);
  cursor: pointer;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
}
.sidebar-item:hover { color: var(--text); background: var(--surface-2); }
.sidebar-item.active { color: var(--primary); background: var(--primary-glow); }
.sidebar-item svg { width: 18px; height: 18px; flex-shrink: 0; }
.sidebar-section {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-dim);
  padding: 14px 12px 6px;
  margin-top: 8px;
}
.main-content {
  flex: 1;
  margin-left: 240px;
  padding: 32px;
  min-height: calc(100vh - 64px);
}

/* ── Page Header ── */
.page-header { margin-bottom: 32px; }
.page-title { font-size: 28px; font-weight: 700; margin-bottom: 6px; }
.page-subtitle { color: var(--text-muted); font-size: 15px; }

/* ── Token Balance Card ── */
.balance-card {
  background: linear-gradient(135deg, rgba(0,212,177,0.08), rgba(124,58,237,0.06));
  border: 1px solid var(--primary);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 24px;
}
.balance-icon {
  width: 48px;
  height: 48px;
  background: var(--primary-glow);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  flex-shrink: 0;
}
.balance-info { flex: 1; }
.balance-label { font-size: 12px; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.8px; font-weight: 600; }
.balance-value { font-family: 'Oswald', sans-serif; font-size: 28px; font-weight: 700; color: var(--primary); }
.balance-sub { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.balance-bar {
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  margin-top: 8px;
  overflow: hidden;
}
.balance-bar-fill {
  height: 100%;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--primary), #00b8d9);
  transition: width 0.5s ease;
}

/* ── Studio ── */
.studio-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 24px;
  align-items: start;
}
.voice-panel-scroll {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.studio-textarea-wrap { position: relative; }
.studio-textarea {
  width: 100%;
  min-height: 220px;
  max-height: 400px;
  resize: none;
  font-size: 15px;
  line-height: 1.7;
  padding: 18px;
  padding-bottom: 40px;
}
.char-counter {
  position: absolute;
  bottom: 12px;
  right: 14px;
  font-size: 12px;
  color: var(--text-dim);
  font-weight: 500;
}
.char-counter.warn { color: var(--warning); }
.char-counter.over { color: var(--error); }

/* Generate button — fixed always visible */
.btn-generate {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 300;
  background: linear-gradient(135deg, var(--primary), #00b8d9);
  color: var(--bg);
  font-size: 15px;
  font-weight: 800;
  padding: 16px 28px;
  border-radius: 50px;
  width: auto;
  overflow: hidden;
  letter-spacing: 0.3px;
  box-shadow: 0 4px 24px rgba(13,148,136,0.5), 0 2px 8px rgba(0,0,0,0.4);
  display: flex;
  align-items: center;
  gap: 8px;
}
.btn-generate:hover:not(:disabled) {
  box-shadow: 0 0 30px var(--primary-glow-strong), 0 6px 24px rgba(0,0,0,0.4);
  transform: translateY(-1px);
}
.btn-generate.loading {
  background: linear-gradient(135deg, #008a75, #007fa0);
  cursor: wait;
}
.btn-generate .spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(0,0,0,0.3);
  border-top-color: var(--bg);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Voice settings panel */
.voice-panel { gap: 12px; }
.voice-panel .card { padding: 18px; }
.voice-panel-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-dim);
  margin-bottom: 12px;
}

/* Audio Player */
.audio-player {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-top: 16px;
}
.audio-player-title { font-size: 13px; color: var(--text-muted); margin-bottom: 12px; font-weight: 600; }
.audio-player audio { width: 100%; height: 40px; outline: none; }
audio::-webkit-media-controls-panel { background: var(--surface-3); }

/* Waveform canvas */
.waveform {
  width: 100%;
  height: 60px;
  border-radius: var(--radius);
  background: var(--surface-3);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.waveform canvas { width: 100%; height: 100%; }

/* Generation loading animation */
.generating-animation {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 60px;
}
.generating-animation span {
  display: block;
  width: 3px;
  height: 20px;
  background: var(--primary);
  border-radius: 2px;
  animation: wave 1s ease-in-out infinite;
}
.generating-animation span:nth-child(2) { animation-delay: 0.1s; }
.generating-animation span:nth-child(3) { animation-delay: 0.2s; }
.generating-animation span:nth-child(4) { animation-delay: 0.3s; }
.generating-animation span:nth-child(5) { animation-delay: 0.4s; }
.generating-animation span:nth-child(6) { animation-delay: 0.3s; }
.generating-animation span:nth-child(7) { animation-delay: 0.2s; }
.generating-animation span:nth-child(8) { animation-delay: 0.1s; }
@keyframes wave {
  0%, 100% { height: 8px; opacity: 0.4; }
  50% { height: 40px; opacity: 1; }
}

/* ── History ── */
.history-list { display: flex; flex-direction: column; gap: 12px; }
.history-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: var(--transition);
}
.history-item:hover { border-color: var(--border-light); background: var(--surface-2); }
.history-play-btn {
  width: 44px;
  height: 44px;
  border-radius: var(--radius);
  background: var(--primary-glow);
  border: 1px solid var(--primary);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: var(--transition);
}
.history-play-btn:hover { background: var(--primary); color: var(--bg); box-shadow: 0 0 16px var(--primary-glow-strong); }
.history-info { flex: 1; min-width: 0; }
.history-text {
  font-size: 14px;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 400px;
  margin-bottom: 4px;
}
.history-meta { display: flex; align-items: center; gap: 12px; font-size: 12px; color: var(--text-dim); }
.history-meta span { display: flex; align-items: center; gap: 4px; }
.history-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }

/* ── Token Packages ── */
.packages-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.package-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px 20px;
  text-align: center;
  position: relative;
  transition: var(--transition);
  cursor: pointer;
}
.package-card:hover {
  border-color: var(--primary);
  box-shadow: 0 0 24px var(--primary-glow);
  transform: translateY(-2px);
}
.package-card.featured {
  border-color: var(--primary);
  background: linear-gradient(135deg, rgba(0,212,177,0.06), rgba(0,184,217,0.04));
}
.package-card.selected {
  border-color: var(--primary);
  background: linear-gradient(135deg, rgba(0,212,177,0.1), rgba(0,184,217,0.07));
  box-shadow: 0 0 24px var(--primary-glow);
}
.package-badge {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  padding: 2px 14px;
  background: linear-gradient(135deg, var(--primary), #00b8d9);
  color: var(--bg);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  border-radius: 2px;
}
.package-name { font-family: 'Oswald', sans-serif; font-size: 18px; color: var(--text); margin-bottom: 8px; }
.package-tokens { font-family: 'Oswald', sans-serif; font-size: 32px; font-weight: 700; color: var(--primary); }
.package-tokens-label { font-size: 12px; color: var(--text-dim); margin-bottom: 16px; }
.package-price { font-family: 'Oswald', sans-serif; font-size: 24px; color: var(--text); }
.package-price-sub { font-size: 12px; color: var(--text-dim); margin-bottom: 20px; }
.package-savings { font-size: 11px; color: var(--success); font-weight: 700; margin-bottom: 6px; }
.package-desc { font-size: 13px; color: var(--text-muted); margin-bottom: 20px; }

/* Payment modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.8);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}
.modal-overlay.open { opacity: 1; pointer-events: all; }
.modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 32px;
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  transform: scale(0.95);
  transition: transform 0.2s;
}
.modal-overlay.open .modal { transform: scale(1); }
.modal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; }
.modal-title { font-family: 'Oswald', sans-serif; font-size: 22px; }
.modal-close { background: none; border: none; color: var(--text-muted); cursor: pointer; font-size: 20px; padding: 4px; border-radius: var(--radius); transition: var(--transition); }
.modal-close:hover { color: var(--text); background: var(--surface-2); }

/* QR Code display */
.pix-qr {
  text-align: center;
  padding: 20px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin: 16px 0;
}
.pix-qr img { width: 180px; height: 180px; margin: 0 auto; border-radius: var(--radius); border: 4px solid #fff; }
.pix-code-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface-3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 14px;
  margin-top: 12px;
}
.pix-code { flex: 1; font-size: 11px; color: var(--text-muted); word-break: break-all; font-family: monospace; }

/* ── Auth Pages ── */
.auth-layout {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: radial-gradient(ellipse at top, rgba(0,212,177,0.06) 0%, var(--bg) 60%);
}
.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 40px;
}
.auth-logo { text-align: center; margin-bottom: 32px; }
.auth-title { font-family: 'Oswald', sans-serif; font-size: 26px; margin-bottom: 6px; }
.auth-sub { color: var(--text-muted); font-size: 14px; }
.auth-divider { display: flex; align-items: center; gap: 12px; margin: 24px 0; }
.auth-divider::before, .auth-divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.auth-divider span { font-size: 12px; color: var(--text-dim); }
.auth-footer { text-align: center; margin-top: 24px; font-size: 14px; color: var(--text-muted); }

/* ── Landing Page ── */
.landing-hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 80px 0;
  position: relative;
  overflow: hidden;
  background: radial-gradient(ellipse at 50% 0%, rgba(0,212,177,0.08) 0%, var(--bg) 60%);
}
.hero-bg-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(30,30,60,0.5) 1px, transparent 1px),
    linear-gradient(90deg, rgba(30,30,60,0.5) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
}
.hero-bg-glow {
  position: absolute;
  top: -200px;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(0,212,177,0.1) 0%, transparent 70%);
  pointer-events: none;
}
.hero-content { position: relative; z-index: 1; text-align: center; max-width: 780px; margin: 0 auto; }
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 16px;
  background: var(--primary-glow);
  border: 1px solid rgba(0,212,177,0.3);
  border-radius: 2px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--primary);
  margin-bottom: 28px;
}
.hero-title {
  font-family: 'Oswald', sans-serif;
  font-size: clamp(40px, 7vw, 72px);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-bottom: 24px;
}
.hero-title .accent { color: var(--primary); }
.hero-desc { font-size: 18px; color: var(--text-muted); max-width: 600px; margin: 0 auto 36px; line-height: 1.7; }
.hero-actions { display: flex; align-items: center; justify-content: center; gap: 16px; flex-wrap: wrap; margin-bottom: 52px; }
.hero-stats { display: flex; align-items: center; justify-content: center; gap: 40px; flex-wrap: wrap; }
.hero-stat { text-align: center; }
.hero-stat-value { font-family: 'Oswald', sans-serif; font-size: 32px; font-weight: 700; color: var(--primary); }
.hero-stat-label { font-size: 13px; color: var(--text-dim); margin-top: 2px; }

/* Demo section on landing */
.demo-card {
  max-width: 720px;
  margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 32px;
}

/* Features grid */
.features-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.feature-card {
  padding: 28px 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: var(--transition);
}
.feature-card:hover { border-color: var(--primary); box-shadow: 0 0 20px var(--primary-glow); }
.feature-icon {
  width: 48px;
  height: 48px;
  background: var(--primary-glow);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  margin-bottom: 16px;
}
.feature-title { font-family: 'Oswald', sans-serif; font-size: 18px; margin-bottom: 10px; }
.feature-desc { font-size: 14px; color: var(--text-muted); line-height: 1.6; }

/* Pricing on landing */
.pricing-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.pricing-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px 20px;
  text-align: center;
  position: relative;
  transition: var(--transition);
}
.pricing-card.popular { border-color: var(--primary); background: linear-gradient(135deg, rgba(0,212,177,0.05), rgba(0,184,217,0.03)); }
.pricing-card:hover { border-color: var(--primary); transform: translateY(-3px); box-shadow: 0 8px 32px var(--primary-glow); }
.pricing-card .popular-badge {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, var(--primary), #00b8d9);
  color: var(--bg);
  font-size: 10px;
  font-weight: 800;
  padding: 2px 14px;
  border-radius: 2px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Footer */
.footer {
  border-top: 1px solid var(--border);
  padding: 40px 0;
  text-align: center;
  color: var(--text-dim);
  font-size: 14px;
}
.footer-logo { font-family: 'Oswald', sans-serif; font-size: 24px; font-weight: 700; color: var(--text); letter-spacing: 1px; margin-bottom: 8px; }
.footer-logo span { color: var(--primary); }

/* ── Utilities ── */
.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }
.mb-4 { margin-bottom: 16px; }
.mb-6 { margin-bottom: 24px; }
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.text-dim { color: var(--text-dim); }
.text-primary { color: var(--primary); }
.text-sm { font-size: 13px; }
.text-xs { font-size: 12px; }
.font-bold { font-weight: 700; }
.truncate { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }

/* ── Toast Notifications ── */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}
.toast {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  background: var(--surface-3);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  font-size: 14px;
  min-width: 300px;
  max-width: 400px;
  pointer-events: all;
  animation: toastIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.toast.removing { animation: toastOut 0.2s ease forwards; }
.toast-success { border-left: 3px solid var(--success); }
.toast-error { border-left: 3px solid var(--error); }
.toast-info { border-left: 3px solid var(--primary); }
@keyframes toastIn { from { transform: translateX(100px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
@keyframes toastOut { to { transform: translateX(100px); opacity: 0; } }

/* ── Responsive ── */
@media (max-width: 1024px) {
  .studio-grid { grid-template-columns: 1fr; }
  .voice-panel { flex-direction: row; flex-wrap: wrap; }
  .packages-grid { grid-template-columns: repeat(2, 1fr); }
  .features-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .sidebar { display: none; }
  .main-content { margin-left: 0; padding: 20px 16px; }
  .navbar-nav { display: none; }
  .packages-grid { grid-template-columns: 1fr; }
  .features-grid { grid-template-columns: 1fr; }
  .hero-title { font-size: 36px; }
  .hero-stats { gap: 24px; }
}
