/* ══════════════════════════════════════════════
   SuperPrompt — Dashboard Styles
   Clean, minimal SaaS UI (Stripe / Notion feel)
   ══════════════════════════════════════════════ */

/* ── RESET & BASE ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { height: 100%; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: #F5F7FB;
  color: #0A0A0F;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
}
a { text-decoration: none; color: inherit; }
button { font-family: inherit; cursor: pointer; }
textarea { font-family: inherit; }

/* ── VARIABLES ── */
:root {
  --bg: #F5F7FB;
  --card: #FFFFFF;
  --border: #E8EAF0;
  --border-hover: #D0D3DC;
  --accent: #0066FF;
  --accent-light: #EBF2FF;
  --accent-dark: #0052CC;
  --text-primary: #0A0A0F;
  --text-secondary: #5A5D6B;
  --text-muted: #9CA0AE;
  --success: #16A34A;
  --error: #DC2626;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.04), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.06), 0 1px 4px rgba(0,0,0,0.04);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.08);
  --radius: 12px;
  --radius-sm: 8px;
  --radius-xs: 6px;
}

/* ══════════════════════════════════════════════
   NAVBAR
   ══════════════════════════════════════════════ */
.dash-nav {
  background: var(--card);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
}
.dash-nav-inner {
  max-width: 1280px;
  margin: 0 auto;
  height: 60px;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.dash-nav-left {
  display: flex;
  align-items: center;
  gap: 32px;
}
.dash-logo {
  font-weight: 700;
  font-size: 18px;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}
.dash-logo span { color: var(--accent); }
.dash-logo:hover { opacity: 0.8; }

.dash-nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}
.dash-nav-link {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--radius-xs);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all 0.15s ease;
}
.dash-nav-link .material-symbols-outlined { font-size: 18px; }
.dash-nav-link:hover {
  background: var(--bg);
  color: var(--text-primary);
}
.dash-nav-link.active {
  background: var(--accent-light);
  color: var(--accent);
}

.dash-nav-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* Usage Badge */
.dash-usage-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 20px;
  background: var(--bg);
  border: 1px solid var(--border);
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
}

/* Avatar */
.dash-avatar-wrap { position: relative; }
.dash-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0055DD, #0088FF);
  border: none;
  color: #fff;
  font-weight: 600;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(0,102,255,0.2);
}
.dash-avatar:hover { transform: scale(1.06); }

/* Dropdown */
.dash-dropdown {
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  min-width: 220px;
  padding: 6px;
  z-index: 100;
  animation: dropIn 0.2s ease;
}
.dash-dropdown.open { display: block; }
@keyframes dropIn {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}
.dash-drop-header { padding: 12px 14px; }
.dash-drop-name { font-size: 14px; font-weight: 600; color: var(--text-primary); }
.dash-drop-email { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.dash-drop-divider { height: 1px; background: var(--border); margin: 4px 0; }
.dash-drop-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--text-secondary);
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  transition: background 0.12s ease;
}
.dash-drop-item:hover { background: var(--bg); }
.dash-drop-item .material-symbols-outlined { font-size: 18px; }
.dash-drop-signout { color: var(--error); }

/* ══════════════════════════════════════════════
   MAIN CONTENT
   ══════════════════════════════════════════════ */
.dash-main {
  padding: 32px 24px 48px;
  min-height: calc(100vh - 60px - 48px);
}
.dash-container {
  max-width: 1160px;
  margin: 0 auto;
}

/* Header */
.dash-header {
  margin-bottom: 24px;
}
.dash-title {
  font-size: 26px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}
.dash-subtitle {
  font-size: 14px;
  color: var(--text-secondary);
  margin-top: 4px;
}

/* ══════════════════════════════════════════════
   GENERATOR CARD
   ══════════════════════════════════════════════ */
.gen-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 32px 32px;
  box-shadow: var(--shadow-sm);
}

/* Sections */
.gen-section { margin-bottom: 24px; }
.gen-section:last-child { margin-bottom: 0; }
.gen-label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 10px;
}

/* ── Prompt Type ── */
.gen-type-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.gen-type-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--card);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all 0.18s ease;
}
.gen-type-btn .material-symbols-outlined { font-size: 18px; }
.gen-type-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.gen-type-btn.selected {
  background: var(--accent-light);
  border-color: var(--accent);
  color: var(--accent);
}

/* ── Tone ── */
.gen-tone-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.gen-tone-btn {
  padding: 7px 16px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--card);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all 0.18s ease;
}
.gen-tone-btn:hover { border-color: var(--accent); color: var(--accent); }
.gen-tone-btn.selected {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* ── Detail Level ── */
.gen-detail-row {
  display: inline-flex;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.gen-detail-btn {
  padding: 8px 20px;
  border: none;
  background: var(--card);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all 0.18s ease;
  border-right: 1px solid var(--border);
}
.gen-detail-btn:last-child { border-right: none; }
.gen-detail-btn:hover { background: var(--bg); }
.gen-detail-btn.selected {
  background: var(--text-primary);
  color: #fff;
}

/* ══════════════════════════════════════════════
   TWO-COLUMN SPLIT
   ══════════════════════════════════════════════ */
.gen-split {
  display: flex;
  gap: 0;
  margin-bottom: 24px;
}
.gen-left, .gen-right {
  flex: 1;
  display: flex;
  flex-direction: column;
}
.gen-left { padding-right: 24px; }
.gen-right { padding-left: 24px; }

/* Input Header */
.gen-input-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}
.gen-char-count {
  font-size: 12px;
  font-weight: 400;
  color: var(--text-muted);
  transition: color 0.2s;
}

/* Textarea */
.gen-textarea {
  flex: 1;
  min-height: 180px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  font-size: 14px;
  color: var(--text-primary);
  line-height: 1.6;
  resize: none;
  outline: none;
  transition: all 0.18s ease;
  font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
}
.gen-textarea::placeholder { color: var(--text-muted); font-family: 'Inter', sans-serif; }
.gen-textarea:hover { border-color: var(--border-hover); }
.gen-textarea:focus {
  border-color: var(--accent);
  background: #fff;
  box-shadow: 0 0 0 3px var(--accent-light);
}

/* Submit Button */
.gen-submit-btn {
  margin-top: 12px;
  width: 100%;
  height: 48px;
  border: none;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, #0055DD, #0077FF);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  transition: all 0.18s ease;
  position: relative;
}
.gen-submit-btn:hover:not(:disabled) {
  filter: brightness(1.06);
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(0,102,255,0.3);
}
.gen-submit-btn:active:not(:disabled) { transform: translateY(0); }
.gen-submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
.gen-btn-loader { display: flex; align-items: center; gap: 8px; }
.gen-spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Divider ── */
.gen-divider {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0;
  flex-shrink: 0;
  width: 1px;
  position: relative;
}
.gen-divider-line {
  flex: 1;
  width: 1px;
  background: var(--border);
}
.gen-divider-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--card);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  flex-shrink: 0;
  z-index: 1;
}
.gen-divider-icon .material-symbols-outlined { font-size: 16px; }

/* ── Output Panel ── */
.gen-output-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}
.gen-status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.gen-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #D0D3DC;
  transition: background 0.3s;
}
.gen-status-dot.active {
  background: var(--success);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}
.gen-output-actions {
  display: flex;
  gap: 6px;
}
.gen-action-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  border-radius: var(--radius-xs);
  border: 1px solid var(--border);
  background: var(--card);
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all 0.15s ease;
}
.gen-action-btn .material-symbols-outlined { font-size: 14px; }
.gen-action-btn:hover {
  background: var(--bg);
  border-color: var(--border-hover);
}

/* Output Box */
.gen-output-box {
  flex: 1;
  min-height: 180px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px;
  overflow-y: auto;
}
.gen-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  min-height: 148px;
  text-align: center;
  color: var(--text-muted);
}
.gen-empty-icon {
  font-size: 32px;
  margin-bottom: 10px;
  opacity: 0.4;
}
.gen-empty-state p { font-size: 13px; }

/* Output Blocks */
.gen-output-block {
  border-left: 3px solid var(--accent);
  background: #FAFBFF;
  border-radius: var(--radius-xs);
  padding: 12px 14px;
  margin-bottom: 10px;
  animation: blockIn 0.3s ease both;
}
.gen-output-block:last-child { margin-bottom: 0; }
@keyframes blockIn {
  from { opacity: 0; transform: translateX(-8px); }
  to { opacity: 1; transform: translateX(0); }
}
.gen-block-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 5px;
  color: var(--accent);
}
.gen-block-content {
  font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
  font-size: 13px;
  color: var(--text-primary);
  line-height: 1.7;
  white-space: pre-wrap;
}

/* Score Row */
.gen-score-row {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  flex-wrap: wrap;
}
.gen-score-pill {
  background: #F0FDF4;
  border: 1px solid #BBF7D0;
  color: var(--success);
  font-size: 11px;
  font-weight: 500;
  padding: 4px 12px;
  border-radius: 20px;
}

/* ══════════════════════════════════════════════
   THINKING ANIMATION
   ══════════════════════════════════════════════ */
.sp-thinking {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 16px;
  gap: 16px;
}
.sp-thinking-orbs {
  display: flex;
  gap: 10px;
  align-items: center;
}
.sp-orb {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  animation: spOrbBounce 1.2s ease-in-out infinite;
}
.sp-orb1 {
  background: var(--accent);
  animation-delay: 0s;
}
.sp-orb2 {
  background: #7C3AED;
  animation-delay: 0.18s;
  width: 10px;
  height: 10px;
}
.sp-orb3 {
  background: #059669;
  animation-delay: 0.36s;
  width: 8px;
  height: 8px;
}
@keyframes spOrbBounce {
  0%, 80%, 100% { transform: translateY(0) scale(1); opacity: 0.6; }
  40% { transform: translateY(-14px) scale(1.1); opacity: 1; }
}
.sp-thinking-msg {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  transition: opacity 0.2s ease, transform 0.2s ease;
  letter-spacing: 0.01em;
}
.sp-thinking-bar {
  width: 160px;
  height: 3px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
}
.sp-thinking-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), #7C3AED, var(--accent));
  background-size: 200% 100%;
  animation: spShimmer 1.4s linear infinite;
  border-radius: 2px;
  width: 60%;
}
@keyframes spShimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ══════════════════════════════════════════════
   LIVE STREAM VIEW
   ══════════════════════════════════════════════ */
.sp-stream-live {
  font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
  font-size: 12.5px;
  color: var(--text-secondary);
  line-height: 1.7;
  white-space: pre-wrap;
  word-break: break-word;
}
.sp-cursor {
  display: inline-block;
  color: var(--accent);
  font-weight: 300;
  font-size: 18px;
  line-height: 1;
  animation: spCursorBlink 0.8s step-end infinite;
  vertical-align: middle;
}
@keyframes spCursorBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* ══════════════════════════════════════════════
   BLOCK APPEAR (final render)
   ══════════════════════════════════════════════ */
.sp-block-appear {
  animation: spBlockAppear 0.4s cubic-bezier(0.16, 1, 0.3, 1) both;
}
@keyframes spBlockAppear {
  from { opacity: 0; transform: translateY(10px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ── Variants ── */
.gen-variant-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.gen-variant-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--card);
  cursor: pointer;
  transition: all 0.18s ease;
}
.gen-variant-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}
.gen-variant-emoji { font-size: 20px; flex-shrink: 0; margin-top: 1px; }
.gen-variant-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 3px;
}
.gen-variant-desc {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.4;
}

/* ══════════════════════════════════════════════
   PROMPT OPTIMIZER SCORE WIDGET
   ══════════════════════════════════════════════ */
.gen-score-widget {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 30px;
  padding: 4px 14px 4px 4px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.03);
  transition: opacity 0.4s ease, transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  transform: scale(0.95);
}
.gen-score-widget.visible {
  opacity: 1 !important;
  transform: scale(1);
}
.circular-chart {
  display: block;
  margin: 0;
  width: 32px;
  height: 32px;
}
.circle-bg {
  fill: none;
  stroke: var(--border);
  stroke-width: 3.5;
}
.circle {
  fill: none;
  stroke-width: 3.5;
  stroke-linecap: round;
  transition: stroke-dasharray 1s cubic-bezier(0.16, 1, 0.3, 1), stroke 0.5s ease;
}
.circular-chart.red .circle { stroke: #ef4444; }
.circular-chart.orange .circle { stroke: #f59e0b; }
.circular-chart.green .circle { stroke: #10b981; }

.score-details {
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.score-text {
  display: flex;
  align-items: baseline;
  line-height: 1;
}
.score-num { font-size: 16px; font-weight: 800; color: var(--text-primary); transition: color 0.5s; }
.score-max { font-size: 10px; color: var(--text-muted); font-weight: 600; margin-left: 2px; }
.score-label { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-secondary); margin-top: 2px; transition: color 0.5s; }

/* ══════════════════════════════════════════════
   FOOTER
   ══════════════════════════════════════════════ */
.dash-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 24px;
  font-size: 12px;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
  background: var(--card);
}
.dash-footer a { color: var(--text-muted); transition: color 0.15s; }
.dash-footer a:hover { color: var(--accent); }

/* ══════════════════════════════════════════════
   QUICK SETUP — Carousel Wizard
   ══════════════════════════════════════════════ */
.gen-quicksetup {
  animation: qsFadeIn 0.3s ease;
}
.gen-quicksetup.hidden {
  display: none;
}
@keyframes qsFadeIn {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}
.gen-label-caps {
  font-size: 11px !important;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent) !important;
  font-weight: 700 !important;
}

/* Wizard Container */
.qs-wizard {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-top: 8px;
}

/* Progress Header */
.qs-progress-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}
.qs-step-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
}
.qs-answered-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
}

/* Progress Bar */
.qs-progress-bar {
  width: 100%;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  margin-bottom: 20px;
  overflow: hidden;
}
.qs-progress-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 2px;
  transition: width 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Question */
.qs-question-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.qs-question-icon {
  font-size: 20px;
  color: var(--accent);
}

/* Slide animation */
.qs-slide {
  animation: qsSlideIn 0.25s ease;
}
@keyframes qsSlideIn {
  from { opacity: 0; transform: translateX(16px); }
  to { opacity: 1; transform: translateX(0); }
}
.qs-slide-back {
  animation: qsSlideBack 0.25s ease;
}
@keyframes qsSlideBack {
  from { opacity: 0; transform: translateX(-16px); }
  to { opacity: 1; transform: translateX(0); }
}

/* Option Cards */
.qs-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
}
.qs-option {
  display: flex;
  align-items: center;
  padding: 13px 16px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  background: var(--card);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}
.qs-option:hover {
  border-color: rgba(0,102,255,0.4);
  background: rgba(0,102,255,0.02);
}
.qs-option.selected {
  border-color: var(--accent);
  background: rgba(0,102,255,0.06);
  color: var(--accent);
  font-weight: 600;
}
.qs-option.selected::before {
  content: '✓';
  margin-right: 10px;
  font-weight: 700;
  font-size: 14px;
  color: var(--accent);
}

/* Navigation Buttons */
.qs-nav {
  display: flex;
  gap: 10px;
}
.qs-nav-btn {
  flex: 1;
  padding: 12px 20px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.qs-back-btn {
  background: var(--card);
  border: 1.5px solid var(--border);
  color: var(--text-secondary);
}
.qs-back-btn:hover {
  border-color: var(--text-muted);
  color: var(--text-primary);
}
.qs-back-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.qs-next-btn {
  background: var(--accent);
  border: none;
  color: #fff;
  box-shadow: 0 2px 10px rgba(0,102,255,0.25);
}
.qs-next-btn:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(0,102,255,0.3);
}
.qs-next-btn:active {
  transform: translateY(0);
}
.qs-skip-btn {
  background: none;
  border: 1.5px solid var(--border);
  color: var(--text-muted);
  font-weight: 500;
}
.qs-skip-btn:hover {
  border-color: var(--text-secondary);
  color: var(--text-secondary);
}

/* ══════════════════════════════════════════════
   SLIDE-OUT PANELS (History & Saved)
   ══════════════════════════════════════════════ */
.sp-panel-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.35);
  z-index: 200;
}
.sp-panel-overlay.open { display: block; }

.sp-panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 420px;
  max-width: 100vw;
  background: var(--card);
  z-index: 201;
  display: flex;
  flex-direction: column;
  box-shadow: -4px 0 30px rgba(0,0,0,0.12);
  transform: translateX(100%);
  transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}
.sp-panel-overlay.open .sp-panel {
  transform: translateX(0);
}

.sp-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.sp-panel-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
}
.sp-panel-title .material-symbols-outlined {
  font-size: 20px;
  color: var(--accent);
}
.sp-panel-close {
  width: 32px;
  height: 32px;
  border: none;
  background: none;
  cursor: pointer;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: all 0.15s;
}
.sp-panel-close:hover {
  background: var(--bg);
  color: var(--text-primary);
}

.sp-panel-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
}

/* Empty state */
.sp-panel-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}
.sp-panel-empty p {
  font-size: 14px;
  font-weight: 500;
  margin-top: 12px;
}
.sp-panel-empty .sp-panel-empty-sub {
  font-size: 12px;
  font-weight: 400;
  margin-top: 4px;
  max-width: 220px;
}

/* Prompt Card in Panel */
.sp-prompt-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin-bottom: 10px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.sp-prompt-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-sm);
}
.sp-prompt-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}
.sp-prompt-card-type {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-light);
  padding: 3px 8px;
  border-radius: 4px;
}
.sp-prompt-card-time {
  font-size: 11px;
  color: var(--text-muted);
}
.sp-prompt-card-idea {
  font-size: 13px;
  color: var(--text-primary);
  font-weight: 500;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.sp-prompt-card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
  font-size: 11px;
  color: var(--text-muted);
}
.sp-prompt-card-actions {
  display: flex;
  gap: 4px;
  margin-top: 8px;
}
.sp-prompt-card-actions button {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--card);
  font-size: 11px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.12s;
}
.sp-prompt-card-actions button:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.sp-prompt-card-actions button .material-symbols-outlined {
  font-size: 14px;
}
.sp-prompt-card-actions .sp-delete-btn:hover {
  border-color: var(--error);
  color: var(--error);
}

/* Nav buttons base style (to match links) */
button.dash-nav-link {
  background: none;
  border: none;
}


/* ══════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════ */

/* Prevent horizontal overflow globally */
html, body { overflow-x: hidden; max-width: 100vw; }

@media (max-width: 900px) {
  .gen-split { flex-direction: column; gap: 20px; }
  .gen-left { padding-right: 0; }
  .gen-right { padding-left: 0; }
  .gen-divider {
    flex-direction: row;
    width: 100%;
    height: 1px;
    padding: 0;
  }
  .gen-divider-line { height: 1px; width: 100%; }
  .gen-divider-icon { transform: rotate(90deg); }
  .gen-variant-row { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  /* ── Navbar Mobile ── */
  .dash-nav-inner {
    padding: 0 16px;
    height: 56px;
  }
  .dash-nav-left { gap: 12px; }
  .dash-nav-links { display: none; }
  .dash-usage-badge { display: none; }

  /* ── Main Layout ── */
  .dash-main { padding: 16px 12px 24px; }
  .dash-container { max-width: 100%; }
  .dash-header { margin-bottom: 16px; }
  .dash-title { font-size: 20px; }
  .dash-subtitle { font-size: 13px; }

  /* ── Generator Card ── */
  .gen-card {
    padding: 16px 14px 20px;
    border-radius: 10px;
  }
  .gen-section { margin-bottom: 18px; }

  /* ── Type Buttons: 2-col grid ── */
  .gen-type-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
  }
  .gen-type-btn {
    padding: 10px 10px;
    font-size: 12px;
    justify-content: center;
  }
  .gen-type-btn .material-symbols-outlined { font-size: 16px; }

  /* ── Tone Pills: wrap ── */
  .gen-tone-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
  }
  .gen-tone-btn {
    padding: 8px 14px;
    font-size: 12px;
  }

  /* ── Detail Level: full width flex ── */
  .gen-detail-row {
    display: flex;
    width: 100%;
  }
  .gen-detail-btn {
    flex: 1;
    padding: 10px 8px;
    font-size: 12px;
    text-align: center;
  }

  /* ── Textarea ── */
  .gen-textarea {
    min-height: 140px;
    font-size: 13px;
    padding: 12px 14px;
  }
  .gen-submit-btn { height: 46px; font-size: 14px; }

  /* ── Output ── */
  .gen-output-header { flex-wrap: wrap; gap: 8px; }
  .gen-output-box {
    min-height: 140px;
    padding: 12px;
  }
  .gen-block-content {
    font-size: 12px;
    word-break: break-word;
    overflow-wrap: break-word;
  }
  .gen-output-block {
    padding: 10px 12px;
    margin-bottom: 8px;
  }

  /* ── Score Pills ── */
  .gen-score-row { gap: 6px; }
  .gen-score-pill { font-size: 10px; padding: 3px 10px; }

  /* ── Variants ── */
  .gen-variant-row { grid-template-columns: 1fr; gap: 8px; }
  .gen-variant-card { padding: 12px 14px; }
  .gen-variant-emoji { font-size: 18px; }
  .gen-variant-title { font-size: 13px; }
  .gen-variant-desc { font-size: 11px; }

  /* ── Footer ── */
  .dash-footer {
    flex-wrap: wrap;
    padding: 12px 16px;
    font-size: 11px;
    gap: 6px;
  }
}

@media (max-width: 400px) {
  .dash-nav-inner { padding: 0 12px; }
  .dash-main { padding: 12px 8px 20px; }
  .gen-card { padding: 14px 10px 16px; }
  .gen-type-row { grid-template-columns: 1fr 1fr; gap: 4px; }
  .gen-type-btn { padding: 8px 6px; font-size: 11px; gap: 4px; }
  .gen-tone-btn { padding: 6px 10px; font-size: 11px; }
  .gen-detail-btn { padding: 8px 4px; font-size: 11px; }
  .gen-textarea { min-height: 120px; font-size: 12px; }
  .gen-submit-btn { height: 44px; font-size: 13px; }
  .gen-output-actions { gap: 4px; }
  .gen-action-btn { padding: 4px 8px; font-size: 11px; }
  .gen-block-content { font-size: 11px; line-height: 1.6; }
}

/* Material Symbols */
.material-symbols-outlined {
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

/* ══════════════════════════════════════════════
   MOBILE BOTTOM NAVIGATION
   ══════════════════════════════════════════════ */
.mobile-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--card);
  border-top: 1px solid var(--border);
  z-index: 60;
  padding: 6px 0 env(safe-area-inset-bottom, 8px);
  box-shadow: 0 -2px 12px rgba(0,0,0,0.06);
}

@media (max-width: 768px) {
  .mobile-bottom-nav {
    display: flex;
    justify-content: space-around;
    align-items: center;
  }
  /* Add bottom padding so content isn't hidden behind nav */
  .dash-main { padding-bottom: 80px; }
  .dash-footer { margin-bottom: 60px; }
}

.mobile-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 6px 12px;
  font-size: 10px;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.15s ease;
  border-radius: 8px;
}
.mobile-nav-item .material-symbols-outlined {
  font-size: 22px;
}
.mobile-nav-item.active {
  color: var(--accent);
}
.mobile-nav-item:active {
  background: var(--accent-light);
}
