/* ============================================
   Insta DMEL — Style Sheet
   DMEL Hypnose branded dark theme
   ============================================ */

:root {
  --primary: #c27a5a;
  --secondary: #e8a88a;
  --bg-dark: #1a1a1a;
  --bg-card: #242424;
  --bg-light: #fdf6f0;
  --text: #ffffff;
  --text-muted: #999;
  --text-dark: #2d2d2d;
  --radius: 12px;
  --transition: 0.2s ease;
}

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

body {
  background: var(--bg-dark);
  color: var(--text);
  font-family: 'Open Sans', sans-serif;
  font-size: 14px;
  line-height: 1.6;
  min-height: 100vh;
}

h1, h2, h3, h4 {
  font-family: 'Playfair Display', serif;
}

/* ---- Scrollbar ---- */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: var(--bg-dark);
}
::-webkit-scrollbar-thumb {
  background: #444;
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: #666;
}

/* ============================================
   HEADER
   ============================================ */
.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 28px;
  border-bottom: 1px solid #2e2e2e;
  background: var(--bg-card);
}

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

.header-logo {
  height: 40px;
  width: auto;
}

.header-title {
  font-size: 22px;
  font-weight: 600;
  color: var(--secondary);
  letter-spacing: 0.5px;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-user {
  font-size: 13px;
  color: var(--text-muted);
}

/* ============================================
   NAVIGATION
   ============================================ */
.app-nav {
  display: flex;
  gap: 6px;
  padding: 12px 28px;
  border-bottom: 1px solid #2a2a2a;
  background: var(--bg-dark);
}

.nav-tab {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: 'Open Sans', sans-serif;
  font-size: 13px;
  font-weight: 600;
  padding: 8px 20px;
  border-radius: 20px;
  cursor: pointer;
  transition: all var(--transition);
}

.nav-tab:hover {
  color: var(--text);
  background: rgba(194, 122, 90, 0.15);
}

.nav-tab.active {
  background: var(--primary);
  color: #fff;
}

/* ============================================
   MAIN CONTENT
   ============================================ */
.app-main {
  padding: 28px;
  max-width: 1400px;
  margin: 0 auto;
}

.section-title {
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 24px;
  color: var(--text);
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 12px;
}

.section-header .section-title {
  margin-bottom: 0;
}

/* ============================================
   STAT CARDS (Dashboard)
   ============================================ */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 32px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid #2e2e2e;
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
  transition: border-color var(--transition);
}

.stat-card:hover {
  border-color: var(--primary);
}

.stat-number {
  display: block;
  font-family: 'Playfair Display', serif;
  font-size: 42px;
  font-weight: 700;
  color: var(--secondary);
  line-height: 1.2;
  margin-bottom: 6px;
}

.stat-label {
  display: block;
  font-size: 13px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ============================================
   PROGRESS BAR
   ============================================ */
.progress-container {
  background: var(--bg-card);
  border: 1px solid #2e2e2e;
  border-radius: var(--radius);
  padding: 24px;
}

.progress-label {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--text);
}

.progress-track {
  height: 8px;
  background: #333;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 8px;
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  border-radius: 4px;
  transition: width 0.6s ease;
}

.progress-text {
  font-size: 13px;
  color: var(--text-muted);
  text-align: right;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 22px;
  border-radius: 8px;
  font-family: 'Open Sans', sans-serif;
  font-size: 13px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}

.btn-primary:hover {
  background: #a8654a;
}

.btn-secondary {
  background: transparent;
  border: 1px solid var(--primary);
  color: var(--primary);
}

.btn-secondary:hover {
  background: rgba(194, 122, 90, 0.12);
}

.btn-block {
  width: 100%;
  margin-top: 16px;
}

.btn-small {
  padding: 5px 12px;
  font-size: 12px;
  border-radius: 6px;
}

.btn-danger {
  background: transparent;
  border: 1px solid #c0392b;
  color: #e74c3c;
}

.btn-danger:hover {
  background: rgba(231, 76, 60, 0.12);
}

/* ============================================
   FORM INPUTS
   ============================================ */
.input-select,
.input-text,
.input-textarea {
  background: #333;
  color: var(--text);
  border: 1px solid #444;
  border-radius: 8px;
  padding: 9px 14px;
  font-family: 'Open Sans', sans-serif;
  font-size: 13px;
  transition: border-color var(--transition);
}

.input-select:focus,
.input-text:focus,
.input-textarea:focus {
  outline: none;
  border-color: var(--primary);
}

.input-textarea {
  resize: vertical;
  min-height: 80px;
  width: 100%;
}

/* Searchable select dropdown */
.searchable-select {
  position: relative;
  width: 100%;
}

.searchable-select-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  max-height: 220px;
  overflow-y: auto;
  background: #333;
  border: 1px solid #555;
  border-top: none;
  border-radius: 0 0 8px 8px;
  z-index: 100;
}

.searchable-select-dropdown.open {
  display: block;
}

.searchable-select-option {
  padding: 8px 14px;
  font-size: 13px;
  cursor: pointer;
  color: var(--text);
  border-bottom: 1px solid #3a3a3a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.searchable-select-option:last-child {
  border-bottom: none;
}

.searchable-select-option:hover,
.searchable-select-option.active {
  background: var(--primary);
  color: #fff;
}

.searchable-select-option .badge {
  margin-right: 6px;
  font-size: 10px;
}

.input-text {
  width: 100%;
}

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.3px;
  margin-bottom: 6px;
}

/* ============================================
   BADGES (Type / Theme)
   ============================================ */
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.badge-citation {
  background: rgba(155, 89, 182, 0.2);
  color: #bb8fce;
}

.badge-tip {
  background: rgba(46, 204, 113, 0.2);
  color: #58d68d;
}

.badge-carrousel {
  background: rgba(52, 152, 219, 0.2);
  color: #5dade2;
}

.badge-mythe-realite {
  background: rgba(241, 196, 15, 0.2);
  color: #f4d03f;
}

.badge-temoignage {
  background: rgba(230, 126, 34, 0.2);
  color: #eb984e;
}

.badge-promo {
  background: rgba(231, 76, 60, 0.2);
  color: #ec7063;
}

.badge-theme {
  background: rgba(194, 122, 90, 0.15);
  color: var(--secondary);
}

.badge-flat {
  background: rgba(52, 152, 219, 0.2);
  color: #85c1e9;
}

/* Status indicators */
.status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 6px;
}

.status-nouvelle { background: #5dade2; }
.status-utilisee { background: #58d68d; }
.status-rejetee { background: #ec7063; }
.status-pret { background: #f4d03f; }
.status-planifie { background: #bb8fce; }
.status-publie { background: #58d68d; }

/* ============================================
   IDEAS SECTION
   ============================================ */
.generate-controls {
  display: flex;
  gap: 10px;
  align-items: center;
}

.ideas-filters {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.ideas-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.ideas-table-info {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.ideas-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-card);
  border: 1px solid #2e2e2e;
  border-radius: var(--radius);
  overflow: hidden;
  font-size: 13px;
}

.ideas-table th {
  background: #2a2a2a;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid #333;
  white-space: nowrap;
}

.ideas-table th.sortable {
  cursor: pointer;
  user-select: none;
}

.ideas-table th.sortable:hover {
  color: var(--secondary);
}

.ideas-table td {
  padding: 8px 12px;
  border-bottom: 1px solid #2a2a2a;
  vertical-align: middle;
}

.ideas-table tbody tr:hover {
  background: rgba(194, 122, 90, 0.05);
}

.ideas-table tbody tr.row-selected {
  background: rgba(194, 122, 90, 0.1);
}

.idea-cell-title {
  max-width: 400px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 500;
}

.idea-status {
  display: flex;
  align-items: center;
  font-size: 12px;
  color: var(--text-muted);
}

/* ============================================
   CALENDAR SECTION
   ============================================ */
.calendar-controls {
  display: flex;
  gap: 10px;
}

.calendar-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 20px;
}

.calendar-main {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 16px;
  border: 1px solid #2e2e2e;
}

.calendar-sidebar {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 16px;
  border: 1px solid #2e2e2e;
  max-height: 600px;
  overflow-y: auto;
}

.calendar-sidebar h3 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--text-muted);
}

.unscheduled-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.unscheduled-item {
  background: #2e2e2e;
  border-radius: 8px;
  padding: 10px 12px;
  cursor: grab;
  font-size: 13px;
  transition: background var(--transition);
}

.unscheduled-item:hover {
  background: #383838;
}

/* FullCalendar dark theme overrides */
.calendar-main .fc {
  --fc-border-color: #333;
  --fc-page-bg-color: var(--bg-card);
  --fc-neutral-bg-color: #2a2a2a;
  --fc-list-event-hover-bg-color: #333;
  --fc-today-bg-color: rgba(194, 122, 90, 0.08);
}

.calendar-main .fc .fc-col-header-cell {
  background: #2a2a2a;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  padding: 8px 0;
}

.calendar-main .fc .fc-daygrid-day-number {
  color: var(--text);
  font-size: 13px;
  padding: 6px 8px;
}

.calendar-main .fc .fc-button {
  background: var(--primary);
  border-color: var(--primary);
  font-size: 13px;
}

.calendar-main .fc .fc-button:hover {
  background: #a8654a;
  border-color: #a8654a;
}

.calendar-main .fc .fc-button-active {
  background: #a8654a !important;
  border-color: #a8654a !important;
}

.calendar-main .fc .fc-toolbar-title {
  font-family: 'Playfair Display', serif;
  font-size: 18px;
  color: var(--text);
}

.calendar-main .fc .fc-event {
  border-radius: 4px;
  padding: 2px 6px;
  font-size: 12px;
  border: none;
}

.fc-event-citation { background: rgba(155, 89, 182, 0.7) !important; }
.fc-event-tip { background: rgba(46, 204, 113, 0.7) !important; }
.fc-event-carrousel { background: rgba(52, 152, 219, 0.7) !important; }
.fc-event-mythe-realite { background: rgba(241, 196, 15, 0.7) !important; color: #333 !important; }
.fc-event-temoignage { background: rgba(230, 126, 34, 0.7) !important; }
.fc-event-promo { background: rgba(231, 76, 60, 0.7) !important; }

/* ============================================
   GENERATOR SECTION
   ============================================ */
.generator-layout {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 28px;
  align-items: start;
}

.generator-form {
  background: var(--bg-card);
  border: 1px solid #2e2e2e;
  border-radius: var(--radius);
  padding: 24px;
}

.template-fields {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.generator-preview {
  display: flex;
  justify-content: center;
}

.preview-wrapper {
  width: 540px;
  height: 540px;
  border: 1px solid #2e2e2e;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  background: var(--bg-card);
}

.preview-frame {
  width: 1080px;
  height: 1080px;
  border: none;
  transform: scale(0.5);
  transform-origin: top left;
}

/* ============================================
   LIBRARY SECTION
   ============================================ */
.library-controls {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.library-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.library-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid #2e2e2e;
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color var(--transition), transform var(--transition);
}

.library-card:hover {
  border-color: #444;
  transform: translateY(-2px);
}

.library-card.selected {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px var(--primary);
}

.library-card-checkbox {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 2;
  width: 24px;
  height: 24px;
  background: rgba(0,0,0,0.6);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.library-card-checkbox input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--primary);
}

.library-card-image {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  background: #2a2a2a;
}

.library-card-body {
  padding: 14px;
}

.library-card-title {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 6px;
}

.library-card-meta {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.library-card-date {
  font-size: 12px;
  color: var(--text-muted);
}

/* ============================================
   BACKGROUNDS SECTION
   ============================================ */
.bg-themes-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.bg-theme-card {
  background: var(--bg-card);
  border: 1px solid #2e2e2e;
  border-radius: var(--radius);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.bg-theme-name {
  font-weight: 600;
  font-size: 15px;
  margin-bottom: 2px;
}

.bg-theme-stats {
  font-size: 12px;
  color: var(--text-muted);
}

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

.input-select-small {
  width: 60px;
  padding: 6px 8px;
  font-size: 12px;
}

.bg-pool-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
}

.bg-pool-item {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid #2e2e2e;
}

.bg-pool-img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  display: block;
}

.bg-pool-meta {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
  padding: 20px 8px 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.bg-pool-uses {
  font-size: 11px;
  color: rgba(255,255,255,0.6);
}

.bg-delete-btn {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(0,0,0,0.7);
  border: 1px solid rgba(231,76,60,0.5);
  color: #e74c3c;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity var(--transition);
}

.bg-pool-item:hover .bg-delete-btn {
  opacity: 1;
}

.section-subtitle {
  font-family: 'Playfair Display', serif;
  font-size: 16px;
  color: var(--text-muted);
  margin-bottom: 16px;
}

/* ============================================
   LOADING OVERLAY
   ============================================ */
.loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.spinner {
  width: 44px;
  height: 44px;
  border: 3px solid #333;
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* ============================================
   EMPTY STATES
   ============================================ */
.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-muted);
}

.empty-state-icon {
  font-size: 48px;
  margin-bottom: 12px;
  opacity: 0.4;
}

.empty-state-text {
  font-size: 14px;
}

/* ============================================
   WIZARD STEPPER
   ============================================ */
.wizard-stepper {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 28px;
  border-bottom: 1px solid #2a2a2a;
  background: var(--bg-card);
  gap: 0;
}

.wizard-step {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 20px;
  cursor: pointer;
  transition: all var(--transition);
  opacity: 0.4;
}

.wizard-step.active {
  opacity: 1;
  background: rgba(194, 122, 90, 0.15);
}

.wizard-step.completed {
  opacity: 0.8;
}

.wizard-step.completed .step-num {
  background: #58d68d;
  color: #fff;
}

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #444;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  font-family: 'Open Sans', sans-serif;
  flex-shrink: 0;
}

.wizard-step.active .step-num {
  background: var(--primary);
}

.step-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
}

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

.wizard-line {
  width: 40px;
  height: 2px;
  background: #333;
  flex-shrink: 0;
}

.wizard-step.completed + .wizard-line {
  background: #58d68d;
}

/* Wizard bottom nav */
.wizard-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 28px;
  background: var(--bg-card);
  border-top: 1px solid #2e2e2e;
  z-index: 50;
}

.wizard-step-hint {
  font-size: 13px;
  color: var(--text-muted);
}

.wizard-nav .btn {
  min-width: 140px;
}

.wizard-nav .btn-large {
  padding: 12px 32px;
  font-size: 14px;
}

/* Dashboard CTA */
.dashboard-cta {
  margin-top: 32px;
  padding: 40px;
  background: linear-gradient(135deg, rgba(194, 122, 90, 0.12), rgba(232, 168, 138, 0.08));
  border: 1px solid rgba(194, 122, 90, 0.3);
  border-radius: var(--radius);
  text-align: center;
}

.dashboard-cta .cta-icon {
  font-size: 36px;
  margin-bottom: 12px;
}

.dashboard-cta h3 {
  font-size: 22px;
  margin-bottom: 10px;
  color: var(--secondary);
}

.dashboard-cta p {
  font-size: 14px;
  color: var(--text-muted);
  max-width: 500px;
  margin: 0 auto 20px;
  line-height: 1.7;
}

.btn-large {
  padding: 12px 32px;
  font-size: 15px;
  border-radius: 10px;
}

/* Wizard batch view */
.batch-summary-card {
  background: var(--bg-card);
  border: 1px solid #2e2e2e;
  border-radius: var(--radius);
  padding: 24px;
  max-width: 700px;
  margin: 0 auto;
}

.batch-ideas-preview {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 300px;
  overflow-y: auto;
}

.batch-idea-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: #2a2a2a;
  border-radius: 8px;
  font-size: 13px;
}

.batch-idea-row .badge {
  flex-shrink: 0;
}

.batch-idea-title {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.batch-progress-panel {
  background: var(--bg-card);
  border: 1px solid #2e2e2e;
  border-radius: var(--radius);
  padding: 24px;
  max-width: 700px;
  margin: 0 auto;
}

.batch-progress-panel h3 {
  font-size: 18px;
  margin-bottom: 4px;
  color: var(--secondary);
}

.batch-progress-log {
  max-height: 260px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.log-entry {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 13px;
  background: #2a2a2a;
}

.log-entry.success {
  border-left: 3px solid #58d68d;
}

.log-entry.error {
  border-left: 3px solid #e74c3c;
}

.log-entry.pending {
  border-left: 3px solid #555;
  opacity: 0.5;
}

.log-entry.current {
  border-left: 3px solid var(--primary);
  background: rgba(194, 122, 90, 0.1);
}

.log-icon {
  flex-shrink: 0;
  width: 18px;
  text-align: center;
}

/* Library wizard CTA */
.wizard-library-cta {
  margin-top: 32px;
  padding: 40px;
  background: linear-gradient(135deg, rgba(88, 214, 141, 0.1), rgba(194, 122, 90, 0.08));
  border: 1px solid rgba(88, 214, 141, 0.3);
  border-radius: var(--radius);
  text-align: center;
}

.wizard-library-cta .cta-icon {
  font-size: 36px;
  margin-bottom: 12px;
}

.wizard-library-cta h3 {
  font-size: 22px;
  margin-bottom: 10px;
  color: #58d68d;
}

.wizard-library-cta p {
  font-size: 14px;
  color: var(--text-muted);
  max-width: 500px;
  margin: 0 auto;
  line-height: 1.7;
}

/* ============================================
   POST DETAIL PAGE
   ============================================ */
.post-detail-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: start;
}

.post-detail-visual {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.post-detail-img {
  width: 100%;
  max-width: 540px;
  border-radius: var(--radius);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.post-detail-carousel-nav {
  display: flex;
  align-items: center;
  gap: 12px;
}

.post-detail-carousel-nav button {
  background: #333;
  border: 1px solid #444;
  color: #fff;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 16px;
  transition: background var(--transition);
}

.post-detail-carousel-nav button:hover {
  background: var(--primary);
}

.post-detail-info {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.post-detail-meta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.post-detail-section {
  background: var(--bg-card);
  border: 1px solid #2e2e2e;
  border-radius: var(--radius);
  padding: 20px;
}

.post-detail-section-title {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.post-detail-caption {
  font-size: 14px;
  line-height: 1.7;
  white-space: pre-wrap;
  color: var(--text);
}

.post-detail-hashtags {
  font-size: 13px;
  color: var(--primary);
  line-height: 1.8;
  word-break: break-word;
}

.post-detail-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.post-detail-date {
  font-size: 14px;
  color: var(--text-muted);
}

.post-detail-keywords {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

@media (max-width: 1200px) {
  .post-detail-layout {
    grid-template-columns: 1fr;
  }
}

/* Body padding when wizard nav visible */
body.wizard-active .app-main {
  padding-bottom: 80px;
}

/* ============================================
   RESPONSIVE (minimal — desktop focus)
   ============================================ */
@media (max-width: 1200px) {
  .stat-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .library-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .generator-layout {
    grid-template-columns: 1fr;
  }
  .calendar-layout {
    grid-template-columns: 1fr;
  }
}
