/* =============================================
   EZ Case Brief — Premium Academic Design
   ============================================= */

:root {
  --navy:       #0f1f3d;
  --navy-mid:   #1a3260;
  --navy-light: #2a4a8a;
  --charcoal:   #2c2c2c;
  --slate:      #4a5568;
  --muted:      #718096;
  --border:     #d1d9e6;
  --border-lt:  #e8edf5;
  --bg:         #f7f8fc;
  --white:      #ffffff;
  --gold:       #c9a84c;
  --gold-light: #f0dda0;
  --gold-fade:  #fdf6e3;
  --success:    #2f855a;
  --danger:     #c53030;
  --danger-lt:  #fff5f5;
  --card-shadow: 0 2px 12px rgba(15,31,61,0.08);
  --card-shadow-hover: 0 8px 32px rgba(15,31,61,0.14);
  --radius:     10px;
  --radius-sm:  6px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

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

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg);
  color: var(--charcoal);
  min-height: 100vh;
  line-height: 1.6;
}

/* VIEWS */
.view { display: none; }
.view.active { display: block; }

/* ---- SITE HEADER ---- */
.site-header {
  background: var(--navy);
  padding: 0 2rem;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 20px rgba(0,0,0,0.25);
}

.header-inner {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
}

.logo-icon {
  font-size: 1.6rem;
  filter: drop-shadow(0 0 6px rgba(201,168,76,0.5));
}

.logo-icon.small { font-size: 1.2rem; }

.logo-title {
  display: block;
  font-family: 'Playfair Display', serif;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--white);
  line-height: 1.1;
}

.logo-sub {
  display: block;
  font-size: 0.65rem;
  color: var(--gold-light);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 500;
}

.header-nav { display: flex; gap: 4px; }

.nav-btn {
  background: none;
  border: none;
  color: rgba(255,255,255,0.65);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.875rem;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s;
}

.nav-btn:hover, .nav-btn.active {
  color: var(--white);
  background: rgba(255,255,255,0.1);
}

/* ---- DASHBOARD ---- */
.dashboard-main {
  max-width: 1400px;
  margin: 0 auto;
  padding: 2.5rem 2rem;
}

.dashboard-hero {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2rem;
  align-items: center;
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-mid) 60%, var(--navy-light) 100%);
  border-radius: 16px;
  padding: 3rem;
  margin-bottom: 2.5rem;
  position: relative;
  overflow: hidden;
}

.dashboard-hero::before {
  content: '⚖';
  position: absolute;
  right: -20px;
  top: -30px;
  font-size: 14rem;
  opacity: 0.05;
  pointer-events: none;
}

.hero-title {
  font-family: 'Playfair Display', serif;
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--white);
  line-height: 1.15;
  margin-bottom: 0.75rem;
}

.hero-title em {
  font-style: italic;
  color: var(--gold-light);
}

.hero-sub {
  color: rgba(255,255,255,0.7);
  font-size: 1rem;
  margin-bottom: 2rem;
  max-width: 440px;
}

.hero-stats {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.stat-card {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius);
  padding: 16px 24px;
  text-align: center;
  min-width: 110px;
}

.stat-number {
  display: block;
  font-family: 'Playfair Display', serif;
  font-size: 2rem;
  font-weight: 700;
  color: var(--gold-light);
  line-height: 1;
}

.stat-label {
  display: block;
  font-size: 0.7rem;
  color: rgba(255,255,255,0.55);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 4px;
}

/* Controls */
.dashboard-controls {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 2rem;
}

.search-bar {
  display: flex;
  align-items: center;
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 0 16px;
  gap: 10px;
  box-shadow: var(--card-shadow);
}

.search-icon { font-size: 1rem; color: var(--muted); }

.search-bar input {
  flex: 1;
  border: none;
  outline: none;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.95rem;
  padding: 14px 0;
  background: transparent;
  color: var(--charcoal);
}

.filter-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.filter-row select {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.875rem;
  padding: 8px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--white);
  color: var(--charcoal);
  cursor: pointer;
  outline: none;
}

/* Briefs Grid */
.briefs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.25rem;
}

.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 5rem 2rem;
  background: var(--white);
  border-radius: 16px;
  border: 2px dashed var(--border);
}

.empty-icon { font-size: 3rem; margin-bottom: 1rem; }

.empty-state h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.4rem;
  color: var(--slate);
  margin-bottom: 0.5rem;
}

.empty-state p {
  color: var(--muted);
  margin-bottom: 1.5rem;
}

/* Brief Card */
.brief-card {
  background: var(--white);
  border-radius: var(--radius);
  border: 1.5px solid var(--border-lt);
  padding: 1.5rem;
  box-shadow: var(--card-shadow);
  cursor: pointer;
  transition: all 0.22s ease;
  position: relative;
  overflow: hidden;
}

.brief-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--card-shadow-hover);
  border-color: var(--navy-light);
}

.brief-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--navy), var(--gold));
  opacity: 0;
  transition: opacity 0.22s;
}

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

.brief-card-course {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--navy-light);
  background: rgba(42,74,138,0.08);
  padding: 3px 10px;
  border-radius: 20px;
  margin-bottom: 10px;
}

.brief-card-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--navy);
  line-height: 1.3;
  margin-bottom: 4px;
}

.brief-card-citation {
  font-family: 'DM Mono', monospace;
  font-size: 0.78rem;
  color: var(--muted);
  margin-bottom: 12px;
}

.brief-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.78rem;
  color: var(--muted);
  border-top: 1px solid var(--border-lt);
  padding-top: 10px;
  margin-top: 10px;
}

.brief-card-progress {
  height: 4px;
  background: var(--border-lt);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 8px;
}

.brief-card-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--navy-light), var(--gold));
  border-radius: 4px;
  transition: width 0.4s;
}

.brief-card-actions {
  display: flex;
  gap: 6px;
  margin-top: 10px;
}

.card-action-btn {
  flex: 1;
  font-size: 0.78rem;
  font-family: 'DM Sans', sans-serif;
  font-weight: 500;
  padding: 6px 0;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  background: transparent;
  color: var(--slate);
  cursor: pointer;
  transition: all 0.18s;
}

.card-action-btn:hover {
  background: var(--navy);
  color: var(--white);
  border-color: var(--navy);
}

.card-action-btn.danger:hover {
  background: var(--danger);
  border-color: var(--danger);
}

.brief-mode-badge {
  font-size: 0.65rem;
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.badge-full { background: var(--navy); color: white; }
.badge-mini { background: var(--gold); color: var(--navy); }

/* ---- BUILDER HEADER ---- */
.builder-header {
  background: var(--navy);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 20px rgba(0,0,0,0.25);
}

.builder-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  height: 60px;
}

.back-btn {
  background: none;
  border: none;
  color: rgba(255,255,255,0.7);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.875rem;
  cursor: pointer;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  transition: all 0.2s;
  white-space: nowrap;
}

.back-btn:hover { color: var(--white); background: rgba(255,255,255,0.1); }

.builder-title-area {
  display: flex;
  align-items: center;
  gap: 8px;
}

.builder-logo {
  font-family: 'Playfair Display', serif;
  font-size: 1.1rem;
  color: var(--white);
  font-weight: 700;
}

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

.progress-bar-container {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 1.5rem 10px;
}

.progress-bar-track {
  flex: 1;
  height: 3px;
  background: rgba(255,255,255,0.15);
  border-radius: 2px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--gold), #f5d06b);
  border-radius: 2px;
  transition: width 0.4s ease;
  width: 0%;
}

.progress-label {
  font-size: 0.72rem;
  color: rgba(255,255,255,0.6);
  white-space: nowrap;
  min-width: 90px;
  text-align: right;
}

/* ---- BUILDER LAYOUT ---- */
.builder-layout {
  display: grid;
  grid-template-columns: 1fr 420px;
  min-height: calc(100vh - 90px);
}

.builder-layout.preview-hidden .preview-panel { display: none; }
.builder-layout.preview-hidden { grid-template-columns: 1fr; }

/* ---- FORM PANEL ---- */
.form-panel {
  padding: 2rem;
  overflow-y: auto;
  border-right: 1.5px solid var(--border);
}

.form-meta {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.5rem;
  border: 1.5px solid var(--border-lt);
  box-shadow: var(--card-shadow);
}

.meta-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  align-items: end;
}

.meta-field label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--slate);
  margin-bottom: 6px;
}

.meta-field select {
  width: 100%;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9rem;
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--charcoal);
  cursor: pointer;
  outline: none;
  transition: border-color 0.2s;
}

.meta-field select:focus { border-color: var(--navy-light); }

.toggle-switch {
  display: flex;
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.toggle-opt {
  flex: 1;
  padding: 10px;
  border: none;
  background: transparent;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.2s;
}

.toggle-opt.active {
  background: var(--navy);
  color: var(--white);
}

/* Toolbar */
.rich-toolbar {
  display: flex;
  align-items: center;
  gap: 4px;
  background: var(--white);
  border: 1.5px solid var(--border-lt);
  border-radius: var(--radius);
  padding: 8px 12px;
  margin-bottom: 1.5rem;
  box-shadow: var(--card-shadow);
  flex-wrap: wrap;
}

.toolbar-btn {
  width: 32px;
  height: 32px;
  border: none;
  background: none;
  border-radius: 4px;
  font-size: 0.9rem;
  cursor: pointer;
  color: var(--slate);
  transition: all 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.toolbar-btn:hover {
  background: var(--border-lt);
  color: var(--navy);
}

.toolbar-divider {
  width: 1px;
  height: 20px;
  background: var(--border);
  margin: 0 4px;
}

.toolbar-info {
  margin-left: auto;
  font-size: 0.75rem;
  color: var(--muted);
  font-style: italic;
}

/* ---- SECTION CARDS ---- */
.section-card {
  background: var(--white);
  border-radius: var(--radius);
  border: 1.5px solid var(--border-lt);
  margin-bottom: 1.25rem;
  box-shadow: var(--card-shadow);
  overflow: hidden;
  transition: border-color 0.2s;
}

.section-card.focused { border-color: var(--navy-light); }
.section-card.hidden-section { display: none; }

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  cursor: pointer;
  user-select: none;
  border-bottom: 1.5px solid var(--border-lt);
  background: linear-gradient(to right, rgba(15,31,61,0.02), transparent);
  transition: background 0.2s;
}

.section-header:hover { background: linear-gradient(to right, rgba(15,31,61,0.04), transparent); }

.section-header-left { display: flex; align-items: center; gap: 10px; }

.section-num {
  width: 26px;
  height: 26px;
  background: var(--navy);
  color: var(--white);
  border-radius: 50%;
  font-size: 0.72rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.section-title {
  font-family: 'Playfair Display', serif;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--navy);
}

.section-wc {
  font-size: 0.7rem;
  color: var(--muted);
  font-family: 'DM Mono', monospace;
  background: var(--bg);
  padding: 2px 8px;
  border-radius: 10px;
  margin-left: 8px;
}

.section-chevron {
  font-size: 0.75rem;
  color: var(--muted);
  transition: transform 0.25s;
}

.section-card.collapsed .section-chevron { transform: rotate(-90deg); }

.section-body {
  padding: 14px 18px 18px;
  transition: all 0.25s;
}

.section-card.collapsed .section-body { display: none; }

.section-helper {
  font-size: 0.8rem;
  color: var(--muted);
  font-style: italic;
  margin-bottom: 10px;
  padding: 8px 12px;
  background: var(--gold-fade);
  border-left: 3px solid var(--gold);
  border-radius: 0 4px 4px 0;
  line-height: 1.5;
}

.section-editor {
  min-height: 100px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9rem;
  line-height: 1.65;
  color: var(--charcoal);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  background: var(--bg);
}

.section-editor:focus {
  border-color: var(--navy-light);
  background: var(--white);
  box-shadow: 0 0 0 3px rgba(42,74,138,0.07);
}

.section-editor:empty::before {
  content: attr(data-placeholder);
  color: #aab;
  pointer-events: none;
}

/* ---- FORM FOOTER ---- */
.form-footer {
  background: var(--white);
  border-radius: var(--radius);
  border: 1.5px solid var(--border-lt);
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 0.5rem;
  box-shadow: var(--card-shadow);
}

.word-count-total {
  font-size: 0.85rem;
  color: var(--muted);
}

.word-count-total strong {
  color: var(--navy);
  font-family: 'DM Mono', monospace;
}

.footer-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* ---- PREVIEW PANEL ---- */
.preview-panel {
  background: var(--white);
  overflow-y: auto;
  border-left: 1.5px solid var(--border);
  position: sticky;
  top: 90px;
  max-height: calc(100vh - 90px);
}

.preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  border-bottom: 1.5px solid var(--border-lt);
  position: sticky;
  top: 0;
  background: var(--white);
  z-index: 10;
}

.preview-header h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1rem;
  color: var(--navy);
}

.preview-content {
  padding: 2rem 1.75rem;
  font-size: 0.875rem;
  line-height: 1.7;
}

/* Preview Styles */
.preview-brief-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 4px;
  line-height: 1.3;
}

.preview-citation {
  font-family: 'DM Mono', monospace;
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 4px;
}

.preview-meta-row {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 1.25rem;
  padding-bottom: 1.25rem;
  border-bottom: 2px solid var(--navy);
}

.preview-course-tag {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  background: var(--navy);
  color: white;
  padding: 3px 10px;
  border-radius: 10px;
}

.preview-section {
  margin-bottom: 1.2rem;
  padding-bottom: 1.2rem;
  border-bottom: 1px solid var(--border-lt);
}

.preview-section:last-child { border-bottom: none; }

.preview-section-title {
  font-family: 'Playfair Display', serif;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--navy);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 6px;
}

.preview-section-body {
  color: var(--charcoal);
  font-size: 0.85rem;
  line-height: 1.65;
}

.preview-section-body:empty::before {
  content: '—';
  color: var(--border);
}

.preview-empty-notice {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--muted);
  font-style: italic;
  font-size: 0.9rem;
}

/* ---- BUTTONS ---- */
.btn-primary {
  background: var(--navy);
  color: var(--white);
  border: none;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.btn-primary:hover { background: var(--navy-light); transform: translateY(-1px); }
.btn-primary.large { padding: 14px 28px; font-size: 1rem; border-radius: var(--radius); }

.btn-ghost {
  background: none;
  border: 1.5px solid rgba(255,255,255,0.25);
  color: rgba(255,255,255,0.8);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.btn-ghost:hover { border-color: rgba(255,255,255,0.6); color: white; }
.btn-ghost.small { padding: 5px 10px; font-size: 0.75rem; }
.btn-ghost.light {
  border-color: var(--border);
  color: var(--slate);
}
.btn-ghost.light:hover { border-color: var(--navy); color: var(--navy); background: rgba(15,31,61,0.04); }

.btn-outline {
  background: none;
  border: 1.5px solid var(--border);
  color: var(--slate);
  padding: 9px 14px;
  border-radius: var(--radius-sm);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.18s;
  white-space: nowrap;
}

.btn-outline:hover {
  border-color: var(--navy);
  color: var(--navy);
  background: rgba(15,31,61,0.03);
}

.btn-danger {
  background: var(--danger);
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-danger:hover { background: #9b2525; }

/* ---- MODAL ---- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15,31,61,0.5);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
}

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

.modal {
  background: var(--white);
  border-radius: 14px;
  padding: 2.5rem;
  max-width: 420px;
  width: 90%;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
  animation: modalIn 0.25s ease;
}

@keyframes modalIn {
  from { opacity: 0; transform: scale(0.92) translateY(10px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-icon { font-size: 2.5rem; margin-bottom: 1rem; }

.modal h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.3rem;
  color: var(--navy);
  margin-bottom: 0.75rem;
}

.modal p {
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
  line-height: 1.55;
}

.modal-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
}

.modal-input {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
  outline: none;
  transition: border-color 0.2s;
}

.modal-input:focus { border-color: var(--navy-light); }

/* ---- TOAST ---- */
.toast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: var(--charcoal);
  color: white;
  padding: 12px 20px;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 500;
  box-shadow: 0 8px 24px rgba(0,0,0,0.25);
  z-index: 2000;
  transform: translateY(80px);
  opacity: 0;
  transition: all 0.3s ease;
  pointer-events: none;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

.toast.success { background: var(--success); }
.toast.error { background: var(--danger); }

/* ---- AUTOSAVE INDICATOR ---- */
.autosave-indicator {
  font-size: 0.72rem;
  color: var(--success);
  opacity: 0;
  transition: opacity 0.5s;
  padding: 0 8px;
}

.autosave-indicator.visible { opacity: 1; }

/* ---- PRINT STYLES ---- */
@media print {
  .builder-header, .form-panel, .preview-header, .site-header { display: none !important; }
  .builder-layout { grid-template-columns: 1fr !important; }
  .preview-panel {
    position: static !important;
    max-height: none !important;
    border: none !important;
    overflow: visible !important;
  }
  .preview-content { padding: 0 !important; }
  body { background: white; }
}

/* ---- RESPONSIVE ---- */
@media (max-width: 1100px) {
  .builder-layout { grid-template-columns: 1fr; }
  .preview-panel { display: none; }
  .builder-layout .preview-panel.show-mobile { display: block; }
}

@media (max-width: 768px) {
  .dashboard-hero { grid-template-columns: 1fr; padding: 2rem 1.5rem; }
  .hero-stats { flex-direction: row; }
  .stat-card { flex: 1; }
  .hero-title { font-size: 1.8rem; }
  .meta-row { grid-template-columns: 1fr; }
  .footer-actions { flex-direction: column; }
  .builder-header-inner { padding: 0 1rem; }
  .builder-actions .btn-outline { display: none; }
  .form-panel { padding: 1rem; }
  .dashboard-main { padding: 1.5rem 1rem; }
}

@media (max-width: 480px) {
  .header-inner { padding: 0 1rem; }
  .filter-row { flex-direction: column; }
  .filter-row select, .filter-row button { width: 100%; }
  .modal { padding: 1.75rem 1.25rem; }
}
