/* public/css/admin.css */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --green:       #1a4736;
  --green-mid:   #236048;
  --green-light: #2d7a5c;
  --green-pale:  #e8f2ee;
  --orange:      #e8521a;
  --orange-lt:   #f07040;
  --ink:         #1a1a1a;
  --muted:       #6b7280;
  --border:      #e0dbd2;
  --cream:       #faf8f4;
  --warm:        #f4f1eb;
  --white:       #ffffff;
  --red:         #dc2626;
  --blue:        #2563eb;
  --yellow:      #d97706;
  --nav-w:       220px;
}

body { font-family: 'Source Sans 3', sans-serif; background: var(--cream); color: var(--ink); font-size: 14px; line-height: 1.5; }

/* ── NAV ─────────────────────────────────────────────────── */
.admin-nav {
  position: fixed; top: 0; left: 0; bottom: 0;
  width: var(--nav-w);
  background: var(--green);
  display: flex; flex-direction: column;
  z-index: 100;
  padding: 0;
}

.an-logo {
  display: flex; align-items: center; gap: 12px;
  padding: 22px 20px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.an-logo-icon {
  width: 36px; height: 36px;
  background: var(--orange);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Playfair Display', serif; font-size: 14px; font-weight: 900; color: white;
  flex-shrink: 0;
}
.an-logo-main { font-family: 'Playfair Display', serif; font-size: 14px; font-weight: 700; color: white; display: block; line-height: 1.2; }
.an-logo-sub  { font-size: 10px; color: rgba(255,255,255,0.4); letter-spacing: 0.08em; }

.an-links { flex: 1; padding: 16px 0; }
.an-link {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 20px;
  color: rgba(255,255,255,0.6);
  text-decoration: none; font-size: 13px; font-weight: 500;
  transition: background 0.2s, color 0.2s;
}
.an-link:hover { background: rgba(255,255,255,0.06); color: white; }
.an-link.active { background: rgba(255,255,255,0.1); color: white; border-right: 2px solid var(--orange); }

.an-user {
  padding: 16px 20px;
  border-top: 1px solid rgba(255,255,255,0.1);
}
.an-user-name { display: block; font-size: 13px; color: white; font-weight: 500; }
.an-user-role { display: block; font-size: 11px; color: rgba(255,255,255,0.4); margin-bottom: 10px; }
.an-logout {
  font-size: 11px; color: rgba(255,255,255,0.4); background: none; border: none;
  cursor: pointer; padding: 0; letter-spacing: 0.05em;
  transition: color 0.2s;
}
.an-logout:hover { color: rgba(255,255,255,0.8); }

/* ── MAIN ─────────────────────────────────────────────────── */
.admin-main { margin-left: var(--nav-w); min-height: 100vh; }

/* ── PAGE HEADER ──────────────────────────────────────────── */
.page-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 32px 40px 24px;
  border-bottom: 1px solid var(--border);
  background: white;
}
.page-title { font-family: 'Playfair Display', serif; font-size: 26px; font-weight: 700; color: var(--green); }
.page-sub   { font-size: 13px; color: var(--muted); margin-top: 2px; }

/* ── STEP INDICATOR ────────────────────────────────────────── */
.step-indicator {
  display: flex; align-items: center; gap: 0;
  padding: 20px 40px;
  background: white; border-bottom: 1px solid var(--border);
}
.step-item { display: flex; align-items: center; gap: 10px; }
.step-num {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--border); color: var(--muted);
  display: flex; align-items: center; justify-content: center;
  font-family: 'DM Mono', monospace; font-size: 12px; font-weight: 500;
  flex-shrink: 0;
}
.step-item.active .step-num { background: var(--green); color: white; }
.step-item.done   .step-num { background: var(--green-light); color: white; }
.step-label { font-size: 13px; color: var(--muted); }
.step-item.active .step-label { color: var(--green); font-weight: 600; }
.step-item.done   .step-label { color: var(--green-light); }
.step-connector { flex: 1; height: 1px; background: var(--border); margin: 0 16px; min-width: 40px; }

/* ── STEP WRAP ─────────────────────────────────────────────── */
.step-wrap { max-width: 680px; margin: 0 auto; padding: 40px; }
.step-wrap-wide { max-width: 100%; padding: 32px 40px; }
.step-header { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 28px; gap: 20px; }
.step-header h2 { font-family: 'Playfair Display', serif; font-size: 22px; font-weight: 700; color: var(--green); margin-bottom: 4px; }
.step-header p  { font-size: 13px; color: var(--muted); }
.step-header-actions { display: flex; gap: 8px; flex-shrink: 0; }
.step-header-meta { flex-shrink: 0; }

/* ── FORMS ─────────────────────────────────────────────────── */
.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-size: 12px; font-weight: 600; color: var(--green); letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 6px; }
.form-group input[type="text"],
.form-group input[type="number"],
.form-group input[type="password"],
.form-group textarea {
  width: 100%; padding: 10px 14px;
  border: 1px solid var(--border); border-radius: 3px;
  font-family: 'Source Sans 3', sans-serif; font-size: 14px; color: var(--ink);
  background: white; transition: border-color 0.2s;
}
.form-group input:focus, .form-group textarea:focus { outline: none; border-color: var(--green); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-actions { display: flex; gap: 12px; justify-content: flex-end; margin-top: 32px; }

.week-preview {
  background: var(--green-pale); border: 1px solid var(--border);
  padding: 10px 14px; font-size: 13px; color: var(--green);
  margin-bottom: 24px;
}
.week-preview-label { font-weight: 600; margin-right: 8px; }

/* ── BUTTONS ───────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 18px; font-size: 13px; font-weight: 600;
  border: none; cursor: pointer; border-radius: 2px;
  text-decoration: none; transition: background 0.2s, color 0.2s, border-color 0.2s;
  white-space: nowrap;
}
.btn-primary  { background: var(--orange); color: white; }
.btn-primary:hover { background: var(--orange-lt); }
.btn-primary:disabled { background: var(--border); color: var(--muted); cursor: not-allowed; }
.btn-ghost    { background: transparent; color: var(--muted); }
.btn-ghost:hover { background: var(--warm); color: var(--ink); }
.btn-outline  { background: white; color: var(--green); border: 1px solid var(--border); }
.btn-outline:hover { border-color: var(--green); }
.btn-danger-ghost { background: transparent; color: var(--red); }
.btn-danger-ghost:hover { background: #fef2f2; }
.btn-sm  { padding: 5px 12px; font-size: 12px; }
.btn-full { width: 100%; justify-content: center; }

/* ── TABLE ─────────────────────────────────────────────────── */
.table-wrap { padding: 24px 40px; }
.data-table { width: 100%; border-collapse: collapse; background: white; }
.data-table th { font-size: 11px; font-weight: 600; color: var(--muted); letter-spacing: 0.1em; text-transform: uppercase; padding: 12px 16px; border-bottom: 2px solid var(--border); text-align: left; white-space: nowrap; }
.data-table td { padding: 14px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: var(--warm); }
.td-name { font-weight: 500; }
.td-mono { font-family: 'DM Mono', monospace; font-size: 12px; }
.td-muted { color: var(--muted); }
.td-actions { display: flex; gap: 6px; flex-wrap: wrap; }

/* ── BADGES ────────────────────────────────────────────────── */
.badge { display: inline-flex; align-items: center; padding: 3px 8px; font-size: 11px; font-weight: 600; border-radius: 2px; letter-spacing: 0.04em; }
.badge-gray   { background: #f3f4f6; color: #6b7280; }
.badge-yellow { background: #fef3c7; color: #92400e; }
.badge-blue   { background: #dbeafe; color: #1d4ed8; }
.badge-green  { background: var(--green-pale); color: var(--green); }

/* ── ALERTS ────────────────────────────────────────────────── */
.alert { padding: 12px 16px; margin: 0 40px 20px; border-radius: 2px; font-size: 13px; }
.alert a { color: inherit; font-weight: 600; }
.alert-success { background: var(--green-pale); color: var(--green); border-left: 3px solid var(--green-light); }
.alert-error   { background: #fef2f2; color: var(--red); border-left: 3px solid var(--red); }

/* ── EMPTY STATE ───────────────────────────────────────────── */
.empty-state { text-align: center; padding: 80px 40px; color: var(--muted); }
.empty-icon  { font-size: 40px; margin-bottom: 16px; }
.empty-state h3 { font-family: 'Playfair Display', serif; font-size: 20px; color: var(--green); margin-bottom: 8px; }
.empty-state p  { margin-bottom: 20px; }

/* ── SELECTION GRID (step 2) ──────────────────────────────── */
.article-selection-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--border); margin-bottom: 0; }
.selection-panel { background: white; }
.selection-panel-header { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.selection-panel-header h3 { font-size: 14px; font-weight: 600; color: var(--green); display: flex; align-items: center; gap: 8px; }
.count-badge { font-size: 11px; color: var(--muted); font-weight: 400; }
.article-list { max-height: 60vh; overflow-y: auto; }
.empty-panel { padding: 40px; text-align: center; color: var(--muted); font-size: 13px; }

.article-row {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 14px 20px; border-bottom: 1px solid var(--border);
  cursor: pointer; transition: background 0.15s;
}
.article-row:last-child { border-bottom: none; }
.article-row:hover { background: var(--warm); }
.article-row.selected { background: var(--green-pale); }
.article-row-check { flex-shrink: 0; padding-top: 2px; }
.checkbox {
  width: 18px; height: 18px; border: 2px solid var(--border); border-radius: 2px;
  transition: all 0.15s;
}
.article-row.selected .checkbox { background: var(--green); border-color: var(--green); }
.article-row.selected .checkbox::after { content: '✓'; display: block; text-align: center; color: white; font-size: 11px; line-height: 14px; }
.article-row-img { width: 48px; height: 48px; flex-shrink: 0; overflow: hidden; border-radius: 2px; }
.article-row-img img { width: 100%; height: 100%; object-fit: cover; }
.img-placeholder { width: 48px; height: 48px; background: var(--green-pale); display: flex; align-items: center; justify-content: center; font-family: 'Playfair Display', serif; font-size: 18px; color: var(--green-light); }
.article-row-content { flex: 1; min-width: 0; }
.article-row-cat   { font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 3px; }
.article-row-title { font-size: 13px; font-weight: 600; color: var(--ink); line-height: 1.3; margin-bottom: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.article-row-exc   { font-size: 12px; color: var(--muted); line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.article-row-date  { font-family: 'DM Mono', monospace; font-size: 10px; color: var(--muted); flex-shrink: 0; padding-top: 2px; }

.step-footer { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; background: white; border-top: 1px solid var(--border); position: sticky; bottom: 0; }
.step-footer-right { display: flex; align-items: center; gap: 16px; }
.selection-summary { font-size: 13px; color: var(--muted); font-family: 'DM Mono', monospace; }

/* ── STEP 3 GRID ───────────────────────────────────────────── */
.step3-grid { display: grid; grid-template-columns: 400px 1fr; gap: 1px; background: var(--border); min-height: 70vh; }
.step3-articles { background: white; overflow-y: auto; max-height: 80vh; }
.step3-main-article { background: white; padding: 24px 28px; overflow-y: auto; max-height: 80vh; }
.section-label { font-size: 11px; font-weight: 600; color: var(--muted); letter-spacing: 0.12em; text-transform: uppercase; padding: 10px 16px; background: var(--warm); border-bottom: 1px solid var(--border); }

/* article-row-edit */
.article-row-edit { display: flex; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--border); transition: background 0.15s; }
.article-row-edit.marked { background: var(--green-pale); }
.are-mark { flex-shrink: 0; }
.mark-btn { background: none; border: none; font-size: 18px; cursor: pointer; color: var(--muted); padding: 0; line-height: 1; transition: color 0.15s; }
.mark-btn:hover { color: var(--orange); }
.article-row-edit.marked .mark-btn { color: var(--orange); }
.are-img { width: 40px; height: 40px; flex-shrink: 0; }
.are-img img { width: 100%; height: 100%; object-fit: cover; border-radius: 2px; }
.img-placeholder-sm { width: 40px; height: 40px; background: var(--green-pale); display: flex; align-items: center; justify-content: center; font-size: 14px; color: var(--green-light); border-radius: 2px; }
.are-content { flex: 1; min-width: 0; }
.are-meta { display: flex; gap: 6px; align-items: center; margin-bottom: 5px; }
.are-type { font-size: 9px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; padding: 2px 5px; border-radius: 2px; }
.are-type.column { background: var(--green-pale); color: var(--green); }
.are-type.nieuws { background: #fef3c7; color: #92400e; }
.are-cat, .are-author { font-size: 10px; color: var(--muted); }
.are-title-input { width: 100%; border: 1px solid transparent; border-radius: 2px; padding: 4px 6px; font-size: 13px; font-weight: 600; color: var(--ink); background: transparent; }
.are-title-input:focus { outline: none; border-color: var(--border); background: white; }
.are-exc-input  { width: 100%; border: 1px solid transparent; border-radius: 2px; padding: 4px 6px; font-size: 12px; color: var(--muted); background: transparent; resize: none; font-family: inherit; }
.are-exc-input:focus  { outline: none; border-color: var(--border); background: white; }

.main-article-header { margin-bottom: 16px; }
.main-article-title-row { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.main-article-title-row h3 { font-family: 'Playfair Display', serif; font-size: 18px; font-weight: 700; color: var(--green); }
.main-article-hint { font-size: 12px; color: var(--muted); }
.marked-count-bar { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; background: var(--warm); border: 1px solid var(--border); margin-bottom: 16px; }
.marked-count-bar span { font-size: 12px; color: var(--muted); font-family: 'DM Mono', monospace; }
.main-article-placeholder { text-align: center; padding: 48px 24px; border: 2px dashed var(--border); border-radius: 3px; margin-top: 16px; }
.placeholder-icon { font-size: 28px; margin-bottom: 12px; }
.main-article-placeholder p { font-size: 13px; color: var(--muted); }

/* ── SPINNER ────────────────────────────────────────────────── */
.spinner { width: 14px; height: 14px; border: 2px solid rgba(255,255,255,0.3); border-top-color: white; border-radius: 50%; animation: spin 0.6s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── WATCHLIST ──────────────────────────────────────────────── */
.wl-layout { display: grid; grid-template-columns: 360px 1fr; gap: 1px; background: var(--border); min-height: calc(100vh - 73px); align-items: start; }
.wl-search-panel { background: white; padding: 28px 28px; position: sticky; top: 0; }
.wl-markets { background: var(--cream); padding: 0; }

.wl-section-title { font-family: 'Playfair Display', serif; font-size: 16px; font-weight: 700; color: var(--green); margin-bottom: 4px; }
.wl-section-sub   { font-size: 12px; color: var(--muted); margin-bottom: 20px; }
.wl-search-header { margin-bottom: 0; }

.wl-search-box { position: relative; margin-bottom: 12px; }
.wl-search-icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.wl-search-input {
  width: 100%; padding: 10px 14px 10px 38px;
  border: 1px solid var(--border); border-radius: 3px;
  font-family: 'Source Sans 3', sans-serif; font-size: 14px; color: var(--ink);
  background: white; transition: border-color 0.2s;
}
.wl-search-input:focus { outline: none; border-color: var(--green); }
.wl-spinner { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); width: 14px; height: 14px; border: 2px solid var(--border); border-top-color: var(--green); border-radius: 50%; animation: spin 0.6s linear infinite; }

.wl-results { border: 1px solid var(--border); border-radius: 3px; max-height: 420px; overflow-y: auto; }
.wl-result-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--border); }
.wl-result-row:last-child { border-bottom: none; }
.wl-result-info { display: flex; align-items: center; gap: 6px; min-width: 0; flex: 1; }
.wl-result-name    { font-size: 13px; font-weight: 500; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 140px; }
.wl-result-country { font-size: 11px; color: var(--muted); flex-shrink: 0; }
.wl-result-actions { display: flex; gap: 4px; flex-shrink: 0; }
.wl-empty-hint { font-size: 13px; color: var(--muted); padding: 12px 0; text-align: center; }

.wl-markets-toolbar { display: flex; align-items: center; justify-content: flex-end; gap: 12px; padding: 10px 24px; background: white; border-bottom: 1px solid var(--border); }
.wl-import-success { font-size: 12px; color: var(--green, #1a4736); font-weight: 500; }

.wl-market { background: white; border-bottom: 1px solid var(--border); }
.wl-market-header { display: flex; align-items: center; gap: 10px; padding: 14px 24px; background: var(--warm); border-bottom: 1px solid var(--border); }
.wl-market-badge { font-size: 11px; font-weight: 700; letter-spacing: 0.08em; padding: 3px 8px; border-radius: 2px; }
.wl-market-badge-NL { background: #dbeafe; color: #1d4ed8; }
.wl-market-badge-BE { background: #fef3c7; color: #92400e; }
.wl-market-badge-US { background: #fce7f3; color: #9d174d; }
.wl-market-label { font-size: 13px; font-weight: 600; color: var(--green); flex: 1; }
.wl-market-count { font-size: 12px; color: var(--muted); font-family: 'DM Mono', monospace; }
.wl-table { margin: 0; }
.wl-market-empty { padding: 24px; font-size: 13px; color: var(--muted); text-align: center; }

/* ── ARTICLE TYPE CARDS (review hub) ────────────────────────── */
.review-meta {
  display: flex; align-items: center; gap: 10px;
  padding: 0 0 24px; font-size: 13px; color: var(--muted);
}
.review-meta-sep { color: var(--border); }

.article-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}
.article-type-card {
  background: white; border: 1px solid var(--border);
  padding: 24px; display: flex; flex-direction: column; gap: 20px;
}
.atc-header { display: flex; align-items: flex-start; gap: 14px; }
.atc-icon   { font-size: 22px; flex-shrink: 0; padding-top: 2px; }
.atc-body   { flex: 1; min-width: 0; }
.atc-title  { font-family: 'Playfair Display', serif; font-size: 16px; font-weight: 700; color: var(--green); margin-bottom: 6px; }
.atc-headline { font-size: 13px; color: var(--ink); margin-bottom: 8px; font-style: italic; line-height: 1.4; }
.atc-hint   { font-size: 12px; color: var(--muted); margin-bottom: 8px; }
.atc-footer { display: flex; justify-content: flex-end; }

/* ── ARTICLE PAGE (main-article / market-article) ────────────── */
.article-page-wrap { display: grid; grid-template-columns: 380px 1fr; gap: 1px; background: var(--border); min-height: calc(100vh - 120px); }
.article-page-sidebar { background: white; overflow-y: auto; max-height: calc(100vh - 120px); }
.article-page-editor  { background: white; padding: 28px; overflow-y: auto; max-height: calc(100vh - 120px); }
.article-page-single  { max-width: 760px; margin: 0 auto; padding: 40px; }

/* ── LOGIN PAGE ─────────────────────────────────────────────── */
.auth-page { display: flex; align-items: center; justify-content: center; min-height: 100vh; background: var(--green); }
.login-wrap { width: 100%; max-width: 380px; padding: 20px; }
.login-card { background: white; padding: 40px; }
.login-logo { display: flex; align-items: center; gap: 14px; margin-bottom: 32px; padding-bottom: 24px; border-bottom: 1px solid var(--border); }
.login-logo-icon { width: 44px; height: 44px; background: var(--orange); display: flex; align-items: center; justify-content: center; font-family: 'Playfair Display', serif; font-size: 18px; font-weight: 900; color: white; flex-shrink: 0; }
.login-logo-main { font-family: 'Playfair Display', serif; font-size: 18px; font-weight: 700; color: var(--green); display: block; }
.login-logo-sub  { font-size: 11px; color: var(--muted); letter-spacing: 0.08em; }
.login-form .btn-primary { margin-top: 8px; }
.login-note { font-size: 11px; color: var(--muted); text-align: center; margin-top: 20px; }

/* ── THEME SELECTOR ─────────────────────────────────────────── */
.theme-selector { display: flex; gap: 16px; margin-top: 8px; flex-wrap: wrap; }
.theme-option { cursor: pointer; }
.theme-option input[type="radio"] { position: absolute; opacity: 0; width: 0; height: 0; }
.theme-card { border: 2px solid var(--border); padding: 16px; min-width: 180px; transition: border-color .2s, background .2s; }
.theme-option input:checked + .theme-card { border-color: var(--green); background: var(--green-pale); }
.theme-option:hover .theme-card { border-color: var(--green-light); }
.theme-swatch { width: 100%; height: 64px; margin-bottom: 10px; }
.theme-swatch--default { background: linear-gradient(135deg, #1a4736 0%, #1a4736 55%, #e8521a 55%); }
.theme-swatch--classic    { background: linear-gradient(135deg, #ffffff 0%, #f5f5f0 55%, #1a1a1a 55%); border: 1px solid #e0dbd2; }
.theme-swatch--financial  { background: linear-gradient(135deg, #F5F0E8 0%, #F5F0E8 55%, #1d9e75 55%); border: 1px solid #C4B8A0; }
.theme-card-label { font-size: 13px; font-weight: 600; color: var(--ink); margin-bottom: 3px; }
.theme-card-desc { font-size: 11px; color: var(--muted); line-height: 1.4; }

.theme-settings-card { background: white; border: 1px solid var(--border); padding: 20px 24px; margin-bottom: 24px; }
.tsc-header { margin-bottom: 14px; }
.tsc-label { font-size: 13px; font-weight: 600; color: var(--ink); }
.tsc-hint { font-size: 12px; color: var(--muted); margin-top: 2px; }
.tsc-status { font-size: 12px; margin-top: 10px; }
.tsc-status--ok  { color: #1a9e5f; }
.tsc-status--err { color: var(--red); }

.theme-selector--inline .theme-card { min-width: 160px; padding: 12px 14px; }
.theme-selector--inline .theme-swatch { height: 48px; }

.market-fetched-note {
  font-size: 12px;
  color: var(--text-muted, #6b7280);
  font-style: italic;
  margin-bottom: 16px;
}

/* ── Quill WYSIWYG editor ────────────────────────────────── */
.wysiwyg-editor {
  background: #fff;
  border-radius: 0 0 4px 4px;
  min-height: 320px;
  font-size: 15px;
  line-height: 1.7;
}
.wysiwyg-editor .ql-editor { min-height: 300px; font-size: 15px; line-height: 1.7; }
.ql-toolbar.ql-snow { border-radius: 4px 4px 0 0; background: #f9fafb; }
.ql-container.ql-snow { border-radius: 0 0 4px 4px; }

/* ── IMAGE GENERATION ───────────────────────────────────────── */
#imageGenSection,
#mktImageGenSection { margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--border); }
.img-gen-header { margin-bottom: 12px; }
.img-gen-header .form-group-label,
.form-group-label {
  display: block; font-size: 12px; font-weight: 600; color: var(--green);
  letter-spacing: 0.06em; text-transform: uppercase;
}

.img-count-row { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.img-count-label { font-size: 12px; color: var(--muted); }
.img-count-btn {
  width: 32px; height: 32px; border: 1px solid var(--border); background: white;
  font-size: 13px; font-weight: 600; color: var(--muted); cursor: pointer;
  border-radius: 2px; transition: all 0.15s;
}
.img-count-btn:hover { border-color: var(--green); color: var(--green); }
.img-count-btn.active { background: var(--green); border-color: var(--green); color: white; }

.img-thumbs-wrap {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 10px;
  margin-top: 16px;
}
.img-thumb {
  cursor: pointer; border: 2px solid var(--border); border-radius: 3px;
  overflow: hidden; position: relative; transition: border-color 0.15s;
}
.img-thumb:hover { border-color: var(--green); }
.img-thumb img { width: 100%; aspect-ratio: 16/9; object-fit: cover; display: block; }
.img-thumb-label {
  position: absolute; bottom: 0; left: 0; right: 0;
  padding: 4px 8px; font-size: 11px; font-weight: 600; color: white;
  background: rgba(0,0,0,0.5);
}

.img-selected-wrap { display: flex; flex-direction: column; }
.img-selected-preview { width: 100%; max-width: 560px; aspect-ratio: 16/9; object-fit: cover; border: 1px solid var(--border); border-radius: 3px; }

/* Lightbox */
.img-lightbox {
  position: fixed; inset: 0; background: rgba(0,0,0,0.85);
  z-index: 1000; display: flex; align-items: center; justify-content: center;
}
.img-lightbox-inner {
  position: relative; max-width: 90vw; max-height: 90vh;
  display: flex; flex-direction: column; align-items: center; gap: 12px;
}
.img-lb-img {
  max-width: 100%; max-height: 75vh; object-fit: contain;
  border-radius: 3px; display: block;
}
.img-lb-close {
  position: absolute; top: -36px; right: 0;
  background: none; border: none; color: white; font-size: 22px;
  cursor: pointer; line-height: 1; padding: 4px 8px;
  transition: opacity 0.15s;
}
.img-lb-close:hover { opacity: 0.7; }
.img-lb-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: rgba(255,255,255,0.15); border: none; color: white;
  font-size: 36px; cursor: pointer; padding: 8px 14px;
  border-radius: 2px; transition: background 0.15s; line-height: 1;
}
.img-lb-nav:hover { background: rgba(255,255,255,0.3); }
.img-lb-prev { left: -60px; }
.img-lb-next { right: -60px; }
.img-lb-footer {
  display: flex; align-items: center; gap: 16px;
}
.img-lb-counter { font-size: 13px; color: rgba(255,255,255,0.6); font-family: 'DM Mono', monospace; }
