/* ==========================================================================
   TVoice Studio — Modern Mobile-First Design System
   Ultra-High Contrast Obsidian Luxe Palette
   ========================================================================== */

:root {
  --bg-main: #06080e;
  --bg-card: rgba(15, 20, 34, 0.88);
  --bg-card-hover: rgba(26, 34, 56, 0.96);
  --bg-dock: rgba(10, 14, 24, 0.95);
  --border-subtle: rgba(255, 255, 255, 0.12);
  --border-active: rgba(99, 102, 241, 0.85);
  --border-focus: #6366f1;
  --primary: #6366f1;
  --primary-glow: rgba(99, 102, 241, 0.45);
  --emerald: #10b981;
  --emerald-glow: rgba(16, 185, 129, 0.4);
  --cyan: #06b6d4;
  --amber: #f59e0b;
  --rose: #f43f5e;
  --text-main: #ffffff;
  --text-muted: #cbd5e1;
  --text-dim: #94a3b8;
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 22px;
  --radius-full: 9999px;
  --safe-bottom: env(safe-area-inset-bottom, 16px);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  background-color: var(--bg-main);
  background-image: 
    radial-gradient(circle at 12% 8%, rgba(99, 102, 241, 0.22) 0%, transparent 45%),
    radial-gradient(circle at 88% 12%, rgba(6, 182, 212, 0.18) 0%, transparent 42%),
    radial-gradient(circle at 50% 95%, rgba(16, 185, 129, 0.14) 0%, transparent 50%);
  background-attachment: fixed;
  color: var(--text-main);
  font-family: var(--font-sans);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  -webkit-font-smoothing: antialiased;
}

/* App Shell Container */
.app-shell {
  width: 100%;
  max-width: 680px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 12px 14px calc(80px + var(--safe-bottom));
  position: relative;
}

/* ==========================================================================
   TOP BAR NAVIGATION
   ========================================================================== */
.top-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 4px 18px;
  gap: 12px;
}

.brand-group {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  user-select: none;
}

.brand-logo {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: linear-gradient(135deg, #4f46e5, #06b6d4);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -0.5px;
  background: linear-gradient(to right, #ffffff, #a5b4fc);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1.2;
}

.status-indicator {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  color: #34d399;
  font-family: var(--font-mono);
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--emerald);
  box-shadow: 0 0 10px var(--emerald);
  animation: pulse-ring 2s infinite ease-out;
}

@keyframes pulse-ring {
  0% { transform: scale(0.9); opacity: 1; }
  50% { transform: scale(1.3); opacity: 0.7; }
  100% { transform: scale(0.9); opacity: 1; }
}

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

.badge-pill {
  border: 1.5px solid var(--border-subtle);
  background: rgba(18, 24, 40, 0.85);
  backdrop-filter: blur(12px);
  color: var(--text-main);
  padding: 7px 14px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.badge-pill:hover {
  border-color: var(--border-active);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(99, 102, 241, 0.25);
}

.key-badge {
  border-color: rgba(99, 102, 241, 0.4);
  color: #c7d2fe;
}

.coin-badge {
  border-color: rgba(245, 158, 11, 0.5);
  background: rgba(245, 158, 11, 0.12);
}

.coin-glow {
  font-size: 15px;
}

.coin-amount {
  color: #fbbf24;
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 800;
}

.coin-unit {
  font-size: 12px;
  color: #fef08a;
  font-weight: 700;
}

.coin-add {
  background: #f59e0b;
  color: #000;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 900;
  margin-left: 2px;
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.5);
}

/* ==========================================================================
   VOICE CAROUSEL (SPOTIFY-STYLE CARDS)
   ========================================================================== */
.section-voices {
  margin-bottom: 16px;
}

.section-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  padding: 0 4px;
}

.section-title {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 1px;
  color: #e2e8f0;
  text-transform: uppercase;
}

.section-hint {
  font-size: 12px;
  color: #94a3b8;
  font-weight: 500;
}

.voice-carousel {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 6px 2px 10px;
  -webkit-overflow-scrolling: touch;
}

.voice-carousel::-webkit-scrollbar {
  display: none;
}

.voice-card {
  flex: 0 0 172px;
  scroll-snap-align: start;
  background: linear-gradient(180deg, rgba(22, 29, 48, 0.9) 0%, rgba(14, 18, 30, 0.96) 100%);
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: relative;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 6px 20px rgba(0, 0, 0, 0.4);
}

.voice-card:hover {
  background: linear-gradient(180deg, rgba(30, 40, 68, 0.95) 0%, rgba(18, 24, 40, 0.98) 100%);
  border-color: rgba(255, 255, 255, 0.25);
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
}

.voice-card.active {
  border-color: var(--primary);
  background: linear-gradient(180deg, rgba(49, 46, 129, 0.5) 0%, rgba(26, 28, 54, 0.9) 100%);
  box-shadow: 0 0 25px rgba(99, 102, 241, 0.4), inset 0 0 16px rgba(99, 102, 241, 0.2);
}

.card-avatar {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.avatar-male1 { background: linear-gradient(135deg, #1e3a8a, #3b82f6); border: 1px solid rgba(59, 130, 246, 0.4); }
.avatar-female1 { background: linear-gradient(135deg, #831843, #ec4899); border: 1px solid rgba(236, 72, 153, 0.4); }
.avatar-male2 { background: linear-gradient(135deg, #7c2d12, #ea580c); border: 1px solid rgba(234, 88, 12, 0.4); }
.avatar-female2 { background: linear-gradient(135deg, #134e4a, #14b8a6); border: 1px solid rgba(20, 184, 166, 0.4); }
.avatar-clone { background: linear-gradient(135deg, #581c87, #a855f7); border: 1px solid rgba(168, 85, 247, 0.4); }

.card-meta {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.card-name {
  font-size: 14px;
  font-weight: 800;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 5px;
}

.badge-hot {
  font-size: 10px;
  background: var(--rose);
  color: #fff;
  padding: 1px 5px;
  border-radius: 4px;
  font-weight: 900;
  box-shadow: 0 0 8px rgba(244, 63, 94, 0.5);
}

.card-tag {
  font-size: 11px;
  color: #94a3b8;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.btn-card-preview {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.12);
  color: #38bdf8;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.btn-card-preview:hover {
  background: var(--emerald);
  border-color: var(--emerald);
  color: #000;
  transform: scale(1.15);
  box-shadow: 0 0 16px var(--emerald-glow);
}

.card-clone {
  border-style: dashed;
  border-color: rgba(168, 85, 247, 0.6);
  background: rgba(168, 85, 247, 0.08);
}

.clone-plus {
  position: absolute;
  top: 10px;
  right: 12px;
  font-size: 20px;
  color: #c084fc;
  font-weight: 800;
}

/* ==========================================================================
   EMOTION SWIPE TOOLBAR
   ========================================================================== */
.section-emotions {
  margin-bottom: 10px;
}

.emotion-scroll {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 2px 2px 6px;
  -webkit-overflow-scrolling: touch;
}

.emotion-scroll::-webkit-scrollbar {
  display: none;
}

.chip {
  flex: 0 0 auto;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  color: var(--text-muted);
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.chip:hover, .chip:active {
  background: rgba(99, 102, 241, 0.2);
  border-color: var(--primary);
  color: #c7d2fe;
  transform: scale(0.97);
}

/* ==========================================================================
   SMART TEXT EDITOR
   ========================================================================== */
.section-editor {
  margin-bottom: 14px;
}

.editor-container {
  background: var(--bg-card);
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(12px);
  padding: 14px;
  display: flex;
  flex-direction: column;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.editor-container:focus-within {
  border-color: var(--border-focus);
  box-shadow: 0 0 20px rgba(99, 102, 241, 0.2);
}

.smart-textarea {
  width: 100%;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-main);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.6;
  resize: vertical;
  min-height: 130px;
  max-height: 380px;
}

.smart-textarea::placeholder {
  color: #475569;
  font-size: 14px;
}

.editor-statusbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 10px;
  margin-top: 6px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  flex-wrap: wrap;
  gap: 8px;
}

.stat-group {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.stat-pill {
  font-size: 12px;
  color: var(--text-dim);
  background: rgba(255, 255, 255, 0.04);
  padding: 3px 8px;
  border-radius: 6px;
  font-family: var(--font-mono);
}

.stat-pill strong {
  color: var(--text-main);
}

.stat-time strong {
  color: #38bdf8;
}

.stat-cost strong {
  color: #fbbf24;
}

.action-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.draft-indicator {
  font-size: 11px;
  color: var(--emerald);
  display: flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-mono);
}

.draft-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--emerald);
}

.btn-text-action {
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
  transition: color 0.15s ease;
}

.btn-text-action:hover {
  color: var(--rose);
}

/* ==========================================================================
   SETTINGS & PARAMETERS
   ========================================================================== */
.section-settings {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px;
}

.setting-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.setting-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
}

.segmented-control {
  display: flex;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 2px;
  gap: 2px;
}

.seg-btn {
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-size: 12px;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.seg-btn.active {
  background: var(--bg-card-hover);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

/* ==========================================================================
   PRIMARY ACTION BUTTON (KEYBOARD-AWARE DOCK)
   ========================================================================== */
.section-action-dock {
  margin-bottom: 18px;
}

.btn-generate-glow {
  width: 100%;
  height: 56px;
  border: none;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #06b6d4 100%);
  color: #fff;
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.8px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 10px 32px rgba(99, 102, 241, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.35);
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.2s ease;
}

.btn-generate-glow:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 40px rgba(99, 102, 241, 0.65), 0 0 20px rgba(6, 182, 212, 0.4);
}

.btn-generate-glow:active {
  transform: translateY(1px) scale(0.99);
}

.btn-generate-glow:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  box-shadow: none;
}

/* ==========================================================================
   FLOATING GLOW AUDIO PLAYER (DYNAMIC ISLAND AESTHETIC)
   ========================================================================== */
.floating-player-card {
  background: rgba(14, 20, 36, 0.95);
  border: 1.5px solid rgba(16, 185, 129, 0.55);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(24px);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  box-shadow: 0 16px 45px rgba(0, 0, 0, 0.7), 0 0 25px rgba(16, 185, 129, 0.35);
  margin-bottom: 16px;
  animation: slide-up 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slide-up {
  from { opacity: 0; transform: translateY(24px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.player-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn-player-play {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, #10b981, #06b6d4);
  color: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(16, 185, 129, 0.5);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn-player-play:hover {
  transform: scale(1.1);
  box-shadow: 0 0 22px rgba(16, 185, 129, 0.7);
}

.player-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.player-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.player-timer {
  font-size: 11px;
  color: var(--text-dim);
  font-family: var(--font-mono);
  display: flex;
  align-items: center;
  gap: 6px;
}

.player-badge-format {
  font-size: 9px;
  background: rgba(16, 185, 129, 0.15);
  color: var(--emerald);
  padding: 1px 4px;
  border-radius: 3px;
}

.player-waveform-box {
  flex: 1;
  height: 42px;
  display: flex;
  align-items: center;
  cursor: pointer;
}

#waveform-canvas {
  width: 100%;
  height: 100%;
}

.btn-player-download {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: all 0.15s ease;
}

.btn-player-download:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.3);
}

/* ==========================================================================
   BOTTOM DOCK (MOBILE NAV BAR)
   ========================================================================== */
.bottom-dock {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: calc(60px + var(--safe-bottom));
  padding-bottom: var(--safe-bottom);
  background: var(--bg-dock);
  border-top: 1px solid var(--border-subtle);
  backdrop-filter: blur(16px);
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 100;
  max-width: 680px;
  margin: 0 auto;
}

.dock-btn {
  background: transparent;
  border: none;
  color: var(--text-dim);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  cursor: pointer;
  padding: 6px 12px;
  border-radius: 8px;
  transition: all 0.15s ease;
}

.dock-btn.active {
  color: #a5b4fc;
}

.dock-btn.active .dock-icon {
  transform: translateY(-2px);
}

.dock-icon {
  font-size: 18px;
  transition: transform 0.15s ease;
}

.dock-text {
  font-size: 11px;
  font-weight: 700;
}

/* ==========================================================================
   MODAL DIALOGS
   ========================================================================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(14px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 1000;
  animation: fade-in 0.2s ease;
}

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-card {
  background: #0d121d;
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7), 0 0 30px rgba(99, 102, 241, 0.2);
  display: flex;
  flex-direction: column;
}

.modal-lg {
  max-width: 640px;
}

.modal-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.modal-title-group h3 {
  font-size: 17px;
  font-weight: 800;
  color: #fff;
}

.modal-close {
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-size: 24px;
  cursor: pointer;
  line-height: 1;
}

.modal-close:hover {
  color: #fff;
}

.modal-tabs {
  display: flex;
  border-bottom: 1px solid var(--border-subtle);
  background: rgba(0, 0, 0, 0.2);
  overflow-x: auto;
}

.modal-tab-btn {
  flex: 1;
  background: transparent;
  border: none;
  padding: 12px 14px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
}

.modal-tab-btn.active {
  color: #fff;
  border-bottom-color: var(--primary);
  background: rgba(99, 102, 241, 0.08);
}

.modal-body {
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.modal-desc {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.5;
}

.tab-note {
  font-size: 13px;
  color: var(--emerald);
  margin-bottom: 10px;
}

/* Form Inputs */
.clean-input, .clean-select {
  width: 100%;
  height: 44px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0 14px;
  font-family: var(--font-sans);
  font-size: 14px;
  color: #fff;
  outline: none;
  transition: border-color 0.15s ease;
}

.clean-input:focus, .clean-select:focus {
  border-color: var(--border-focus);
}

.clean-textarea {
  width: 100%;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: #a5b4fc;
  outline: none;
  resize: vertical;
}

.input-group {
  display: flex;
  gap: 8px;
}

.btn-primary {
  background: var(--primary);
  border: none;
  color: #fff;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 700;
  padding: 0 16px;
  height: 44px;
  border-radius: var(--radius-md);
  cursor: pointer;
  white-space: nowrap;
  transition: opacity 0.15s ease;
}

.btn-primary:hover {
  opacity: 0.9;
}

.btn-full {
  width: 100%;
}

.modal-note-box {
  background: rgba(255, 255, 255, 0.03);
  border-left: 3px solid #38bdf8;
  padding: 10px 12px;
  border-radius: 4px 8px 8px 4px;
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
}

.license-status-box {
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
}

.info-row {
  display: flex;
  justify-content: space-between;
}

.info-row strong {
  color: var(--emerald);
}

/* ==========================================================================
   PRICING CARDS
   ========================================================================== */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
}

.pricing-card {
  background: linear-gradient(180deg, rgba(22, 28, 46, 0.9) 0%, rgba(14, 18, 30, 0.95) 100%);
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: relative;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

.pricing-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.3);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
}

.pricing-card.featured {
  border-color: #6366f1;
  background: linear-gradient(180deg, rgba(49, 46, 129, 0.45) 0%, rgba(20, 24, 46, 0.95) 100%);
  box-shadow: 0 0 25px rgba(99, 102, 241, 0.35);
}

.pkg-badge {
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--text-dim);
}

.badge-pop { color: #38bdf8; }
.badge-best { color: #fbbf24; }

.pkg-name {
  font-size: 15px;
  font-weight: 800;
  color: #fff;
}

.pkg-price {
  font-size: 19px;
  font-weight: 800;
  color: var(--emerald);
  font-family: var(--font-mono);
}

.pkg-price span {
  font-size: 12px;
  color: var(--text-dim);
}

.pkg-features {
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 6px 0 10px;
}

.pkg-features strong {
  color: #fff;
}

.btn-select-pkg {
  margin-top: auto;
  height: 36px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-subtle);
  color: #fff;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-select-pkg:hover {
  background: var(--primary);
  border-color: var(--primary);
}

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

/* ==========================================================================
   VIETQR CHECKOUT VIEW
   ========================================================================== */
.vietqr-checkout-view {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.checkout-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 8px;
}

.btn-back-pkgs {
  background: transparent;
  border: none;
  color: #38bdf8;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
}

.checkout-pkg-info {
  font-size: 13px;
  color: var(--text-muted);
}

.vietqr-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
}

.qr-image-wrapper {
  width: 200px;
  height: 200px;
  background: #fff;
  border-radius: 12px;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
}

.qr-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.qr-details {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 13px;
}

.bank-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 8px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 6px;
}

.highlight-money {
  color: #fbbf24;
  font-size: 15px;
  font-family: var(--font-mono);
}

.highlight-code-row {
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(99, 102, 241, 0.3);
}

.code-tag {
  color: #c7d2fe;
  font-family: var(--font-mono);
  font-weight: 700;
}

.btn-mini-copy {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--border-subtle);
  color: #fff;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
}

.btn-mini-copy:hover {
  background: var(--primary);
}

.auto-verify-pill {
  margin-top: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 12px;
  color: var(--emerald);
  font-weight: 600;
}

.spinner-mini {
  width: 12px;
  height: 12px;
  border: 2px solid rgba(16, 185, 129, 0.3);
  border-top-color: var(--emerald);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* ==========================================================================
   REFERRAL BOX
   ========================================================================== */
.referral-box {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.referral-box h4 {
  font-size: 15px;
  color: #fff;
}

.referral-share-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.my-ref-badge {
  flex: 1;
  background: rgba(99, 102, 241, 0.15);
  border: 1px solid rgba(99, 102, 241, 0.4);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 700;
  color: #c7d2fe;
}

.btn-copy {
  height: 44px;
  background: var(--primary);
  border: none;
  color: #fff;
  font-weight: 700;
  padding: 0 16px;
  border-radius: var(--radius-md);
  cursor: pointer;
}

.divider {
  border: none;
  border-top: 1px solid var(--border-subtle);
  margin: 6px 0;
}

/* ==========================================================================
   ADMIN PANEL STYLES
   ========================================================================== */
.admin-create-box {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.admin-create-box h4 {
  font-size: 14px;
  font-weight: 800;
  color: #38bdf8;
}

.admin-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
}

.form-col {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.form-col label {
  font-size: 12px;
  color: var(--text-muted);
}

.admin-output-box {
  background: rgba(99, 102, 241, 0.08);
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.output-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 700;
  color: #c7d2fe;
}

.admin-table-box {
  margin-top: 8px;
}

.admin-table-box h4 {
  font-size: 14px;
  margin-bottom: 8px;
  color: #fff;
}

.table-responsive {
  overflow-x: auto;
}

.clean-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  color: var(--text-muted);
}

.clean-table th, .clean-table td {
  padding: 8px 10px;
  text-align: left;
  border-bottom: 1px solid var(--border-subtle);
}

.clean-table th {
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-dim);
  font-weight: 700;
  text-transform: uppercase;
}

.status-active { color: var(--emerald); font-weight: 700; }
.status-pending { color: #f59e0b; font-weight: 700; }
.status-revoked { color: var(--rose); text-decoration: line-through; }

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: calc(70px + var(--safe-bottom));
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 2000;
  width: 90%;
  max-width: 360px;
  pointer-events: none;
}

.toast {
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  gap: 8px;
  animation: toast-in 0.25s ease-out;
  pointer-events: auto;
}

.toast-success { border-color: rgba(16, 185, 129, 0.5); }
.toast-error { border-color: rgba(244, 63, 94, 0.5); }

@keyframes toast-in {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   DESKTOP TWEAKS (Wider Screens)
   ========================================================================== */
@media (min-width: 681px) {
  .app-shell {
    padding-top: 24px;
  }
  .voice-card {
    flex: 0 0 180px;
  }
  .pricing-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
