/* ==========================================================================
   HOMILETIKA 2026 - SISTEMA DE ESTUDIO Y SERMONES EXPOSITIVOS
   Design System & Premium Aesthetics (Doctrina Bautista Fundamentalista)
   ========================================================================== */

:root {
  /* Color Palette: Classic Navy, Sacred Gold, Slate & Parchment */
  --bg-primary: #0a0e17;
  --bg-secondary: #111827;
  --bg-surface: #182234;
  --bg-surface-elevated: #222e44;
  --bg-surface-hover: #2b3a55;
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-medium: rgba(255, 255, 255, 0.16);
  --border-gold: rgba(212, 175, 55, 0.35);

  --accent-gold: #d4af37;
  --accent-gold-hover: #dfc058;
  --accent-gold-subtle: rgba(212, 175, 55, 0.12);
  --accent-blue: #3b82f6;
  --accent-blue-hover: #60a5fa;
  --accent-blue-subtle: rgba(59, 130, 246, 0.12);
  --accent-emerald: #10b981;
  --accent-emerald-subtle: rgba(16, 185, 129, 0.12);
  --accent-amber: #f59e0b;
  --accent-crimson: #ef4444;

  /* Typography */
  --font-serif: 'Cinzel', 'Playfair Display', Georgia, serif;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

  /* Text Colors */
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-gold: #e6c86e;

  /* Shadows & Glassmorphism */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.5), 0 2px 4px -2px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 10px 25px -5px rgba(0, 0, 0, 0.6), 0 8px 10px -6px rgba(0, 0, 0, 0.6);
  --shadow-gold: 0 0 25px rgba(212, 175, 55, 0.15);
  --glass-bg: rgba(17, 24, 39, 0.75);
  --glass-blur: blur(16px);

  /* Layout */
  --header-height: 72px;
  --sidebar-width: 290px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --transition-fast: 0.18s ease;
  --transition-normal: 0.28s ease;
}

[data-theme="light"] {
  --bg-primary: #f8fafc;
  --bg-secondary: #f1f5f9;
  --bg-surface: #ffffff;
  --bg-surface-elevated: #f8fafc;
  --bg-surface-hover: #e2e8f0;
  --border-subtle: rgba(0, 0, 0, 0.08);
  --border-medium: rgba(0, 0, 0, 0.15);
  --border-gold: rgba(180, 140, 30, 0.4);

  --accent-gold: #b48c1e;
  --accent-gold-hover: #967414;
  --accent-gold-subtle: rgba(180, 140, 30, 0.1);
  --accent-blue: #2563eb;
  --accent-blue-hover: #1d4ed8;
  --accent-blue-subtle: rgba(37, 99, 235, 0.08);

  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --text-gold: #967414;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 25px -5px rgba(0, 0, 0, 0.12);
  --shadow-gold: 0 0 20px rgba(180, 140, 30, 0.15);
  --glass-bg: rgba(255, 255, 255, 0.85);
}

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

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

body {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100%;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  background-image: 
    radial-gradient(at 0% 0%, rgba(212, 175, 55, 0.05) 0px, transparent 50%),
    radial-gradient(at 100% 100%, rgba(59, 130, 246, 0.05) 0px, transparent 50%);
}

/* App Container */
.app-container {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ==========================================================================
   HEADER
   ========================================================================== */
.main-header {
  height: var(--header-height);
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  border-bottom: 1px solid var(--border-subtle);
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.75rem;
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.brand-icon {
  width: 42px;
  height: 42px;
  background: linear-gradient(135deg, #1e293b, #0f172a);
  border: 1px solid var(--accent-gold);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-gold);
  font-size: 1.35rem;
  box-shadow: var(--shadow-gold);
}

.brand-info h1 {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  letter-spacing: 0.05em;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.1;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.brand-badge {
  font-family: var(--font-sans);
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  background: var(--accent-gold-subtle);
  color: var(--accent-gold);
  border: 1px solid var(--border-gold);
  text-transform: uppercase;
}

.brand-sub {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* ==========================================================================
   WORKSPACE LAYOUT
   ========================================================================== */
.workspace-wrapper {
  display: flex;
  flex: 1;
  height: calc(100vh - var(--header-height));
  overflow: hidden;
}

/* Sidebar */
.workspace-sidebar {
  width: var(--sidebar-width);
  background: var(--bg-secondary);
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  transition: width var(--transition-normal);
  flex-shrink: 0;
}

.sidebar-section-title {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  padding: 1rem 1.25rem 0.5rem;
  font-weight: 600;
}

.nav-steps-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.5rem 0.75rem;
}

.step-nav-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.75rem 0.9rem;
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  transition: all var(--transition-fast);
  position: relative;
}

.step-nav-btn:hover {
  background: var(--bg-surface);
  color: var(--text-primary);
}

.step-nav-btn.active {
  background: var(--accent-gold-subtle);
  border-color: var(--border-gold);
  color: var(--accent-gold);
  font-weight: 600;
}

.step-number {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  flex-shrink: 0;
  color: var(--text-muted);
}

.step-nav-btn.active .step-number {
  background: var(--accent-gold);
  color: #0f172a;
  border-color: var(--accent-gold);
}

.step-nav-btn.completed .step-number {
  background: var(--accent-emerald-subtle);
  border-color: var(--accent-emerald);
  color: var(--accent-emerald);
}

.step-meta {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.step-subtext {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-weight: 400;
}

/* Sidebar Quick Status & Tools */
.sidebar-status-card {
  margin: auto 0.75rem 0.75rem;
  padding: 1rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  font-size: 0.8rem;
}

.status-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: var(--text-gold);
}

/* Main Content Area */
.workspace-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  padding: 1.75rem 2.25rem;
  background: var(--bg-primary);
  scroll-behavior: smooth;
}

.content-max-width {
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

/* ==========================================================================
   BANNER & SEARCH BAR - BIBLE PASSAGE INPUT
   ========================================================================== */
.passage-banner-card {
  background: linear-gradient(135deg, rgba(24, 34, 52, 0.95), rgba(17, 24, 39, 0.98));
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow-md), var(--shadow-gold);
  position: relative;
  overflow: hidden;
}

.passage-banner-card::after {
  content: "†";
  position: absolute;
  right: -10px;
  bottom: -40px;
  font-size: 160px;
  font-family: var(--font-serif);
  color: rgba(212, 175, 55, 0.03);
  pointer-events: none;
}

.banner-header-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1.25rem;
  gap: 1rem;
}

.banner-title {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent-gold);
  letter-spacing: 0.03em;
}

.banner-desc {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-top: 0.25rem;
}

.passage-search-form {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 0.75rem;
  align-items: center;
}

.input-with-icon {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 1rem;
  color: var(--accent-gold);
  font-size: 1.1rem;
  pointer-events: none;
}

.passage-input {
  width: 100%;
  padding: 0.9rem 1rem 0.9rem 2.85rem;
  background: var(--bg-primary);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 1rem;
  font-family: var(--font-sans);
  transition: all var(--transition-fast);
}

.passage-input:focus {
  outline: none;
  border-color: var(--accent-gold);
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.2);
}

.quick-examples {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.85rem;
  align-items: center;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.pill-btn {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  border-radius: 999px;
  padding: 0.25rem 0.65rem;
  font-size: 0.75rem;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.pill-btn:hover {
  border-color: var(--accent-gold);
  color: var(--accent-gold);
  background: var(--accent-gold-subtle);
}

/* ==========================================================================
   BUTTONS & CONTROLS
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.35rem;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--transition-fast);
  font-family: var(--font-sans);
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, #d4af37, #b48c1e);
  color: #0b0f19;
  box-shadow: 0 2px 10px rgba(212, 175, 55, 0.3);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #dfc058, #c69b28);
  box-shadow: 0 4px 15px rgba(212, 175, 55, 0.45);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--bg-surface);
  border-color: var(--border-medium);
  color: var(--text-primary);
}

.btn-secondary:hover {
  background: var(--bg-surface-hover);
  border-color: var(--border-gold);
}

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

.btn-outline-gold:hover {
  background: var(--accent-gold-subtle);
  color: var(--accent-gold-hover);
}

.btn-sm {
  padding: 0.4rem 0.85rem;
  font-size: 0.775rem;
}

.btn-lg {
  padding: 0.95rem 1.75rem;
  font-size: 1rem;
}

/* ==========================================================================
   CARDS & SECTIONS
   ========================================================================== */
.panel-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: border-color var(--transition-fast);
}

.panel-card:hover {
  border-color: var(--border-medium);
}

.card-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-subtle);
}

.card-title {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.card-badge {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  background: var(--accent-blue-subtle);
  color: var(--accent-blue);
  border: 1px solid rgba(59, 130, 246, 0.25);
  text-transform: uppercase;
}

/* Step Views Visibility */
.step-pane {
  display: none;
  flex-direction: column;
  gap: 1.5rem;
  animation: fadeIn 0.24s ease-out;
}

.step-pane.active {
  display: flex;
}

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

/* ==========================================================================
   VERSIONS COMPARISON GRID (RV1960 vs NTV vs BTX)
   ========================================================================== */
.bible-comparison-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.25rem;
}

.version-col {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
}

.version-col.highlight-primary {
  border-color: var(--border-gold);
  box-shadow: var(--shadow-gold);
}

.version-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.85rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-subtle);
}

.version-tag {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--accent-gold);
}

.version-desc {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.scripture-text-box {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--text-primary);
  flex: 1;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 1rem;
}

.verse-num {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent-gold);
  vertical-align: super;
  margin-right: 0.25rem;
}

/* ==========================================================================
   STRONG & ORIGINAL LANGUAGES BOX
   ========================================================================== */
.strong-words-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
}

.word-analysis-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-left: 3px solid var(--accent-gold);
  border-radius: var(--radius-md);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.word-orig-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.word-original {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--accent-gold);
  letter-spacing: 0.05em;
}

.word-strong-code {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  padding: 0.15rem 0.45rem;
  border-radius: var(--radius-sm);
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--accent-blue);
}

.word-translit {
  font-size: 0.85rem;
  font-style: italic;
  color: var(--text-secondary);
}

.word-def {
  font-size: 0.825rem;
  color: var(--text-primary);
  margin-top: 0.25rem;
  line-height: 1.5;
}

.word-ortho-note {
  font-size: 0.725rem;
  color: var(--text-muted);
  background: var(--bg-surface);
  padding: 0.4rem 0.6rem;
  border-radius: var(--radius-sm);
  margin-top: 0.35rem;
}

/* ==========================================================================
   METODO SCOPE - VISUAL BUILDER & GAUGES
   ========================================================================== */
.scope-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1rem;
  margin: 1.25rem 0;
}

@media (max-width: 900px) {
  .scope-grid {
    grid-template-columns: 1fr;
  }
}

.scope-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.25rem 1rem;
  text-align: center;
  position: relative;
  transition: all var(--transition-fast);
}

.scope-card.active {
  border-color: var(--accent-gold);
  background: var(--accent-gold-subtle);
}

.scope-letter {
  font-family: var(--font-serif);
  font-size: 2.25rem;
  font-weight: 900;
  color: var(--accent-gold);
  line-height: 1;
  margin-bottom: 0.25rem;
}

.scope-label {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-primary);
}

.scope-question {
  font-size: 0.725rem;
  color: var(--text-secondary);
  margin-top: 0.35rem;
}

.scope-value {
  margin-top: 0.75rem;
  padding: 0.5rem;
  background: var(--bg-surface);
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  color: var(--text-primary);
  font-weight: 500;
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px dashed var(--border-subtle);
}

/* ==========================================================================
   HOMILETICAL OUTLINE EDITOR (Braga & Robinson)
   ========================================================================== */
.outline-editor-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
}

.outline-meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.field-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.field-label {
  font-size: 0.775rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
  display: flex;
  justify-content: space-between;
}

.field-hint {
  font-weight: 400;
  color: var(--text-muted);
  text-transform: none;
}

.field-input, .field-textarea, .field-select {
  padding: 0.65rem 0.85rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  transition: all var(--transition-fast);
}

.field-input:focus, .field-textarea:focus, .field-select:focus {
  outline: none;
  border-color: var(--accent-gold);
  box-shadow: 0 0 0 2px rgba(212, 175, 55, 0.15);
}

.field-textarea {
  min-height: 80px;
  resize: vertical;
}

/* Outline Tree Points (Punto I, II, III con aliteración) */
.points-list {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin: 1rem 0;
}

.point-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-left: 4px solid var(--accent-blue);
  border-radius: var(--radius-md);
  padding: 1.25rem;
}

.point-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.85rem;
}

.point-title-input {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--accent-gold);
  background: transparent;
  border: none;
  border-bottom: 1px dashed var(--border-medium);
  padding: 0.25rem 0;
  width: 70%;
}

.point-title-input:focus {
  outline: none;
  border-color: var(--accent-gold);
}

.subpoint-row {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 0.75rem;
  margin-top: 0.5rem;
  align-items: flex-start;
}

.subpoint-tag {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
  padding: 0.4rem 0.5rem;
  background: var(--bg-surface);
  border-radius: var(--radius-sm);
  text-align: center;
}

/* ==========================================================================
   SOURCES PRIORITY CONFIGURATION MODAL / PANEL
   ========================================================================== */
.sources-priority-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.source-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1.15rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
}

.source-item:hover {
  border-color: var(--border-medium);
}

.source-item.tier-1 {
  border-left: 4px solid var(--accent-gold);
}

.source-item.tier-2 {
  border-left: 4px solid var(--accent-blue);
}

.source-info {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.source-badge {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-sm);
}

.source-badge.gold {
  background: var(--accent-gold-subtle);
  color: var(--accent-gold);
}

.source-badge.blue {
  background: var(--accent-blue-subtle);
  color: var(--accent-blue);
}

.source-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Switch / Toggle */
.switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  transition: .2s;
  border-radius: 24px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 3px;
  bottom: 3px;
  background-color: var(--text-secondary);
  transition: .2s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: var(--accent-gold);
}

input:checked + .slider:before {
  transform: translateX(20px);
  background-color: #0b0f19;
}

/* ==========================================================================
   MODAL / POPUP
   ========================================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal-overlay.open {
  display: flex;
}

.modal-content {
  background: var(--bg-surface);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-lg);
  max-width: 680px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg), var(--shadow-gold);
  padding: 1.75rem;
  animation: modalScale 0.2s ease-out;
}

@keyframes modalScale {
  from { transform: scale(0.95); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

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

.modal-close-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
}

.modal-close-btn:hover {
  color: var(--text-primary);
}

/* ==========================================================================
   AUDIT & SCOPE CHECKLIST
   ========================================================================== */
.audit-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.audit-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  font-size: 0.85rem;
}

.audit-item.passed {
  border-left: 3px solid var(--accent-emerald);
}

.audit-item.warning {
  border-left: 3px solid var(--accent-amber);
}

.audit-icon {
  font-size: 1rem;
  flex-shrink: 0;
  margin-top: 0.1rem;
}

.audit-item.passed .audit-icon { color: var(--accent-emerald); }
.audit-item.warning .audit-icon { color: var(--accent-amber); }

/* ==========================================================================
   EXPORT & DOWNLOAD VIEW (DOCX, PDF, MD)
   ========================================================================== */
.export-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
}

.export-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  transition: all var(--transition-fast);
}

.export-card:hover {
  border-color: var(--accent-gold);
  transform: translateY(-2px);
}

.export-icon {
  font-size: 2.25rem;
  color: var(--accent-gold);
}

/* Deliverable Preview Document */
.document-sheet-preview {
  background: #ffffff;
  color: #1a1a1a;
  border-radius: var(--radius-sm);
  padding: 2.5rem 3rem;
  font-family: 'Times New Roman', Times, Georgia, serif;
  line-height: 1.7;
  font-size: 1.05rem;
  box-shadow: var(--shadow-lg);
  margin-top: 1rem;
  border: 1px solid #d1d5db;
}

.document-sheet-preview h1, 
.document-sheet-preview h2, 
.document-sheet-preview h3 {
  font-family: 'Times New Roman', Times, serif;
  color: #111827;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

.document-sheet-preview h1 {
  text-align: center;
  font-size: 1.8rem;
  border-bottom: 2px solid #b48c1e;
  padding-bottom: 0.5rem;
  margin-top: 0;
}

.doc-meta-header {
  text-align: center;
  font-size: 0.95rem;
  font-style: italic;
  color: #4b5563;
  margin-bottom: 1.5rem;
}

/* ==========================================================================
   RESPONSIVE DESIGN
   ========================================================================== */
@media (max-width: 840px) {
  .workspace-wrapper {
    flex-direction: column;
    height: auto;
  }
  .workspace-sidebar {
    width: 100%;
    height: auto;
    border-right: none;
    border-bottom: 1px solid var(--border-subtle);
  }
  .passage-search-form {
    grid-template-columns: 1fr;
  }
  .workspace-content {
    padding: 1.25rem;
  }
}

/* ==========================================================================
   PRINT STYLES FOR DIRECT PDF SAVE
   ========================================================================== */
@media print {
  body {
    background: #ffffff !important;
    color: #000000 !important;
  }
  .main-header, .workspace-sidebar, .header-actions, .passage-banner-card, .btn, .step-nav-btn {
    display: none !important;
  }
  .workspace-content {
    padding: 0 !important;
    overflow: visible !important;
  }
  .document-sheet-preview {
    box-shadow: none !important;
    border: none !important;
    padding: 0 !important;
  }
}
