/* ─────────────────────────────────────────────────────────────
   MARTINACCI EDITORIAL KANBAN — DESIGN SYSTEM
   Strict Rules: Zero Shadow (box-shadow: none !important),
   Clean Swiss Modernist Flat Borders, High-Contrast Editorial Palette.
   ───────────────────────────────────────────────────────────── */

:root {
  /* Light Mode Palette */
  --bg-app: #fcfcfc;
  --bg-surface: #ffffff;
  --bg-subtle: #f4f4f5;
  --bg-hover: #ebebef;
  
  --border-subtle: #e4e4e7;
  --border-strong: #d4d4d8;
  --border-focus: #09090b;

  --text-main: #09090b;
  --text-muted: #52525b;
  --text-faint: #71717a;

  /* Editorial Accent Inks */
  --ink-primary: #09090b;
  --ink-primary-contrast: #ffffff;
  
  --col-ideas: #475569;
  --col-ai: #1d4ed8;
  --col-review: #b45309;
  --col-ready: #047857;
  --col-published: #065f46;

  --danger-ink: #b91c1c;
  --danger-bg: #fef2f2;
  --danger-border: #fca5a5;

  /* Fonts */
  --font-ui: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-brand: 'Plus Jakarta Sans', var(--font-ui);
  --font-mono: 'JetBrains Mono', monospace;
  --font-editorial: 'Newsreader', Georgia, serif;
}

[data-theme="dark"] {
  --bg-app: #0c0d12;
  --bg-surface: #14161f;
  --bg-subtle: #1c1e2a;
  --bg-hover: #262939;

  --border-subtle: #272a38;
  --border-strong: #3b3f54;
  --border-focus: #f4f4f5;

  --text-main: #f4f4f5;
  --text-muted: #a1a1aa;
  --text-faint: #71717a;

  --ink-primary: #f4f4f5;
  --ink-primary-contrast: #09090b;

  --col-ideas: #94a3b8;
  --col-ai: #3b82f6;
  --col-review: #f59e0b;
  --col-ready: #10b981;
  --col-published: #34d399;

  --danger-ink: #f87171;
  --danger-bg: #450a0a;
  --danger-border: #7f1d1d;
}

/* HARD NO-SHADOW CONSTRAINT ACROSS ENTIRE APP */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  box-shadow: none !important;
  text-shadow: none !important;
}

body {
  font-family: var(--font-ui);
  background-color: var(--bg-app);
  color: var(--text-main);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ─────────────────────────────────────────────────────────────
   HEADER NAVIGATION
   ───────────────────────────────────────────────────────────── */
.app-header {
  height: 60px;
  background-color: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  position: sticky;
  top: 0;
  z-index: 40;
}

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

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

.brand-badge {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  background: var(--text-main);
  color: var(--bg-app);
  padding: 2px 6px;
  letter-spacing: 0.08em;
  border-radius: 2px;
}

.brand-title {
  font-family: var(--font-brand);
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-main);
}

.brand-domain {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
  padding-left: 4px;
  border-left: 1px solid var(--border-subtle);
}

.header-status {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: 2px;
}

.status-indicator {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

.status-indicator.online {
  background-color: #10b981;
}

.status-label {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
}

.header-center {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  max-width: 520px;
  margin: 0 20px;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  padding: 6px 12px;
  border-radius: 2px;
  flex: 1;
}

.search-box input {
  border: none;
  background: transparent;
  outline: none;
  color: var(--text-main);
  font-size: 13px;
  font-family: var(--font-ui);
  width: 100%;
}

.search-box input::placeholder {
  color: var(--text-faint);
}

.filter-select {
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  padding: 6px 10px;
  font-size: 13px;
  font-family: var(--font-ui);
  outline: none;
  border-radius: 2px;
  cursor: pointer;
}

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

/* ─────────────────────────────────────────────────────────────
   BUTTONS & CONTROLS
   ───────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 14px;
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 500;
  border-radius: 2px;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease;
  white-space: nowrap;
}

.btn-primary {
  background-color: var(--text-main);
  color: var(--bg-surface);
  border: 1px solid var(--text-main);
}

.btn-primary:hover {
  opacity: 0.9;
}

.btn-secondary {
  background-color: var(--bg-surface);
  color: var(--text-main);
  border: 1px solid var(--border-subtle);
}

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

.btn-danger {
  background-color: var(--danger-bg);
  color: var(--danger-ink);
  border: 1px solid var(--danger-border);
}

.btn-danger:hover {
  background-color: #fee2e2;
}

.btn-sm {
  padding: 5px 10px;
  font-size: 12px;
}

.btn-icon {
  width: 34px;
  height: 34px;
  padding: 0;
  font-size: 14px;
}

.btn-block {
  width: 100%;
}

.btn-micro {
  padding: 3px 7px;
  font-size: 11px;
  font-family: var(--font-mono);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  border-radius: 2px;
  cursor: pointer;
}

.btn-micro:hover {
  background: var(--bg-subtle);
  border-color: var(--border-strong);
}

.sparkle {
  color: #3b82f6;
  font-size: 13px;
}

/* ─────────────────────────────────────────────────────────────
   METRICS BAR
   ───────────────────────────────────────────────────────────── */
.metrics-bar {
  display: flex;
  align-items: center;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
  padding: 8px 20px;
  gap: 20px;
  overflow-x: auto;
}

.metric-item {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.metric-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  color: var(--text-faint);
}

.metric-value {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-main);
}

.metric-live {
  color: #10b981;
}

.metric-divider {
  width: 1px;
  height: 14px;
  background: var(--border-subtle);
}

/* ─────────────────────────────────────────────────────────────
   KANBAN BOARD GRID
   ───────────────────────────────────────────────────────────── */
.kanban-wrapper {
  flex: 1;
  padding: 20px;
  overflow-x: auto;
  overflow-y: hidden;
}

.kanban-board {
  display: grid;
  grid-template-columns: repeat(5, minmax(280px, 1fr));
  gap: 16px;
  min-width: 1440px;
  height: calc(100vh - 150px);
}

.kanban-col {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 2px;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.col-header {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-surface);
}

.col-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.col-dot {
  width: 8px;
  height: 8px;
  border-radius: 1px;
}

.dot-slate { background-color: var(--col-ideas); }
.dot-blue { background-color: var(--col-ai); }
.dot-amber { background-color: var(--col-review); }
.dot-emerald { background-color: var(--col-ready); }
.dot-green { background-color: var(--col-published); }

.col-title {
  font-family: var(--font-brand);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text-main);
}

.col-badge {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  padding: 1px 6px;
  border-radius: 2px;
}

.col-add-btn {
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  border-radius: 2px;
  cursor: pointer;
}

.col-add-btn:hover {
  background: var(--bg-subtle);
  color: var(--text-main);
  border-color: var(--border-strong);
}

.col-body {
  flex: 1;
  padding: 12px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background-color: var(--bg-app);
}

/* Drag & drop dragover indicator */
.col-body.drag-over {
  background-color: var(--bg-subtle);
  outline: 2px dashed var(--border-strong);
  outline-offset: -4px;
}

/* ─────────────────────────────────────────────────────────────
   KANBAN CARD
   ───────────────────────────────────────────────────────────── */
.kanban-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 2px;
  padding: 12px;
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease;
  position: relative;
}

.kanban-card:hover {
  border-color: var(--border-focus);
}

.kanban-card.dragging {
  opacity: 0.4;
}

.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.card-cat-badge {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 2px 6px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  border-radius: 2px;
}

.card-wp-tag {
  font-family: var(--font-mono);
  font-size: 10px;
  padding: 2px 5px;
  border-radius: 2px;
  border: 1px solid transparent;
}

.card-wp-tag.draft {
  background: #fffbeb;
  color: #b45309;
  border-color: #fde68a;
}

.card-wp-tag.publish {
  background: #ecfdf5;
  color: #047857;
  border-color: #a7f3d0;
}

.card-title {
  font-family: var(--font-brand);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--text-main);
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-excerpt {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
  margin-bottom: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 8px;
  border-top: 1px solid var(--border-subtle);
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-faint);
}

.card-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.card-btn-action {
  padding: 2px 6px;
  font-size: 10px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  border-radius: 2px;
  cursor: pointer;
}

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

/* ─────────────────────────────────────────────────────────────
   MODAL WINDOWS
   ───────────────────────────────────────────────────────────── */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background-color: rgba(9, 9, 11, 0.45);
  backdrop-filter: blur(2px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 50;
  padding: 20px;
}

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

.modal-dialog {
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  border-radius: 2px;
  width: 100%;
  display: flex;
  flex-direction: column;
  max-height: 90vh;
}

.modal-sm { max-width: 480px; }
.modal-md { max-width: 620px; }

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

.modal-title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.modal-title-wrap h3 {
  font-family: var(--font-brand);
  font-size: 16px;
  font-weight: 700;
  color: var(--text-main);
}

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

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

.modal-body {
  padding: 20px;
  overflow-y: auto;
}

.modal-footer {
  padding: 14px 20px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  background: var(--bg-subtle);
}

/* Form inputs inside modals & editor */
.form-group {
  margin-bottom: 14px;
}

.form-group label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 6px;
}

.form-row {
  display: flex;
  gap: 12px;
}

.flex-1 { flex: 1; }
.flex-2 { flex: 2; }

.form-control,
input[type="text"],
textarea,
select {
  width: 100%;
  padding: 8px 12px;
  font-family: var(--font-ui);
  font-size: 13px;
  color: var(--text-main);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 2px;
  outline: none;
}

.form-control:focus,
input[type="text"]:focus,
textarea:focus,
select:focus {
  border-color: var(--border-focus);
}

.form-hint {
  font-size: 11px;
  color: var(--text-faint);
  margin-top: 4px;
}

.badge {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 2px;
}

.badge-ai {
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}

.badge-neutral {
  background: var(--bg-subtle);
  color: var(--text-muted);
  border: 1px solid var(--border-subtle);
}

/* ─────────────────────────────────────────────────────────────
   FULL DRAWER ARTICLE EDITOR
   ───────────────────────────────────────────────────────────── */
.drawer-backdrop {
  position: fixed;
  inset: 0;
  background-color: rgba(9, 9, 11, 0.4);
  backdrop-filter: blur(2px);
  display: none;
  z-index: 60;
  justify-content: flex-end;
}

.drawer-backdrop.open {
  display: flex;
}

.drawer-panel {
  width: 92vw;
  max-width: 1360px;
  background: var(--bg-surface);
  border-left: 1px solid var(--border-strong);
  height: 100vh;
  display: flex;
  flex-direction: column;
}

.drawer-header {
  height: 56px;
  padding: 0 20px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-surface);
}

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

.drawer-status-pill {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 2px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
}

.drawer-meta-id {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-faint);
}

.drawer-wp-badge {
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 2px;
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #b45309;
}

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

.drawer-close-btn {
  background: transparent;
  border: 1px solid var(--border-subtle);
  width: 30px;
  height: 30px;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-faint);
  border-radius: 2px;
  cursor: pointer;
  margin-left: 8px;
}

.drawer-close-btn:hover {
  color: var(--text-main);
  border-color: var(--border-strong);
}

.drawer-body {
  flex: 1;
  display: flex;
  overflow: hidden;
}

.editor-pane-left {
  flex: 1;
  padding: 24px;
  overflow-y: auto;
  border-right: 1px solid var(--border-subtle);
}

.editor-pane-right {
  width: 320px;
  background: var(--bg-subtle);
  padding: 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.input-title {
  font-family: var(--font-brand);
  font-size: 18px;
  font-weight: 700;
  padding: 10px 14px;
}

.label-with-counter {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 6px;
}

.char-counter {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-faint);
}

.char-counter.warning {
  color: #d97706;
}

.slug-input-wrap {
  display: flex;
  align-items: center;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 2px;
}

.slug-prefix {
  padding: 8px 0 8px 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-faint);
}

.slug-input-wrap input {
  border: none;
  padding-left: 4px;
}

/* Content Editor Area */
.content-editor-section {
  border: 1px solid var(--border-subtle);
  border-radius: 2px;
  margin-top: 14px;
}

.content-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: var(--bg-subtle);
  border-bottom: 1px solid var(--border-subtle);
}

.toolbar-left {
  display: flex;
  gap: 4px;
}

.tab-btn {
  background: transparent;
  border: 1px solid transparent;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  border-radius: 2px;
  cursor: pointer;
}

.tab-btn.active {
  background: var(--bg-surface);
  border-color: var(--border-subtle);
  color: var(--text-main);
  font-weight: 600;
}

.toolbar-separator {
  width: 1px;
  height: 18px;
  background: var(--border-subtle);
  margin: 0 4px;
  align-self: center;
}

.btn-toolbar-insert-img {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 2px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-toolbar-insert-img:hover {
  border-color: var(--border-strong);
  background: var(--bg-subtle);
}

.btn-toolbar-insert-img:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-toolbar-insert-img .btn-icon {
  font-size: 13px;
  line-height: 1;
}

.body-image-upload-progress {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  background: #f8fafc;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 12px;
  color: var(--text-main);
  font-family: var(--font-mono);
}

.upload-spinner-sm {
  width: 14px;
  height: 14px;
  border: 2px solid var(--border-subtle);
  border-top-color: #09090b;
  border-radius: 50%;
  animation: spinLoader 0.7s linear infinite;
  display: inline-block;
  flex-shrink: 0;
}

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

.toolbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.word-counter {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-faint);
  margin-right: 8px;
}

.editor-area-wrap textarea.code-editor {
  width: 100%;
  height: 480px;
  border: none;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.6;
  padding: 16px;
  resize: vertical;
  background: var(--bg-surface);
}

.preview-area-wrap {
  height: 520px;
  overflow-y: auto;
  padding: 24px;
  background: var(--bg-surface);
}

/* Editorial Article Typography & Visual Preview */
.editorial-preview {
  font-family: var(--font-editorial);
  font-size: 17px;
  line-height: 1.7;
  color: var(--text-main);
  max-width: 720px;
  margin: 0 auto;
}

.preview-header-section {
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-subtle);
}

.preview-headline {
  font-family: var(--font-brand);
  font-size: 26px;
  font-weight: 800;
  line-height: 1.3;
  color: var(--text-main);
  margin: 0 0 16px 0;
}

.preview-feat-img-wrap {
  margin-top: 14px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-subtle);
  border-radius: 2px;
  overflow: hidden;
}

.preview-feat-img-wrap img {
  width: 100%;
  max-height: 420px;
  object-fit: cover;
  display: block;
}

.article-body-editable {
  min-height: 380px;
  outline: none;
  font-family: var(--font-editorial);
  font-size: 17px;
  line-height: 1.7;
  color: var(--text-main);
  position: relative;
}

.article-body-editable:focus {
  outline: none;
}

.article-body-editable.drag-over {
  outline: 2px dashed #09090b;
  background: rgba(0, 0, 0, 0.02);
}

.editorial-preview figure,
.article-body-editable figure,
.editorial-preview .wp-block-image,
.article-body-editable .wp-block-image {
  margin: 24px 0;
  border: 1px solid var(--border-subtle);
  background: var(--bg-subtle);
  border-radius: 2px;
  overflow: hidden;
}

.editorial-preview figure img,
.article-body-editable figure img,
.editorial-preview .wp-block-image img,
.article-body-editable .wp-block-image img {
  display: block;
  width: 100%;
  max-height: 520px;
  object-fit: cover;
}

.editorial-preview figcaption,
.article-body-editable figcaption,
.editorial-preview .wp-element-caption,
.article-body-editable .wp-element-caption {
  padding: 8px 14px;
  font-family: var(--font-sans);
  font-size: 12px;
  color: var(--text-muted);
  background: var(--bg-surface);
  border-top: 1px solid var(--border-subtle);
  text-align: center;
  font-style: italic;
  outline: none;
}

.article-body-editable figcaption:focus {
  background: var(--bg-subtle);
  color: var(--text-main);
  outline: 1px dashed var(--border-strong);
}

.editorial-preview h2,
.article-body-editable h2 {
  font-family: var(--font-brand);
  font-size: 22px;
  font-weight: 700;
  margin: 28px 0 12px 0;
  color: var(--text-main);
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 6px;
}

.editorial-preview h3,
.article-body-editable h3 {
  font-family: var(--font-brand);
  font-size: 18px;
  font-weight: 600;
  margin: 20px 0 10px 0;
  color: var(--text-main);
}

.editorial-preview p,
.article-body-editable p {
  margin-bottom: 16px;
}

.editorial-preview ul,
.editorial-preview ol,
.article-body-editable ul,
.article-body-editable ol {
  margin: 0 0 16px 24px;
}

.editorial-preview li,
.article-body-editable li {
  margin-bottom: 6px;
}

.editorial-preview strong,
.article-body-editable strong {
  font-weight: 600;
}

/* Sidebar Blocks */
.sidebar-block {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 2px;
  padding: 14px;
}

.sidebar-title {
  font-family: var(--font-brand);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  margin-bottom: 10px;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 6px;
}

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

.meta-row {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
}

.meta-key {
  color: var(--text-faint);
  font-family: var(--font-mono);
  font-size: 11px;
}

.meta-val {
  color: var(--text-main);
  font-weight: 500;
}

.meta-link {
  color: #1d4ed8;
  text-decoration: none;
  font-weight: 600;
}

.meta-link:hover {
  text-decoration: underline;
}

.editorial-checklist {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 12px;
  color: var(--text-muted);
}

.ai-assistant-output {
  font-size: 12px;
  line-height: 1.5;
  color: var(--text-muted);
  background: var(--bg-subtle);
  padding: 10px;
  border: 1px solid var(--border-subtle);
  border-radius: 2px;
  min-height: 80px;
  white-space: pre-wrap;
}

.action-block {
  margin-top: auto;
}

/* ─────────────────────────────────────────────────────────────
   TOAST NOTIFICATION
   ───────────────────────────────────────────────────────────── */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  padding: 10px 18px;
  background: var(--text-main);
  color: var(--bg-surface);
  font-size: 13px;
  font-family: var(--font-ui);
  border-radius: 2px;
  border: 1px solid var(--border-focus);
  display: none;
  z-index: 100;
}

.toast.show {
  display: block;
}

/* Dropdown for Cron Menu (Strict Zero Shadow, Flat Border) */
.dropdown {
  position: relative;
  display: inline-block;
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  background: var(--bg-surface);
  border: 1px solid var(--border-focus);
  min-width: 290px;
  z-index: 70;
  display: flex;
  flex-direction: column;
}

.dropdown-header {
  padding: 8px 12px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: var(--bg-subtle);
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-subtle);
}

.dropdown-item {
  padding: 10px 14px;
  text-align: left;
  background: var(--bg-surface);
  border: none;
  border-bottom: 1px solid var(--border-subtle);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-family: var(--font-ui);
}

.dropdown-item:last-child {
  border-bottom: none;
}

.dropdown-item strong {
  font-size: 12px;
  color: var(--text-main);
  font-weight: 600;
}

.dropdown-item span {
  font-size: 11px;
  color: var(--text-muted);
}

.dropdown-item:hover {
  background: var(--bg-subtle);
}

/* ─────────────────────────────────────────────────────────────
   AI COMMAND CONSOLE / CHAT DRAWER (ZERO SHADOW / EDITORIAL)
   ───────────────────────────────────────────────────────────── */
.btn-chat-trigger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.chat-pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: #10b981;
  display: inline-block;
  animation: pulseGreen 2s infinite ease-in-out;
}

@keyframes pulseGreen {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

.chat-drawer-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.45);
  z-index: 1200;
  display: none;
  justify-content: flex-end;
}

.chat-drawer-backdrop.open {
  display: flex;
}

.chat-drawer-panel {
  width: min(92vw, 560px);
  background: var(--bg-surface);
  border-left: 1px solid var(--border-strong);
  height: 100vh;
  display: flex;
  flex-direction: column;
  box-shadow: none !important;
}

.chat-header {
  padding: 12px 18px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-surface);
}

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

.chat-status-indicator {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #10b981;
  flex-shrink: 0;
}

.chat-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.01em;
}

.chat-subtitle {
  font-size: 10px;
  font-family: var(--font-mono);
  color: var(--text-muted);
}

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

.chat-session-badge {
  font-family: var(--font-mono);
  font-size: 10px;
  padding: 2px 6px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  border-radius: 2px;
  max-width: 130px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.btn-xs {
  padding: 2px 8px;
  font-size: 11px;
  height: 24px;
}

.chat-close-btn {
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  width: 26px;
  height: 26px;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.chat-close-btn:hover {
  background: var(--bg-subtle);
  color: var(--text-main);
}

.chat-chips-bar {
  padding: 8px 16px;
  border-bottom: 1px solid var(--border-subtle);
  background: var(--bg-subtle);
  display: flex;
  gap: 6px;
  overflow-x: auto;
  white-space: nowrap;
}

.chat-chip {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  font-size: 11px;
  font-weight: 500;
  padding: 4px 10px;
  cursor: pointer;
  border-radius: 2px;
  flex-shrink: 0;
  font-family: var(--font-ui);
}

.chat-chip:hover {
  border-color: var(--border-strong);
  background: var(--bg-surface);
}

.chat-messages-container {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: var(--bg-canvas);
}

.chat-msg {
  display: flex;
  flex-direction: column;
  max-width: 92%;
}

.chat-msg.user {
  align-self: flex-end;
}

.chat-msg.assistant {
  align-self: flex-start;
  max-width: 98%;
}

.chat-msg-author {
  font-size: 10px;
  font-family: var(--font-mono);
  color: var(--text-muted);
  margin-bottom: 4px;
  font-weight: 600;
  text-transform: uppercase;
}

.chat-msg.user .chat-msg-author {
  text-align: right;
}

.chat-msg-bubble {
  padding: 10px 14px;
  border-radius: 2px;
  font-size: 13px;
  line-height: 1.55;
  box-shadow: none !important;
}

.chat-msg.user .chat-msg-bubble {
  background: var(--text-main);
  color: var(--bg-surface);
  border: 1px solid var(--text-main);
}

.chat-msg.assistant .chat-msg-bubble {
  background: var(--bg-surface);
  color: var(--text-main);
  border: 1px solid var(--border-subtle);
}

.chat-msg-system {
  width: 100%;
  max-width: 100%;
}

.chat-msg-system .chat-msg-content {
  background: var(--bg-subtle);
  border: 1px dashed var(--border-strong);
  padding: 12px 14px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--text-muted);
  border-radius: 2px;
}

.chat-msg-bubble pre {
  background: #0f172a;
  color: #f8fafc;
  padding: 10px 12px;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 12px;
  border-radius: 2px;
  margin: 8px 0;
  border: 1px solid #334155;
}

.chat-msg-bubble code {
  font-family: var(--font-mono);
  font-size: 11.5px;
  background: var(--bg-subtle);
  color: var(--text-main);
  padding: 1px 4px;
  border-radius: 2px;
  border: 1px solid var(--border-subtle);
}

.chat-msg.user .chat-msg-bubble code {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  border: none;
}

.chat-msg-bubble p {
  margin: 0 0 8px 0;
}

.chat-msg-bubble p:last-child {
  margin-bottom: 0;
}

.chat-msg-bubble ul, .chat-msg-bubble ol {
  margin: 6px 0 8px 20px;
  padding: 0;
}

.chat-msg-bubble li {
  margin-bottom: 4px;
}

.chat-thinking {
  padding: 8px 16px;
  background: var(--bg-subtle);
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  font-family: var(--font-mono);
  color: var(--text-muted);
}

.spinner-small {
  width: 12px;
  height: 12px;
  border: 2px solid var(--border-strong);
  border-top-color: var(--text-main);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.chat-input-area {
  padding: 12px 16px;
  background: var(--bg-surface);
  border-top: 1px solid var(--border-strong);
  display: flex;
  gap: 10px;
  align-items: flex-end;
}

.chat-input {
  flex: 1;
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  color: var(--text-main);
  font-family: var(--font-ui);
  font-size: 13px;
  padding: 10px 12px;
  border-radius: 2px;
  resize: none;
  line-height: 1.4;
  outline: none;
  min-height: 44px;
  max-height: 120px;
  box-shadow: none !important;
}

.chat-input:focus {
  border-color: var(--text-main);
}

.chat-send-btn {
  height: 44px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  border-radius: 2px;
  flex-shrink: 0;
}

/* ─────────────────────────────────────────────────────────────
   FEATURED IMAGE FRAME & THUMBNAILS (ZERO SHADOW / EDITORIAL)
   ───────────────────────────────────────────────────────────── */
.sidebar-title-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.badge-subtle {
  font-family: var(--font-mono);
  font-size: 10px;
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
  padding: 1px 6px;
  border-radius: 2px;
}

.featured-dropzone {
  border: 1px dashed var(--border-strong);
  background: var(--bg-subtle);
  border-radius: 2px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: border-color 0.15s ease, background-color 0.15s ease;
  min-height: 130px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.featured-dropzone:hover, .featured-dropzone.dragover {
  border-color: var(--text-main);
  background: var(--bg-surface);
}

.featured-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 18px 12px;
  text-align: center;
  gap: 6px;
  color: var(--text-muted);
}

.featured-empty-state svg {
  color: var(--text-muted);
}

.dropzone-text strong {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 2px;
}

.dropzone-text span {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.3;
}

.featured-uploading-state {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-family: var(--font-mono);
  color: var(--text-muted);
  padding: 24px 16px;
}

.featured-preview-state {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
}

.featured-preview-state img {
  width: 100%;
  max-height: 180px;
  object-fit: cover;
  display: block;
  border-bottom: 1px solid var(--border-subtle);
}

.featured-preview-actions {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  padding: 6px 8px;
  background: var(--bg-surface);
}

.featured-help-text {
  font-size: 10.5px;
  color: var(--text-muted);
  margin-top: 6px;
  line-height: 1.4;
  font-family: var(--font-ui);
}

/* Kanban Card Thumbnail (Top of card) */
.card-thumbnail-wrap {
  width: calc(100% + 24px);
  margin: -12px -12px 10px -12px;
  max-height: 125px;
  overflow: hidden;
  border-bottom: 1px solid var(--border-subtle);
  background: var(--bg-subtle);
}

.card-thumbnail-wrap img {
  width: 100%;
  height: 125px;
  object-fit: cover;
  display: block;
  transition: transform 0.2s ease;
}

.kanban-card:hover .card-thumbnail-wrap img {
  transform: scale(1.02);
}


