/* ============================================================
   DocFill — Design System & Styles
   Premium dark-mode glassmorphism UI
   ============================================================ */

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

/* --- Design Tokens --- */
:root {
  /* Background */
  --bg-primary: #07080d;
  --bg-secondary: #0f1018;
  --bg-card: rgba(255, 255, 255, 0.035);
  --bg-card-hover: rgba(255, 255, 255, 0.065);
  --bg-glass: rgba(255, 255, 255, 0.05);
  --bg-glass-strong: rgba(255, 255, 255, 0.09);
  --bg-input: rgba(255, 255, 255, 0.05);
  --bg-input-focus: rgba(255, 255, 255, 0.08);

  /* Text */
  --text-primary: #eeeef5;
  --text-secondary: #9a9ab0;
  --text-muted: #5c5c72;
  --text-accent: #a78bfa;

  /* Accent */
  --accent-primary: #7c3aed;
  --accent-secondary: #a78bfa;
  --accent-gradient: linear-gradient(135deg, #7c3aed 0%, #a78bfa 50%, #c4b5fd 100%);
  --accent-glow: rgba(124, 58, 237, 0.3);

  /* Borders */
  --border-subtle: rgba(255, 255, 255, 0.06);
  --border-medium: rgba(255, 255, 255, 0.1);
  --border-accent: rgba(124, 58, 237, 0.4);

  /* Status */
  --success: #34d399;
  --success-bg: rgba(52, 211, 153, 0.1);
  --error: #f87171;
  --error-bg: rgba(248, 113, 113, 0.1);
  --warning: #fbbf24;
  --warning-bg: rgba(251, 191, 36, 0.1);

  /* Spacing */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  --space-3xl: 64px;

  /* Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-full: 50%;

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 30px var(--accent-glow);

  /* Transitions */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --transition-fast: 150ms var(--ease-out);
  --transition-normal: 250ms var(--ease-out);
  --transition-slow: 400ms var(--ease-out);
}

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

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
  line-height: 1.6;
}

/* Ambient background glow */
body::before {
  content: '';
  position: fixed;
  top: -30%;
  left: -10%;
  width: 60%;
  height: 60%;
  background: radial-gradient(circle, rgba(124, 58, 237, 0.08) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

body::after {
  content: '';
  position: fixed;
  bottom: -20%;
  right: -10%;
  width: 50%;
  height: 50%;
  background: radial-gradient(circle, rgba(167, 139, 250, 0.05) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

/* --- Layout --- */
.app-container {
  position: relative;
  z-index: 1;
  max-width: 900px;
  margin: 0 auto;
  padding: var(--space-lg) var(--space-md);
  padding-bottom: calc(var(--space-2xl) + env(safe-area-inset-bottom, 0px));
  min-height: 100vh;
  min-height: 100dvh;
}

/* --- Header / Logo --- */
.app-header {
  text-align: center;
  padding: var(--space-2xl) 0 var(--space-lg);
}

.app-logo {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.app-logo .logo-icon {
  font-size: 2rem;
  -webkit-text-fill-color: initial;
  background: none;
  filter: drop-shadow(0 0 8px var(--accent-glow));
}

.app-tagline {
  color: var(--text-muted);
  font-size: 0.875rem;
  font-weight: 400;
  margin-top: var(--space-xs);
  letter-spacing: 0.5px;
}

/* --- Step Indicator --- */
.step-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: var(--space-lg) 0 var(--space-xl);
}

.step {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  opacity: 0.35;
  transition: opacity var(--transition-normal), transform var(--transition-normal);
}

.step.active {
  opacity: 1;
}

.step.completed {
  opacity: 0.7;
}

.step-number {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
  border: 2px solid var(--border-medium);
  background: var(--bg-card);
  color: var(--text-secondary);
  transition: all var(--transition-normal);
  flex-shrink: 0;
}

.step.active .step-number {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
  color: #fff;
  box-shadow: var(--shadow-glow);
}

.step.completed .step-number {
  background: var(--success);
  border-color: var(--success);
  color: #fff;
}

.step-label {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary);
  white-space: nowrap;
}

.step.active .step-label {
  color: var(--text-primary);
}

.step-connector {
  width: 40px;
  height: 2px;
  background: var(--border-subtle);
  margin: 0 var(--space-xs);
  flex-shrink: 0;
  transition: background var(--transition-normal);
}

.step-connector.completed {
  background: var(--success);
}

/* --- Views --- */
.view {
  display: none;
  animation: fadeSlideIn 0.4s var(--ease-out);
}

.view.active {
  display: block;
}

@keyframes fadeSlideIn {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* --- Glass Card --- */
.glass-card {
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  transition: all var(--transition-normal);
}

.glass-card-compact {
  padding: var(--space-lg);
}

/* --- Login View --- */
.login-card {
  max-width: 420px;
  margin: var(--space-3xl) auto 0;
}

.login-title {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: var(--space-xs);
}

.login-subtitle {
  color: var(--text-secondary);
  font-size: 0.875rem;
  margin-bottom: var(--space-xl);
}

.input-group {
  margin-bottom: var(--space-md);
}

.input-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: var(--space-sm);
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.text-input {
  width: 100%;
  padding: var(--space-md);
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 1rem;
  outline: none;
  transition: all var(--transition-fast);
  -webkit-appearance: none;
  appearance: none;
}

.text-input:focus {
  background: var(--bg-input-focus);
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.15);
}

.text-input::placeholder {
  color: var(--text-muted);
}

textarea.text-input {
  resize: vertical;
  min-height: 100px;
  line-height: 1.5;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: 14px var(--space-lg);
  border: none;
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-decoration: none;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  min-height: 48px;
}

.btn:active {
  transform: scale(0.97);
}

.btn-primary {
  background: var(--accent-primary);
  color: #fff;
  box-shadow: 0 2px 12px rgba(124, 58, 237, 0.3);
}

.btn-primary:hover {
  background: #6d28d9;
  box-shadow: 0 4px 20px rgba(124, 58, 237, 0.45);
  transform: translateY(-1px);
}

.btn-primary:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-secondary {
  background: var(--bg-glass-strong);
  color: var(--text-primary);
  border: 1px solid var(--border-medium);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: var(--border-accent);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  padding: var(--space-sm) var(--space-md);
  min-height: 40px;
}

.btn-ghost:hover {
  color: var(--text-primary);
  background: var(--bg-card);
}

.btn-full {
  width: 100%;
}

.btn-icon {
  font-size: 1.1rem;
}

/* --- Template Header --- */
.template-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
}

/* --- Template Cards --- */
.view-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: var(--space-xs);
}

.view-subtitle {
  color: var(--text-secondary);
  font-size: 0.875rem;
  margin-bottom: var(--space-xl);
}

.template-grid {
  display: grid;
  gap: var(--space-md);
}

.template-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  cursor: pointer;
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.template-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--accent-gradient);
  opacity: 0;
  transition: opacity var(--transition-normal);
}

.template-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md), 0 0 0 1px var(--border-accent);
}

.template-card:hover::before {
  opacity: 1;
}

.template-card:active {
  transform: translateY(0) scale(0.99);
}

.template-card-name {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: var(--space-xs);
}

.template-card-desc {
  color: var(--text-secondary);
  font-size: 0.85rem;
  line-height: 1.5;
  margin-bottom: var(--space-md);
}

.template-card-meta {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  font-size: 0.78rem;
  color: var(--text-muted);
}

.template-card-meta span {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

/* --- Prompt View --- */
.prompt-section {
  margin-bottom: var(--space-xl);
}

.section-title {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: var(--space-md);
}

.section-title .section-number {
  width: 26px;
  height: 26px;
  border-radius: var(--radius-full);
  background: var(--accent-primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 700;
  flex-shrink: 0;
  box-shadow: 0 0 12px rgba(124, 58, 237, 0.25);
}

.prompt-box {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  position: relative;
  max-height: 280px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.prompt-box pre {
  font-family: 'Inter', monospace;
  font-size: 0.82rem;
  line-height: 1.7;
  color: var(--text-secondary);
  white-space: pre-wrap;
  word-break: break-word;
}

.prompt-box-actions {
  display: flex;
  gap: var(--space-sm);
  margin-top: var(--space-md);
  align-items: center;
}

.copy-feedback {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  color: var(--success);
  font-size: 0.82rem;
  font-weight: 600;
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.copy-feedback.visible {
  opacity: 1;
}

.instructions-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.instructions-list li {
  display: flex;
  gap: var(--space-md);
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.6;
  padding: var(--space-md);
  background: var(--bg-card);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  transition: all var(--transition-fast);
}

.instructions-list li .inst-icon {
  flex-shrink: 0;
  font-size: 1.3rem;
  margin-top: 1px;
}

/* JSON Paste Area */
.json-paste-area {
  min-height: 160px;
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.85rem;
  line-height: 1.6;
}

/* --- Form View --- */
.form-section {
  margin-bottom: var(--space-xl);
}

.form-section:last-of-type {
  margin-bottom: 0;
}

.field-group {
  margin-bottom: var(--space-lg);
}

.field-label {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: var(--space-sm);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.field-required {
  color: var(--error);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 6px;
  background: var(--error-bg);
  border-radius: 4px;
  text-transform: uppercase;
}

.field-description {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: var(--space-sm);
  line-height: 1.5;
}

/* Table Editor */
.table-editor {
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.table-editor-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.table-editor table {
  width: 100%;
  border-collapse: collapse;
  min-width: 300px;
}

.table-editor th {
  background: var(--bg-glass-strong);
  padding: var(--space-sm) var(--space-md);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-secondary);
  text-align: left;
  border-bottom: 1px solid var(--border-subtle);
  white-space: nowrap;
}

.table-editor td {
  padding: var(--space-xs) var(--space-sm);
  border-bottom: 1px solid var(--border-subtle);
}

.table-editor td:last-child {
  width: 44px;
  text-align: center;
}

.table-editor input {
  width: 100%;
  padding: 10px var(--space-sm);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.9rem;
  outline: none;
  transition: all var(--transition-fast);
  min-height: 40px;
}

.table-editor input:focus {
  background: var(--bg-input);
  border-color: var(--border-accent);
}

.table-editor .btn-remove-row {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1.1rem;
  padding: 8px;
  border-radius: 6px;
  transition: all var(--transition-fast);
  min-width: 36px;
  min-height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.table-editor .btn-remove-row:hover {
  color: var(--error);
  background: var(--error-bg);
}

.table-actions {
  padding: var(--space-sm);
  display: flex;
  justify-content: center;
}

.btn-add-row {
  background: none;
  border: 1px dashed var(--border-medium);
  color: var(--text-muted);
  cursor: pointer;
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 500;
  padding: 10px var(--space-md);
  border-radius: 6px;
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  min-height: 40px;
}

.btn-add-row:hover {
  border-color: var(--accent-secondary);
  color: var(--accent-secondary);
  background: rgba(124, 58, 237, 0.05);
}

/* Form Actions */
.form-actions {
  display: flex;
  gap: var(--space-md);
  margin-top: var(--space-xl);
  padding-top: var(--space-xl);
  border-top: 1px solid var(--border-subtle);
}

/* --- Alerts / Messages --- */
.alert {
  padding: var(--space-md) var(--space-lg);
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
  animation: fadeSlideIn 0.3s var(--ease-out);
}

.alert-error {
  background: var(--error-bg);
  border: 1px solid rgba(248, 113, 113, 0.2);
  color: var(--error);
}

.alert-success {
  background: var(--success-bg);
  border: 1px solid rgba(52, 211, 153, 0.2);
  color: var(--success);
}

.alert-warning {
  background: var(--warning-bg);
  border: 1px solid rgba(251, 191, 36, 0.2);
  color: var(--warning);
}

/* --- Spinner --- */
.spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-top-color: #fff;
  border-radius: var(--radius-full);
  animation: spin 0.6s linear infinite;
}

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

/* --- Back Button --- */
.back-bar {
  margin-bottom: var(--space-lg);
}

/* --- Selected Template Badge --- */
.selected-template-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  background: var(--bg-glass);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  color: var(--accent-secondary);
  font-weight: 600;
  margin-bottom: var(--space-lg);
}

/* --- File Input Styling --- */
input[type="file"].text-input {
  padding: var(--space-md);
  font-size: 0.9rem;
  cursor: pointer;
  line-height: 1.4;
}

input[type="file"].text-input::file-selector-button {
  background: var(--accent-primary);
  color: #fff;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  font-family: inherit;
  font-weight: 600;
  font-size: 0.82rem;
  cursor: pointer;
  margin-right: 12px;
  transition: background var(--transition-fast);
}

input[type="file"].text-input::file-selector-button:hover {
  background: #6d28d9;
}

/* ============================================================
   RESPONSIVE — TABLET (max-width: 768px)
   ============================================================ */
@media (max-width: 768px) {
  .app-container {
    padding: var(--space-md) var(--space-md);
  }

  .template-header {
    flex-direction: column;
    gap: var(--space-md);
  }

  .template-header .btn {
    width: 100%;
  }

  .template-grid {
    gap: var(--space-md);
  }

  .form-actions {
    flex-direction: column;
  }

  .form-actions .btn {
    width: 100%;
  }
}

/* ============================================================
   RESPONSIVE — MOBILE (max-width: 640px)
   ============================================================ */
@media (max-width: 640px) {
  :root {
    --space-lg: 20px;
    --space-xl: 28px;
  }

  .app-container {
    padding: var(--space-sm) var(--space-sm);
    padding-bottom: calc(var(--space-xl) + env(safe-area-inset-bottom, 0px));
  }

  .app-header {
    padding: var(--space-lg) 0 var(--space-md);
  }

  .app-logo {
    font-size: 1.5rem;
  }

  .app-logo .logo-icon {
    font-size: 1.6rem;
  }

  .app-tagline {
    font-size: 0.8rem;
  }

  /* Step indicator — compact on mobile */
  .step-indicator {
    padding: var(--space-md) 0 var(--space-lg);
  }

  .step-label {
    display: none;
  }

  .step-connector {
    width: 24px;
  }

  .step-number {
    width: 30px;
    height: 30px;
    font-size: 0.75rem;
  }

  /* Cards */
  .glass-card {
    padding: var(--space-md);
    border-radius: var(--radius-md);
  }

  .template-card {
    padding: var(--space-md);
    border-radius: var(--radius-md);
  }

  .template-card-name {
    font-size: 1rem;
  }

  .template-card-desc {
    font-size: 0.82rem;
    margin-bottom: var(--space-sm);
  }

  .template-card-meta {
    flex-wrap: wrap;
    gap: var(--space-sm);
  }

  /* View titles */
  .view-title {
    font-size: 1.1rem;
  }

  .view-subtitle {
    font-size: 0.82rem;
    margin-bottom: var(--space-lg);
  }

  /* Prompt */
  .prompt-box {
    padding: var(--space-md);
    max-height: 220px;
    border-radius: var(--radius-sm);
  }

  .prompt-box pre {
    font-size: 0.78rem;
    line-height: 1.6;
  }

  .section-title {
    font-size: 0.88rem;
  }

  /* Instruction cards */
  .instructions-list li {
    padding: var(--space-sm) var(--space-md);
    font-size: 0.82rem;
    gap: var(--space-sm);
  }

  .instructions-list li .inst-icon {
    font-size: 1.1rem;
  }

  /* JSON area */
  .json-paste-area {
    min-height: 140px;
    font-size: 0.8rem;
  }

  /* Form fields */
  .field-group {
    margin-bottom: var(--space-md);
  }

  .text-input {
    padding: 14px var(--space-md);
    font-size: 1rem;
    border-radius: var(--radius-sm);
  }

  /* Table editor — full-width scroll */
  .table-editor {
    border-radius: var(--radius-sm);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .table-editor table {
    min-width: 320px;
  }

  .table-editor th {
    padding: var(--space-sm);
    font-size: 0.7rem;
  }

  .table-editor td {
    padding: var(--space-xs);
  }

  .table-editor input {
    font-size: 0.85rem;
    padding: 8px var(--space-sm);
    min-height: 38px;
  }

  /* Buttons — full width on mobile */
  .btn {
    padding: 14px var(--space-lg);
    font-size: 0.88rem;
  }

  .btn-primary {
    width: 100%;
  }

  .btn-secondary {
    width: 100%;
  }

  /* Prompt box actions */
  .prompt-box-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .copy-feedback {
    text-align: center;
    justify-content: center;
  }

  /* Selected badge */
  .selected-template-badge {
    font-size: 0.75rem;
    padding: var(--space-xs) var(--space-sm);
  }

  /* Alert */
  .alert {
    padding: var(--space-sm) var(--space-md);
    font-size: 0.82rem;
    border-radius: var(--radius-sm);
  }

  /* Back bar */
  .back-bar {
    margin-bottom: var(--space-md);
  }
}

/* ============================================================
   RESPONSIVE — SMALL MOBILE (max-width: 400px)
   ============================================================ */
@media (max-width: 400px) {
  .app-container {
    padding: var(--space-xs) var(--space-xs);
  }

  .app-header {
    padding: var(--space-md) 0 var(--space-sm);
  }

  .app-logo {
    font-size: 1.3rem;
  }

  .step-number {
    width: 26px;
    height: 26px;
    font-size: 0.68rem;
  }

  .step-connector {
    width: 18px;
  }

  .section-title .section-number {
    width: 22px;
    height: 22px;
    font-size: 0.65rem;
  }

  .template-card {
    padding: var(--space-sm) var(--space-md);
  }
}

/* ============================================================
   LARGE SCREENS — 2 column template grid
   ============================================================ */
@media (min-width: 641px) {
  .template-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* --- Scrollbar --- */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--border-medium);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* --- Selection --- */
::selection {
  background: rgba(124, 58, 237, 0.3);
  color: #fff;
}
