/* ===========================
   BlogRush — Modern UI v3.0
   =========================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --primary: #6366f1;
  --primary-dark: #4f46e5;
  --primary-light: #eef2ff;
  --primary-lighter: #f5f3ff;
  --accent: #8b5cf6;
  --accent-light: #ede9fe;
  --success: #10b981;
  --success-light: #d1fae5;
  --warning: #f59e0b;
  --warning-light: #fef3c7;
  --danger: #ef4444;
  --danger-light: #fee2e2;
  --bg: #f1f5f9;
  --surface: #ffffff;
  --surface-raised: #ffffff;
  --border: #e2e8f0;
  --border-light: #f1f5f9;
  --text: #0f172a;
  --text-muted: #64748b;
  --text-light: #94a3b8;
  --sidebar-bg: #0f172a;
  --sidebar-surface: rgba(255,255,255,.04);
  --sidebar-hover: rgba(255,255,255,.06);
  --sidebar-active: rgba(99,102,241,.25);
  --sidebar-active-border: #818cf8;
  --sidebar-text: #94a3b8;
  --sidebar-text-active: #e2e8f0;
  --sidebar-width: 240px;
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.04);
  --shadow: 0 1px 3px rgba(0,0,0,.06), 0 4px 16px rgba(0,0,0,.03);
  --shadow-md: 0 4px 12px rgba(0,0,0,.08), 0 8px 32px rgba(0,0,0,.04);
  --shadow-lg: 0 8px 24px rgba(0,0,0,.12), 0 16px 48px rgba(0,0,0,.06);
  --transition: all .2s cubic-bezier(.4,0,.2,1);
}

body { font-family: 'Inter', system-ui, -apple-system, sans-serif; background: var(--bg); color: var(--text); min-height: 100vh; font-size: 14px; line-height: 1.6; position: relative; -webkit-font-smoothing: antialiased; }

/* ── Sidebar ── */
.sidebar { width: var(--sidebar-width); height: 100vh; max-height: 100vh; background: var(--sidebar-bg); display: flex; flex-direction: column; position: fixed; top: 0; left: 0; z-index: 100; border-right: 1px solid rgba(255,255,255,.06); overflow: hidden; }
.sidebar-logo { display: flex; align-items: center; gap: 10px; padding: 20px 18px 16px; }
.logo-icon { flex-shrink: 0; }
.logo-title { display: block; color: #f1f5f9; font-weight: 800; font-size: 16px; letter-spacing: -.02em; }
.logo-sub { display: block; color: #64748b; font-size: 10px; font-weight: 500; text-transform: uppercase; letter-spacing: .06em; margin-top: 1px; }

/* Project Selector */
.sidebar-project-select { padding: 0 14px 12px; }
.sidebar-project-dropdown { width: 100%; padding: 8px 10px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.08); border-radius: var(--radius-sm); color: #e2e8f0; font-size: 12px; font-weight: 500; font-family: inherit; cursor: pointer; outline: none; appearance: none; -webkit-appearance: none; background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%2394a3b8' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; padding-right: 28px; transition: var(--transition); }
.sidebar-project-dropdown:hover { background: rgba(255,255,255,.09); border-color: rgba(255,255,255,.12); }
.sidebar-project-dropdown:focus { border-color: #6366f1; box-shadow: 0 0 0 2px rgba(99,102,241,.2); }
.sidebar-project-dropdown option { background: #1e293b; color: #e2e8f0; }

/* Nav Groups */
.nav-scroll { flex: 1; overflow-y: auto; padding: 0 0 8px; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.1) transparent; }
.nav-scroll::-webkit-scrollbar { width: 4px; }
.nav-scroll::-webkit-scrollbar-thumb { background: rgba(255,255,255,.1); border-radius: 4px; }
.nav-group { margin-bottom: 4px; }
.nav-group-label { font-size: 10px; font-weight: 700; color: #475569; text-transform: uppercase; letter-spacing: .08em; padding: 16px 18px 6px; }
.nav-links { list-style: none; padding: 0 10px; }
.nav-links li { margin-bottom: 1px; }
.nav-link { display: flex; align-items: center; gap: 10px; padding: 8px 10px; color: var(--sidebar-text); text-decoration: none; border-radius: var(--radius-sm); font-size: 13px; font-weight: 500; transition: var(--transition); border: 1px solid transparent; }
.nav-link:hover { background: var(--sidebar-hover); color: var(--sidebar-text-active); }
.nav-link.active { background: var(--sidebar-active); color: #c7d2fe; border-color: rgba(99,102,241,.2); }
.nav-icon { width: 18px; height: 16px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; opacity: .7; }
.nav-link.active .nav-icon { opacity: 1; color: #a5b4fc; }
.nav-link:hover .nav-icon { opacity: 1; }

/* Sidebar Footer */
.sidebar-footer { padding: 12px 18px; border-top: 1px solid rgba(255,255,255,.06); display: flex; align-items: center; justify-content: space-between; }
.wp-status { display: flex; align-items: center; gap: 7px; font-size: 11px; color: #64748b; }
.status-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--danger); flex-shrink: 0; }
.status-dot.online { background: var(--success); }
.sidebar-version { font-size: 10px; color: #475569; font-weight: 500; }

/* ── Main ── */
.main-content { position: absolute; top: 0; left: var(--sidebar-width); right: 0; min-height: 100vh; padding: 28px 32px; box-sizing: border-box; overflow-x: hidden; }
.page { display: none; }
.page.active { display: block; }
.page-header { margin-bottom: 24px; display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.page-header-left { flex: 1; }
.page-header h1 { font-size: 22px; font-weight: 800; margin-bottom: 2px; letter-spacing: -.02em; color: var(--text); }
.page-header p { color: var(--text-muted); font-size: 13px; }
.page-header-actions { display: flex; gap: 8px; align-items: center; flex-shrink: 0; }

/* ── Pipeline ── */
.pipeline { display: flex; align-items: center; gap: 6px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 20px; margin-bottom: 20px; overflow-x: auto; }
.pipeline-step { display: flex; flex-direction: column; align-items: center; gap: 5px; min-width: 72px; opacity: .35; transition: opacity .3s; }
.pipeline-step.active { opacity: 1; }
.pipeline-step.done { opacity: .7; }
.step-icon { font-size: 20px; }
.step-label { font-size: 11px; font-weight: 600; color: var(--text-muted); white-space: nowrap; }
.pipeline-arrow { color: var(--border); font-size: 16px; }

/* ── Generate Article Interactive Pipeline ── */
.gen-pipeline {
  display: flex; align-items: center; gap: 2px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 12px 16px; margin-bottom: 20px; overflow-x: auto;
  box-shadow: var(--shadow-sm);
}
.gen-pipe-step {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  min-width: 80px; padding: 10px 14px; border-radius: var(--radius); cursor: pointer;
  opacity: .35; transition: var(--transition); position: relative;
}
.gen-pipe-step:hover { opacity: .65; background: var(--primary-light); }
.gen-pipe-step.active { opacity: 1; background: var(--accent-light); }
.gen-pipe-step.done { opacity: .85; }
.gen-pipe-step.done .gen-pipe-icon::after {
  content: '✓'; position: absolute; top: -2px; right: -2px;
  background: var(--success); color: #fff; font-size: 9px; width: 16px; height: 16px;
  border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700;
}
.gen-pipe-icon { font-size: 20px; position: relative; }

/* Article Title Bar — shown on pipeline steps 2-6 */
.gen-article-title-bar {
  display: flex; align-items: center; gap: 10px;
  background: rgba(99,102,241,0.04);
  border: 1px solid rgba(99,102,241,0.15); border-radius: var(--radius);
  padding: 10px 18px; margin-bottom: 16px;
}
.gen-article-title-icon { font-size: 18px; flex-shrink: 0; }
.gen-article-title-text {
  font-size: 15px; font-weight: 700; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.gen-pipe-label { font-size: 11px; font-weight: 700; color: var(--text-muted); white-space: nowrap; }
.gen-pipe-status { font-size: 9px; color: var(--text-light); }
.gen-pipe-arrow { color: var(--border); font-size: 14px; flex-shrink: 0; opacity: .5; }
.gen-panel { animation: fadeIn .2s; overflow: hidden; max-width: 100%; }
.gen-step-hint { font-size: 13px; color: var(--text-muted); margin-bottom: 16px; }
.gen-step-actions {
  display: flex; gap: 10px; align-items: center; margin-top: 18px;
  padding-top: 16px; border-top: 1px solid var(--border);
}
.gen-step-results { margin-top: 20px; padding-top: 16px; border-top: 1px solid #e2e8f0; }
.gen-results-title {
  font-size: 13px; font-weight: 700; color: var(--text); margin-bottom: 10px;
  display: flex; align-items: center; gap: 8px;
}
.gen-loading {
  text-align: center; padding: 30px 20px; color: var(--text-muted);
}
.gen-spinner {
  width: 32px; height: 32px; border: 3px solid #e2e8f0; border-top-color: #6366f1;
  border-radius: 50%; animation: spin 1s linear infinite; margin: 0 auto 12px;
}
@keyframes spin { to { transform: rotate(360deg); } }
.gen-seo-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px; margin-bottom: 16px; max-width: 100%;
}
.gen-seo-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 12px 14px; transition: var(--transition);
}
.gen-seo-card:hover { border-color: #c7d2fe; box-shadow: var(--shadow-sm); }
.gen-seo-card-label { font-size: 10px; font-weight: 700; color: #64748b; text-transform: uppercase; letter-spacing: .3px; margin-bottom: 4px; }
.gen-seo-card-val { font-size: 14px; font-weight: 600; color: #1e293b; overflow-wrap: break-word; word-wrap: break-word; }
.gen-tag-editor { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.gen-tag {
  display: inline-flex; align-items: center; gap: 4px;
  background: #e0e7ff; color: #4338ca; padding: 4px 10px; border-radius: 16px;
  font-size: 12px; font-weight: 600;
}
.gen-tag-x {
  cursor: pointer; font-size: 13px; opacity: .6; margin-left: 2px;
}
.gen-tag-x:hover { opacity: 1; color: #ef4444; }
.gen-tag.semantic { background: #dbeafe; color: #1e40af; }
.gen-tag-add { display: flex; gap: 6px; align-items: center; }
.gen-count-badge {
  background: #e0e7ff; color: #4338ca; font-size: 11px; font-weight: 700;
  padding: 1px 8px; border-radius: 10px;
}

/* Outline editor */
.gen-outline-list { min-height: 60px; }
.gen-outline-item {
  display: flex; align-items: flex-start; gap: 8px; padding: 12px 14px;
  border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 6px;
  background: var(--surface); transition: var(--transition); cursor: grab;
}
.gen-outline-item:hover { border-color: #a5b4fc; box-shadow: var(--shadow-sm); }
.gen-outline-item.dragging { opacity: .5; }
.gen-outline-drag { color: #cbd5e1; cursor: grab; font-size: 16px; padding-top: 2px; }
.gen-outline-body { flex: 1; }
.gen-outline-heading {
  font-size: 14px; font-weight: 700; color: #1e293b; margin-bottom: 2px;
}
.gen-outline-heading input {
  width: 100%; border: none; background: transparent; font-size: 14px;
  font-weight: 700; color: #1e293b; outline: none; padding: 0;
}
.gen-outline-heading input:focus { border-bottom: 1.5px solid #6366f1; }
.gen-outline-type {
  font-size: 10px; font-weight: 700; color: #6366f1; text-transform: uppercase;
  letter-spacing: .3px;
}
.gen-outline-desc {
  font-size: 12px; color: #64748b; margin-top: 2px;
}
.gen-outline-desc textarea {
  width: 100%; border: 1px solid #e2e8f0; border-radius: 6px; font-size: 12px;
  color: #64748b; padding: 4px 8px; resize: vertical; min-height: 28px; outline: none;
}
.gen-outline-desc textarea:focus { border-color: #a5b4fc; }
.gen-outline-actions { display: flex; gap: 4px; flex-shrink: 0; }
.gen-outline-btn {
  background: none; border: none; cursor: pointer; padding: 2px 4px;
  font-size: 14px; color: #94a3b8; border-radius: 4px; transition: all .15s;
}
.gen-outline-btn:hover { color: #4338ca; background: #f5f3ff; }
.gen-outline-btn.danger:hover { color: #ef4444; background: #fee2e2; }
.gen-outline-empty { text-align: center; padding: 30px 20px; color: var(--text-muted); }

/* Links editor */
.gen-links-section { margin-bottom: 16px; }
.gen-links-list { display: flex; flex-direction: column; gap: 6px; }
.gen-link-item {
  display: flex; align-items: center; gap: 10px; padding: 8px 12px;
  border: 1px solid #e2e8f0; border-radius: 8px; background: #fff;
  font-size: 13px; transition: all .15s;
}
.gen-link-item:hover { border-color: #a5b4fc; }
.gen-link-check { accent-color: #6366f1; flex-shrink: 0; }
.gen-link-anchor { font-weight: 600; color: #1e293b; min-width: 120px; }
.gen-link-url { color: #6366f1; text-decoration: none; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gen-link-type-badge {
  font-size: 10px; font-weight: 700; padding: 2px 8px; border-radius: 10px;
}
.gen-link-type-badge.internal { background: #dbeafe; color: #1e40af; }
.gen-link-type-badge.affiliate { background: #fef3c7; color: #92400e; }
.gen-link-remove {
  background: none; border: none; cursor: pointer; color: #94a3b8;
  font-size: 14px; padding: 2px 4px; border-radius: 4px;
}
.gen-link-remove:hover { color: #ef4444; background: #fee2e2; }
.gen-manual-link { margin-top: 16px; padding-top: 12px; border-top: 1px solid #e2e8f0; }

/* Publish summary */
.gen-publish-summary {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 10px; margin-bottom: 20px;
}
.gen-publish-stat {
  background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 8px;
  padding: 12px 14px;
}
.gen-publish-stat-label { display: block; font-size: 10px; font-weight: 700; color: #64748b; text-transform: uppercase; margin-bottom: 4px; }
.gen-publish-stat-val { display: block; font-size: 15px; font-weight: 700; color: #1e293b; }
.gen-publish-mode { margin-bottom: 16px; }
.gen-refine-section { margin-top: 20px; padding-top: 16px; border-top: 1px solid #e2e8f0; }

/* ── Cards ── */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); margin-bottom: 16px; overflow: hidden; transition: var(--transition); }
.card:hover { box-shadow: var(--shadow); }
.card-header { display: flex; align-items: center; justify-content: space-between; padding: 14px 20px; border-bottom: 1px solid var(--border-light); background: var(--surface); }
.card-header h3 { font-size: 14px; font-weight: 700; color: var(--text); letter-spacing: -.01em; }
.card-actions { display: flex; align-items: center; gap: 8px; }
.card-body { padding: 20px; max-width: 100%; overflow: hidden; }
.card-tabs { display: flex; border-bottom: 1px solid var(--border); background: var(--surface); gap: 0; }
.tab { padding: 10px 18px; font-size: 13px; font-weight: 600; background: none; border: none; cursor: pointer; color: var(--text-muted); border-bottom: 2px solid transparent; transition: var(--transition); }
.tab:hover { color: var(--text); }
.tab.active { color: var(--primary); border-bottom-color: var(--primary); }
.tab-content { display: none; }
.tab-content.active { display: block; }

/* ── Forms ── */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 20px; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group.full-width { grid-column: 1 / -1; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-label { font-size: 13px; font-weight: 600; color: var(--text); }
.optional { font-weight: 400; color: var(--text-light); font-size: 11px; }
.form-input { padding: 9px 13px; border: 1.5px solid var(--border); border-radius: var(--radius-sm); font-size: 14px; font-family: inherit; color: var(--text); background: var(--surface); transition: var(--transition); outline: none; }
.form-input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(99,102,241,.08); background: #fff; }
.large-input { padding: 13px 14px; font-size: 15px; font-weight: 500; }
textarea.form-input { resize: vertical; min-height: 70px; }
select.form-input { cursor: pointer; }

/* ── Style selector ── */
.style-selector { display: grid; grid-template-columns: repeat(4,1fr); gap: 8px; overflow-x: auto; }
.style-btn { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; padding: 12px 14px; background: var(--surface); border: 1.5px solid var(--border); border-radius: var(--radius); cursor: pointer; transition: var(--transition); text-align: left; }
.style-btn:hover { border-color: #a5b4fc; background: var(--primary-light); transform: translateY(-1px); }
.style-btn.active { border-color: var(--primary); background: var(--primary-light); box-shadow: 0 0 0 3px rgba(99,102,241,.08); }
.style-icon { font-size: 16px; }
.style-name { font-size: 12px; font-weight: 700; color: var(--text); }
.style-desc { font-size: 11px; color: var(--text-muted); }

/* ── Radio/Checkbox ── */
.radio-group { display: flex; flex-direction: column; gap: 7px; }
.radio-item { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.radio-item input { accent-color: var(--primary); width: 15px; height: 15px; }
.radio-label { font-size: 13px; }
.checkbox-item { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.checkbox-item input { accent-color: var(--primary); width: 15px; height: 15px; }
.checkbox-label { font-size: 13px; }

/* ── Buttons ── */
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 9px 16px; border-radius: var(--radius-sm); font-size: 13px; font-weight: 600; font-family: inherit; border: none; cursor: pointer; transition: var(--transition); text-decoration: none; }
.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 1px 3px rgba(99,102,241,.3); }
.btn-primary:hover { background: var(--primary-dark); box-shadow: 0 2px 8px rgba(99,102,241,.4); transform: translateY(-1px); }
.btn-secondary { background: var(--surface); border: 1.5px solid var(--border); color: var(--text); }
.btn-secondary:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-light); }
.btn-success { background: var(--success); color: #fff; box-shadow: 0 1px 3px rgba(16,185,129,.3); }
.btn-success:hover { background: #059669; transform: translateY(-1px); }
.btn-ghost { background: none; color: var(--text-muted); }
.btn-ghost:hover { background: var(--bg); color: var(--text); }
.btn-large { padding: 12px 24px; font-size: 14px; border-radius: var(--radius); }
.btn-sm { padding: 6px 11px; font-size: 12px; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none !important; }

/* ── Progress ── */
.progress-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.progress-header h3 { font-size: 15px; font-weight: 700; }
.progress-bar-wrap { background: var(--border); border-radius: 20px; height: 8px; overflow: hidden; margin-bottom: 6px; }
.progress-bar { height: 100%; background: var(--primary); border-radius: 20px; transition: width .4s ease; width: 0%; }
.progress-percent { text-align: right; font-size: 12px; font-weight: 700; color: var(--primary); margin-bottom: 14px; }
.progress-steps { display: flex; flex-direction: column; gap: 4px; max-height: 140px; overflow-y: auto; }
.progress-step-item { font-size: 13px; color: var(--text-muted); padding: 3px 0; border-bottom: 1px solid var(--bg); }

/* ── SEO grid ── */
.seo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px,1fr)); gap: 10px; }
.seo-item { background: var(--bg); border-radius: var(--radius-sm); padding: 11px 13px; }
.seo-item-label { font-size: 10px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: .5px; margin-bottom: 4px; }
.seo-item-value { font-size: 13px; font-weight: 600; color: var(--text); }
.kw-chips { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.kw-chip { background: var(--primary-light); color: var(--primary-dark); font-size: 11px; font-weight: 500; padding: 3px 9px; border-radius: 20px; }

/* ── Article preview ── */
.article-preview { font-size: 15px; line-height: 1.8; color: var(--text); max-height: 580px; overflow-y: auto; }
.article-preview h2 { font-size: 19px; font-weight: 700; margin: 22px 0 10px; }
.article-preview h3 { font-size: 16px; font-weight: 600; margin: 18px 0 8px; }
.article-preview p { margin-bottom: 14px; }
.article-preview ul, .article-preview ol { margin: 10px 0 14px 20px; }
.article-preview li { margin-bottom: 5px; }
.article-preview blockquote { border-left: 4px solid var(--primary); background: var(--primary-light); padding: 10px 14px; margin: 14px 0; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; font-style: italic; }
.article-preview blockquote.pro-tip { border-color: var(--success); background: var(--success-light); font-style: normal; }
.article-preview blockquote.important-note { border-color: var(--warning); background: var(--warning-light); font-style: normal; }
.article-preview a { color: var(--primary); text-decoration: underline; }

/* ── Quality element styles (article preview) ── */

/* Proof Box — personal test results, case studies */
.article-preview .proof-box, .proof-box {
  background: #ecfdf5; border: 1px solid #6ee7b7; border-left: 5px solid #10b981;
  border-radius: var(--radius-sm); padding: 14px 16px; margin: 18px 0;
  font-size: 14px; line-height: 1.7;
}
.article-preview .proof-box strong, .proof-box strong { color: #065f46; }

/* Stat Highlight — statistics with source */
.article-preview .stat-highlight, .stat-highlight {
  background: #eff6ff; border: 1px solid #bfdbfe; border-left: 5px solid #3b82f6;
  border-radius: var(--radius-sm); padding: 12px 16px; margin: 14px 0;
  font-size: 14px; font-weight: 500;
}
.article-preview .stat-highlight strong, .stat-highlight strong { color: #1d4ed8; font-size: 16px; }

/* Unique Insight — contrarian takes */
.article-preview .unique-insight, .unique-insight {
  background: #faf5ff; border: 1px solid #d8b4fe; border-left: 5px solid #9333ea;
  border-radius: var(--radius-sm); padding: 14px 16px; margin: 18px 0;
  font-size: 14px; line-height: 1.7;
}
.article-preview .unique-insight strong, .unique-insight strong { color: #6b21a8; }

/* Affiliate Box — product/tool recommendations */
.article-preview .affiliate-box, .affiliate-box {
  background: #fefce8; border: 1px solid #fde68a; border-left: 5px solid #f59e0b;
  border-radius: var(--radius-sm); padding: 14px 16px; margin: 18px 0; font-size: 14px;
}

/* Comparison Table — feature/pricing grids */
.article-preview table, .article-preview .comparison-table { width: 100%; border-collapse: collapse; margin: 18px 0; font-size: 13px; }
.article-preview th { background: #1e1b4b; color: #fff; padding: 10px 12px; font-weight: 700; border: 1px solid #312e81; text-align: left; }
.article-preview td { padding: 9px 12px; border: 1px solid var(--border); vertical-align: top; }
.article-preview tr:nth-child(even) td { background: #f8fafc; }
.article-preview tr:hover td { background: #f0f4ff; }

/* CTA Box — mid-article and end CTA */
.article-preview .cta-box, .cta-box {
  background: #6366f1;
  color: #fff; border-radius: var(--radius); padding: 20px 22px; margin: 24px 0;
  text-align: center; font-size: 15px;
}
.article-preview .cta-box.primary, .cta-box.primary {
  background: #059669;
}
.article-preview .cta-box strong, .cta-box strong { font-size: 17px; display: block; margin-bottom: 8px; }
.article-preview .cta-btn, .cta-btn {
  display: inline-block; background: #fff; color: #4f46e5; font-weight: 800;
  padding: 10px 22px; border-radius: 30px; text-decoration: none !important;
  margin-top: 10px; font-size: 14px; transition: transform .15s;
}
.article-preview .cta-box.primary .cta-btn { color: #047857; }
.article-preview .cta-btn:hover { transform: scale(1.04); }

/* Lead Magnet Box — email capture / free resource offer */
.article-preview .lead-magnet-box, .lead-magnet-box {
  background: #fff7ed; border: 2px dashed #fb923c; border-radius: var(--radius);
  padding: 18px 20px; margin: 24px 0; text-align: center; font-size: 14px;
}
.article-preview .lead-magnet-box strong { font-size: 16px; color: #9a3412; display: block; margin-bottom: 6px; }
.html-source { background: #1e293b; color: #e2e8f0; padding: 14px; border-radius: var(--radius-sm); font-size: 12px; overflow: auto; max-height: 480px; white-space: pre-wrap; word-break: break-all; font-family: monospace; }
.word-count-badge { background: var(--success-light); color: var(--success); font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 20px; }

/* ── WP publish ── */
.publish-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.wp-success-box { background: var(--success-light); border: 1px solid var(--success); border-radius: var(--radius-sm); padding: 12px 14px; }
.wp-success-box a { color: #065f46; font-weight: 600; }
.wp-error-box { background: var(--danger-light); border: 1px solid var(--danger); border-radius: var(--radius-sm); padding: 12px 14px; }

/* ── History ── */
.history-item { display: flex; align-items: center; gap: 12px; padding: 14px 16px; background: var(--surface); border-radius: var(--radius); border: 1px solid var(--border); margin-bottom: 8px; transition: var(--transition); }
.history-item:hover { border-color: #c7d2fe; box-shadow: var(--shadow-sm); }
.history-title { font-size: 14px; font-weight: 600; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.history-meta { font-size: 12px; color: var(--text-muted); margin-top: 2px; display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.history-actions { display: flex; gap: 4px; flex-shrink: 0; align-items: center; }
.empty-state { text-align: center; padding: 48px 20px; color: var(--text-muted); font-size: 14px; }

/* ── History Groups ── */
.history-group { margin-bottom: 12px; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.history-group-header {
  display: flex; align-items: center; gap: 8px; padding: 10px 14px;
  background: var(--surface-raised, #f8fafc); cursor: pointer; border-bottom: 1px solid var(--border);
}
.history-group-header:hover { background: rgba(99,102,241,0.03); }
.hg-toggle { font-size: 10px; color: var(--text-muted); width: 14px; }
.history-group-body { padding: 8px; }
.history-group-body .history-item { margin-bottom: 4px; }

/* ── Settings ── */
.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 20px; width: 100%; }
.settings-body { display: flex; flex-direction: column; gap: 14px; }
.settings-grid .card { min-width: 0; }
.settings-test-row { display: flex; align-items: center; gap: 10px; margin-top: 4px; }
.settings-save-row { display: flex; align-items: center; gap: 14px; }
.test-result-inline { font-size: 12px; font-weight: 600; }
.test-result-inline.ok { color: var(--success); }
.test-result-inline.fail { color: var(--danger); }
.save-feedback { font-size: 13px; font-weight: 600; }
.save-feedback.ok { color: var(--success); }
.save-feedback.fail { color: var(--danger); }
.help-text { font-size: 12px; color: var(--text-muted); }
.help-link { font-size: 12px; color: var(--primary); text-decoration: none; font-weight: 500; }
.help-link:hover { text-decoration: underline; }

/* ── Saved badges ── */
.saved-badge { background: #d1fae5; color: #065f46; font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 20px; }
.key-row { display: flex; align-items: center; gap: 8px; }
.key-row .form-input { flex: 1; }
.key-saved { color: #059669; font-size: 12px; font-weight: 700; white-space: nowrap; }

/* ── Dashboard ── */
.stats-row { display: grid; grid-template-columns: repeat(4,1fr); gap: 14px; margin-bottom: 20px; }
.stat-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 20px; text-align: center; box-shadow: var(--shadow-sm); transition: var(--transition); }
.stat-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.stat-num { font-size: 28px; font-weight: 800; color: var(--primary); letter-spacing: -.02em; }
.stat-label { font-size: 11px; color: var(--text-muted); font-weight: 600; margin-top: 4px; text-transform: uppercase; letter-spacing: .04em; }
.quick-actions { display: flex; gap: 10px; margin-bottom: 20px; flex-wrap: wrap; }
.qa-btn { padding: 10px 18px; border-radius: var(--radius-sm); font-size: 13px; font-weight: 600; cursor: pointer; border: 1.5px solid var(--border); background: var(--surface); color: var(--text); transition: var(--transition); font-family: inherit; }
.qa-btn:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-light); transform: translateY(-1px); }
.qa-btn.primary { background: var(--primary); color: #fff; border-color: var(--primary); box-shadow: 0 2px 8px rgba(99,102,241,.3); }
.qa-btn.primary:hover { background: var(--primary-dark); transform: translateY(-1px); }

/* ── Income Roadmap ── */
.income-roadmap { background: #f9fafb; border: 1px solid var(--border); }
.roadmap-steps { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.rm-step { display: flex; align-items: flex-start; gap: 10px; padding: 12px; background: var(--surface); border-radius: var(--radius-sm); border: 1px solid var(--border-light); transition: var(--transition); }
.rm-step:hover { border-color: var(--primary); box-shadow: var(--shadow-sm); }
.rm-num { width: 24px; height: 24px; min-width: 24px; background: var(--primary); color: #fff; border-radius: 50%; font-size: 11px; font-weight: 800; display: flex; align-items: center; justify-content: center; }
.rm-text { font-size: 12px; color: var(--text); line-height: 1.5; }

/* ── Niche page ── */
.niche-header-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 16px; flex-wrap: wrap; }
.niche-tabs { display: flex; flex-wrap: wrap; gap: 8px; }

/* Niche tab with edit/delete inline */
.niche-tab-wrap { display: flex; align-items: stretch; border-radius: var(--radius-sm); border: 2px solid var(--border); overflow: hidden; transition: border-color .15s; background: var(--surface); }
.niche-tab-wrap:hover, .niche-tab-wrap.active { border-color: var(--primary); }
.niche-tab-btn { padding: 9px 14px; font-size: 13px; font-weight: 600; cursor: pointer; border: none; background: transparent; color: var(--text); font-family: inherit; display: flex; flex-direction: column; align-items: flex-start; transition: background .15s; }
.niche-tab-btn:hover, .niche-tab-wrap.active .niche-tab-btn { background: var(--primary-light); color: var(--primary-dark); }
.niche-tab-meta { font-size: 10px; font-weight: 400; color: var(--text-muted); margin-top: 2px; }
.niche-tab-actions { display: flex; flex-direction: row; border-left: 1px solid var(--border); background: var(--bg); }
.niche-action-btn { padding: 0 8px; font-size: 13px; background: none; border: none; cursor: pointer; color: var(--text-muted); transition: background .15s; border: none; }
.niche-action-btn:hover { background: var(--border); }
.niche-action-btn.danger:hover { background: var(--danger-light); color: var(--danger); }

.required { color: var(--danger); font-size: 12px; }
.checkbox-group { display: flex; flex-wrap: wrap; gap: 10px; }

/* API error box */
.api-error-box { background: #fff7ed; border: 1px solid #fed7aa; border-radius: var(--radius-sm); padding: 14px 16px; font-size: 13px; color: #92400e; line-height: 1.7; }
.api-error-box a { color: var(--primary); }
.suggestion-count { font-size: 12px; color: var(--text-muted); font-weight: 500; margin-bottom: 10px; padding: 6px 0; border-bottom: 1px solid var(--border); }

/* ── Silo cards ── */
.silo-card { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; margin-bottom: 12px; }
.silo-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.silo-name { font-size: 15px; font-weight: 700; color: var(--text); }
.silo-keyword { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.silo-actions { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.silo-badge { background: var(--primary-light); color: var(--primary-dark); font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 20px; white-space: nowrap; }
.silo-desc { font-size: 12px; color: var(--text-muted); margin-bottom: 6px; }
.silo-money { font-size: 12px; color: #059669; font-weight: 500; margin-bottom: 8px; }
.btn-ghost.danger { color: var(--danger); }
.btn-ghost.danger:hover { background: var(--danger-light); }

/* ── Cluster topics ── */
.cluster-topics { margin-top: 8px; }
.cluster-title { font-size: 11px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: .5px; margin-bottom: 6px; }
.cluster-grid { display: flex; flex-wrap: wrap; gap: 5px; }
.cluster-item { display: flex; align-items: center; gap: 5px; padding: 5px 9px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); cursor: pointer; transition: all .15s; font-size: 12px; }
.cluster-item:hover { border-color: var(--primary); background: var(--primary-light); }
.cluster-type { font-size: 13px; }
.cluster-text { font-weight: 500; color: var(--text); }

/* ── Silo Table View ── */
.silo-table-card { border: 1.5px solid var(--border); border-radius: var(--radius); overflow: hidden; margin-bottom: 12px; background: var(--bg); }
.silo-table-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 16px; cursor: pointer; background: var(--surface-raised, #f8fafc);
  border-bottom: 1px solid var(--border); gap: 12px;
}
.silo-table-header:hover { background: rgba(99,102,241,0.03); }
.silo-table-left { display: flex; align-items: center; gap: 10px; }
.silo-table-toggle { font-size: 11px; color: var(--text-muted); width: 16px; }
.silo-table-name { font-size: 14px; font-weight: 700; color: var(--text); }
.silo-table-meta { font-size: 11px; color: var(--text-muted); margin-top: 1px; }
.silo-table-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.silo-content-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.silo-content-table thead th {
  padding: 8px 12px; text-align: left; font-size: 11px; font-weight: 600;
  color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px;
  background: var(--surface-raised, #f8fafc); border-bottom: 1px solid var(--border);
}
.silo-content-table tbody td { padding: 8px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.silo-content-table tbody tr:hover { background: rgba(99,102,241,0.02); }
.silo-row-pillar { background: rgba(139,92,246,0.04); }
.silo-row-title { font-weight: 500; }
.silo-row-actions { display: flex; gap: 4px; flex-wrap: wrap; }
.silo-row-actions .btn { padding: 2px 8px; font-size: 11px; }
.silo-type-badge {
  display: inline-block; font-size: 10px; font-weight: 700; padding: 2px 8px;
  border-radius: 10px; text-transform: capitalize; white-space: nowrap;
}
.silo-type-badge.pillar { background: rgba(139,92,246,0.12); color: #7c3aed; }
.silo-type-badge.cluster, .silo-type-badge.how-to, .silo-type-badge.listicle,
.silo-type-badge.review, .silo-type-badge.comparison, .silo-type-badge.beginner-guide,
.silo-type-badge.case-study, .silo-type-badge.faq { background: rgba(59,130,246,0.12); color: #2563eb; }
.silo-status-badge {
  display: inline-block; font-size: 10px; font-weight: 600; padding: 2px 8px; border-radius: 10px;
}
.silo-status-badge.ghost { background: #f1f5f9; color: #94a3b8; }
.silo-status-badge.info { background: #e0e7ff; color: #4338ca; }
.silo-status-badge.warning { background: #fef3c7; color: #92400e; }
.silo-status-badge.accent { background: #ede9fe; color: #7c3aed; }
.silo-status-badge.success { background: #d1fae5; color: #065f46; }
.silo-bulk-actions { display: flex; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--border); background: var(--surface-raised, #f8fafc); }

/* ── Topic suggestions ── */
.suggestion-item { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px 14px; margin-bottom: 8px; }
.suggestion-main { display: flex; align-items: center; gap: 8px; margin-bottom: 5px; flex-wrap: wrap; }
.suggestion-title { font-size: 13px; font-weight: 600; flex: 1; }
.suggestion-type { font-size: 11px; font-weight: 700; background: var(--primary-light); color: var(--primary-dark); padding: 2px 7px; border-radius: 10px; white-space: nowrap; }
.suggestion-meta { font-size: 11px; color: var(--text-muted); margin-bottom: 8px; }
.diff-badge { font-size: 10px; font-weight: 700; padding: 2px 6px; border-radius: 10px; }
.diff-easy { background: var(--success-light); color: var(--success); }
.diff-medium { background: var(--warning-light); color: #92400e; }
.diff-hard { background: var(--danger-light); color: var(--danger); }

/* ── History enhancements ── */
.history-filters { display: flex; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.form-input-sm { padding: 7px 10px; font-size: 13px; }
.status-pill { font-size: 10px; font-weight: 700; padding: 2px 7px; border-radius: 10px; margin-left: 6px; }
.status-pill.published { background: var(--success-light); color: var(--success); }
.status-pill.draft { background: var(--warning-light); color: #92400e; }
.hist-kw { font-size: 11px; background: var(--primary-light); color: var(--primary-dark); padding: 1px 6px; border-radius: 8px; margin-left: 6px; }

/* ── Generate enhancements ── */
.topic-row { display: flex; align-items: center; gap: 8px; }
.topic-row .form-input { flex: 1; }
.warn-text { color: #92400e; background: var(--warning-light); padding: 8px 10px; border-radius: var(--radius-sm); font-size: 11px; margin-top: 4px; }
.badge-info { font-size: 10px; font-weight: 700; background: #e0f2fe; color: #0369a1; padding: 2px 6px; border-radius: 8px; margin-left: 6px; }

/* ── Multi-select categories ── */
.category-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 8px; }
.cat-item { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid var(--border); border-radius: var(--radius-sm); cursor: pointer; transition: all .15s; font-size: 13px; font-weight: 500; }
.cat-item:hover { border-color: var(--primary); background: var(--primary-light); }
.cat-item input[type=checkbox] { accent-color: var(--primary); width: 15px; height: 15px; flex-shrink: 0; }
.cat-item.selected, .cat-item:has(input:checked) { border-color: var(--primary); background: var(--primary-light); color: var(--primary-dark); }
.cat-tag { display: inline-flex; align-items: center; gap: 5px; background: var(--primary-light); color: var(--primary-dark); border-radius: 20px; padding: 3px 10px 3px 12px; font-size: 12px; font-weight: 600; }
.cat-tag button { background: none; border: none; cursor: pointer; font-size: 14px; padding: 0; color: var(--primary-dark); }
.cat-item-custom { position: relative; border-style: dashed; }
.cat-item-custom .cat-del-btn { position: absolute; top: -6px; right: -6px; width: 18px; height: 18px; border-radius: 50%; background: var(--danger); color: #fff; border: none; cursor: pointer; font-size: 12px; line-height: 1; display: flex; align-items: center; justify-content: center; opacity: 0; transition: opacity .15s; padding: 0; }
.cat-item-custom:hover .cat-del-btn { opacity: 1; }

/* ── AI Provider bar in Niche page ── */
.niche-ai-bar { display: flex; align-items: center; gap: 10px; background: #f0f4ff; border: 1px solid #c7d2fe; border-radius: var(--radius-sm); padding: 8px 14px; margin-bottom: 16px; flex-wrap: wrap; }
.niche-ai-label { font-size: 13px; font-weight: 600; color: var(--primary-dark); white-space: nowrap; }

/* ── Key mask badge in Settings ── */
.key-mask-badge { font-size: 11px; font-weight: 700; font-family: monospace; background: #f0fdf4; color: #166534; border: 1px solid #bbf7d0; border-radius: var(--radius-sm); padding: 3px 8px; white-space: nowrap; flex-shrink: 0; }

/* ── Template Modal ── */
.modal-overlay { position: fixed; inset: 0; background: rgba(15,23,42,.5); backdrop-filter: blur(4px); z-index: 500; display: flex; align-items: center; justify-content: center; padding: 20px; }
.modal-box { background: var(--surface); border-radius: var(--radius-lg); padding: 24px; max-width: 680px; width: 100%; max-height: 80vh; overflow-y: auto; box-shadow: var(--shadow-lg); }
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.modal-header h3 { font-size: 18px; font-weight: 700; }
.template-card { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 14px 16px; cursor: pointer; transition: all .15s; display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.template-card:hover { border-color: var(--primary); background: var(--primary-light); }
.template-icon { font-size: 28px; flex-shrink: 0; }
.template-info { flex: 1; }
.template-name { font-weight: 700; font-size: 14px; margin-bottom: 4px; }
.template-desc { font-size: 12px; color: var(--text-muted); line-height: 1.5; }
.template-meta { display: flex; gap: 8px; margin-top: 6px; }
.template-badge { font-size: 10px; font-weight: 700; background: var(--primary-light); color: var(--primary-dark); padding: 2px 7px; border-radius: 8px; }

/* ── AI Refine Chat ── */
/* ── Refine & Continue (Modern) ── */
.refine-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.refine-header-actions { display: flex; gap: 8px; align-items: center; }
.refine-action-count { font-size: 12px; color: var(--text-muted); font-weight: 500; }
.refine-section-picker { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; padding: 10px 14px; background: #f8fafc; border-radius: var(--radius); border: 1px solid #e2e8f0; }
.refine-picker-label { font-size: 13px; font-weight: 600; color: var(--text); white-space: nowrap; }
.refine-chat-history { max-height: 220px; overflow-y: auto; margin-bottom: 12px; display: flex; flex-direction: column; gap: 8px; }
.refine-msg { padding: 10px 14px; border-radius: 12px; font-size: 13px; line-height: 1.6; max-width: 85%; animation: refineSlideIn 0.3s ease; }
@keyframes refineSlideIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.refine-msg.user { background: var(--primary); color: #fff; align-self: flex-end; font-weight: 500; border-bottom-right-radius: 4px; }
.refine-msg.ai { background: #f0fdf4; color: #166534; border: 1px solid #bbf7d0; border-bottom-left-radius: 4px; }
.refine-msg.error { background: var(--danger-light); color: var(--danger); border: 1px solid #fecaca; }
.refine-actions-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 14px; }
.refine-action-card { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 14px 8px; border: 1.5px solid var(--border); border-radius: var(--radius); background: var(--surface); cursor: pointer; transition: var(--transition); text-align: center; }
.refine-action-card:hover { border-color: var(--primary); background: var(--primary-light); transform: translateY(-2px); box-shadow: 0 4px 16px rgba(99,102,241,0.12); }
.refine-action-card.refine-action-continue { border-color: var(--accent); background: #fff7ed; }
.refine-action-card.refine-action-continue:hover { border-color: var(--accent); background: #fff7ed; }
.refine-action-icon { font-size: 20px; }
.refine-action-label { font-size: 12px; font-weight: 700; color: var(--text); }
.refine-action-desc { font-size: 10px; color: var(--text-muted); line-height: 1.3; }
.refine-status-bar { margin-top: 8px; font-size: 12px; color: var(--text-muted); padding: 6px 0; }
.refine-result-notification { display: flex; align-items: center; gap: 10px; padding: 12px 16px; margin-top: 10px; background: #f0fdf4; border: 1.5px solid #86efac; border-radius: var(--radius); animation: refineSlideIn 0.3s ease; }
.refine-result-notification.hidden { display: none; }
.refine-result-icon { font-size: 20px; }
.refine-result-text { flex: 1; font-size: 13px; font-weight: 500; color: #166534; }
.refine-progress-bar { height: 3px; background: #e2e8f0; border-radius: 3px; overflow: hidden; margin-bottom: 6px; }
.refine-progress-fill { height: 100%; background: var(--primary); border-radius: 3px; animation: refineProgressPulse 2s ease-in-out infinite; width: 60%; }
@keyframes refineProgressPulse { 0%,100% { width: 30%; opacity: 0.7; } 50% { width: 80%; opacity: 1; } }

/* ── Write Config ── */
.gen-write-config { background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 10px; padding: 16px 20px; margin-bottom: 16px; }
.gen-config-row { display: flex; gap: 16px; flex-wrap: wrap; align-items: flex-end; }
.gen-config-field { flex: 1; min-width: 140px; }
.gen-config-field label { display: block; font-size: 11px; font-weight: 700; color: #64748b; text-transform: uppercase; letter-spacing: .3px; margin-bottom: 6px; }
.gen-config-field .form-select { width: 100%; padding: 8px 12px; border-radius: 8px; border: 1px solid #d1d5db; font-size: 13px; background: #fff; }
.gen-config-info { display: block; padding: 9px 0; font-size: 14px; font-weight: 700; color: var(--primary); }
.gen-config-note { font-size: 11px; color: #94a3b8; margin-top: 10px; margin-bottom: 0; }

/* ── Section status ── */
.gen-section-status { background: #f0fdf4; border: 1px solid #bbf7d0; border-radius: 8px; padding: 12px 16px; margin: 12px 0; font-size: 12px; color: #166534; }
.gen-section-status .done-list { color: #15803d; font-weight: 600; }
.gen-section-status .remaining-list { color: #b45309; font-weight: 600; }

/* ── Continue button accent ── */
.btn-accent { background: #f59e0b !important; color: #fff !important; border: none !important; font-weight: 700 !important; }
.btn-accent:hover { background: #d97706 !important; }
.gen-kw-header { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 4px; }
.gen-kw-header .form-label { margin-bottom: 0; }
.gen-kw-header .btn-accent.btn-sm { font-size: 11px; padding: 4px 12px; border-radius: 6px; white-space: nowrap; }
.refine-input-row { display: flex; gap: 8px; align-items: flex-start; }
.refine-input-row textarea { flex: 1; resize: vertical; min-height: 48px; font-size: 13px; }

/* ── Category selector (Step 5) ── */
.gen-category-section { background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 10px; padding: 16px 20px; margin-bottom: 16px; }
.gen-cat-row { display: flex; gap: 14px; flex-wrap: wrap; align-items: flex-end; }
.gen-cat-field { flex: 1; min-width: 180px; }
.gen-cat-field .form-select { width: 100%; padding: 10px 14px; border-radius: 8px; border: 1px solid #d1d5db; font-size: 13px; background: #fff; color: #1e293b; cursor: pointer; }
.gen-cat-label { display: block; font-size: 11px; font-weight: 700; color: #64748b; text-transform: uppercase; letter-spacing: .3px; margin-bottom: 6px; }
.gen-cat-hint { font-size: 11px; color: #94a3b8; margin-top: 8px; margin-bottom: 0; }

/* ── Article History (below pipeline) ── */
.gen-history-section { margin-top: 24px; }
.gen-hist-item {
  display: flex; align-items: center; gap: 12px; padding: 12px 16px;
  border-bottom: 1px solid #f1f5f9; transition: background .15s;
}
.gen-hist-item:hover { background: #f8fafc; }
.gen-hist-item:last-child { border-bottom: none; }
.gen-hist-check { flex-shrink: 0; width: 16px; height: 16px; accent-color: #6366f1; cursor: pointer; }
.gen-hist-info { flex: 1; min-width: 0; }
.gen-hist-title { font-size: 14px; font-weight: 600; color: #1e293b; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gen-hist-meta { font-size: 11px; color: #94a3b8; margin-top: 2px; display: flex; gap: 8px; flex-wrap: wrap; }
.gen-hist-meta .hist-tag { background: #eff6ff; color: #3b82f6; padding: 1px 6px; border-radius: 4px; font-size: 10px; font-weight: 600; }
.gen-hist-meta .hist-tag.project { background: #faf5ff; color: #9333ea; }
.gen-hist-meta .hist-tag.published { background: #d1fae5; color: #065f46; }
.gen-hist-meta .hist-tag.draft { background: #fef3c7; color: #92400e; }
.gen-hist-meta .hist-tag.in-progress { background: #e0f2fe; color: #0369a1; }
.gen-hist-meta .hist-tag.error-tag { background: #fee2e2; color: #dc2626; }
.gen-hist-actions { display: flex; gap: 4px; flex-shrink: 0; align-items: center; }

/* Individual action buttons */
.hist-action-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: 6px; border: 1px solid transparent;
  background: transparent; cursor: pointer; font-size: 14px;
  text-decoration: none; color: #64748b; transition: all .15s;
}
.hist-action-btn:hover { background: #f1f5f9; border-color: #e2e8f0; color: #334155; }

/* More dropdown */
.hist-more-wrap { position: relative; }
.hist-more-menu {
  position: absolute; right: 0; top: 100%; margin-top: 4px;
  background: #fff; border: 1px solid #e2e8f0; border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0,0,0,.12); z-index: 100;
  min-width: 180px; overflow: hidden;
}
.hist-more-item {
  padding: 8px 14px; font-size: 13px; cursor: pointer;
  display: flex; align-items: center; gap: 6px;
  color: #334155; transition: background .1s;
}
.hist-more-item:hover { background: #f8fafc; }
.hist-more-danger { color: #ef4444; }
.hist-more-danger:hover { background: #fef2f2; }

/* Live status pulse animation */
.hist-status-live { animation: histPulse 1.5s ease-in-out infinite; }
@keyframes histPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .6; }
}

.gen-hist-folder-header {
  font-size: 13px; font-weight: 700; color: #6366f1; padding: 10px 16px;
  background: #f1f5f9; border-bottom: 1px solid #e2e8f0;
  display: flex; align-items: center; gap: 8px; cursor: pointer;
}
.gen-hist-folder-header:hover { background: #e2e8f0; }
.gen-hist-folder-count { font-size: 11px; font-weight: 400; color: #94a3b8; }
.btn-danger { background: #ef4444 !important; color: #fff !important; border: none !important; }
.btn-danger:hover { background: #dc2626 !important; }

/* ── ETA & Live Preview (during generation) ── */
.gen-write-progress-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.gen-eta { font-size: 12px; color: var(--text-muted); font-weight: 500; }
.gen-live-preview { border: 1px solid #e2e8f0; border-radius: 10px; overflow: hidden; margin-top: 12px; }
.gen-live-preview-header { display: flex; justify-content: space-between; align-items: center; padding: 8px 14px; background: #f8fafc; border-bottom: 1px solid #e2e8f0; font-size: 12px; font-weight: 600; color: var(--text-muted); }
.gen-live-wc { background: var(--success-light); color: var(--success); padding: 2px 8px; border-radius: 12px; font-size: 11px; font-weight: 700; }
.gen-live-content { max-height: 500px; overflow-y: auto; padding: 16px; font-size: 14px; line-height: 1.7; }
.gen-live-content:empty::after { content: "Content will appear here as sections are generated..."; color: #94a3b8; font-style: italic; }

/* ── Section Tracker Pills ── */
.section-tracker { margin: 10px 0; }
.section-tracker-pills { display: flex; flex-wrap: wrap; gap: 4px; }
.section-pill {
  font-size: 10px; padding: 3px 10px; border-radius: 20px;
  background: var(--bg); color: var(--text-muted); border: 1px solid var(--border);
  font-weight: 500; white-space: nowrap; max-width: 150px; overflow: hidden; text-overflow: ellipsis;
  transition: all 0.3s ease;
}
.section-pill.done {
  background: var(--success-light); color: var(--success); border-color: var(--success);
}
.section-pill.active {
  background: var(--primary-light); color: var(--primary); border-color: var(--primary);
  animation: sectionPulse 1.5s ease-in-out infinite;
}
@keyframes sectionPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(99,102,241,.3); }
  50% { box-shadow: 0 0 0 4px rgba(99,102,241,.1); }
}

/* ── Section Log (terminal-like) ── */
.section-log { margin: 12px 0; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.section-log-header {
  padding: 8px 14px; background: #1e293b; color: #94a3b8; font-size: 12px; font-weight: 600;
  border-bottom: 1px solid #334155;
}
.section-log-body {
  background: #0f172a; padding: 10px 14px; max-height: 200px; overflow-y: auto;
  font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
}
.section-log-entry {
  font-size: 12px; color: #94a3b8; padding: 3px 0; line-height: 1.5;
  border-bottom: 1px solid rgba(255,255,255,.04);
}
.section-log-entry.active { color: #60a5fa; font-weight: 600; }
.section-log-entry:last-child { border-bottom: none; }
.log-spinner {
  display: inline-block; width: 12px; height: 12px;
  border: 2px solid #60a5fa; border-top-color: transparent;
  border-radius: 50%; animation: logSpin 1s linear infinite;
  vertical-align: middle; margin-right: 2px;
}
@keyframes logSpin { to { transform: rotate(360deg); } }

/* Write status text */
.write-status-text { font-size: 15px; font-weight: 600; color: var(--text); margin-bottom: 8px; }

/* ── TinyMCE Visual Editor ── */
.ve-editor-wrapper { border-radius: 10px 10px 0 0; overflow: hidden; border: 1px solid #d1d5db; border-bottom: none; }
.ve-editor-wrapper .tox.tox-tinymce { border: none !important; border-radius: 0 !important; }
.ve-footer { background: #f8fafc; border: 1px solid #d1d5db; border-top: none; border-radius: 0 0 10px 10px; padding: 0; }
.ve-footer-row-top { display: flex; align-items: center; justify-content: space-between; padding: 6px 14px; border-bottom: 1px solid #e2e8f0; }
.ve-footer-row-bottom { display: flex; align-items: center; justify-content: space-between; padding: 8px 14px; gap: 10px; flex-wrap: wrap; }
.ve-status { font-size: 12px; font-weight: 600; color: var(--success); }
.ve-stats { display: flex; align-items: center; gap: 10px; font-size: 12px; color: #64748b; font-weight: 600; }
.ve-stat-sep { color: #cbd5e1; }
.ve-saved-docs { flex-shrink: 0; }
.ve-saved-docs select { font-size: 12px; padding: 5px 10px; border-radius: 6px; min-width: 220px; }
.ve-footer-actions { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.ve-footer-actions .btn { font-size: 12px; padding: 5px 12px; }
.ve-action-btn { border: 1px solid #d1d5db !important; border-radius: 6px !important; background: #fff !important; }
.ve-action-btn:hover { background: #f1f5f9 !important; border-color: var(--primary) !important; }
.ve-btn-group { display: flex; position: relative; }
.ve-btn-group .btn:first-child { border-radius: 6px 0 0 6px; }
.ve-btn-group .ve-dropdown-toggle { border-radius: 0 6px 6px 0; padding: 5px 6px; border-left: 1px solid rgba(255,255,255,0.3); }
.ve-dropdown-menu { position: absolute; bottom: 100%; right: 0; background: #fff; border: 1px solid #d1d5db; border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,0.12); min-width: 180px; z-index: 100; padding: 4px; margin-bottom: 4px; }
.ve-dropdown-menu button { display: block; width: 100%; text-align: left; padding: 8px 12px; border: none; background: none; font-size: 12px; font-weight: 500; cursor: pointer; border-radius: 6px; color: var(--text); }
.ve-dropdown-menu button:hover { background: #f1f5f9; color: var(--primary); }

/* ── Silo Content Manager (in Generate page) ── */
.silo-content-manager { margin-top: 16px; }
.silo-cm-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.silo-cm-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.silo-cm-card { background: var(--bg); border: 1.5px solid var(--border); border-radius: var(--radius); padding: 14px 16px; transition: all .15s; }
.silo-cm-card:hover { border-color: var(--primary); }
.silo-cm-card.pillar { border-left: 4px solid var(--primary); }
.silo-cm-card.cluster { border-left: 4px solid var(--warning); }
.silo-cm-card-title { font-size: 14px; font-weight: 700; color: var(--text); margin-bottom: 4px; display: flex; align-items: center; gap: 6px; }
.silo-cm-card-meta { font-size: 11px; color: var(--text-muted); margin-bottom: 8px; }
.silo-cm-status { display: inline-flex; align-items: center; gap: 4px; font-size: 10px; font-weight: 700; padding: 2px 8px; border-radius: 10px; }
.silo-cm-status.created { background: var(--success-light); color: var(--success); }
.silo-cm-status.pending { background: var(--warning-light); color: #92400e; }
.silo-cm-status.queued { background: var(--primary-light); color: var(--primary); }
.silo-cm-actions { display: flex; gap: 6px; margin-top: 8px; }
.silo-cm-check { accent-color: var(--primary); width: 16px; height: 16px; cursor: pointer; }
.silo-queue-bar { display: flex; align-items: center; gap: 10px; background: var(--primary-light); border-radius: var(--radius-sm); padding: 10px 16px; margin-top: 12px; }
.silo-queue-bar .queue-count { font-weight: 700; color: var(--primary); }

/* ── 5-Step Pipeline Layout ── */

/* ── Step 1: Silo Map ── */
.gen-silo-map {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px; margin-bottom: 16px;
}
.gen-silo-map-header {
  font-size: 13px; font-weight: 700; color: var(--text); margin-bottom: 12px;
  display: flex; align-items: center; gap: 8px;
}
.gen-silo-map-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px;
}
.gen-silo-pillar {
  background: #6366f1; color: #fff;
  padding: 10px 12px; border-radius: var(--radius-sm); font-size: 12px; font-weight: 700;
  text-align: center; box-shadow: 0 2px 6px rgba(99,102,241,.25);
}
.gen-silo-topic {
  background: var(--accent-light); border: 1px solid #c7d2fe; color: var(--primary);
  padding: 7px 10px; border-radius: var(--radius-sm); font-size: 11px; font-weight: 600;
  text-align: center; transition: var(--transition);
}
.gen-silo-topic:hover { background: #c7d2fe; }
.gen-silo-more {
  font-size: 11px; color: var(--text-muted); text-align: center;
  padding: 6px; font-style: italic;
}

/* ── Step 2: SEO Topic Bar ── */
.gen-seo-topic-bar {
  display: flex; align-items: center; gap: 10px;
  background: var(--accent-light); border: 1px solid #c7d2fe; border-radius: var(--radius-sm);
  padding: 10px 14px; margin-bottom: 14px; font-size: 13px; color: var(--primary);
}
.gen-seo-topic-bar strong { color: var(--text); }

/* ── Step 4: Write Done Summary ── */
.gen-write-done-summary {
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  padding: 32px 20px; text-align: center;
}
.gen-write-done-icon { font-size: 48px; line-height: 1; }
.gen-write-done-text h3 { font-size: 18px; color: var(--text); margin-bottom: 6px; }
.gen-write-done-text p { font-size: 13px; color: var(--text-muted); }
.gen-write-done-stats {
  display: flex; gap: 20px; margin-top: 8px;
}
.gen-write-done-stats span {
  font-size: 12px; color: var(--text-light); display: flex; align-items: center; gap: 4px;
}
.gen-write-done-stats strong { color: var(--primary); font-size: 16px; }

/* ── Step 1: Silo Cards with Topic Tables ── */
/* ── Silo Overview Bar ── */
.silo-overview-bar {
  background: #f8fafc;
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 14px 18px; margin-bottom: 16px;
}
.silo-overview-progress {
  height: 6px; background: #e2e8f0; border-radius: 3px; overflow: hidden; margin-bottom: 10px;
}
.silo-overview-progress-fill {
  height: 100%; background: #6366f1;
  border-radius: 3px; transition: width .6s ease;
}
.silo-overview-stats {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap; font-size: 12px;
}
.silo-ov-stat { display: flex; align-items: center; gap: 5px; font-weight: 500; color: var(--text); }
.silo-ov-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.silo-ov-done { background: #22c55e; }
.silo-ov-active { background: #f59e0b; animation: pulse-badge 1.5s ease-in-out infinite; }
.silo-ov-queued { background: #6366f1; }
.silo-ov-error { background: #ef4444; }
.silo-ov-total { margin-left: auto; font-weight: 700; color: #6366f1; font-size: 13px; }

/* ── Silo Cards (modernized) ── */
.gen-silo-card {
  border: 1px solid var(--border); border-radius: 12px; margin-bottom: 14px;
  background: var(--surface); overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,.04);
  transition: box-shadow .2s, border-color .2s;
}
.gen-silo-card:hover { box-shadow: 0 4px 12px rgba(99,102,241,.08); }
.gen-silo-card.silo-card-active {
  border-color: #818cf8;
  box-shadow: 0 0 0 2px rgba(99,102,241,.1), 0 4px 12px rgba(99,102,241,.06);
}
.gen-silo-card-header {
  display: flex; align-items: center; gap: 12px;
  padding: 16px 18px; cursor: pointer; transition: var(--transition);
  background: #fafafa;
}
.gen-silo-card-header:hover { background: #f5f5ff; }
.gen-silo-card-arrow { font-size: 12px; color: var(--text-muted); transition: transform .2s; width: 16px; }
.gen-silo-card-info { flex: 1; }
.gen-silo-card-info h4 { font-size: 15px; font-weight: 700; color: var(--text); margin: 0; }
.gen-silo-card-meta { font-size: 11px; color: var(--text-muted); margin-top: 0; display: inline; }
.silo-card-progress-row { display: flex; align-items: center; gap: 10px; margin-top: 6px; }
.silo-card-minibar { flex: 0 0 80px; height: 4px; background: #e2e8f0; border-radius: 2px; overflow: hidden; }
.silo-card-minibar-fill { height: 100%; background: #6366f1; border-radius: 2px; transition: width .4s; }
.silo-active-badge {
  display: inline-block; background: #fef3c7; color: #b45309; padding: 1px 7px;
  border-radius: 8px; font-size: 10px; font-weight: 600;
  animation: pulse-badge 1.5s ease-in-out infinite;
}
.gen-silo-card-actions { display: flex; gap: 6px; flex-shrink: 0; }
.gen-silo-card-body { padding: 2px 18px 18px; }
.gen-silo-card-body.collapsed { display: none; }
.gen-silo-table {
  width: 100%; border-collapse: collapse; font-size: 13px;
}
.gen-silo-table th {
  text-align: left; padding: 10px 10px; font-size: 10px; font-weight: 700;
  color: var(--text-muted); text-transform: uppercase; letter-spacing: .6px;
  border-bottom: 2px solid var(--border); background: #fafafa;
}
.gen-silo-table td {
  padding: 10px 10px; border-bottom: 1px solid #f1f5f9; vertical-align: middle;
}
.gen-silo-table tr:hover td { background: #f8faff; }
.gen-silo-table input[type="checkbox"] { accent-color: var(--primary); width: 15px; height: 15px; cursor: pointer; }
.topic-name-cell { max-width: 300px; overflow: hidden; text-overflow: ellipsis; }
.topic-action-group { display: flex; align-items: center; gap: 4px; flex-wrap: nowrap; }
.btn-cancel { color: var(--danger) !important; font-weight: 700; font-size: 12px !important; padding: 2px 6px !important; }
.btn-rewrite { color: #6366f1 !important; }
.btn-reset { color: #94a3b8 !important; }
.btn-reset:hover { color: var(--danger) !important; }

/* ── Status spinner/pulse indicators ── */
.status-spinner {
  display: inline-block; width: 10px; height: 10px; border: 2px solid #fbbf24;
  border-top-color: transparent; border-radius: 50%;
  animation: spin-status .8s linear infinite; vertical-align: middle; margin-right: 3px;
}
.status-pulse {
  display: inline-block; width: 8px; height: 8px; border-radius: 50%;
  background: #6366f1; animation: pulse-dot 1.5s ease-in-out infinite;
  vertical-align: middle; margin-right: 4px;
}
@keyframes spin-status { to { transform: rotate(360deg); } }
@keyframes pulse-dot { 0%,100%{opacity:1;transform:scale(1)} 50%{opacity:.4;transform:scale(.8)} }

.badge-type {
  display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 10px;
  font-weight: 700; text-transform: capitalize;
}
.badge-pillar { background: #ede9fe; color: #7c3aed; }
.badge-guide { background: #dbeafe; color: #2563eb; }
.badge-how-to { background: #d1fae5; color: #059669; }
.badge-listicle { background: #fef3c7; color: #d97706; }
.badge-review { background: #fce7f3; color: #db2777; }
.badge-comparison { background: #e0e7ff; color: #4f46e5; }
.badge-case-study { background: #f3e8ff; color: #9333ea; }
.badge-news { background: #fee2e2; color: #dc2626; }
.badge-cluster { background: #dbeafe; color: #2563eb; }
.badge-status {
  display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 10px;
  font-size: 10px; font-weight: 600; gap: 2px;
}
.badge-not-created { background: #f1f5f9; color: #94a3b8; }
.badge-created { background: #d1fae5; color: #059669; }
.badge-draft { background: #fef3c7; color: #d97706; }
.badge-published { background: #dbeafe; color: #2563eb; }
.badge-queued { background: #e0e7ff; color: #4f46e5; }
.badge-processing { background: #fef3c7; color: #b45309; animation: pulse-badge 1.5s ease-in-out infinite; }
.badge-error { background: #fee2e2; color: #dc2626; }
@keyframes pulse-badge { 0%,100%{opacity:1} 50%{opacity:.65} }
.btn-xs { padding: 3px 10px; font-size: 11px; border-radius: 6px; }
.gen-silo-empty {
  text-align: center; padding: 40px 20px; color: var(--text-muted);
}
.gen-silo-empty p { margin-top: 8px; font-size: 13px; }

/* ── Step 2 Queue Panel ── */
.card-header-right { display: flex; align-items: center; gap: 10px; }
.queue-toggle-btn {
  position: relative; border: 1px solid #e0e7ff !important;
  background: #f5f3ff !important; color: #6366f1 !important; font-weight: 600 !important;
}
.queue-toggle-btn:hover { background: #ede9fe !important; }
.queue-badge-count {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  background: #6366f1; color: #fff; font-size: 10px; font-weight: 700;
  margin-left: 4px; animation: pulse-badge 1.5s ease-in-out infinite;
}
.step2-queue-panel {
  background: #f8f9ff;
  border: 2px solid #a5b4fc; border-radius: 12px;
  padding: 18px 20px; margin-bottom: 20px; animation: fadeIn .2s;
  box-shadow: 0 4px 16px rgba(99,102,241,.1);
}
.step2-queue-header {
  display: flex; justify-content: space-between; align-items: flex-start;
  margin-bottom: 12px; padding-bottom: 10px; border-bottom: 1px solid #e0e7ff;
}
.step2-queue-title-row { display: flex; align-items: center; gap: 8px; }
.step2-queue-header h4 { margin: 0; font-size: 15px; font-weight: 800; color: #312e81; }
.step2-queue-summary { font-size: 12px; font-weight: 600; color: #6366f1; text-align: right; }
.step2-q-pct { font-size: 16px; font-weight: 800; color: #4f46e5; }
.step2-queue-list { max-height: 500px; overflow-y: auto; }

/* Progress bar in Step 2 queue */
.step2-q-progress-wrap { margin-bottom: 14px; }
.step2-q-progress-bar {
  height: 8px; background: #e2e8f0; border-radius: 4px; overflow: hidden; margin-bottom: 6px;
}
.step2-q-progress-fill {
  height: 100%; background: #6366f1;
  border-radius: 4px; transition: width .6s ease;
  background-size: 200% 100%; animation: shimmer 2s linear infinite;
}
@keyframes shimmer { 0%{background-position:200% 0} 100%{background-position:-200% 0} }
.step2-q-progress-info {
  display: flex; align-items: center; gap: 8px; font-size: 12px; color: #64748b;
}

/* Currently processing article — highlighted card */
.step2-q-current {
  background: #fff; border: 2px solid #818cf8; border-radius: 10px;
  padding: 14px 16px; margin-bottom: 12px;
  box-shadow: 0 2px 12px rgba(99,102,241,.12);
}
.step2-q-current-header {
  display: flex; align-items: center; gap: 8px; margin-bottom: 12px;
}
.step2-q-current-label {
  background: #6366f1; color: #fff; font-size: 10px; font-weight: 700;
  padding: 2px 8px; border-radius: 6px; text-transform: uppercase; letter-spacing: .5px;
  animation: pulse-badge 1.5s ease-in-out infinite;
}
.step2-q-current-topic {
  flex: 1; font-size: 14px; font-weight: 700; color: #1e1b4b;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* Pipeline stepper */
.step2-q-pipeline {
  display: flex; align-items: center; gap: 0; margin-bottom: 12px;
  padding: 8px 0;
}
.step2-q-pipe-step {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  flex: 1; font-size: 11px; font-weight: 600; color: #94a3b8;
  transition: color .3s;
}
.step2-q-pipe-step.pipe-active { color: #f59e0b; }
.step2-q-pipe-step.pipe-done { color: #22c55e; }
.pipe-icon { font-size: 16px; width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; }
.pipe-connector {
  flex: 0 0 30px; height: 3px; background: #e2e8f0; border-radius: 2px;
  margin: 0 2px; margin-bottom: 18px;
  transition: background .3s;
}
.pipe-connector.pipe-conn-done { background: #22c55e; }

/* Current article progress bar */
.step2-q-current-progress {
  display: flex; align-items: center; gap: 8px;
}
.step2-q-cpbar {
  flex: 1; height: 6px; background: #e2e8f0; border-radius: 3px; overflow: hidden;
}
.step2-q-cpfill {
  height: 100%; background: #f59e0b;
  border-radius: 3px; transition: width .4s;
}
.step2-q-cptext { font-size: 12px; font-weight: 700; color: #b45309; min-width: 36px; text-align: right; }

/* Queue items list */
.step2-q-items { display: flex; flex-direction: column; gap: 2px; }
.step2-queue-item {
  display: flex; align-items: center; gap: 8px; padding: 8px 10px;
  border-radius: 8px; font-size: 12px; transition: background .15s;
}
.step2-queue-item:hover { background: rgba(99,102,241,.06); }
.step2-queue-item.q-active { background: #fef9c3; border-left: 3px solid #f59e0b; }
.step2-queue-item.q-done { opacity: .6; }
.step2-queue-item.q-error { background: #fef2f2; border-left: 3px solid #ef4444; }
.step2-q-num { font-weight: 700; color: #94a3b8; font-size: 11px; min-width: 22px; }
.step2-q-topic { flex: 1; font-weight: 500; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.step2-q-status { font-size: 11px; font-weight: 600; color: #64748b; white-space: nowrap; }
.step2-q-words { font-size: 10px; color: #22c55e; font-weight: 600; }
.step2-q-err { font-size: 10px; color: #ef4444; max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.step2-queue-empty { text-align: center; padding: 20px; color: var(--text-muted); font-size: 13px; }

/* ── Step 3: Sub-tabs ── */
.s3-tab-content { animation: fadeIn .2s; }
.s3-tab-content.hidden { display: none; }

/* ── Step 5: External Links Section ── */
.gen-ext-links-section { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border); }
.gen-ext-links-section h4 {
  font-size: 13px; font-weight: 700; color: var(--text); margin-bottom: 10px;
  display: flex; align-items: center; gap: 6px;
}

/* ── Step 6: Publish Cards ── */
.gen-pub-cards {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 18px;
}
.gen-pub-card {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 16px 10px; border: 2px solid var(--border); border-radius: var(--radius);
  cursor: pointer; transition: var(--transition); background: var(--surface); text-align: center;
}
.gen-pub-card:hover { border-color: #a5b4fc; background: var(--accent-light); }
.gen-pub-card.selected { border-color: var(--primary); background: var(--accent-light); box-shadow: 0 0 0 3px rgba(99,102,241,.15); }
.gen-pub-card .pub-card-icon { font-size: 24px; }
.gen-pub-card .pub-card-title { font-size: 13px; font-weight: 700; color: var(--text); }
.gen-pub-card .pub-card-desc { font-size: 11px; color: var(--text-muted); line-height: 1.4; }

/* ── Step 6: Schedule Options ── */
.gen-schedule-options {
  display: flex; gap: 12px; align-items: center; flex-wrap: wrap;
  padding: 12px 14px; background: #fffbeb; border: 1px solid #fde68a;
  border-radius: var(--radius-sm); margin-bottom: 16px;
}
.gen-schedule-options label { font-size: 12px; font-weight: 600; color: #92400e; }
.gen-schedule-options input {
  padding: 6px 10px; border: 1px solid #fde68a; border-radius: 6px;
  font-size: 13px; background: #fff; outline: none;
}
.gen-schedule-options input:focus { border-color: #f59e0b; }

/* ── Step 6: Publish Progress ── */
.gen-pub-progress {
  display: flex; flex-direction: column; gap: 10px;
  padding: 20px; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); margin-top: 16px;
}
.gen-pub-pstep {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 12px; border-radius: var(--radius-sm); font-size: 13px;
  color: var(--text-muted); transition: var(--transition);
}
.gen-pub-pstep.active { color: var(--primary); font-weight: 600; background: var(--accent-light); }
.gen-pub-pstep.done { color: var(--success); }
.gen-pub-pstep-icon { font-size: 16px; width: 20px; text-align: center; }
.gen-pub-pstep-line {
  width: 2px; height: 10px; background: var(--border); margin-left: 9px;
}
.gen-pub-pstep-line.done { background: var(--success); }
.gen-pub-progress-msg {
  text-align: center; font-size: 12px; color: var(--text-muted);
  margin-top: 8px; font-style: italic;
}

/* ── Utilities ── */
.hidden { display: none !important; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }

/* ── Responsive ── */
@media (max-width: 1200px) {
  .gen-pipeline { flex-wrap: wrap; justify-content: center; gap: 8px; }
  .gen-pipe-arrow { display: none; }
  .gen-publish-summary { grid-template-columns: repeat(3, 1fr); }
  .silo-cm-grid { grid-template-columns: 1fr; }
  .gen-pub-cards { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 860px) {
  :root { --sidebar-width: 56px; }
  .sidebar { width: 56px; }
  .logo-text, .nav-link span:not(.nav-icon), .sidebar-footer span:not(.status-dot), .nav-group-label, .sidebar-project-select, .sidebar-version { display: none; }
  .nav-link { justify-content: center; padding: 10px; }
  .nav-icon { width: auto; }
  .main-content { left: 56px; padding: 20px 12px; }
  .form-grid, .settings-grid { grid-template-columns: 1fr; }
  .style-selector { grid-template-columns: 1fr 1fr; }
  .gen-pipeline { padding: 10px 12px; }
  .gen-pipe-step { min-width: 60px; padding: 6px 8px; }
  .gen-pipe-label { font-size: 10px; }
  .gen-pipe-icon { font-size: 18px; }
  .card-header { flex-direction: column; gap: 8px; align-items: flex-start; }
  .card-actions { flex-wrap: wrap; }
  .gen-step-actions { flex-wrap: wrap; }
  .gen-config-row { flex-direction: column; }
  .gen-cat-row { flex-direction: column; }
  .gen-publish-summary { grid-template-columns: 1fr 1fr; }
  .gen-seo-grid { grid-template-columns: 1fr 1fr; }
  .gen-link-item { flex-wrap: wrap; gap: 6px; }
  .gen-link-anchor { min-width: auto; }
  .gen-link-url { max-width: 100%; }
  .ve-footer-row-bottom { flex-direction: column; align-items: stretch; }
  .ve-footer-actions { justify-content: center; }
  .ve-saved-docs select { width: 100%; }
  .refine-actions-grid { grid-template-columns: repeat(2, 1fr); }
  .refine-section-picker { flex-direction: column; align-items: stretch; }
  .refine-result-notification { flex-wrap: wrap; }
  .gen-silo-card-header { flex-wrap: wrap; }
  .gen-silo-card-actions { flex-wrap: wrap; width: 100%; justify-content: flex-end; }
  .gen-silo-table { font-size: 12px; }
  .gen-kw-header { flex-direction: column; align-items: flex-start; gap: 6px; }
  .gen-hist-item { flex-direction: column; align-items: flex-start; gap: 6px; }
  .hist-action-btn { width: 26px; height: 26px; font-size: 12px; }
  .hist-more-menu { right: auto; left: 0; }
  .gen-hist-actions { align-self: flex-end; }
  .stats-row { grid-template-columns: 1fr 1fr; }
  .roadmap-steps { grid-template-columns: 1fr; }
  .quick-actions { flex-wrap: wrap; }
  .page-type-grid { grid-template-columns: 1fr 1fr; }
  .page-header { flex-direction: column; }
  .gen-pub-cards { grid-template-columns: 1fr 1fr; }
  .gen-silo-map-grid { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); }
  .gen-schedule-options { flex-direction: column; align-items: stretch; }
}

@media (max-width: 480px) {
  .main-content { padding: 16px 8px; }
  .gen-pipeline { padding: 8px; }
  .gen-pipe-step { min-width: 48px; padding: 4px 6px; }
  .gen-pipe-label { font-size: 9px; }
  .btn-large { padding: 10px 16px; font-size: 13px; }
  .gen-publish-summary { grid-template-columns: 1fr; }
  .gen-seo-grid { grid-template-columns: 1fr; }
  .stats-row { grid-template-columns: 1fr; }
  .style-selector { grid-template-columns: 1fr; }
  .page-type-grid { grid-template-columns: 1fr; }
  .gen-pub-cards { grid-template-columns: 1fr; }
  .gen-write-done-stats { flex-direction: column; gap: 8px; }
}

/* ════════════════════════════════════════════
   PAGES, MENU BUILDER, SITE SETTINGS
   ════════════════════════════════════════════ */

/* Nav separator (legacy, kept for compat) */
.nav-separator { height: 1px; background: rgba(255,255,255,0.06); margin: 6px 16px; list-style: none; }

/* ── Pages List ── */
.pages-list { padding: 0; }
.page-row {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 20px; border-bottom: 1px solid #f1f5f9;
  transition: background .15s;
}
.page-row:hover { background: #f8fafc; }
.page-row:last-child { border-bottom: none; }
.page-row-icon { font-size: 20px; width: 32px; text-align: center; flex-shrink: 0; }
.page-row-info { flex: 1; min-width: 0; }
.page-row-title { font-weight: 600; font-size: 14px; color: #1e293b; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.page-row-meta { font-size: 11px; color: #94a3b8; margin-top: 2px; }
.page-row-slug { font-family: monospace; font-size: 11px; color: #6366f1; background: #ede9fe; padding: 1px 6px; border-radius: 4px; }
.page-status-badge {
  font-size: 11px; padding: 2px 8px; border-radius: 20px; font-weight: 500; flex-shrink: 0;
}
.page-status-badge.published { background: #dcfce7; color: #15803d; }
.page-status-badge.draft { background: #fef9c3; color: #854d0e; }
.page-row-actions { display: flex; gap: 6px; flex-shrink: 0; }

/* ── Page Type Grid ── */
.page-type-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px;
}
.page-type-card {
  border: 2px solid #e2e8f0; border-radius: 10px; padding: 14px 10px;
  text-align: center; cursor: pointer; transition: all .2s;
}
.page-type-card:hover { border-color: #6366f1; background: #f5f3ff; transform: translateY(-2px); }
.page-type-card.selected { border-color: #6366f1; background: #ede9fe; }
.page-type-card-icon { font-size: 26px; margin-bottom: 6px; }
.page-type-card-label { font-size: 12px; font-weight: 600; color: #1e293b; }
.page-type-card-desc { font-size: 10px; color: #94a3b8; margin-top: 3px; line-height: 1.3; }

/* ── Page Editor (in modal) ── */
.modal-lg { max-width: 860px; width: 95vw; }
.modal-body { padding: 20px 24px; }
.page-editor-top { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-start; margin-bottom: 4px; }
.page-content-editor {
  width: 100%; min-height: 300px; font-family: 'Courier New', monospace;
  font-size: 12px; line-height: 1.6; resize: vertical; background: #0f172a; color: #e2e8f0;
  border-radius: 8px; padding: 14px;
}
.page-content-preview {
  min-height: 300px; border: 1px solid #e2e8f0; border-radius: 8px; padding: 20px;
  background: #fff; overflow-y: auto;
}
.page-ai-bar {
  display: flex; align-items: center; gap: 10px; padding: 10px 14px;
  background: #f5f3ff; border-radius: 8px;
  margin-bottom: 12px; flex-wrap: wrap;
}
.page-ai-label { font-size: 13px; font-weight: 600; color: #4f46e5; }

/* ── Menu Builder Layout ── */
.menu-builder-layout { display: grid; grid-template-columns: 300px 1fr; gap: 20px; }
.menu-available-list { display: flex; flex-direction: column; gap: 6px; max-height: 400px; overflow-y: auto; }
.menu-available-item {
  display: flex; align-items: center; gap: 8px; padding: 8px 12px;
  border: 1px solid #e2e8f0; border-radius: 8px; cursor: pointer;
  font-size: 13px; transition: all .15s; background: #fff;
}
.menu-available-item:hover { border-color: #6366f1; background: #f5f3ff; }
.menu-available-item.in-menu { opacity: 0.4; pointer-events: none; }
.menu-divider { font-size: 11px; font-weight: 600; color: #94a3b8; text-transform: uppercase; letter-spacing: .5px; margin: 14px 0 8px; }
.menu-custom-link-form { display: flex; flex-direction: column; gap: 6px; }

/* ── Menu Structure ── */
.menu-structure-list { min-height: 200px; display: flex; flex-direction: column; gap: 6px; }
.menu-empty-hint { text-align: center; color: #94a3b8; font-size: 13px; padding: 40px 20px; }
.menu-item-row {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; background: #f8fafc; border: 1px solid #e2e8f0;
  border-radius: 8px; cursor: grab; user-select: none;
  transition: all .15s;
}
.menu-item-row:hover { border-color: #6366f1; box-shadow: 0 2px 8px rgba(99,102,241,.1); }
.menu-item-row.dragging { opacity: .4; }
.menu-item-row.drag-over { border-color: #6366f1; background: #ede9fe; }
.menu-item-children { margin-left: 32px; display: flex; flex-direction: column; gap: 5px; margin-top: 5px; }
.menu-item-children .menu-item-row { background: #fff; font-size: 12px; }
.menu-item-drag { color: #cbd5e1; font-size: 14px; cursor: grab; }
.menu-item-icon { font-size: 16px; }
.menu-item-label { flex: 1; font-size: 13px; font-weight: 500; color: #1e293b; }
.menu-item-label input { border: none; background: transparent; font-size: 13px; font-weight: 500; width: 100%; outline: none; }
.menu-item-label input:focus { background: #fff; border-radius: 4px; padding: 2px 4px; }
.menu-item-url { font-size: 11px; color: #6366f1; }
.menu-item-actions { display: flex; gap: 4px; }
.menu-item-actions button { padding: 3px 7px; font-size: 11px; }
.menu-nest-drop {
  height: 6px; border-radius: 3px; background: #c7d2fe; margin: 0 8px;
  opacity: 0; transition: opacity .15s;
}
.menu-nest-drop.active { opacity: 1; }

/* ── Menu preview bar ── */
.menu-nav-preview { margin-top: 20px; border-top: 1px solid #e2e8f0; padding-top: 16px; }
.menu-preview-label { font-size: 11px; color: #94a3b8; text-transform: uppercase; letter-spacing: .5px; margin-bottom: 8px; }
.menu-preview-nav { display: flex; gap: 4px; flex-wrap: wrap; }
.menu-preview-nav a {
  padding: 6px 14px; background: #6366f1; color: #fff; border-radius: 20px;
  font-size: 12px; font-weight: 500; text-decoration: none;
}
.menu-preview-nav .has-children { position: relative; }
.menu-preview-nav .has-children::after { content: ' ▾'; font-size: 10px; }

/* ── Responsive ── */
@media (max-width: 860px) {
  .page-type-grid { grid-template-columns: repeat(2, 1fr); }
  .menu-builder-layout { grid-template-columns: 1fr; }
}

/* ════════════════════════════════════════════
   FULL-SCREEN PAGE EDITOR  (.pge-*)
   ════════════════════════════════════════════ */

/* Overlay covers everything */
.pge-overlay {
  position: fixed; inset: 0; z-index: 9000;
  background: #f1f5f9; display: flex; flex-direction: column;
  font-family: 'Inter', sans-serif;
}

/* ── Top Bar ── */
.pge-topbar {
  height: 56px; background: #fff; border-bottom: 1px solid #e2e8f0;
  display: flex; align-items: center; padding: 0 16px; gap: 12px;
  box-shadow: 0 1px 4px rgba(0,0,0,.06); flex-shrink: 0; z-index: 10;
}
.pge-back-btn {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: 8px; border: 1px solid #e2e8f0;
  background: #fff; cursor: pointer; font-size: 13px; font-weight: 500;
  color: #475569; transition: all .15s; white-space: nowrap;
}
.pge-back-btn:hover { background: #f8fafc; border-color: #cbd5e1; }
.pge-back-arrow { font-size: 16px; line-height: 1; }
.pge-topbar-center {
  flex: 1; display: flex; align-items: center; gap: 10px; min-width: 0;
}
.pge-page-type-badge {
  font-size: 12px; padding: 3px 10px; border-radius: 20px;
  background: #ede9fe; color: #6d28d9; font-weight: 600; white-space: nowrap;
}
.pge-title-input {
  flex: 1; border: none; outline: none; font-size: 18px; font-weight: 700;
  color: #1e293b; background: transparent; min-width: 0;
}
.pge-title-input::placeholder { color: #cbd5e1; }
.pge-topbar-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.pge-save-status { font-size: 12px; color: #94a3b8; }
.pge-btn-ghost {
  padding: 7px 16px; border-radius: 8px; border: 1px solid #e2e8f0;
  background: #fff; cursor: pointer; font-size: 13px; font-weight: 500; color: #475569;
  transition: all .15s;
}
.pge-btn-ghost:hover { background: #f1f5f9; }
.pge-btn-publish {
  padding: 7px 18px; border-radius: 8px; border: none;
  background: #6366f1;
  color: #fff; cursor: pointer; font-size: 13px; font-weight: 600;
  transition: all .2s; box-shadow: 0 2px 8px rgba(99,102,241,.35);
}
.pge-btn-publish:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(99,102,241,.45); }

/* ── Type chooser (Step 1) ── */
.pge-type-chooser {
  flex: 1; display: flex; align-items: center; justify-content: center;
  padding: 40px 20px; overflow-y: auto;
}
.pge-type-chooser-inner { max-width: 820px; width: 100%; text-align: center; }
.pge-type-chooser-title { font-size: 26px; font-weight: 800; color: #1e293b; margin-bottom: 8px; }
.pge-type-chooser-sub { font-size: 14px; color: #64748b; margin-bottom: 32px; }
.pge-type-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px;
}
.pge-type-card {
  background: #fff; border: 2px solid #e2e8f0; border-radius: 14px;
  padding: 22px 14px; cursor: pointer; transition: all .2s; text-align: center;
}
.pge-type-card:hover { border-color: #6366f1; box-shadow: 0 8px 24px rgba(99,102,241,.15); transform: translateY(-3px); }
.pge-type-card.selected { border-color: #6366f1; background: #f5f3ff; }
.pge-type-card-icon { font-size: 32px; margin-bottom: 10px; display: block; }
.pge-type-card-label { font-size: 13px; font-weight: 700; color: #1e293b; margin-bottom: 4px; }
.pge-type-card-desc { font-size: 11px; color: #94a3b8; line-height: 1.4; }

/* ── Split Editor (Step 2) ── */
.pge-split-editor {
  flex: 1; display: flex; min-height: 0; overflow: hidden;
}

/* ── Left Panel ── */
.pge-left-panel {
  width: 300px; flex-shrink: 0; background: #fff;
  border-right: 1px solid #e2e8f0; display: flex; flex-direction: column;
  overflow: hidden;
}
.pge-left-tabs {
  display: flex; border-bottom: 1px solid #e2e8f0; flex-shrink: 0;
}
.pge-tab {
  flex: 1; padding: 10px 6px; font-size: 12px; font-weight: 600;
  border: none; background: transparent; cursor: pointer; color: #94a3b8;
  border-bottom: 2px solid transparent; transition: all .15s;
}
.pge-tab.active { color: #6366f1; border-bottom-color: #6366f1; background: #fafafa; }
.pge-tab-panel { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.pge-tab-panel.hidden { display: none; }

/* Settings fields */
.pge-field { display: flex; flex-direction: column; gap: 5px; }
.pge-label { font-size: 12px; font-weight: 600; color: #475569; }
.pge-hint { font-weight: 400; color: #94a3b8; font-size: 11px; }
.pge-input {
  padding: 8px 10px; border: 1px solid #e2e8f0; border-radius: 8px;
  font-size: 13px; font-family: inherit; background: #f8fafc;
  transition: border-color .15s; color: #1e293b;
}
.pge-input:focus { outline: none; border-color: #6366f1; background: #fff; }
.pge-slug-row { display: flex; align-items: center; gap: 4px; }
.pge-slug-prefix { font-size: 13px; color: #94a3b8; font-family: monospace; }
.pge-slug-row .pge-input { flex: 1; font-family: monospace; }
.pge-meta-input { resize: none; }
.pge-char-count { font-size: 11px; color: #94a3b8; text-align: right; }
.pge-action-btn {
  padding: 8px 14px; border: 1px solid #e2e8f0; border-radius: 8px;
  background: #f8fafc; cursor: pointer; font-size: 12px; font-weight: 500;
  color: #475569; transition: all .15s; text-align: left;
}
.pge-action-btn:hover { border-color: #6366f1; background: #f5f3ff; color: #6366f1; }

/* AI panel in left sidebar */
.pge-ai-panel {
  background: #f5f3ff;
  border: 1px solid #c4b5fd; border-radius: 12px; padding: 14px;
  margin-top: auto;
}
.pge-ai-header { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.pge-ai-icon { font-size: 18px; }
.pge-ai-title { font-size: 13px; font-weight: 700; color: #5b21b6; }
.pge-ai-gen-btn {
  width: 100%; padding: 10px; border: none; border-radius: 8px;
  background: #7c3aed;
  color: #fff; font-size: 13px; font-weight: 600; cursor: pointer;
  transition: all .2s; box-shadow: 0 2px 8px rgba(124,58,237,.3);
}
.pge-ai-gen-btn:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(124,58,237,.4); }
.pge-ai-gen-btn:disabled { opacity: .6; transform: none; cursor: wait; }
.pge-gen-status { font-size: 12px; color: #7c3aed; margin-top: 8px; min-height: 16px; text-align: center; }

/* Block Library */
.pge-block-intro { font-size: 12px; color: #64748b; }
.pge-block-grid { display: flex; flex-direction: column; gap: 6px; }
.pge-block-item {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px;
  border: 1px solid #e2e8f0; border-radius: 10px; cursor: pointer;
  background: #fff; transition: all .15s;
}
.pge-block-item:hover { border-color: #6366f1; background: #f5f3ff; transform: translateX(3px); }
.pge-block-item-icon { font-size: 18px; width: 28px; text-align: center; flex-shrink: 0; }
.pge-block-item-info { flex: 1; }
.pge-block-item-name { font-size: 12px; font-weight: 600; color: #1e293b; }
.pge-block-item-desc { font-size: 11px; color: #94a3b8; }

/* Code editor tab */
.pge-code-toolbar {
  display: flex; align-items: center; gap: 8px; margin-bottom: 8px; flex-shrink: 0;
}
.pge-code-btn {
  padding: 5px 10px; border: 1px solid #e2e8f0; border-radius: 6px;
  background: #fff; cursor: pointer; font-size: 11px; color: #475569;
  transition: all .15s;
}
.pge-code-btn:hover { border-color: #6366f1; color: #6366f1; }
.pge-word-count { font-size: 11px; color: #94a3b8; margin-left: auto; }
.pge-code-editor {
  flex: 1; width: 100%; min-height: 0; border: 1px solid #1e293b;
  border-radius: 10px; padding: 14px; font-family: 'Courier New', monospace;
  font-size: 11.5px; line-height: 1.7; background: #0f172a; color: #a5f3fc;
  resize: none; outline: none; flex-grow: 1;
}
#pgeTab_code { flex: 1; overflow: hidden; }

/* ── Preview Panel ── */
.pge-preview-panel {
  flex: 1; display: flex; flex-direction: column; background: #e2e8f0;
  overflow: hidden;
}
.pge-preview-topbar {
  height: 44px; background: #fff; border-bottom: 1px solid #e2e8f0;
  display: flex; align-items: center; padding: 0 14px; gap: 10px; flex-shrink: 0;
}
.pge-preview-devices { display: flex; gap: 4px; }
.pge-dev-btn {
  width: 32px; height: 28px; border: 1px solid #e2e8f0; border-radius: 6px;
  background: #fff; cursor: pointer; font-size: 14px; transition: all .15s;
}
.pge-dev-btn.active { border-color: #6366f1; background: #ede9fe; }
.pge-preview-label { flex: 1; text-align: center; font-size: 12px; font-weight: 600; color: #64748b; }
.pge-preview-wrap {
  flex: 1; display: flex; align-items: flex-start; justify-content: center;
  padding: 20px; overflow: auto;
}
.pge-preview-frame {
  background: #fff; border: none; border-radius: 12px;
  box-shadow: 0 8px 40px rgba(0,0,0,.18); transition: width .3s ease;
  height: calc(100vh - 160px); min-height: 500px;
}
.pge-preview-frame.desktop { width: 100%; }
.pge-preview-frame.tablet  { width: 768px; }
.pge-preview-frame.mobile  { width: 390px; }

/* Responsive */
@media (max-width: 900px) {
  .pge-left-panel { width: 260px; }
  .pge-type-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 680px) {
  .pge-split-editor { flex-direction: column; }
  .pge-left-panel { width: 100%; height: 300px; border-right: none; border-bottom: 1px solid #e2e8f0; }
}

/* ════════════════════════════════════════════
   PROJECTS SYSTEM
   ════════════════════════════════════════════ */

/* ── Projects Hero ── */
.prj-hero {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 28px; flex-wrap: wrap; gap: 16px;
}
.prj-hero-title { font-size: 28px; font-weight: 800; color: #1e293b; margin: 0 0 6px; }
.prj-hero-sub { font-size: 14px; color: #64748b; margin: 0; }
.prj-new-btn {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 22px; background: #6366f1;
  color: #fff; border: none; border-radius: 10px; font-size: 14px; font-weight: 700;
  cursor: pointer; transition: all .2s; box-shadow: 0 4px 16px rgba(99,102,241,.35);
}
.prj-new-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(99,102,241,.45); }
.prj-new-icon { font-size: 16px; }

/* ── Projects Grid ── */
.prj-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 20px;
}
.prj-empty-state {
  grid-column: 1/-1; text-align: center; padding: 80px 40px;
  background: #fff; border-radius: 16px; border: 2px dashed #e2e8f0;
}
.prj-empty-state h3 { font-size: 20px; color: #1e293b; margin-bottom: 8px; }
.prj-empty-state p { color: #64748b; margin-bottom: 24px; }
.prj-empty-icon { font-size: 48px; margin-bottom: 16px; }

/* ── Project Card ── */
.prj-card {
  background: #fff; border-radius: var(--radius-lg); border: 1px solid var(--border);
  overflow: hidden; cursor: pointer; transition: var(--transition);
  box-shadow: var(--shadow-sm);
}
.prj-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: #c7d2fe; }
.prj-card-banner {
  height: 100px; position: relative; overflow: hidden;
  display: flex; align-items: flex-end; padding: 14px 18px;
}
.prj-card-theme-dots {
  display: flex; gap: 6px;
}
.prj-card-dot { width: 14px; height: 14px; border-radius: 50%; border: 2px solid rgba(255,255,255,.4); }
.prj-card-body { padding: 18px 20px; }
.prj-card-name { font-size: 17px; font-weight: 700; color: #1e293b; margin-bottom: 4px; }
.prj-card-niche { font-size: 12px; color: #6366f1; background: #ede9fe; padding: 2px 8px; border-radius: 20px; display: inline-block; margin-bottom: 12px; }
.prj-card-meta { display: flex; gap: 14px; font-size: 12px; color: #94a3b8; margin-bottom: 14px; }
.prj-card-meta span { display: flex; align-items: center; gap: 4px; }
.prj-card-footer { display: flex; gap: 8px; padding-top: 12px; border-top: 1px solid #f1f5f9; }
.prj-card-badge {
  font-size: 11px; padding: 3px 8px; border-radius: 20px; font-weight: 600;
}
.prj-card-badge.active { background: #dcfce7; color: #15803d; }
.prj-card-btn {
  flex: 1; padding: 8px; border: 1px solid #e2e8f0; border-radius: 8px;
  background: #fff; font-size: 12px; font-weight: 600; cursor: pointer;
  transition: all .15s; color: #475569;
}
.prj-card-btn:hover { border-color: #6366f1; color: #6366f1; background: #f5f3ff; }
.prj-card-btn.primary { background: #6366f1; color: #fff; border-color: #6366f1; }
.prj-card-btn.primary:hover { background: #4f46e5; }
.prj-card-btn.danger { background: #fff; color: #94a3b8; border-color: #e2e8f0; flex: 0; padding: 8px 10px; }
.prj-card-btn.danger:hover { background: #fee2e2; color: #ef4444; border-color: #fca5a5; }

/* ── Project Editor Overlay ── */
.pe-overlay {
  position: fixed; inset: 0; z-index: 2000;
  background: var(--bg); overflow-y: auto;
}
.pe-container { max-width: 1000px; margin: 0 auto; padding: 20px 24px 60px; }
.pe-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 20px; flex-wrap: wrap; gap: 12px;
}
.pe-header-left { display: flex; align-items: center; gap: 14px; }
.pe-header-left h2 { font-size: 20px; font-weight: 800; color: var(--text); margin: 0; }
.pe-header-right { display: flex; gap: 8px; }
.pe-nav {
  display: flex; gap: 4px; background: var(--surface); border: 1.5px solid var(--border);
  border-radius: var(--radius); padding: 6px; margin-bottom: 20px; overflow-x: auto;
}
.pe-nav-item {
  display: flex; align-items: center; gap: 6px;
  padding: 10px 16px; border: none; background: transparent;
  border-radius: var(--radius-sm); cursor: pointer;
  font-size: 13px; font-weight: 600; color: var(--text-muted);
  transition: all .2s; white-space: nowrap;
}
.pe-nav-item:hover { background: #f5f3ff; color: #4338ca; }
.pe-nav-item.active {
  background: #6366f1; color: #fff;
  box-shadow: 0 2px 8px rgba(99,102,241,.3);
}
.pe-nav-icon { font-size: 15px; }
.pe-body { }
.pe-panel { animation: fadeIn .2s; }
.pe-theme-card {
  display: flex; align-items: center; gap: 16px; padding: 14px;
  background: #f8fafc; border-radius: 10px;
}
.pe-theme-preview {
  width: 80px; height: 50px; border-radius: 8px; flex-shrink: 0;
}
.pe-page-item {
  display: flex; align-items: center; gap: 10px; padding: 10px 14px;
  border-bottom: 1px solid #f1f5f9;
}
.pe-page-item:last-child { border-bottom: none; }
.pe-page-icon { font-size: 18px; flex-shrink: 0; }
.pe-page-info { flex: 1; }
.pe-page-title { font-size: 13px; font-weight: 600; color: var(--text); }
.pe-page-meta { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.pe-page-meta a { color: #6366f1; }
.pe-page-status {
  font-size: 10px; font-weight: 700; padding: 2px 8px; border-radius: 8px;
  text-transform: uppercase;
}
.pe-page-status.published { background: #d1fae5; color: #065f46; }
.pe-page-status.draft { background: #fef3c7; color: #92400e; }
.pe-silo-item {
  padding: 12px 14px; border: 1px solid #e2e8f0; border-radius: 10px;
  margin-bottom: 8px; background: #fff;
}
.pe-silo-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.pe-silo-desc { font-size: 12px; color: #64748b; margin-bottom: 6px; }
.pe-silo-chips { display: flex; flex-wrap: wrap; gap: 4px; }
/* Silo card in project editor */
.pe-silo-card { border: 1.5px solid var(--border); border-radius: var(--radius); overflow: hidden; margin-bottom: 8px; }
.pe-silo-card-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 14px; cursor: pointer; background: var(--surface-raised, #f8fafc);
  transition: background 0.15s;
}
.pe-silo-card-header:hover { background: rgba(99,102,241,0.04); }
.pe-silo-card-body { border-top: 1px solid var(--border); }
.pe-silo-topics { display: flex; flex-direction: column; }
.pe-silo-topic-row {
  display: flex; align-items: center; gap: 10px; padding: 6px 12px;
  border-bottom: 1px solid var(--border);
}
.pe-silo-topic-row:last-child { border-bottom: none; }
.pe-topic-bullet {
  width: 20px; height: 20px; border-radius: 50%; display: flex; align-items: center;
  justify-content: center; font-size: 10px; font-weight: 700; flex-shrink: 0;
  background: rgba(59,130,246,0.12); color: var(--info, #3b82f6);
}
.pe-design-summary {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px;
}
.pe-post-item {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 14px; border-bottom: 1px solid #f1f5f9;
}
.pe-post-item:last-child { border-bottom: none; }
.pe-post-title { font-size: 13px; font-weight: 600; color: var(--text); }
.pe-post-meta { display: flex; gap: 8px; align-items: center; font-size: 11px; color: var(--text-muted); }
.pe-post-badge {
  font-size: 10px; font-weight: 700; padding: 2px 8px; border-radius: 8px;
  background: #e0e7ff; color: #4338ca; text-transform: uppercase;
}

/* ── Project Detail ── */
.prj-progress-wrap {
  background: #fff; border-radius: 14px; padding: 20px 24px;
  margin-bottom: 20px; border: 1px solid #e2e8f0;
}
.prj-progress-header { display: flex; justify-content: space-between; font-size: 13px; font-weight: 600; color: #1e293b; margin-bottom: 10px; }
.prj-progress-bar-bg { background: #f1f5f9; border-radius: 10px; height: 8px; overflow: hidden; margin-bottom: 12px; }
.prj-progress-bar-fill { height: 100%; background: #6366f1; border-radius: 10px; transition: width .4s ease; }
.prj-progress-log { display: flex; flex-direction: column; gap: 4px; max-height: 120px; overflow-y: auto; }
.prj-progress-log-item { font-size: 12px; color: #64748b; padding: 3px 0; }
.prj-progress-log-item.done { color: #059669; }
.prj-progress-log-item.error { color: #dc2626; }

.prj-page-checks { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; padding: 16px 20px; }
.prj-page-check-item {
  display: flex; align-items: center; gap: 10px; padding: 10px 14px;
  border: 1.5px solid #e2e8f0; border-radius: 10px; cursor: pointer;
  transition: all .15s; background: #fff;
}
.prj-page-check-item:hover { border-color: #6366f1; background: #f5f3ff; }
.prj-page-check-item.checked { border-color: #6366f1; background: #ede9fe; }
.prj-page-check-item input { display: none; }
.prj-page-check-icon { font-size: 20px; }
.prj-page-check-info { flex: 1; }
.prj-page-check-label { font-size: 13px; font-weight: 600; color: #1e293b; }
.prj-page-check-desc { font-size: 11px; color: #94a3b8; }
.prj-page-check-tick { font-size: 16px; color: #6366f1; opacity: 0; transition: opacity .15s; }
.prj-page-check-item.checked .prj-page-check-tick { opacity: 1; }
.prj-divider { font-size: 12px; font-weight: 700; color: #94a3b8; text-transform: uppercase; letter-spacing: .5px; margin: 16px 20px 0; }

/* ═══════════════════════════════════════════
   PROJECT WIZARD
   ═══════════════════════════════════════════ */
.prj-wizard-overlay {
  position: fixed; inset: 0; background: rgba(15,23,42,.6); z-index: 9500;
  display: flex; align-items: center; justify-content: center; padding: 20px;
  backdrop-filter: blur(4px);
}
.prj-wizard-box {
  background: #fff; border-radius: 20px; width: 100%; max-width: 760px;
  max-height: 90vh; display: flex; flex-direction: column;
  box-shadow: 0 24px 80px rgba(0,0,0,.25);
}
.prj-wizard-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 24px 28px 20px; border-bottom: 1px solid #f1f5f9;
}
.prj-wizard-steps { display: flex; align-items: center; gap: 0; }
.prj-wizard-step {
  display: flex; align-items: center; gap: 8px; padding: 6px 14px;
  border-radius: 20px; transition: all .2s;
}
.prj-wizard-step.active .prj-step-num {
  background: #6366f1; color: #fff;
}
.prj-wizard-step.done .prj-step-num { background: #10b981; color: #fff; }
.prj-step-num {
  width: 26px; height: 26px; border-radius: 50%; background: #e2e8f0;
  color: #94a3b8; font-size: 12px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.prj-step-label { font-size: 13px; font-weight: 600; color: #64748b; }
.prj-wizard-step.active .prj-step-label { color: #6366f1; }
.prj-wizard-step-line { width: 32px; height: 2px; background: #e2e8f0; }

.prj-wizard-panel { flex: 1; overflow-y: auto; padding: 28px; }
.prj-wizard-title { font-size: 22px; font-weight: 800; color: #1e293b; margin-bottom: 6px; }
.prj-wizard-sub { font-size: 14px; color: #64748b; margin-bottom: 24px; }
.prj-wizard-form { display: flex; flex-direction: column; gap: 16px; }
.prj-wizard-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.prj-wizard-field { display: flex; flex-direction: column; gap: 6px; }
.prj-wizard-label { font-size: 13px; font-weight: 600; color: #374151; }
.prj-wizard-input {
  padding: 10px 14px; border: 1.5px solid #e2e8f0; border-radius: 10px;
  font-size: 14px; font-family: inherit; transition: border-color .15s;
}
.prj-wizard-input:focus { outline: none; border-color: #6366f1; }
.prj-wizard-input::placeholder { color: #cbd5e1; }

/* Theme Grid */
.prj-theme-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.prj-theme-card {
  border: 2.5px solid #e2e8f0; border-radius: 14px; overflow: hidden;
  cursor: pointer; transition: all .2s; background: #fff;
}
.prj-theme-card:hover { border-color: #a5b4fc; transform: translateY(-2px); box-shadow: 0 8px 20px rgba(99,102,241,.15); }
.prj-theme-card.selected { border-color: #6366f1; box-shadow: 0 0 0 3px rgba(99,102,241,.2); }
.prj-theme-preview {
  height: 90px; position: relative; padding: 12px;
  display: flex; flex-direction: column; gap: 6px;
}
.prj-theme-preview-bar {
  height: 12px; border-radius: 4px; background: rgba(255,255,255,.9);
}
.prj-theme-preview-bar:nth-child(1) { width: 40%; }
.prj-theme-preview-bar:nth-child(2) { width: 70%; height: 8px; }
.prj-theme-preview-bar:nth-child(3) { width: 55%; height: 8px; }
.prj-theme-preview-dots { display: flex; gap: 4px; margin-top: auto; }
.prj-theme-preview-dot { width: 10px; height: 10px; border-radius: 50%; }
.prj-theme-info { padding: 10px 14px 14px; }
.prj-theme-emoji { font-size: 18px; }
.prj-theme-name { font-size: 14px; font-weight: 700; color: #1e293b; }
.prj-theme-desc { font-size: 11px; color: #94a3b8; margin-top: 2px; }
.prj-theme-best { font-size: 10px; color: #6366f1; margin-top: 4px; }
.prj-theme-check { display: none; }
.prj-theme-card.selected .prj-theme-check { display: block; position: absolute; top: 8px; right: 8px; background: #6366f1; color: #fff; border-radius: 50%; width: 22px; height: 22px; font-size: 12px; line-height: 22px; text-align: center; }

/* Page picks */
.prj-page-picks { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.prj-page-pick {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 14px 10px; border: 2px solid #e2e8f0; border-radius: 12px;
  cursor: pointer; transition: all .15s; text-align: center; background: #fff;
}
.prj-page-pick:hover { border-color: #a5b4fc; background: #f5f3ff; }
.prj-page-pick.selected { border-color: #6366f1; background: #ede9fe; }
.prj-page-pick-icon { font-size: 24px; }
.prj-page-pick-name { font-size: 12px; font-weight: 700; color: #1e293b; }
.prj-page-pick-desc { font-size: 10px; color: #94a3b8; }

/* Wizard footer */
.prj-wizard-footer {
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px 28px; border-top: 1px solid #f1f5f9; flex-shrink: 0;
}
.prj-btn-ghost {
  padding: 9px 20px; border: 1.5px solid #e2e8f0; border-radius: 10px;
  background: #fff; cursor: pointer; font-size: 14px; font-weight: 500; color: #475569;
  transition: all .15s;
}
.prj-btn-ghost:hover { border-color: #6366f1; color: #6366f1; }
.prj-btn-primary {
  padding: 10px 24px; background: #6366f1;
  color: #fff; border: none; border-radius: 10px; font-size: 14px; font-weight: 700;
  cursor: pointer; transition: all .2s; box-shadow: 0 4px 14px rgba(99,102,241,.35);
}
.prj-btn-primary:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(99,102,241,.45); }
.prj-btn-primary:disabled { opacity: .6; transform: none; cursor: wait; }

/* ════════════════════════════════════════════════════════════════
   CONTENT PIPELINE
   ════════════════════════════════════════════════════════════════ */

.pipeline-toolbar {
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 12px; margin-bottom: 20px;
  background: #fff; border: 1px solid #e2e8f0; border-radius: 12px;
  padding: 12px 16px;
}
.pipeline-batch-actions {
  display: flex; gap: 6px; align-items: center;
  background: #ede9fe; border-radius: 8px; padding: 6px 10px;
}
.pipeline-board {
  display: flex; gap: 14px; overflow-x: auto; padding-bottom: 16px;
  align-items: flex-start; min-height: 500px;
}
.pipeline-col {
  flex: 0 0 220px; display: flex; flex-direction: column;
  background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 14px;
  min-height: 400px; overflow: hidden;
}
.pipeline-col-header {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 14px; font-weight: 700; font-size: 13px;
  border-bottom: 2px solid transparent;
}
.pipeline-col-header.research  { background: #fff7ed; border-color: #fb923c; color: #9a3412; }
.pipeline-col-header.outline   { background: #eff6ff; border-color: #3b82f6; color: #1e40af; }
.pipeline-col-header.write     { background: #f0fdf4; border-color: #22c55e; color: #166534; }
.pipeline-col-header.linked    { background: #faf5ff; border-color: #a855f7; color: #6b21a8; }
.pipeline-col-header.published { background: #ecfdf5; border-color: #10b981; color: #064e3b; }
.pipeline-col-icon { font-size: 16px; }
.pipeline-col-title { flex: 1; }
.pipeline-col-count {
  background: rgba(0,0,0,.08); color: inherit; border-radius: 10px;
  padding: 1px 8px; font-size: 11px; font-weight: 700;
}
.pipeline-col-body {
  flex: 1; padding: 10px; display: flex; flex-direction: column; gap: 8px;
  overflow-y: auto; max-height: 600px;
}
.pipeline-empty {
  color: #94a3b8; font-size: 12px; text-align: center; padding: 30px 10px;
}
.pipeline-add-btn {
  width: 100%; padding: 8px; background: none; border: none;
  border-top: 1px solid #e2e8f0; color: #6366f1; font-size: 12px;
  font-weight: 600; cursor: pointer; transition: background .15s;
}
.pipeline-add-btn:hover { background: #f5f3ff; }

/* Pipeline cards */
.pipeline-card {
  background: #fff; border: 1.5px solid #e2e8f0; border-radius: 10px;
  padding: 10px 12px; transition: all .15s; cursor: default;
}
.pipeline-card:hover { border-color: #a5b4fc; box-shadow: 0 2px 8px rgba(99,102,241,.12); }
.pipeline-card.selected { border-color: #6366f1; background: #ede9fe; }
.pipeline-card-header {
  display: flex; align-items: flex-start; gap: 8px; margin-bottom: 6px;
}
.pipeline-check { flex-shrink: 0; margin-top: 2px; accent-color: #6366f1; }
.pipeline-card-title {
  flex: 1; font-size: 12px; font-weight: 600; color: #1e293b;
  line-height: 1.4; cursor: pointer;
}
.pipeline-card-title:hover { color: #6366f1; }
.pipeline-card-menu { display: flex; gap: 2px; flex-shrink: 0; }
.pipeline-card-action {
  background: none; border: none; cursor: pointer; font-size: 12px;
  padding: 2px 4px; border-radius: 4px; opacity: 0.5; transition: opacity .15s;
}
.pipeline-card-action:hover { opacity: 1; background: #f1f5f9; }
.pipeline-card-action.danger:hover { background: #fee2e2; }
.pipeline-card-meta {
  display: flex; gap: 5px; flex-wrap: wrap; margin-bottom: 8px;
}
.pipeline-card-badge {
  background: #f1f5f9; color: #475569; font-size: 10px; font-weight: 600;
  padding: 1px 7px; border-radius: 6px;
}
.pipeline-card-badge.cat { background: #e0e7ff; color: #4338ca; }
.pipeline-card-badge.published { background: #d1fae5; color: #065f46; }
.pipeline-card-date { font-size: 10px; color: #94a3b8; margin-left: auto; }
.pipeline-card-footer { display: flex; gap: 6px; }
.pipeline-stage-btn {
  flex: 1; padding: 5px 8px; border: none; border-radius: 6px;
  font-size: 11px; font-weight: 700; cursor: pointer; transition: all .15s;
  background: #6366f1; color: #fff;
}
.pipeline-stage-btn:hover { background: #4f46e5; }
.pipeline-stage-btn.generate { background: #f59e0b; }
.pipeline-stage-btn.generate:hover { background: #d97706; }
.pipeline-stage-btn.secondary { background: #e0e7ff; color: #4338ca; }
.pipeline-stage-btn.secondary:hover { background: #c7d2fe; }

/* Batch generate progress */
.bg-progress-wrap {
  background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 10px;
  padding: 14px; margin-top: 16px;
}
.bg-progress-header {
  display: flex; justify-content: space-between; font-size: 13px;
  font-weight: 600; color: #1e293b; margin-bottom: 8px;
}

/* Modal two-column layout */
.modal-two-col {
  display: grid; grid-template-columns: 1fr 1fr; gap: 14px;
}

/* Categories */
.category-row {
  display: flex; align-items: center; gap: 12px; padding: 10px 16px;
  border-bottom: 1px solid #f1f5f9;
}
.category-row:last-child { border-bottom: none; }
.category-dot {
  width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0;
}
.category-info { flex: 1; }
.category-name { font-size: 14px; font-weight: 600; color: #1e293b; }
.category-slug { font-size: 11px; color: #94a3b8; margin-left: 8px; }
.category-desc { display: block; font-size: 12px; color: #64748b; margin-top: 2px; }
.category-actions { display: flex; gap: 4px; }

/* Site settings code textarea */
.code-textarea {
  font-family: 'Fira Code', 'Courier New', monospace;
  font-size: 12px; line-height: 1.6; resize: vertical;
  background: #0f172a; color: #e2e8f0;
}
.form-hint {
  display: block; font-size: 11px; color: #94a3b8; font-weight: 400; margin-top: 2px;
}

/* Pipeline log items */
.prj-log-item { font-size: 11px; padding: 3px 6px; border-radius: 4px; margin-bottom: 2px; }
.prj-log-item.success { background: #d1fae5; color: #065f46; }
.prj-log-item.warn    { background: #fef9c3; color: #854d0e; }
.prj-log-item.error   { background: #fee2e2; color: #991b1b; }

/* ─── Post Type Grid ─────────────────────────────────────────────── */
.post-type-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 6px;
}
.post-type-card {
  background: #f8fafc; border: 1.5px solid #e2e8f0; border-radius: 10px;
  padding: 10px 8px; cursor: pointer; transition: all .15s; text-align: center;
}
.post-type-card:hover { border-color: #a5b4fc; background: #f5f3ff; }
.post-type-card.selected {
  border-color: #6366f1; background: #ede9fe;
  box-shadow: 0 0 0 3px rgba(99,102,241,.15);
}
.post-type-icon { font-size: 22px; display: block; margin-bottom: 4px; }
.post-type-label {
  font-size: 10px; font-weight: 700; color: #475569; line-height: 1.3;
  display: block;
}
.post-type-card.selected .post-type-label { color: #4338ca; }

/* Wide article modal */
.art-modal-wide { max-width: 880px; }

/* ─── Affiliate Links Page ───────────────────────────────────────── */
.af-info-banner {
  background: #eef0ff;
  border: 1px solid #c7d2fe; border-radius: 12px;
  padding: 14px 18px; margin-bottom: 18px;
  display: flex; align-items: flex-start; gap: 12px;
}
.af-info-banner .banner-icon { font-size: 24px; flex-shrink: 0; margin-top: 2px; }
.af-info-banner .banner-body { flex: 1; }
.af-info-banner h4 { font-size: 14px; font-weight: 700; color: #4338ca; margin: 0 0 4px; }
.af-info-banner p { font-size: 12px; color: #4c1d95; margin: 0; line-height: 1.5; }

.af-stats {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 18px;
}
.af-stat-card {
  background: #fff; border: 1px solid #e2e8f0; border-radius: 10px;
  padding: 14px 16px; text-align: center;
}
.af-stat-card .stat-val { font-size: 28px; font-weight: 800; color: #6366f1; display: block; }
.af-stat-card .stat-lbl { font-size: 11px; color: #64748b; font-weight: 600; margin-top: 2px; }

.af-table-wrap {
  background: #fff; border: 1px solid #e2e8f0; border-radius: 12px; overflow: hidden;
}
.af-table-head {
  display: grid;
  grid-template-columns: 2fr 1.8fr .7fr .8fr .6fr .5fr .7fr;
  background: #f8fafc; padding: 10px 16px;
  border-bottom: 1px solid #e2e8f0;
  font-size: 11px; font-weight: 700; color: #64748b; text-transform: uppercase;
  letter-spacing: .5px;
}
.af-row {
  display: grid;
  grid-template-columns: 2fr 1.8fr .7fr .8fr .6fr .5fr .7fr;
  padding: 10px 16px; border-bottom: 1px solid #f1f5f9;
  align-items: center; transition: background .1s;
}
.af-row:last-child { border-bottom: none; }
.af-row:hover { background: #f8fafc; }
.af-name { font-size: 13px; font-weight: 600; color: #1e293b; }
.af-url-chip {
  font-size: 11px; color: #6366f1; background: #e0e7ff; padding: 2px 8px;
  border-radius: 20px; display: inline-block; max-width: 160px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.af-price-chip {
  font-size: 11px; font-weight: 700; color: #059669;
}
.af-cat-badge {
  font-size: 10px; font-weight: 700; background: #f1f5f9; color: #475569;
  padding: 2px 8px; border-radius: 20px;
}
.af-keywords { display: flex; flex-wrap: wrap; gap: 3px; }
.af-kw {
  font-size: 10px; background: #fef9c3; color: #854d0e;
  padding: 1px 6px; border-radius: 10px;
}

/* Toggle switch */
.af-toggle { position: relative; display: inline-block; width: 36px; height: 20px; }
.af-toggle input { opacity: 0; width: 0; height: 0; }
.af-toggle-slider {
  position: absolute; cursor: pointer; inset: 0;
  background: #cbd5e1; border-radius: 20px; transition: .25s;
}
.af-toggle-slider:before {
  content: ""; position: absolute;
  width: 14px; height: 14px; border-radius: 50%;
  background: #fff; left: 3px; bottom: 3px; transition: .25s;
}
.af-toggle input:checked + .af-toggle-slider { background: #6366f1; }
.af-toggle input:checked + .af-toggle-slider:before { transform: translateX(16px); }

.af-actions { display: flex; gap: 4px; }
.af-empty {
  padding: 40px 20px; text-align: center; color: #94a3b8;
  font-size: 14px;
}

/* Affiliate chips in article modal */
.af-preview-wrap {
  border: 1px solid #e2e8f0; border-radius: 8px; padding: 10px 12px;
  background: #f8fafc; min-height: 44px;
}
.af-preview-empty { font-size: 12px; color: #94a3b8; font-style: italic; }
.af-preview-chip {
  display: inline-flex; align-items: center; gap: 5px;
  background: #e0e7ff; color: #4338ca;
  font-size: 11px; font-weight: 600; padding: 3px 10px;
  border-radius: 20px; margin: 2px;
}
.af-preview-chip .chip-dot {
  width: 6px; height: 6px; border-radius: 50%; background: #6366f1;
}

/* ─── Wizard: 5-step stepper ─────────────────────────────────────── */
.prj-wizard-steps { flex-wrap: nowrap; }
.prj-step-label { font-size: 11px; }

/* ─── Wizard Step 3: Silo Architecture ────────────────────────────── */
.wiz-silo-header {
  display: flex; justify-content: space-between; align-items: flex-start; gap: 16px;
}
.wiz-silo-actions-bar {
  display: flex; justify-content: space-between; align-items: center;
  margin: 14px 0; padding: 10px 14px;
  background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 10px;
}
.wiz-silo-action-btns { display: flex; gap: 8px; }
.wiz-silo-action-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 14px; border: 1px solid #e2e8f0; border-radius: 8px;
  background: #fff; font-size: 12px; font-weight: 700; color: #475569;
  cursor: pointer; transition: all .15s; white-space: nowrap;
}
.wiz-silo-action-btn:hover { border-color: #a5b4fc; background: #f5f3ff; color: #4338ca; }
.wiz-silo-action-btn.primary {
  background: #6366f1; color: #fff; border-color: transparent;
}
.wiz-silo-action-btn.primary:hover { background: #4f46e5; }
.wiz-silo-action-btn.accent {
  background: #f59e0b; color: #fff; border-color: transparent;
}
.wiz-silo-action-btn.accent:hover { background: #d97706; }

.wiz-manual-silo-form {
  background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 10px;
  padding: 14px; margin-bottom: 12px;
}

/* Loading spinner */
.wiz-silo-loading {
  text-align: center; padding: 40px 20px;
}
.wiz-silo-loading p { font-size: 14px; color: #6366f1; font-weight: 600; margin-top: 12px; }
.wiz-silo-spinner {
  width: 36px; height: 36px; border: 3px solid #e2e8f0; border-top-color: #6366f1;
  border-radius: 50%; animation: wizSpin .7s linear infinite; margin: 0 auto;
}
@keyframes wizSpin { to { transform: rotate(360deg); } }

/* Silo architecture container */
.wiz-silo-architecture {
  max-height: 420px; overflow-y: auto; padding-right: 4px;
}
.wiz-silo-empty {
  text-align: center; padding: 40px 20px; color: #94a3b8;
}
.wiz-silo-empty h3 { font-size: 16px; }
.wiz-silo-empty p { font-size: 13px; line-height: 1.6; }

/* Individual silo card */
.wiz-silo-card {
  border: 1.5px solid #e2e8f0; border-radius: 12px;
  margin-bottom: 12px; overflow: hidden; transition: all .15s;
  background: #fff;
}
.wiz-silo-card:hover { border-color: #c7d2fe; box-shadow: 0 2px 8px rgba(99,102,241,.08); }
.wiz-silo-card.deselected { opacity: .5; }
.wiz-silo-card-header { padding: 14px 16px 10px; cursor: pointer; }
.wiz-silo-card-info { flex: 1; }
.wiz-silo-card-title-row {
  display: flex; align-items: center; gap: 10px; margin-bottom: 4px;
}
.wiz-silo-card-title {
  font-size: 16px; font-weight: 800; color: #1e293b; flex: 1;
}
.wiz-silo-article-count {
  background: #d1fae5; color: #065f46; font-size: 11px; font-weight: 700;
  padding: 2px 10px; border-radius: 20px; white-space: nowrap;
}
.wiz-silo-card-btn {
  background: none; border: 1px solid #e2e8f0; border-radius: 6px;
  font-size: 11px; padding: 3px 10px; cursor: pointer;
  color: #475569; font-weight: 600; transition: all .15s; white-space: nowrap;
}
.wiz-silo-card-btn.write { color: #6366f1; }
.wiz-silo-card-btn.write:hover { background: #ede9fe; border-color: #a5b4fc; }
.wiz-silo-card-btn.delete:hover { background: #fee2e2; border-color: #fca5a5; color: #ef4444; }
.wiz-silo-card-keyword {
  font-size: 12px; color: #6366f1; font-weight: 600; margin-bottom: 4px;
}
.wiz-silo-card-desc {
  font-size: 12px; color: #64748b; line-height: 1.5; margin-bottom: 4px;
}
.wiz-silo-card-affiliate {
  font-size: 12px; color: #059669; font-weight: 600;
}

/* Cluster topics section */
.wiz-silo-cluster {
  border-top: 1px solid #f1f5f9; padding: 10px 16px 14px;
  background: #fafbff;
}
.wiz-cluster-label {
  font-size: 11px; font-weight: 800; color: #64748b;
  text-transform: uppercase; letter-spacing: .5px; margin-bottom: 8px;
}
.wiz-cluster-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.wiz-cluster-chip {
  display: inline-flex; align-items: center; gap: 4px;
  background: #f1f5f9; border: 1px solid #e2e8f0; border-radius: 8px;
  padding: 4px 10px; font-size: 11px; color: #334155; font-weight: 500;
  cursor: default; transition: all .15s;
}
.wiz-cluster-chip:hover { border-color: #a5b4fc; background: #ede9fe; }

.wiz-silo-collapsed-hint {
  padding: 8px 16px; font-size: 12px; color: #6366f1; font-weight: 600;
  cursor: pointer; border-top: 1px solid #f1f5f9; background: #fafbff;
}
.wiz-silo-collapsed-hint:hover { background: #ede9fe; }

/* Template picker */
.wiz-template-picker { margin-bottom: 16px; }
.wiz-template-option {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; border: 1px solid #e2e8f0; border-radius: 10px;
  margin-bottom: 8px; cursor: pointer; transition: all .15s;
}
.wiz-template-option:hover { border-color: #6366f1; background: #f5f3ff; }

/* ─── Wizard Step 5: Blog Posts ──────────────────────────────────── */
.wiz-blog-wrap { margin-top: 8px; }
.wiz-blog-controls { margin-bottom: 12px; }
.wiz-blog-add-row {
  display: flex; gap: 8px; align-items: center; margin-bottom: 8px;
}
.wiz-blog-ai-row {
  display: flex; gap: 8px; align-items: center; flex-wrap: wrap;
}
.wiz-blog-toolbar {
  display: flex; align-items: center; gap: 12px;
  padding: 8px 14px; background: #f1f5f9; border-radius: 8px;
  margin-bottom: 8px; font-size: 12px;
}
.wiz-blog-selectall {
  display: flex; align-items: center; gap: 5px;
  font-weight: 600; color: #475569; cursor: pointer;
}
.wiz-blog-selectall input { accent-color: #6366f1; }
.wiz-blog-count { flex: 1; color: #6366f1; font-weight: 700; }

.wiz-blog-list {
  max-height: 300px; overflow-y: auto;
  border: 1px solid #e2e8f0; border-radius: 10px;
  background: #f8fafc;
}
.wiz-post-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 14px; border-bottom: 1px solid #e2e8f0;
  transition: background .15s;
}
.wiz-post-item:last-child { border-bottom: none; }
.wiz-post-item:hover { background: #f1f5f9; }
.wiz-post-item.selected { background: #ede9fe; }
.wiz-post-check { flex-shrink: 0; accent-color: #6366f1; }
.wiz-post-info { flex: 1; min-width: 0; }
.wiz-post-title {
  display: block; font-size: 13px; font-weight: 600; color: #1e293b;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.wiz-post-meta { display: flex; gap: 6px; margin-top: 3px; flex-wrap: wrap; }
.wiz-post-type-badge {
  font-size: 10px; font-weight: 700; background: #e0e7ff; color: #4338ca;
  padding: 1px 8px; border-radius: 20px;
}
.wiz-post-silo-badge {
  font-size: 10px; font-weight: 600; background: #fef9c3; color: #854d0e;
  padding: 1px 8px; border-radius: 20px;
}
.wiz-post-type-select {
  font-size: 11px; padding: 3px 6px; border: 1px solid #e2e8f0;
  border-radius: 6px; background: #fff; flex-shrink: 0; cursor: pointer;
  max-width: 120px;
}
.wiz-post-remove {
  background: none; border: none; color: #94a3b8; cursor: pointer;
  font-size: 14px; padding: 4px 6px; border-radius: 6px; transition: all .15s;
  flex-shrink: 0;
}
.wiz-post-remove:hover { color: #ef4444; background: #fee2e2; }
.wiz-blog-empty {
  text-align: center; padding: 40px 20px; color: #94a3b8;
}
.wiz-blog-empty p { font-size: 13px; margin-top: 8px; margin-bottom: 12px; }

/* ─── Silo Content Plan (Step 6) ─────────────────────────────── */
.wiz-silo-plan { display: flex; flex-direction: column; gap: 14px; }
.wiz-silo-plan-card {
  border: 1.5px solid var(--border); border-radius: var(--radius); overflow: hidden;
  background: var(--surface); transition: var(--transition);
}
.wiz-silo-plan-card:hover { border-color: #c7d2fe; }
.wiz-silo-plan-header {
  display: flex; align-items: center; gap: 10px; padding: 12px 16px;
  background: #f9fafb; border-bottom: 1px solid var(--border);
  cursor: pointer; user-select: none;
}
.wiz-silo-plan-header:hover { background: #f1f5f9; }
.wiz-silo-plan-toggle { font-size: 12px; color: #94a3b8; transition: transform .2s; }
.wiz-silo-plan-toggle.open { transform: rotate(90deg); }
.wiz-silo-plan-name { font-size: 14px; font-weight: 700; color: var(--text); flex: 1; }
.wiz-silo-plan-stats { font-size: 11px; color: var(--text-muted); display: flex; gap: 8px; }
.wiz-silo-plan-badge {
  font-size: 10px; font-weight: 700; padding: 2px 8px; border-radius: 20px;
}
.wiz-silo-plan-badge.pillar { background: #ede9fe; color: #6d28d9; }
.wiz-silo-plan-badge.cluster { background: #dbeafe; color: #1e40af; }
.wiz-silo-plan-body { padding: 0; }

/* Pillar Page Row */
.wiz-plan-pillar {
  display: flex; align-items: center; gap: 10px; padding: 10px 16px;
  background: #faf5ff; border-bottom: 1px solid #f1f5f9;
}
.wiz-plan-pillar-icon {
  width: 28px; height: 28px; border-radius: 8px; background: #8b5cf6;
  color: #fff; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700;
  flex-shrink: 0;
}
.wiz-plan-pillar-info { flex: 1; min-width: 0; }
.wiz-plan-pillar-title { font-size: 13px; font-weight: 700; color: #1e293b; }
.wiz-plan-pillar-kw { font-size: 11px; color: #7c3aed; }
.wiz-plan-pillar-check { accent-color: #8b5cf6; width: 16px; height: 16px; flex-shrink: 0; }

/* Cluster Topic Rows */
.wiz-plan-cluster-item {
  display: flex; align-items: center; gap: 10px; padding: 8px 16px 8px 28px;
  border-bottom: 1px solid #f8fafc; transition: background .15s;
}
.wiz-plan-cluster-item:last-child { border-bottom: none; }
.wiz-plan-cluster-item:hover { background: #f8fafc; }
.wiz-plan-cluster-icon {
  width: 22px; height: 22px; border-radius: 6px; background: #e0f2fe; color: #0369a1;
  display: flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 700;
  flex-shrink: 0;
}
.wiz-plan-cluster-info { flex: 1; min-width: 0; }
.wiz-plan-cluster-title { font-size: 13px; font-weight: 500; color: var(--text); }
.wiz-plan-cluster-type { font-size: 10px; color: var(--text-muted); }
.wiz-plan-cluster-check { accent-color: #6366f1; width: 15px; height: 15px; flex-shrink: 0; }

/* Generate action row inside silo plan card */
.wiz-plan-actions {
  display: flex; align-items: center; gap: 8px; padding: 10px 16px;
  background: #f8fafc; border-top: 1px solid var(--border-light);
}
.wiz-plan-actions .btn { font-size: 11px; padding: 5px 12px; }
.wiz-plan-select-count { flex: 1; font-size: 11px; color: var(--text-muted); font-weight: 600; }

/* Divider between silo plan and manual posts */
.wiz-plan-divider {
  display: flex; align-items: center; gap: 12px; margin: 20px 0 14px;
  font-size: 11px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: .05em;
}
.wiz-plan-divider::before, .wiz-plan-divider::after {
  content: ''; flex: 1; height: 1px; background: var(--border);
}

/* No-silos state */
.wiz-silo-plan-empty {
  text-align: center; padding: 28px 20px; color: var(--text-muted);
  border: 2px dashed var(--border); border-radius: var(--radius); font-size: 13px;
}
.wiz-silo-plan-empty p { margin-top: 6px; }

/* Wider wizard box for 6 steps */
.prj-wizard-box { max-width: 800px; }

/* ─── Wizard Step 1: Multi-select Niche Dropdown ─────────────────── */
.wiz-niche-multiselect {
  position: relative;
}
.wiz-niche-selected {
  min-height: 42px; padding: 6px 10px;
  border: 1.5px solid #e2e8f0; border-radius: 8px;
  background: #fff; cursor: pointer;
  display: flex; flex-wrap: wrap; gap: 5px; align-items: center;
  transition: border-color .15s;
}
.wiz-niche-selected:hover { border-color: #a5b4fc; }
.wiz-niche-selected:focus-within { border-color: #6366f1; box-shadow: 0 0 0 3px rgba(99,102,241,.12); }
.wiz-niche-placeholder { color: #94a3b8; font-size: 13px; }
.wiz-niche-chip {
  display: inline-flex; align-items: center; gap: 4px;
  background: #e0e7ff; color: #4338ca; font-size: 11px; font-weight: 600;
  padding: 3px 8px 3px 10px; border-radius: 20px;
}
.wiz-niche-chip-x {
  cursor: pointer; font-size: 13px; line-height: 1; opacity: .6;
  margin-left: 2px; font-weight: 700;
}
.wiz-niche-chip-x:hover { opacity: 1; color: #ef4444; }
.wiz-niche-dropdown {
  position: absolute; top: calc(100% + 4px); left: 0; right: 0;
  background: #fff; border: 1.5px solid #e2e8f0; border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,.12); z-index: 999;
  max-height: 300px; display: flex; flex-direction: column;
}
.wiz-niche-search {
  padding: 10px 12px; border: none; border-bottom: 1px solid #e2e8f0;
  font-size: 13px; outline: none; border-radius: 10px 10px 0 0;
}
.wiz-niche-options {
  overflow-y: auto; flex: 1; padding: 4px 0;
}
.wiz-niche-group-label {
  padding: 6px 14px 3px; font-size: 10px; font-weight: 800;
  color: #94a3b8; text-transform: uppercase; letter-spacing: .5px;
}
.wiz-niche-option {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 14px; cursor: pointer; font-size: 13px; color: #334155;
  transition: background .1s;
}
.wiz-niche-option:hover { background: #f5f3ff; }
.wiz-niche-option.selected { background: #ede9fe; color: #4338ca; font-weight: 600; }
.wiz-niche-option .niche-check {
  width: 16px; height: 16px; border: 2px solid #cbd5e1; border-radius: 4px;
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; color: #fff; flex-shrink: 0; transition: all .15s;
}
.wiz-niche-option.selected .niche-check {
  background: #6366f1; border-color: #6366f1;
}
.wiz-niche-option.hidden-opt { display: none; }

/* ─── Logo Upload / AI Generate ──────────────────────────────────── */
.wiz-logo-wrap {
  display: flex; align-items: center; gap: 14px;
}
.wiz-logo-preview {
  width: 72px; height: 72px; border: 2px dashed #e2e8f0; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; background: #f8fafc; flex-shrink: 0;
}
.wiz-logo-preview img {
  width: 100%; height: 100%; object-fit: contain;
}
.wiz-logo-placeholder { font-size: 11px; color: #94a3b8; text-align: center; }
.wiz-logo-actions { display: flex; flex-direction: column; gap: 6px; }
.wiz-logo-upload-btn { cursor: pointer; }

/* ─── Footer Copyright Editor ────────────────────────────────────── */
.wiz-footer-editor-wrap {
  border: 1.5px solid #e2e8f0; border-radius: 8px; overflow: hidden;
}
.wiz-footer-toolbar {
  display: flex; align-items: center; gap: 2px;
  padding: 4px 8px; background: #f8fafc; border-bottom: 1px solid #e2e8f0;
}
.wiz-ft-btn {
  background: none; border: 1px solid transparent; border-radius: 4px;
  padding: 3px 8px; cursor: pointer; font-size: 12px; color: #475569;
  transition: all .15s;
}
.wiz-ft-btn:hover { background: #e0e7ff; border-color: #c7d2fe; color: #4338ca; }
.wiz-ft-sep { color: #e2e8f0; margin: 0 4px; }
.wiz-footer-textarea {
  border: none !important; border-radius: 0 !important;
  font-family: 'Fira Code', 'Courier New', monospace;
  font-size: 12px; resize: vertical; min-height: 40px;
}
.wiz-footer-preview {
  margin-top: 6px; padding: 8px 12px;
  background: #1e293b; border-radius: 8px; min-height: 28px;
  font-size: 12px; color: #94a3b8; text-align: center;
}
.wiz-footer-preview a { color: #818cf8; text-decoration: underline; }

/* ─── Design Step (Header & Footer) ─────────────────────────────── */
.wiz-design-tabs {
  display: flex; gap: 0; margin-bottom: 18px;
  border-bottom: 2px solid #e2e8f0;
}
.wiz-design-tab {
  background: none; border: none; border-bottom: 2.5px solid transparent;
  padding: 10px 22px; cursor: pointer; font-size: 14px; font-weight: 600;
  color: #64748b; transition: all .2s; margin-bottom: -2px;
}
.wiz-design-tab:hover { color: #4338ca; }
.wiz-design-tab.active {
  color: #4338ca; border-bottom-color: #6366f1;
}
.wiz-design-section { animation: fadeIn .2s; }
.wiz-design-templates-bar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin-bottom: 16px; padding: 12px 14px;
  background: #f8fafc; border: 1.5px solid #e2e8f0; border-radius: 10px;
}
.wiz-design-bar-label {
  font-size: 12px; font-weight: 700; color: #64748b;
  text-transform: uppercase; letter-spacing: .4px; white-space: nowrap;
}
.wiz-design-template-pills {
  display: flex; gap: 6px; flex-wrap: wrap;
}
.wiz-design-pill {
  background: #fff; border: 1.5px solid #e2e8f0; border-radius: 20px;
  padding: 6px 14px; cursor: pointer; font-size: 12.5px; font-weight: 500;
  color: #475569; transition: all .2s; white-space: nowrap;
}
.wiz-design-pill:hover { border-color: #a5b4fc; color: #4338ca; background: #f5f3ff; }
.wiz-design-pill.active {
  background: #6366f1; color: #fff; border-color: #6366f1;
  box-shadow: 0 2px 8px rgba(99,102,241,.3);
}
.wiz-design-customize-row {
  display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 16px;
}
.wiz-design-field {
  display: flex; flex-direction: column; gap: 4px; min-width: 140px;
}
.wiz-design-field label,
.wiz-design-label {
  font-size: 11.5px; font-weight: 700; color: #475569;
  text-transform: uppercase; letter-spacing: .3px;
}
.wiz-design-field input[type="color"] {
  width: 44px; height: 34px; border: 1.5px solid #e2e8f0; border-radius: 8px;
  padding: 2px; cursor: pointer; background: #fff;
}
.wiz-design-field input[type="text"],
.wiz-design-field input[type="url"] {
  padding: 7px 10px; border: 1.5px solid #e2e8f0; border-radius: 8px;
  font-size: 13px; outline: none; transition: border-color .2s;
}
.wiz-design-field input[type="text"]:focus,
.wiz-design-field input[type="url"]:focus { border-color: #a5b4fc; }
.wiz-design-select {
  padding: 7px 10px; border: 1.5px solid #e2e8f0; border-radius: 8px;
  font-size: 13px; background: #fff; cursor: pointer; outline: none;
  color: #334155;
}
.wiz-design-select:focus { border-color: #a5b4fc; }
.wiz-design-nav-editor { margin-bottom: 16px; }
.wiz-nav-items {
  display: flex; flex-direction: column; gap: 6px; margin-top: 8px;
}
.wiz-nav-item {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 10px; background: #f8fafc; border: 1px solid #e2e8f0;
  border-radius: 8px;
}
.wiz-nav-item input {
  flex: 1; padding: 5px 8px; border: 1px solid #e2e8f0; border-radius: 6px;
  font-size: 12.5px; outline: none;
}
.wiz-nav-item input:focus { border-color: #a5b4fc; }
.wiz-nav-item .nav-remove-btn {
  background: none; border: none; cursor: pointer; color: #94a3b8;
  font-size: 16px; padding: 2px 4px; border-radius: 4px; transition: all .15s;
}
.wiz-nav-item .nav-remove-btn:hover { color: #ef4444; background: #fee2e2; }
.wiz-design-code-section { margin-bottom: 16px; }
.wiz-design-code-section .wiz-design-label {
  cursor: pointer; display: flex; align-items: center; gap: 6px;
  padding: 6px 0; user-select: none;
}
.wiz-design-code {
  width: 100%; padding: 10px 12px; border: 1.5px solid #e2e8f0; border-radius: 8px;
  font-family: 'Fira Code', 'Courier New', monospace; font-size: 12px;
  background: #1e293b; color: #e2e8f0; resize: vertical; outline: none;
}
.wiz-design-code:focus { border-color: #818cf8; }
.wiz-design-preview-wrap { margin-bottom: 18px; }
.wiz-design-preview-frame {
  border: 1.5px solid #e2e8f0; border-radius: 10px;
  min-height: 80px; overflow: hidden; background: #fff;
  box-shadow: inset 0 1px 4px rgba(0,0,0,.04);
}
.wiz-design-preview-frame.dark { background: #1e293b; }
.wiz-design-footer-content { margin-bottom: 16px; }
.wiz-design-row {
  display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 10px;
}
.wiz-design-row .wiz-design-field textarea {
  padding: 7px 10px; border: 1.5px solid #e2e8f0; border-radius: 8px;
  font-size: 13px; resize: vertical; outline: none; min-height: 36px;
  font-family: 'Inter', system-ui, sans-serif;
}
.wiz-design-row .wiz-design-field textarea:focus { border-color: #a5b4fc; }

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

/* ── Batch Queue Panel ── */
.batch-queue-panel {
  background: var(--surface, #ffffff); border: 1.5px solid var(--border, #e2e8f0);
  border-radius: 12px; padding: 0; margin-bottom: 16px;
  box-shadow: 0 2px 12px rgba(0,0,0,.06); overflow: hidden;
  animation: fadeIn .3s;
}
.batch-queue-panel.minimized .batch-queue-list,
.batch-queue-panel.minimized .batch-queue-footer { display: none; }
.batch-queue-panel.minimized .batch-queue-header { border-bottom: none; }
.batch-queue-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 16px; background: #eef2ff;
  border-bottom: 1px solid var(--border, #e2e8f0); cursor: pointer;
}
.batch-queue-header h4 { margin: 0; font-size: 14px; font-weight: 600; color: #312e81; }
.batch-queue-summary {
  font-size: 12px; font-weight: 600; color: #4f46e5;
  background: #fff; padding: 3px 10px; border-radius: 12px;
}
.batch-queue-list {
  max-height: 320px; overflow-y: auto; padding: 8px 12px;
}
.batch-queue-item {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 10px; border-radius: 8px; margin-bottom: 4px;
  border: 1px solid transparent; transition: all .2s;
}
.batch-queue-item.batch-active {
  background: #fef3c7; border-color: #fbbf24;
}
.batch-queue-item.batch-done {
  background: #f0fdf4; border-color: #bbf7d0; opacity: .75;
}
.batch-queue-item.batch-error {
  background: #fef2f2; border-color: #fca5a5;
}
.batch-queue-item-info {
  display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0;
}
.batch-queue-num {
  font-size: 11px; font-weight: 700; color: #6366f1;
  background: #eef2ff; width: 24px; height: 24px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.batch-queue-topic {
  font-size: 12px; font-weight: 500; color: #1e293b;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 280px;
}
.batch-queue-type { font-size: 9px; flex-shrink: 0; }
.batch-queue-item-status {
  display: flex; align-items: center; gap: 8px; font-size: 11px; font-weight: 500;
  color: #64748b; flex-shrink: 0;
}
.batch-queue-progress-bar {
  width: 60px; height: 6px; background: #e2e8f0; border-radius: 3px; overflow: hidden;
}
.batch-queue-progress-fill {
  height: 100%; background: #6366f1;
  border-radius: 3px; transition: width .5s ease;
}
.batch-queue-footer {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 16px; border-top: 1px solid var(--border, #e2e8f0);
  background: #f8fafc;
}
.batch-queue-eta { font-size: 12px; color: #64748b; font-weight: 500; }
.text-danger { color: #dc2626; }
.text-muted { color: #94a3b8; }

@media (max-width: 768px) {
  .batch-queue-topic { max-width: 140px; }
  .batch-queue-item { flex-direction: column; align-items: flex-start; gap: 4px; }
  .batch-queue-item-status { width: 100%; }
}

/* ── Inline Topic Edit ── */
.topic-edit-inline {
  display: flex; align-items: center; gap: 6px;
}
.topic-edit-inline input { flex: 1; min-width: 0; }
.topic-actions-cell {
  display: flex; gap: 3px; align-items: center; white-space: nowrap;
}
.topic-actions-cell .btn-xs { padding: 2px 6px; font-size: 10px; }
.gen-silo-table td:last-child { width: 140px; }

/* ── AI Suggest Popup ── */
.ai-suggest-list {
  display: flex; flex-direction: column; gap: 6px;
  max-height: 420px; overflow-y: auto; padding: 2px;
}
.ai-suggest-item {
  display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px;
  border: 1.5px solid var(--border, #e2e8f0); border-radius: 10px;
  cursor: pointer; transition: all .15s; background: var(--surface, #fff);
}
.ai-suggest-item:hover { border-color: #a5b4fc; background: #f5f3ff; }
.ai-suggest-item input[type="checkbox"] {
  margin-top: 3px; flex-shrink: 0; width: 16px; height: 16px; accent-color: #6366f1;
}
.ai-suggest-item-body { flex: 1; min-width: 0; }
.ai-suggest-item-title {
  font-size: 13px; font-weight: 600; color: #1e293b;
  line-height: 1.3; margin-bottom: 4px;
}
.ai-suggest-item-meta {
  display: flex; gap: 8px; flex-wrap: wrap; align-items: center;
}
.ai-suggest-item-meta .badge-type { font-size: 9px; }
.ai-suggest-kw { font-size: 11px; color: #6366f1; font-weight: 500; }
.ai-suggest-diff { font-size: 11px; font-weight: 600; }
.ai-suggest-intent { font-size: 10px; color: #64748b; background: #f1f5f9; padding: 1px 6px; border-radius: 8px; }
.form-input-sm { padding: 4px 8px !important; font-size: 12px !important; }

/* ── SERP Competitor Analysis ── */
.serp-section { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 20px; }
.serp-section h4 { margin-bottom: 16px; }

/* Insights bar */
.serp-insight-bar {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px;
  background: var(--primary-light); border-radius: 10px; padding: 14px; margin-bottom: 16px;
}
.serp-insight-item { display: flex; flex-direction: column; gap: 2px; }
.serp-insight-wide { grid-column: 1 / -1; }
.serp-insight-label { font-size: 11px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: .4px; }
.serp-insight-val { font-size: 14px; font-weight: 700; color: var(--text); }
.serp-common-topics { margin-top: 8px; }
.serp-topic-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.serp-topic-tag {
  font-size: 11px; padding: 3px 10px; border-radius: 20px;
  background: var(--accent-light); color: var(--accent); font-weight: 500;
}

/* Competitor cards grid */
.serp-competitors-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; margin-bottom: 16px;
}
.serp-comp-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 16px;
  transition: box-shadow .2s, border-color .2s;
}
.serp-comp-card:hover { border-color: var(--primary); box-shadow: 0 4px 16px rgba(99,102,241,.1); }
.serp-comp-header { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.serp-comp-rank {
  font-size: 13px; font-weight: 800; color: var(--primary); background: var(--primary-light);
  padding: 2px 8px; border-radius: 6px; min-width: 28px; text-align: center;
}
.serp-comp-type {
  font-size: 10px; font-weight: 600; text-transform: capitalize; padding: 2px 8px; border-radius: 20px;
}
.serp-comp-title { font-size: 14px; font-weight: 700; color: var(--text); margin-bottom: 4px; line-height: 1.3; }
.serp-comp-domain { font-size: 12px; color: var(--primary); margin-bottom: 10px; }
.serp-comp-stats {
  display: flex; gap: 14px; font-size: 12px; color: var(--text-muted); margin-bottom: 10px; font-weight: 500;
}
.serp-comp-sub-label { font-size: 11px; font-weight: 700; color: var(--text-muted); display: block; margin-bottom: 4px; }
.serp-comp-headings ul, .serp-comp-strengths ul, .serp-comp-weaknesses ul {
  list-style: none; padding: 0; margin: 0;
}
.serp-comp-headings li, .serp-comp-strengths li, .serp-comp-weaknesses li {
  font-size: 12px; color: var(--text-muted); padding: 2px 0; padding-left: 12px;
  position: relative; line-height: 1.4;
}
.serp-comp-headings li::before { content: '→'; position: absolute; left: 0; color: var(--primary); }
.serp-comp-strengths li::before { content: '✓'; position: absolute; left: 0; color: var(--success); }
.serp-comp-weaknesses li::before { content: '!'; position: absolute; left: 0; color: var(--warning); font-weight: 700; }
.serp-comp-headings { margin-bottom: 8px; }
.serp-comp-strengths { margin-bottom: 8px; }

/* Content Gaps */
.serp-gaps-title { font-size: 14px; font-weight: 700; margin-bottom: 10px; color: var(--text); }
.serp-gaps-list { display: flex; flex-direction: column; gap: 8px; }
.serp-gap-item {
  display: flex; align-items: flex-start; gap: 8px; padding: 10px 14px;
  background: var(--warning-light); border-radius: 8px; font-size: 13px; color: var(--text); line-height: 1.4;
}
.serp-gap-icon { flex-shrink: 0; }

/* People Also Ask */
.paa-section { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 20px; }
.paa-section h4 { margin-bottom: 12px; }
.paa-list { display: flex; flex-direction: column; gap: 6px; }
.paa-item {
  display: flex; align-items: center; gap: 8px; padding: 10px 14px;
  background: var(--bg); border-radius: 8px; font-size: 13px; color: var(--text); line-height: 1.4;
}
.paa-icon { flex-shrink: 0; font-size: 14px; }
.paa-text { font-weight: 500; }

/* ═══════════════ AUTH MODAL ═══════════════ */
.auth-modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.6); backdrop-filter: blur(4px);
  z-index: 1000; display: flex; align-items: center; justify-content: center;
}
.auth-modal-overlay.hidden { display: none; }
.auth-modal {
  background: var(--surface, #ffffff); border-radius: 16px; padding: 32px;
  width: 420px; max-width: 90vw; box-shadow: 0 20px 60px rgba(0,0,0,0.4);
}
.auth-modal h2 { text-align: center; margin-bottom: 24px; font-size: 22px; }
.auth-tabs { display: flex; gap: 0; margin-bottom: 24px; border-radius: 8px; overflow: hidden; border: 1px solid var(--border, #e2e8f0); }
.auth-tab-btn { flex: 1; padding: 10px; text-align: center; cursor: pointer; background: transparent; border: none; color: var(--text-muted, #64748b); font-weight: 600; transition: all .2s; }
.auth-tab-btn.active { background: var(--primary, #6366f1); color: #fff; }
.auth-form { display: flex; flex-direction: column; gap: 16px; }
.auth-form.hidden { display: none; }
.auth-form label { font-size: 13px; font-weight: 600; color: var(--text-muted, #64748b); margin-bottom: -8px; }
.auth-form input { padding: 10px 14px; border-radius: 8px; border: 1px solid var(--border, #e2e8f0); background: var(--surface, #ffffff); color: var(--text, #1e293b); font-size: 14px; }
.auth-form input:focus { border-color: var(--primary, #6366f1); outline: none; box-shadow: 0 0 0 3px rgba(99,102,241,0.15); }
.auth-form button[type=submit] { padding: 12px; border-radius: 8px; border: none; background: var(--primary, #6366f1); color: #fff; font-weight: 700; font-size: 14px; cursor: pointer; transition: transform .1s; }
.auth-form button[type=submit]:hover { transform: translateY(-1px); }
.auth-form button[type=submit]:disabled { opacity: .6; cursor: not-allowed; }
.auth-user-info { display: flex; align-items: center; gap: 10px; padding: 10px 16px; border-bottom: 1px solid var(--border, #e2e8f0); margin-bottom: 8px; }
.auth-user-avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--primary, #6366f1); display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 700; font-size: 14px; flex-shrink: 0; }
.auth-user-details { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.auth-user-name { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.auth-user-role { font-size: 11px; color: var(--text-muted, #64748b); text-transform: capitalize; }

/* ═══════════════ SEO TOOLS PAGE ═══════════════ */
.seo-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 900px) { .seo-grid { grid-template-columns: 1fr; } }
.seo-score-section { display: flex; align-items: center; gap: 24px; padding: 20px; background: var(--surface, #ffffff); border-radius: 12px; margin-bottom: 16px; }
.seo-score-circle { width: 100px; height: 100px; border-radius: 50%; background: conic-gradient(var(--score-color) var(--score-pct), var(--border, #e2e8f0) var(--score-pct)); display: flex; flex-direction: column; align-items: center; justify-content: center; position: relative; }
.seo-score-circle::before { content: ''; position: absolute; inset: 8px; background: var(--surface, #ffffff); border-radius: 50%; }
.seo-score-value { position: relative; z-index: 1; font-size: 24px; font-weight: 800; line-height: 1; }
.seo-score-grade { position: relative; z-index: 1; font-size: 12px; font-weight: 600; color: var(--text-muted, #64748b); }
.seo-score-summary h4 { margin: 0 0 4px; }
.seo-score-summary p { margin: 0; font-size: 13px; color: var(--text-muted, #64748b); }
.seo-checks-list { display: flex; flex-direction: column; gap: 6px; }
.seo-check { display: grid; grid-template-columns: 24px 1fr auto auto; gap: 8px; align-items: center; padding: 8px 12px; border-radius: 8px; background: var(--bg, #f1f5f9); font-size: 13px; }
.seo-check.passed { border-left: 3px solid #10b981; }
.seo-check.failed { border-left: 3px solid #ef4444; }
.seo-check-icon { font-weight: 700; text-align: center; }
.seo-check.passed .seo-check-icon { color: #10b981; }
.seo-check.failed .seo-check-icon { color: #ef4444; }
.seo-check-score { font-weight: 600; font-size: 12px; color: var(--text-muted, #64748b); }
.seo-check-tip { font-size: 11px; color: var(--text-muted, #64748b); grid-column: 2 / -1; }
.density-stat { display: flex; justify-content: space-between; padding: 6px 0; border-bottom: 1px solid var(--border, #e2e8f0); font-size: 13px; }
.density-rec { margin-top: 8px; font-size: 12px; color: var(--text-muted, #64748b); padding: 8px; background: var(--bg, #f1f5f9); border-radius: 8px; }
.text-green { color: #10b981; }
.text-orange { color: #f59e0b; }

/* ═══════════════ DISTRIBUTION PAGE ═══════════════ */
.social-account-card { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 10px; background: var(--bg, #f1f5f9); margin-bottom: 8px; }
.social-account-icon { width: 40px; height: 40px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 18px; color: #fff; }
.social-facebook { background: #1877f2; }
.social-twitter { background: #000; }
.social-linkedin { background: #0a66c2; }
.social-pinterest { background: #e60023; }
.social-letter { line-height: 1; }
.social-account-info { flex: 1; display: flex; flex-direction: column; }
.social-account-info strong { font-size: 14px; }
.social-account-info span { font-size: 12px; color: var(--text-muted, #64748b); }
.dist-platform-checks { display: flex; gap: 16px; flex-wrap: wrap; margin: 12px 0; }
.dist-platform-check-label { display: flex; align-items: center; gap: 6px; font-size: 13px; cursor: pointer; padding: 6px 12px; border-radius: 8px; border: 1px solid var(--border, #e2e8f0); transition: all .2s; }
.dist-platform-check-label:has(:checked) { border-color: var(--primary, #6366f1); background: rgba(99,102,241,0.1); }
.dist-preview-card { padding: 12px; border-radius: 8px; background: var(--bg, #f1f5f9); margin-bottom: 8px; }
.dist-preview-card h5 { margin: 0 0 8px; text-transform: capitalize; }
.dist-preview-card pre { white-space: pre-wrap; font-size: 12px; color: var(--text-muted, #64748b); margin: 0; }

/* ═══════════════ ADMIN PANEL ═══════════════ */
.admin-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 24px; }
@media (max-width: 900px) { .admin-stats { grid-template-columns: repeat(2, 1fr); } }
.admin-stat-card { background: var(--surface, #ffffff); border-radius: 12px; padding: 20px; text-align: center; border: 1px solid var(--border, #e2e8f0); }
.admin-stat-value { font-size: 32px; font-weight: 800; background: linear-gradient(135deg, var(--primary, #6366f1), #a78bfa); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.admin-stat-label { font-size: 12px; color: var(--text-muted, #64748b); font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; margin-top: 4px; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.admin-table th { text-align: left; padding: 10px 12px; font-weight: 600; font-size: 11px; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-muted, #64748b); border-bottom: 1px solid var(--border, #e2e8f0); }
.admin-table td { padding: 10px 12px; border-bottom: 1px solid var(--border, #e2e8f0); }
.role-select { padding: 4px 8px; border-radius: 6px; border: 1px solid var(--border, #e2e8f0); background: var(--surface, #ffffff); color: var(--text, #1e293b); font-size: 12px; }

/* ═══════════════ BILLING PAGE ═══════════════ */
.plans-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-bottom: 24px; }
@media (max-width: 900px) { .plans-grid { grid-template-columns: 1fr; } }
.plan-card { background: var(--surface, #ffffff); border-radius: 16px; padding: 28px; border: 1px solid var(--border, #e2e8f0); text-align: center; position: relative; transition: transform .2s, box-shadow .2s; }
.plan-card:hover { transform: translateY(-4px); box-shadow: 0 12px 40px rgba(0,0,0,0.3); }
.plan-card.plan-current { border-color: var(--primary, #6366f1); box-shadow: 0 0 0 2px rgba(99,102,241,0.3); }
.plan-badge { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); background: var(--primary, #6366f1); color: #fff; font-size: 11px; font-weight: 700; padding: 4px 16px; border-radius: 20px; white-space: nowrap; }
.plan-card h3 { margin: 8px 0 4px; font-size: 20px; }
.plan-price { font-size: 36px; font-weight: 800; margin: 8px 0 16px; }
.plan-price span { font-size: 14px; font-weight: 400; color: var(--text-muted, #64748b); }
.plan-features { list-style: none; padding: 0; margin: 0 0 20px; text-align: left; }
.plan-features li { padding: 6px 0; font-size: 13px; border-bottom: 1px solid var(--border, #e2e8f0); }
.plan-features li:last-child { border: none; }
.usage-bar-wrapper { padding: 16px 0; }
.usage-bar-header { display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 8px; }
.usage-bar { height: 8px; background: var(--border, #e2e8f0); border-radius: 4px; overflow: hidden; }
.usage-bar-fill { height: 100%; background: var(--primary, #6366f1); border-radius: 4px; transition: width .5s ease; }
.usage-bar-fill.usage-warning { background: #f59e0b; }
.usage-warning-text { color: #f59e0b; font-size: 12px; margin-top: 6px; }
.usage-exceeded-text { color: #ef4444; font-size: 12px; margin-top: 6px; }

/* ═══════════════ SHARED / BADGES ═══════════════ */
.badge { display: inline-block; padding: 2px 8px; border-radius: 4px; font-size: 11px; font-weight: 600; background: var(--border, #e2e8f0); }
.badge-success { background: rgba(16,185,129,0.15); color: #10b981; }
.badge-muted { background: var(--border, #e2e8f0); color: var(--text-muted, #64748b); }
.badge-warning { background: rgba(245,158,11,0.15); color: #f59e0b; }
.badge-danger { background: rgba(239,68,68,0.15); color: #ef4444; }
.empty-state { text-align: center; color: var(--text-muted, #64748b); padding: 24px; font-size: 13px; }
.btn-icon { background: none; border: none; color: var(--text-muted, #64748b); cursor: pointer; padding: 4px; border-radius: 4px; }
.btn-icon:hover { color: var(--text, #1e293b); background: rgba(255,255,255,0.05); }

/* SEO Badge in History */
.seo-badge { display: inline-block; padding: 1px 6px; border-radius: 4px; font-size: 10px; font-weight: 700; }
.seo-a, .seo-b { background: rgba(16,185,129,0.15); color: #10b981; }
.seo-c { background: rgba(245,158,11,0.15); color: #f59e0b; }
.seo-d, .seo-f, .seo-na { background: rgba(239,68,68,0.15); color: #ef4444; }

/* ═══════════════ NICHE LIBRARY ═══════════════ */
.niche-lib-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.niche-lib-tab { padding: 6px 14px; border-radius: 20px; border: 1px solid var(--border); background: var(--bg-secondary, #f8f9fa); font-size: 13px; font-weight: 500; cursor: pointer; transition: all .2s; }
.niche-lib-tab:hover { background: rgba(99,102,241,0.08); border-color: #818cf8; }
.niche-lib-tab.active { background: #6366f1; color: #fff; border-color: transparent; }

.niche-lib-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; max-height: 600px; overflow-y: auto; padding: 4px; }

.niche-lib-card { background: #fff; border: 1px solid var(--border, #e5e7eb); border-radius: 12px; padding: 16px; transition: all .25s; position: relative; }
.niche-lib-card:hover { border-color: #818cf8; box-shadow: 0 4px 20px rgba(99,102,241,0.12); transform: translateY(-2px); }

.niche-lib-card-header { margin-bottom: 8px; }
.niche-lib-cat-badge { font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 10px; background: rgba(99,102,241,0.1); color: #6366f1; }

.niche-lib-card-title { font-size: 16px; font-weight: 700; margin: 4px 0 6px; color: var(--text-primary, #111827); }
.niche-lib-card-desc { font-size: 12.5px; color: var(--text-secondary, #6b7280); line-height: 1.5; margin-bottom: 10px; }

.niche-lib-card-meta { display: flex; gap: 12px; flex-wrap: wrap; font-size: 11px; color: #9ca3af; margin-bottom: 8px; }
.niche-lib-card-meta span { display: flex; align-items: center; gap: 3px; }

.niche-lib-services { font-size: 11px; color: #6b7280; margin-bottom: 10px; line-height: 1.6; }
.niche-lib-services strong { color: #374151; }

.niche-lib-card-actions { display: flex; gap: 8px; margin-top: 10px; }

/* Niche Preview Modal */
.niche-preview-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 20px; }
.niche-preview-modal { background: #fff; border-radius: 16px; width: 100%; max-width: 560px; max-height: 80vh; overflow-y: auto; box-shadow: 0 20px 60px rgba(0,0,0,0.3); }
.niche-preview-header { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; border-bottom: 1px solid #e5e7eb; }
.niche-preview-header h3 { margin: 0; font-size: 18px; }
.niche-preview-body { padding: 20px; font-size: 13px; line-height: 1.7; }
.niche-preview-body h4 { margin: 14px 0 8px; font-size: 14px; color: #374151; }
.niche-preview-body p { margin: 4px 0; }
.niche-preview-silos { display: flex; flex-wrap: wrap; gap: 6px; }
.niche-preview-silo-tag { padding: 3px 10px; border-radius: 6px; background: rgba(99,102,241,0.1); color: #6366f1; font-size: 12px; font-weight: 500; }
.niche-preview-service-tag { padding: 3px 10px; border-radius: 6px; background: rgba(16,185,129,0.1); color: #10b981; font-size: 12px; font-weight: 500; }
.niche-preview-footer { padding: 16px 20px; border-top: 1px solid #e5e7eb; display: flex; justify-content: flex-end; }

/* Niche tab actions always visible */
.niche-tab-actions-always { display: flex; gap: 2px; margin-left: 6px; flex-shrink: 0; }
.niche-tab-actions-always .niche-action-btn { width: 28px; height: 28px; border-radius: 6px; border: 1px solid transparent; background: transparent; cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 13px; transition: all .2s; }
.niche-tab-actions-always .niche-action-btn:hover { background: rgba(0,0,0,0.06); border-color: #d1d5db; }
.niche-tab-actions-always .niche-action-btn.danger:hover { background: rgba(239,68,68,0.1); border-color: #fca5a5; }

/* Niche type badges */
.niche-type-badge { font-size: 9px; font-weight: 700; padding: 1px 6px; border-radius: 4px; text-transform: uppercase; letter-spacing: 0.5px; vertical-align: middle; }
.niche-type-badge.blog { background: rgba(99,102,241,0.12); color: #6366f1; }
.niche-type-badge.service { background: rgba(16,185,129,0.12); color: #10b981; }

/* ═══════════════════════════════════════════════
   Modern Refine & Continue Panel
   ═══════════════════════════════════════════════ */
.modern-refine { margin-top: 24px; padding: 20px; border-top: none; background: #fafbff; border-radius: 16px; border: 1px solid rgba(99,102,241,0.12); }
.modern-refine .refine-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.modern-refine .refine-header-left { display: flex; align-items: center; gap: 10px; }
.modern-refine .refine-header-icon { width: 36px; height: 36px; border-radius: 10px; background: #6366f1; color: white; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.modern-refine .gen-results-title { font-size: 16px; font-weight: 700; color: var(--text); margin: 0; }

/* Section Picker Modern */
.modern-picker { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; padding: 12px 16px; background: white; border-radius: 12px; border: 1px solid #e2e8f0; box-shadow: 0 1px 3px rgba(0,0,0,0.04); }
.modern-picker .picker-label-row { display: flex; align-items: center; gap: 10px; width: 100%; }
.modern-picker .refine-picker-label { font-size: 13px; font-weight: 600; color: var(--text-muted); white-space: nowrap; }
.modern-select { border-radius: 8px !important; border: 1.5px solid #e2e8f0 !important; background: #f8fafc !important; font-size: 13px !important; padding: 6px 12px !important; transition: all 0.2s !important; }
.modern-select:focus { border-color: var(--primary) !important; box-shadow: 0 0 0 3px rgba(99,102,241,0.1) !important; }

/* Continue Writing Primary Button */
.refine-primary-action { margin-bottom: 16px; }
.refine-continue-btn { display: flex; align-items: center; gap: 14px; width: 100%; padding: 16px 20px; border: 2px solid rgba(99,102,241,0.2); border-radius: 14px; background: #ffffff; cursor: pointer; transition: all 0.25s ease; }
.refine-continue-btn:hover { border-color: var(--primary); background: #f5f3ff; transform: translateY(-1px); box-shadow: 0 8px 24px rgba(99,102,241,0.15); }
.refine-continue-btn:active { transform: translateY(0); }
.refine-continue-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; box-shadow: none; }
.continue-btn-icon { width: 44px; height: 44px; border-radius: 12px; background: #6366f1; color: white; display: flex; align-items: center; justify-content: center; flex-shrink: 0; transition: all 0.25s; }
.refine-continue-btn:hover .continue-btn-icon { background: #4f46e5; box-shadow: 0 4px 12px rgba(99,102,241,0.3); }
.continue-btn-text { display: flex; flex-direction: column; gap: 2px; text-align: left; }
.continue-btn-title { font-size: 15px; font-weight: 700; color: var(--text); }
.continue-btn-desc { font-size: 12px; color: var(--text-muted); line-height: 1.4; }

/* Quick Actions Chips */
.refine-quick-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.8px; color: var(--text-muted); margin-bottom: 8px; }
.modern-grid { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.refine-chip { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 20px; border: 1.5px solid #e2e8f0; background: white; font-size: 12.5px; font-weight: 600; color: var(--text); cursor: pointer; transition: all 0.2s; white-space: nowrap; }
.refine-chip:hover { border-color: var(--primary); background: #f5f3ff; color: var(--primary); transform: translateY(-1px); box-shadow: 0 3px 10px rgba(99,102,241,0.1); }
.refine-chip:active { transform: translateY(0); }
.chip-icon { font-size: 14px; }

/* Custom Refine Input Modern */
.modern-input { display: flex; gap: 10px; align-items: flex-end; }
.modern-input .refine-textarea { flex: 1; resize: vertical; min-height: 52px; font-size: 13.5px; border: 1.5px solid #e2e8f0; border-radius: 12px; padding: 12px 14px; background: white; transition: all 0.2s; line-height: 1.5; }
.modern-input .refine-textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(99,102,241,0.1); outline: none; }
.modern-input .refine-textarea::placeholder { color: #a1a1aa; }
.refine-send-btn { display: flex; align-items: center; gap: 6px; padding: 12px 20px; border-radius: 12px; font-size: 13.5px; font-weight: 600; white-space: nowrap; height: 52px; }
.refine-send-btn svg { flex-shrink: 0; }

/* Refine Status Modern */
.modern-refine .refine-status-bar { margin-top: 12px; font-size: 13px; color: var(--text-muted); padding: 8px 0; display: flex; align-items: center; gap: 8px; }
.modern-refine .refine-progress-bar { height: 4px; background: #e2e8f0; border-radius: 4px; overflow: hidden; flex: 1; }
.modern-refine .refine-progress-fill { height: 100%; background: #6366f1; border-radius: 4px; animation: refineProgressPulse 2s ease infinite; }
@keyframes refineProgressPulse {
  0%, 100% { opacity: 0.8; }
  50% { opacity: 1; }
}

/* Refine Result Notification Modern */
.modern-refine .refine-result-notification { display: flex; align-items: center; gap: 12px; padding: 14px 18px; margin-top: 12px; background: #f0fdf4; border: 1.5px solid #86efac; border-radius: 12px; animation: refineSlideIn 0.3s ease; }

/* Section Status in Header */
.refine-section-status { font-size: 12px; color: var(--text-muted); }
.refine-section-status .done-list { color: #10b981; font-weight: 600; }
.refine-section-status .remaining-list { color: #f59e0b; font-size: 11px; }

/* Responsive */
@media (max-width: 768px) {
  .modern-grid { gap: 6px; }
  .refine-chip { padding: 6px 10px; font-size: 11.5px; }
  .modern-picker { flex-direction: column; align-items: stretch; }
  .modern-picker .picker-label-row { flex-direction: column; }
  .modern-input { flex-direction: column; }
  .refine-send-btn { width: 100%; justify-content: center; }
  .continue-btn-icon { width: 36px; height: 36px; }
}

/* ═══════════════════════════════════════════════
   Advanced SEO Command Center
   ═══════════════════════════════════════════════ */

/* Input Card */
.seo-input-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 20px; }
.seo-run-btn { display: flex; align-items: center; justify-content: center; gap: 8px; font-weight: 600; }

/* Score Overview */
.seo-score-overview { display: flex; align-items: center; gap: 32px; padding: 24px; background: #fafbff; border-radius: 16px; border: 1px solid rgba(99,102,241,0.1); margin-bottom: 20px; }
.seo-score-ring-wrapper { position: relative; width: 120px; height: 120px; flex-shrink: 0; }
.seo-score-ring { width: 100%; height: 100%; }
.seo-score-center { position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); text-align: center; }
.seo-score-number { font-size: 32px; font-weight: 800; color: var(--text); line-height: 1; }
.seo-score-grade { font-size: 14px; font-weight: 700; color: var(--primary); }
.seo-score-stats { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; flex: 1; }
.seo-stat-item { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 8px; background: white; border-radius: 10px; border: 1px solid #e5e7eb; }
.seo-stat-value { font-size: 18px; font-weight: 700; color: var(--text); }
.seo-stat-label { font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-muted); }

/* Category Cards */
.seo-categories-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 20px; }
.seo-cat-card { background: white; border-radius: 14px; border: 1px solid #e5e7eb; padding: 18px; transition: all 0.2s; }
.seo-cat-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.06); }
.seo-cat-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.seo-cat-title { font-size: 14px; font-weight: 700; color: var(--text); display: flex; align-items: center; gap: 6px; }
.seo-cat-score { font-size: 13px; font-weight: 700; padding: 3px 10px; border-radius: 8px; }
.seo-cat-score.good { background: rgba(16,185,129,0.1); color: #10b981; }
.seo-cat-score.medium { background: rgba(245,158,11,0.1); color: #f59e0b; }
.seo-cat-score.bad { background: rgba(239,68,68,0.1); color: #ef4444; }
.seo-cat-bar { height: 6px; background: #e5e7eb; border-radius: 6px; overflow: hidden; margin-bottom: 12px; }
.seo-cat-bar-fill { height: 100%; border-radius: 6px; transition: width 1s ease; }
.seo-cat-checks { display: flex; flex-direction: column; gap: 6px; }
.seo-check-item { display: flex; align-items: center; gap: 8px; font-size: 12px; padding: 4px 0; }
.seo-check-icon-sm { width: 18px; height: 18px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 10px; flex-shrink: 0; }
.seo-check-icon-sm.pass { background: rgba(16,185,129,0.15); color: #10b981; }
.seo-check-icon-sm.fail { background: rgba(239,68,68,0.15); color: #ef4444; }
.seo-check-text { flex: 1; color: var(--text); }
.seo-check-pts { font-size: 11px; font-weight: 600; color: var(--text-muted); }

/* Recommendations */
.seo-recommendations-card .card-body { padding: 0; }
.seo-rec-item { display: flex; align-items: flex-start; gap: 12px; padding: 14px 20px; border-bottom: 1px solid #f3f4f6; }
.seo-rec-item:last-child { border-bottom: none; }
.seo-rec-severity { font-size: 10px; font-weight: 700; padding: 2px 8px; border-radius: 6px; text-transform: uppercase; letter-spacing: 0.5px; flex-shrink: 0; }
.seo-rec-severity.critical { background: #fef2f2; color: #dc2626; }
.seo-rec-severity.high { background: #fff7ed; color: #ea580c; }
.seo-rec-severity.medium { background: #fffbeb; color: #d97706; }
.seo-rec-severity.low { background: #f0f9ff; color: #0284c7; }
.seo-rec-text { font-size: 13px; color: var(--text); }
.seo-rec-category { font-size: 11px; color: var(--text-muted); margin-top: 2px; }

/* Tabs */
.seo-tools-tabs { display: flex; gap: 4px; margin-bottom: 16px; padding: 4px; background: #f3f4f6; border-radius: 12px; overflow-x: auto; }
.seo-tab { padding: 10px 16px; border: none; background: transparent; border-radius: 10px; font-size: 13px; font-weight: 600; color: var(--text-muted); cursor: pointer; transition: all 0.2s; white-space: nowrap; }
.seo-tab.active { background: white; color: var(--text); box-shadow: 0 1px 4px rgba(0,0,0,0.08); }
.seo-tab:hover:not(.active) { color: var(--text); background: rgba(255,255,255,0.5); }
.seo-tab-content { display: none; }
.seo-tab-content.active { display: block; }

/* AI Meta Generator */
.ai-meta-section { margin-bottom: 20px; }
.ai-meta-label { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-muted); margin-bottom: 10px; }
.ai-meta-variants { display: flex; flex-direction: column; gap: 10px; }
.ai-meta-variant { display: flex; align-items: center; gap: 12px; padding: 14px 16px; background: #f8fafc; border: 1.5px solid #e2e8f0; border-radius: 12px; cursor: pointer; transition: all 0.2s; }
.ai-meta-variant:hover { border-color: var(--primary); background: #f5f3ff; }
.ai-meta-variant.selected { border-color: var(--primary); background: #ede9fe; }
.ai-meta-variant-text { flex: 1; font-size: 14px; color: var(--text); line-height: 1.5; }
.ai-meta-variant-info { display: flex; gap: 8px; align-items: center; flex-shrink: 0; }
.ai-meta-chars { font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 6px; }
.ai-meta-chars.ok { background: rgba(16,185,129,0.1); color: #10b981; }
.ai-meta-chars.warn { background: rgba(245,158,11,0.1); color: #f59e0b; }
.ai-meta-style { font-size: 10px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; }
.ai-meta-copy { width: 32px; height: 32px; border: none; background: transparent; cursor: pointer; border-radius: 8px; font-size: 14px; transition: all 0.2s; }
.ai-meta-copy:hover { background: rgba(99,102,241,0.1); }
.ai-meta-slug { padding: 12px 16px; background: #f0fdf4; border-radius: 10px; font-family: monospace; font-size: 13px; color: #166534; border: 1px solid #bbf7d0; }

/* SERP Preview */
.serp-preview-google { padding: 20px; background: white; border-radius: 12px; border: 1px solid #e5e7eb; max-width: 600px; }
.serp-breadcrumb { font-size: 12px; color: #70757a; margin-bottom: 4px; }
.serp-title { font-size: 20px; color: #1a0dab; cursor: text; line-height: 1.3; margin-bottom: 4px; font-family: arial, sans-serif; }
.serp-title:focus { outline: 2px solid var(--primary); border-radius: 4px; padding: 2px 4px; }
.serp-description { font-size: 14px; color: #4d5156; line-height: 1.5; cursor: text; font-family: arial, sans-serif; }
.serp-description:focus { outline: 2px solid var(--primary); border-radius: 4px; padding: 2px 4px; }
.serp-char-counts { display: flex; gap: 20px; margin-top: 12px; font-size: 12px; color: var(--text-muted); }

/* Social Preview */
.social-preview-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.social-preview-card { background: #f8fafc; border-radius: 12px; padding: 14px; }
.social-preview-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-muted); margin-bottom: 10px; }
.social-og-preview { background: white; border: 1px solid #e5e7eb; border-radius: 8px; overflow: hidden; }
.og-image-placeholder, .twitter-image-placeholder { height: 120px; background: #667eea; display: flex; align-items: center; justify-content: center; color: rgba(255,255,255,0.6); font-size: 13px; font-weight: 600; }
.og-text, .twitter-text { padding: 10px 12px; }
.og-site, .twitter-domain { font-size: 11px; color: #65676b; text-transform: uppercase; }
.og-title, .twitter-title { font-size: 14px; font-weight: 600; color: #1c1e21; line-height: 1.3; margin: 2px 0; }
.og-desc, .twitter-desc { font-size: 12px; color: #65676b; line-height: 1.4; }
.twitter-preview { background: white; border: 1px solid #e5e7eb; border-radius: 12px; overflow: hidden; }

/* Schema Type Selector */
.schema-type-selector { display: flex; gap: 8px; flex-wrap: wrap; }
.schema-type-chip { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 20px; border: 1.5px solid #e2e8f0; background: white; font-size: 13px; font-weight: 600; cursor: pointer; transition: all 0.2s; }
.schema-type-chip.active { border-color: var(--primary); background: #f5f3ff; color: var(--primary); }
.schema-type-chip input { display: none; }

/* Image Style Grid */
.image-style-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.image-style-card { border-radius: 12px; overflow: hidden; background: white; border: 1px solid #e5e7eb; transition: all 0.2s; }
.image-style-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.08); transform: translateY(-2px); }
.image-style-preview { height: 100px; display: flex; align-items: center; justify-content: center; color: white; font-size: 14px; font-weight: 700; text-shadow: 0 1px 3px rgba(0,0,0,0.3); }
.image-style-card .btn { border-radius: 0 0 12px 12px; }

/* Readability */
.readability-score-section { display: flex; align-items: center; gap: 24px; margin-bottom: 20px; }
.readability-gauge { width: 200px; height: 12px; background: linear-gradient(90deg, #ef4444 0%, #f59e0b 33%, #10b981 66%, #10b981 100%); border-radius: 12px; position: relative; }
.readability-gauge-fill { position: absolute; top: -4px; width: 20px; height: 20px; background: white; border: 3px solid var(--primary); border-radius: 50%; transition: left 1s ease; }
.readability-score-number { font-size: 32px; font-weight: 800; color: var(--text); }
.readability-score-label { font-size: 14px; font-weight: 700; color: var(--primary); }
.readability-score-desc { font-size: 12px; color: var(--text-muted); }
.readability-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 16px; }
.readability-stat { text-align: center; padding: 12px; background: #f8fafc; border-radius: 10px; }
.readability-stat-value { font-size: 20px; font-weight: 700; color: var(--text); }
.readability-stat-label { font-size: 11px; color: var(--text-muted); margin-top: 2px; }

/* Link Analysis */
.link-stats-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 16px; }
.link-stat-card { text-align: center; padding: 16px; background: #f8fafc; border-radius: 12px; border: 1px solid #e5e7eb; }
.link-stat-num { font-size: 28px; font-weight: 800; }
.link-stat-label { font-size: 11px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; margin-top: 4px; }

/* Responsive */
@media (max-width: 768px) {
  .seo-input-grid { grid-template-columns: 1fr; }
  .seo-score-overview { flex-direction: column; }
  .seo-score-stats { grid-template-columns: repeat(3, 1fr); }
  .seo-categories-grid { grid-template-columns: 1fr; }
  .seo-tools-tabs { overflow-x: auto; }
  .social-preview-grid { grid-template-columns: 1fr; }
  .image-style-grid { grid-template-columns: repeat(2, 1fr); }
  .readability-stats { grid-template-columns: repeat(2, 1fr); }
  .link-stats-row { grid-template-columns: repeat(2, 1fr); }
}

/* ═══════════════ BILLING PANEL TABS ═══════════════ */
.adm-billing-panel { }
.adm-billing-panel.adm-hidden { display: none !important; }
.bill-usage-meter { padding: 12px; border: 1px solid var(--border, #e2e8f0); border-radius: 8px; }

/* ═══════════════ API PROVIDER & PAYMENT GATEWAY CARDS ═══════════════ */
.api-provider-card, .pay-gateway-card {
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 10px;
  padding: 0;
  background: var(--bg, #fff);
  transition: box-shadow 0.2s, border-color 0.2s;
  overflow: hidden;
}
.api-provider-card:hover, .pay-gateway-card:hover {
  border-color: var(--primary, #6366f1);
  box-shadow: 0 4px 16px rgba(99,102,241,0.08);
}
.api-provider-header, .pay-gateway-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border, #e2e8f0);
  background: var(--bg-secondary, #f8fafc);
}
.api-provider-logo, .pay-gateway-logo {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 800;
  font-size: 16px;
  flex-shrink: 0;
}
.api-provider-info, .pay-gateway-info {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}
.api-provider-info strong, .pay-gateway-info strong {
  font-size: 13px;
  font-weight: 700;
}
.api-provider-model {
  font-size: 11px;
  color: var(--text-muted, #64748b);
}
.api-provider-badge-fallback {
  font-size: 10px;
  color: var(--text-muted, #94a3b8);
  padding: 2px 8px;
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 4px;
  white-space: nowrap;
}
.api-provider-body, .pay-gateway-body {
  padding: 12px 16px;
}
.api-provider-key-row {
  display: flex;
  gap: 6px;
  align-items: center;
  margin-bottom: 8px;
}
.api-provider-key-row .form-input {
  flex: 1;
  font-family: 'SF Mono', 'Cascadia Code', monospace;
}
.api-provider-meta, .pay-gateway-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
}
.api-provider-status {
  font-size: 11px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
}
.api-provider-status::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  display: inline-block;
}
.api-provider-status.api-connected { color: #059669; }
.api-provider-status.api-connected::before { background: #059669; }
.api-provider-status.api-disconnected { color: #94a3b8; }
.api-provider-status.api-disconnected::before { background: #cbd5e1; }
.api-provider-footer, .pay-gateway-footer {
  display: flex;
  gap: 4px;
  padding: 8px 16px;
  border-top: 1px solid var(--border, #e2e8f0);
  background: var(--bg-secondary, #f8fafc);
}

/* ═══════════════════════════════════════════════════════════════
   ADMIN PAGE COMPONENTS STYLESHEET - V3 PREMIUM

   Prefix: adm-
   Modern, premium SaaS UI styles with glass effects & micro-animations
   To be appended to existing stylesheet with CSS variables
   ═══════════════════════════════════════════════════════════════ */

/* ─────────────────────────────────────────────────────────────────
   CSS VARIABLES & THEME FOUNDATION
   ───────────────────────────────────────────────────────────────── */

:root {
  --primary: #6366f1;
  --primary-light: #e0e7ff;
  --primary-dark: #4f46e5;
  --surface: #ffffff;
  --bg: #f8fafc;
  --border: #e2e8f0;
  --text: #1e293b;
  --text-muted: #64748b;
  --text-light: #94a3b8;
  --success: #10b981;
  --success-light: #d1fae5;
  --danger: #ef4444;
  --danger-light: #fee2e2;
  --warning: #f59e0b;
  --warning-light: #fef3c7;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05), 0 1px 3px 0 rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ─────────────────────────────────────────────────────────────────
   UTILITY CLASSES
   ───────────────────────────────────────────────────────────────── */

.adm-hidden {
  display: none !important;
}

.adm-mono {
  font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
  font-size: 13px;
  letter-spacing: 0.01em;
}

.adm-form-group {
  margin-bottom: 24px;
}

.adm-section {
  margin-bottom: 32px;
}

.adm-card-header-border {
  border-bottom: 1px solid var(--border);
  padding-bottom: 16px;
  margin-bottom: 24px;
}

/* ─────────────────────────────────────────────────────────────────
   TAB NAVIGATION
   ───────────────────────────────────────────────────────────────── */

.adm-tab-bar {
  display: flex;
  gap: 4px;
  padding: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 24px;
  overflow-x: auto;
  box-shadow: var(--shadow-sm);
}

.adm-tab-bar button {
  padding: 10px 18px;
  font-size: 13px;
  font-weight: 500;
  border: none;
  background: transparent;
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition);
}

.adm-tab-bar button:hover {
  background: var(--bg);
  color: var(--text);
}

.adm-tab-bar button.adm-tab-active {
  background: var(--primary);
  color: white;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

.adm-tab-panel {
  display: none;
  animation: fadeIn 0.2s ease-in;
}

.adm-tab-panel-active {
  display: block;
}

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

/* ─────────────────────────────────────────────────────────────────
   USER CELL & AVATARS
   ───────────────────────────────────────────────────────────────── */

.adm-user-cell {
  display: flex;
  align-items: center;
  gap: 12px;
  transition: var(--transition);
}

.adm-user-cell:hover {
  transform: translateX(2px);
}

.adm-avatar {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-size: 13px;
  flex-shrink: 0;
  box-shadow: var(--shadow-sm);
  border: 2px solid rgba(255, 255, 255, 0.3);
}

.adm-avatar-1 {
  background: #6366f1;
}

.adm-avatar-2 {
  background: #8b5cf6;
}

.adm-avatar-3 {
  background: #f59e0b;
}

.adm-avatar-4 {
  background: #10b981;
}

.adm-avatar-5 {
  background: #6b7280;
}

.adm-user-name {
  font-weight: 600;
  font-size: 14px;
  color: var(--text);
}

.adm-user-email {
  font-size: 12px;
  color: var(--text-muted);
}

/* ─────────────────────────────────────────────────────────────────
   BADGES & STATUS INDICATORS
   ───────────────────────────────────────────────────────────────── */

.adm-badge {
  display: inline-flex;
  align-items: center;
  padding: 5px 12px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  transition: var(--transition);
}

.adm-badge:hover {
  transform: scale(1.05);
}

.adm-badge-super-admin {
  background: #f3e8ff;
  color: #7c3aed;
  border: 1px solid #e9d5ff;
}

.adm-badge-admin {
  background: var(--primary-light);
  color: var(--primary-dark);
  border: 1px solid #bfdbfe;
}

.adm-badge-manager {
  background: #d1fae5;
  color: #059669;
  border: 1px solid #a7f3d0;
}

.adm-badge-editor {
  background: #e0f2fe;
  color: #0369a1;
  border: 1px solid #7dd3fc;
}

.adm-badge-viewer {
  background: #f3f4f6;
  color: #374151;
  border: 1px solid #d1d5db;
}

.adm-badge-active {
  background: var(--success-light);
  color: var(--success);
  border: 1px solid #86efac;
}

.adm-badge-inactive {
  background: var(--danger-light);
  color: var(--danger);
  border: 1px solid #fca5a5;
}

.adm-badge-pending {
  background: var(--warning-light);
  color: var(--warning);
  border: 1px solid #fdba74;
}

.adm-badge-info {
  background: #e0e7ff;
  color: #4f46e5;
  border: 1px solid #c7d2fe;
}

.adm-badge-success {
  background: var(--success-light);
  color: var(--success);
  border: 1px solid #6ee7b7;
}

.adm-badge-warning {
  background: var(--warning-light);
  color: var(--warning);
  border: 1px solid #fdba74;
}

.adm-badge-danger {
  background: var(--danger-light);
  color: var(--danger);
  border: 1px solid #fca5a5;
}

.adm-badge-author {
  background: #fef3c7;
  color: #b45309;
  border: 1px solid #fcd34d;
}

/* ─────────────────────────────────────────────────────────────────
   TABLES
   ───────────────────────────────────────────────────────────────── */

.adm-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.adm-table thead th {
  padding: 14px 16px;
  text-align: left;
  font-weight: 700;
  color: var(--text);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: var(--bg);
  border-bottom: 2px solid var(--border);
}

.adm-table tbody td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.adm-table tbody tr {
  transition: var(--transition);
}

.adm-table tbody tr:hover {
  background: rgba(99, 102, 241, 0.05);
}

.adm-table tbody tr:last-child td {
  border-bottom: none;
}

/* ─────────────────────────────────────────────────────────────────
   PAGINATION
   ───────────────────────────────────────────────────────────────── */

.adm-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 0;
  border-top: 1px solid var(--border);
  margin-top: 16px;
}

.adm-pagination-info {
  font-size: 13px;
  color: var(--text-muted);
}

.adm-pagination-btns {
  display: flex;
  gap: 4px;
  align-items: center;
}

.adm-pagination-btns button {
  min-width: 36px;
  height: 36px;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}

.adm-pagination-btns button:hover:not(:disabled) {
  background: var(--bg);
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-1px);
}

.adm-pagination-btns button.adm-page-active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

.adm-pagination-btns button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ─────────────────────────────────────────────────────────────────
   ROLE CARDS GRID
   ───────────────────────────────────────────────────────────────── */

.adm-role-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

.adm-role-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: var(--transition-slow);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(10px);
}

.adm-role-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(99, 102, 241, 0.05);
  opacity: 0;
  transition: var(--transition);
  pointer-events: none;
}

.adm-role-card:hover {
  border-color: var(--primary);
  box-shadow: 0 12px 24px rgba(99, 102, 241, 0.15);
  transform: translateY(-4px);
}

.adm-role-card:hover::before {
  opacity: 1;
}

.adm-role-card h3 {
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 6px;
  color: var(--text);
}

.adm-role-card p {
  font-size: 13px;
  color: var(--text-muted);
  margin: 0 0 14px;
  line-height: 1.6;
}

.adm-role-count {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: var(--primary-light);
  border: 1px solid #bfdbfe;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  color: var(--primary-dark);
  margin-bottom: 16px;
  transition: var(--transition);
}

.adm-role-count:hover {
  transform: scale(1.08);
}

/* ─────────────────────────────────────────────────────────────────
   PERMISSION MATRIX TABLE
   ───────────────────────────────────────────────────────────────── */

.adm-perm-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.adm-perm-table th {
  padding: 14px;
  text-align: center;
  font-weight: 700;
  color: var(--text);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: var(--bg);
  border-bottom: 2px solid var(--border);
}

.adm-perm-table th:first-child {
  text-align: left;
  min-width: 180px;
}

.adm-perm-table td {
  padding: 14px;
  text-align: center;
  border-bottom: 1px solid var(--border);
  transition: var(--transition);
}

.adm-perm-table td:first-child {
  text-align: left;
  font-weight: 600;
  color: var(--text);
}

.adm-perm-table tbody tr {
  transition: var(--transition);
}

.adm-perm-table tbody tr:hover {
  background: rgba(99, 102, 241, 0.05);
}

.adm-perm-table tbody tr:last-child td {
  border-bottom: none;
}

.adm-perm-check {
  width: 20px;
  height: 20px;
  accent-color: var(--primary);
  cursor: pointer;
  transition: var(--transition);
}

.adm-perm-check:hover {
  transform: scale(1.15);
}

/* ─────────────────────────────────────────────────────────────────
   NOTIFICATION ITEMS
   ───────────────────────────────────────────────────────────────── */

.adm-notif-item {
  display: flex;
  gap: 14px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  transition: var(--transition);
  cursor: pointer;
  align-items: flex-start;
}

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

.adm-notif-item:hover {
  background: rgba(99, 102, 241, 0.04);
  padding-left: 22px;
}

.adm-notif-unread {
  background: var(--primary-light);
  border-left: 4px solid var(--primary);
}

.adm-notif-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
  transition: var(--transition);
}

/* Notification icon variants - both styles for compatibility */
.adm-notif-icon-system,
.adm-notif-system {
  background: #eef2ff;
  color: #4f46e5;
}

.adm-notif-icon-security,
.adm-notif-security {
  background: var(--danger-light);
  color: var(--danger);
}

.adm-notif-icon-billing,
.adm-notif-billing {
  background: var(--warning-light);
  color: var(--warning);
}

.adm-notif-icon-team,
.adm-notif-team {
  background: var(--success-light);
  color: var(--success);
}

.adm-notif-icon:hover {
  transform: scale(1.1) rotate(5deg);
}

.adm-notif-content {
  flex: 1;
  min-width: 0;
}

.adm-notif-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 4px;
}

.adm-notif-title {
  font-weight: 700;
  font-size: 14px;
  color: var(--text);
}

.adm-notif-time {
  font-size: 12px;
  color: var(--text-light);
  white-space: nowrap;
  flex-shrink: 0;
}

.adm-notif-desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
}

.adm-notif-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.adm-notif-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary);
  flex-shrink: 0;
  align-self: center;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

/* ─────────────────────────────────────────────────────────────────
   TOGGLE SWITCH (BOTH CLASS VARIANTS FOR COMPATIBILITY)
   ───────────────────────────────────────────────────────────────── */

.adm-toggle {
  position: relative;
  display: inline-flex;
  width: 48px;
  height: 26px;
  flex-shrink: 0;
  margin: 0;
}

.adm-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
  cursor: pointer;
}

/* Support both class names for maximum compatibility */
.adm-toggle-slider,
.adm-toggle-switch {
  position: absolute;
  inset: 0;
  background: #cbd5e1;
  border-radius: 26px;
  cursor: pointer;
  transition: var(--transition-slow);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.06);
}

.adm-toggle-slider::before,
.adm-toggle-switch::before {
  content: "";
  position: absolute;
  width: 20px;
  height: 20px;
  left: 3px;
  top: 3px;
  background: white;
  border-radius: 50%;
  transition: var(--transition-slow);
  box-shadow: var(--shadow-md);
}

.adm-toggle input:checked + .adm-toggle-slider,
.adm-toggle input:checked + .adm-toggle-switch {
  background: var(--primary);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

.adm-toggle input:checked + .adm-toggle-slider::before,
.adm-toggle input:checked + .adm-toggle-switch::before {
  transform: translateX(22px);
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

.adm-toggle input:focus-visible + .adm-toggle-slider,
.adm-toggle input:focus-visible + .adm-toggle-switch {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* ─────────────────────────────────────────────────────────────────
   TOGGLE ROW (LABEL + TOGGLE)
   ───────────────────────────────────────────────────────────────── */

.adm-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.adm-toggle-row:hover {
  background: var(--surface);
  border-color: var(--primary);
  box-shadow: var(--shadow-sm);
}

.adm-toggle-label {
  font-weight: 600;
  font-size: 14px;
  color: var(--text);
  flex: 1;
}

/* ─────────────────────────────────────────────────────────────────
   SESSION CARDS - NEW COMPLETE STYLES
   ───────────────────────────────────────────────────────────────── */

.adm-sessions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}

.adm-session-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0;
  overflow: hidden;
  transition: var(--transition-slow);
  box-shadow: var(--shadow-sm);
}

.adm-session-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.adm-session-header {
  padding: 16px 18px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 12px;
}

.adm-session-body {
  padding: 16px 18px;
}

.adm-session-footer {
  padding: 12px 18px;
  background: var(--bg);
  border-top: 1px solid var(--border);
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.adm-session-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
}

.adm-session-row:not(:last-child) {
  border-bottom: 1px solid var(--border);
  margin-bottom: 8px;
  padding-bottom: 12px;
}

.adm-session-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.adm-session-value {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  font-family: 'SF Mono', 'Fira Code', monospace;
}

.adm-session-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  background: var(--success-light);
  color: var(--success);
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  border: 1px solid #a7f3d0;
}

.adm-session-current {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: var(--primary-light);
  color: var(--primary-dark);
  border: 1px solid #bfdbfe;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
}

/* Compact single-line session card variant */
.adm-session-compact {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
  transition: var(--transition);
}

.adm-session-compact:hover {
  border-color: var(--primary);
  background: var(--surface);
}

.adm-session-device {
  font-weight: 600;
  font-size: 14px;
  color: var(--text);
}

.adm-session-meta {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ─────────────────────────────────────────────────────────────────
   IP BLOCK LIST
   ───────────────────────────────────────────────────────────────── */

.adm-ip-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  transition: var(--transition);
}

.adm-ip-item:hover {
  border-color: var(--primary);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.adm-ip-item:last-child {
  margin-bottom: 0;
}

/* ─────────────────────────────────────────────────────────────────
   PLAN BANNER
   ───────────────────────────────────────────────────────────────── */

.adm-plan-banner {
  padding: 24px 28px;
  background: var(--primary-light);
  border-radius: var(--radius);
  border-left: 4px solid var(--primary);
  margin-bottom: 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 8px 16px rgba(99, 102, 241, 0.15);
}

.adm-plan-banner h3 {
  margin: 0 0 6px;
  font-size: 20px;
  font-weight: 700;
  color: var(--primary-dark);
}

.adm-plan-banner p {
  margin: 0;
  font-size: 14px;
  color: var(--text-muted);
}

/* ─────────────────────────────────────────────────────────────────
   PLANS GRID
   ───────────────────────────────────────────────────────────────── */

.adm-plans-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 32px;
}

@media (max-width: 1200px) {
  .adm-plans-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .adm-plans-grid {
    grid-template-columns: 1fr;
  }
}

.adm-plan-card {
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  text-align: center;
  transition: var(--transition-slow);
  position: relative;
  overflow: hidden;
}

.adm-plan-card::before {
  content: "";
  position: absolute;
  top: -50%;
  right: -50%;
  width: 100%;
  height: 100%;
  background: rgba(99, 102, 241, 0.05);
  opacity: 0;
  transition: var(--transition);
  pointer-events: none;
}

.adm-plan-card:hover {
  border-color: var(--primary);
  box-shadow: 0 16px 32px rgba(99, 102, 241, 0.2);
  transform: translateY(-4px);
}

.adm-plan-card:hover::before {
  opacity: 1;
}

.adm-plan-current {
  border-color: var(--primary);
  background: var(--primary-light);
  box-shadow: 0 8px 16px rgba(99, 102, 241, 0.15);
}

.adm-plan-card h4 {
  margin: 0 0 8px;
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
}

.adm-plan-price {
  font-size: 32px;
  font-weight: 800;
  margin-bottom: 6px;
  background: var(--primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.adm-plan-price span {
  font-size: 14px;
  font-weight: 400;
  color: var(--text-muted);
  display: block;
  background: none;
  -webkit-text-fill-color: inherit;
}

.adm-plan-badge {
  position: absolute;
  top: -12px;
  right: 16px;
  padding: 6px 14px;
  background: var(--primary);
  color: white;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

.adm-plan-features {
  list-style: none;
  padding: 0;
  margin: 0 0 24px;
  text-align: left;
  font-size: 13px;
}

.adm-plan-features li {
  padding: 8px 0;
  display: flex;
  gap: 10px;
  align-items: center;
  color: var(--text);
}

.adm-plan-features li::before {
  content: "✓";
  color: var(--success);
  font-weight: 700;
  font-size: 16px;
  flex-shrink: 0;
}

.adm-plan-features li.disabled {
  color: var(--text-muted);
}

.adm-plan-features li.disabled::before {
  content: "✕";
  color: var(--text-light);
  font-weight: 700;
  font-size: 16px;
}

/* ─────────────────────────────────────────────────────────────────
   LOG CONSOLE
   ───────────────────────────────────────────────────────────────── */

.adm-log-console {
  background: #0f172a;
  border-radius: var(--radius);
  padding: 16px;
  max-height: 500px;
  overflow-y: auto;
  font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.3);
}

.adm-log-console::-webkit-scrollbar {
  width: 6px;
}

.adm-log-console::-webkit-scrollbar-track {
  background: transparent;
}

.adm-log-console::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
}

.adm-log-console::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.2);
}

.adm-log-entry {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 8px 0;
  font-size: 12px;
  color: #cbd5e1;
  line-height: 1.6;
  transition: var(--transition);
}

.adm-log-entry:hover {
  background: rgba(255, 255, 255, 0.03);
  padding-left: 4px;
  padding-right: 4px;
}

.adm-log-time {
  color: #64748b;
  white-space: nowrap;
  flex-shrink: 0;
  min-width: 170px;
  font-weight: 500;
}

.adm-log-level {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
  min-width: 70px;
  text-align: center;
  flex-shrink: 0;
}

.adm-log-info {
  background: rgba(99, 102, 241, 0.3);
  color: #818cf8;
}

.adm-log-warning {
  background: rgba(245, 158, 11, 0.3);
  color: #fbbf24;
}

.adm-log-error {
  background: rgba(239, 68, 68, 0.3);
  color: #f87171;
}

.adm-log-critical {
  background: rgba(239, 68, 68, 0.4);
  color: #fca5a5;
  font-weight: 600;
}

.adm-log-msg {
  flex: 1;
  word-break: break-word;
}

/* ─────────────────────────────────────────────────────────────────
   HEALTH BARS - FIXED FOR INLINE WIDTH
   ───────────────────────────────────────────────────────────────── */

.adm-health-grid {
  display: grid;
  gap: 0;
}

.adm-health-item {
  margin-bottom: 24px;
}

.adm-health-item:last-child {
  margin-bottom: 0;
}

.adm-health-header {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  margin-bottom: 8px;
  align-items: baseline;
}

.adm-health-label {
  font-weight: 700;
  color: var(--text);
}

.adm-health-value {
  color: var(--text-muted);
  font-weight: 600;
}

/* Wrapper for the health bar track */
.adm-health-bar,
.adm-health-track {
  height: 10px;
  background: var(--bg);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.08);
  position: relative;
  border: 1px solid var(--border);
}

/* The fill that uses inline width style */
.adm-health-bar[style*="width"] {
  background: var(--success);
  border-radius: 8px;
  border: none;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
  transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.adm-health-fill {
  height: 100%;
  border-radius: 8px;
  transition: width 1s ease;
}

.adm-health-green {
  background: var(--success);
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

.adm-health-yellow {
  background: var(--warning);
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
}

.adm-health-red {
  background: var(--danger);
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
}

/* ─────────────────────────────────────────────────────────────────
   SETTINGS NAVIGATION SIDEBAR
   ───────────────────────────────────────────────────────────────── */

.adm-settings-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 28px;
}

@media (max-width: 768px) {
  .adm-settings-layout {
    grid-template-columns: 1fr;
  }
}

.adm-settings-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.adm-settings-nav button {
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 500;
  border: none;
  background: transparent;
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  cursor: pointer;
  text-align: left;
  transition: var(--transition);
  border-left: 3px solid transparent;
}

.adm-settings-nav button:hover {
  background: var(--bg);
  color: var(--text);
  border-left-color: var(--primary);
}

.adm-settings-nav button.adm-settings-nav-active {
  background: var(--primary-light);
  color: var(--primary-dark);
  border-left-color: var(--primary);
  font-weight: 700;
  box-shadow: inset -2px 0 0 var(--primary);
}

/* ─────────────────────────────────────────────────────────────────
   FEATURE TOGGLE CARDS - BOTH CLASS VARIANTS
   ───────────────────────────────────────────────────────────────── */

.adm-feature-card,
.adm-feature-toggle {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
  transition: var(--transition);
}

.adm-feature-card:hover,
.adm-feature-toggle:hover {
  border-color: var(--primary);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.adm-feature-card:last-child,
.adm-feature-toggle:last-child {
  margin-bottom: 0;
}

.adm-feature-card h4,
.adm-feature-toggle h4 {
  margin: 0 0 4px;
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}

.adm-feature-card p,
.adm-feature-toggle p {
  margin: 0;
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
}

.adm-feature-info {
  flex: 1;
}

.adm-feature-info h3 {
  margin: 0 0 4px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}

.adm-feature-info p {
  margin: 0;
  font-size: 13px;
  color: var(--text-muted);
}

/* ─────────────────────────────────────────────────────────────────
   FILTER BAR
   ───────────────────────────────────────────────────────────────── */

.adm-filter-bar {
  display: grid;
  grid-template-columns: 1fr 160px 160px;
  gap: 12px;
  margin-bottom: 24px;
  align-items: end;
}

.adm-filter-bar-3 {
  grid-template-columns: 1fr 160px 160px;
}

.adm-filter-bar-3col {
  grid-template-columns: 160px 160px 1fr;
}

.adm-filter-bar input,
.adm-filter-bar select {
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  background: var(--surface);
  color: var(--text);
  transition: var(--transition);
}

.adm-filter-bar input:focus,
.adm-filter-bar select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.adm-filter-bar input::placeholder {
  color: var(--text-light);
}

/* ─────────────────────────────────────────────────────────────────
   EMAIL PREFERENCES - NEW
   ───────────────────────────────────────────────────────────────── */

.adm-prefs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}

.adm-pref-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.adm-pref-item:hover {
  border-color: var(--primary);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.adm-pref-item label {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 500;
  font-size: 14px;
  color: var(--text);
  flex: 1;
  margin: 0;
  cursor: pointer;
}

/* ─────────────────────────────────────────────────────────────────
   FORM GROUPS & INPUTS - NEW
   ───────────────────────────────────────────────────────────────── */

.adm-form-hint {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 6px;
  line-height: 1.5;
}

.adm-checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
}

.adm-checkbox-item {
  display: flex;
  align-items: center;
  gap: 10px;
}

.adm-checkbox-item input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: var(--primary);
}

.adm-checkbox-item label {
  cursor: pointer;
  font-size: 14px;
  color: var(--text);
  margin: 0;
}

.adm-settings-form,
.adm-ip-form,
.adm-promo-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.adm-ip-form,
.adm-promo-form {
  flex-direction: row;
  align-items: flex-end;
}

.adm-ip-form input,
.adm-promo-form input {
  flex: 1;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  transition: var(--transition);
}

.adm-ip-form input:focus,
.adm-promo-form input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.adm-ip-form button,
.adm-promo-form button {
  padding: 10px 18px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
  white-space: nowrap;
}

.adm-ip-form button:hover,
.adm-promo-form button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

/* ─────────────────────────────────────────────────────────────────
   PAYMENT INFO - NEW
   ───────────────────────────────────────────────────────────────── */

.adm-payment-info {
  display: flex;
  align-items: flex-end;
  gap: 16px;
  margin-bottom: 28px;
}

.adm-payment-card {
  flex: 1;
}

.adm-payment-type {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}

.adm-payment-number {
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 10px;
  letter-spacing: 0.1em;
}

.adm-payment-expiry {
  font-size: 13px;
  color: var(--text-muted);
}

.adm-payment-info button {
  padding: 10px 20px;
  background: var(--danger);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}

.adm-payment-info button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(239, 68, 68, 0.4);
}

/* ─────────────────────────────────────────────────────────────────
   UPLOAD AREA - NEW
   ───────────────────────────────────────────────────────────────── */

.adm-upload-area {
  padding: 32px;
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  text-align: center;
  transition: var(--transition);
  cursor: pointer;
  background: rgba(99, 102, 241, 0.02);
}

.adm-upload-area:hover {
  border-color: var(--primary);
  background: rgba(99, 102, 241, 0.06);
  box-shadow: var(--shadow-sm);
}

.adm-upload-area input[type="file"] {
  display: none;
}

.adm-upload-area p {
  margin: 0 0 8px;
  font-weight: 600;
  color: var(--text);
  font-size: 14px;
}

.adm-upload-area span {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
}

/* ─────────────────────────────────────────────────────────────────
   CODE/API KEY - NEW
   ───────────────────────────────────────────────────────────────── */

.adm-code {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 12px;
  color: var(--text);
  font-weight: 500;
  letter-spacing: 0.01em;
  transition: var(--transition);
}

.adm-code:hover {
  background: var(--bg);
  border-color: var(--primary);
}

.adm-code-block {
  display: block;
  padding: 12px 14px;
  background: #0f172a;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-sm);
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 12px;
  color: #e2e8f0;
  white-space: pre-wrap;
  word-break: break-word;
  overflow-x: auto;
  margin: 12px 0;
}

/* ─────────────────────────────────────────────────────────────────
   MODAL - NEW COMPLETE STYLES
   ───────────────────────────────────────────────────────────────── */

.adm-modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  z-index: 999;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.2s ease-in;
}

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

.adm-modal {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
  max-width: 500px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  animation: slideUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

.adm-modal-header h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
}

.adm-modal-header button {
  background: none;
  border: none;
  font-size: 24px;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.adm-modal-header button:hover {
  background: var(--bg);
  color: var(--text);
}

.adm-modal-body {
  padding: 24px;
}

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

.adm-modal-footer button {
  padding: 10px 18px;
  border: none;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  transition: var(--transition);
}

.adm-modal-footer button.adm-modal-cancel {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
}

.adm-modal-footer button.adm-modal-cancel:hover {
  background: var(--bg);
  border-color: var(--primary);
}

.adm-modal-footer button.adm-modal-confirm {
  background: var(--primary);
  color: white;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.adm-modal-footer button.adm-modal-confirm:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

/* ─────────────────────────────────────────────────────────────────
   RESPONSIVE ADJUSTMENTS
   ───────────────────────────────────────────────────────────────── */

@media (max-width: 768px) {
  .adm-role-grid {
    grid-template-columns: 1fr;
  }

  .adm-sessions-grid {
    grid-template-columns: 1fr;
  }

  .adm-plans-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .adm-filter-bar {
    grid-template-columns: 1fr;
  }

  .adm-filter-bar-3 {
    grid-template-columns: 1fr;
  }

  .adm-filter-bar-3col {
    grid-template-columns: 1fr;
  }

  .adm-payment-info {
    flex-direction: column;
    align-items: stretch;
  }

  .adm-ip-form,
  .adm-promo-form {
    flex-direction: column;
  }

  .adm-ip-form button,
  .adm-promo-form button {
    width: 100%;
  }
}

/* ─────────────────────────────────────────────────────────────────
   PREMIUM ANIMATIONS & TRANSITIONS
   ───────────────────────────────────────────────────────────────── */

@keyframes shimmer {
  0% {
    background-position: -1000px 0;
  }
  100% {
    background-position: 1000px 0;
  }
}

@keyframes glow {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.4);
  }
  50% {
    box-shadow: 0 0 0 10px rgba(99, 102, 241, 0);
  }
}

/* Loading state */
.adm-loading {
  position: relative;
  overflow: hidden;
}

.adm-loading::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
  background: transparent;
  animation: shimmer 2s infinite;
  pointer-events: none;
}

/* Glow effect for active elements */
.adm-glow {
  animation: glow 2s infinite;
}

/* Smooth scroll behavior */
html {
  scroll-behavior: smooth;
}

/* ─────────────────────────────────────────────────────────────────
   DARK MODE SUPPORT (DISABLED — light theme only)
   ───────────────────────────────────────────────────────────────── */

/* ─────────────────────────────────────────────────────────────────
   FEATURE LOCKED (Plan-based gating)
   ───────────────────────────────────────────────────────────────── */
.feature-locked {
  opacity: 0.5;
  pointer-events: none;
  position: relative;
  cursor: not-allowed;
}
.feature-locked::after {
  content: "🔒";
  position: absolute;
  top: 4px;
  right: 8px;
  font-size: 12px;
}

/* ─────────────────────────────────────────────────────────────────
   BULK ACTION BAR
   ───────────────────────────────────────────────────────────────── */

.adm-bulk-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--primary-light);
  border: 1px solid var(--primary);
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
  animation: fadeIn 0.2s ease-in;
}

.adm-bulk-bar span {
  font-size: 13px;
  font-weight: 600;
  color: var(--primary-dark);
  margin-right: auto;
}

/* User row checkbox */
.adm-user-check,
#adm-select-all {
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
  cursor: pointer;
}

tr.adm-row-selected {
  background: var(--primary-light) !important;
}

/* ─────────────────────────────────────────────────────────────────
   PERMISSION TABLE CHECKBOXES
   ───────────────────────────────────────────────────────────────── */

.adm-perm-table input[type="checkbox"] {
  width: 20px;
  height: 20px;
  accent-color: var(--primary);
  cursor: pointer;
  transition: var(--transition);
}

.adm-perm-table input[type="checkbox"]:hover {
  transform: scale(1.15);
}

.adm-perm-table td {
  text-align: center;
}

.adm-perm-table td:first-child {
  text-align: left;
  font-weight: 500;
}

.adm-perm-toolbar {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
}

/* ─────────────────────────────────────────────────────────────────
   WORDPRESS CONNECTION CARDS
   ───────────────────────────────────────────────────────────────── */

.adm-wp-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 16px;
  transition: var(--transition);
}

.adm-wp-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-sm);
}

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

.adm-wp-card-status {
  display: flex;
  align-items: center;
  gap: 10px;
}

.adm-wp-card-status strong {
  font-size: 15px;
  color: var(--text);
}

.adm-wp-card-actions {
  display: flex;
  gap: 6px;
}

.adm-wp-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.adm-wp-connected {
  background: var(--success);
  box-shadow: 0 0 6px rgba(16, 185, 129, 0.4);
}

.adm-wp-disconnected {
  background: var(--danger);
  box-shadow: 0 0 6px rgba(239, 68, 68, 0.4);
}

.adm-wp-card-body {
  padding: 16px 20px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.adm-wp-detail {
  font-size: 13px;
  color: var(--text);
}

.adm-wp-detail span:first-child {
  font-weight: 600;
  color: var(--text-muted);
  margin-right: 4px;
}

.adm-wp-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 20px;
  border-top: 1px solid var(--border);
  background: var(--bg);
  border-radius: 0 0 var(--radius) var(--radius);
}

/* ═══ Profile Dropdown Menu ═══ */
.profile-dropdown-menu {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 0;
  right: 0;
  background: var(--surface, #ffffff);
  border: 1px solid var(--border, #e2e8f0);
  border-radius: var(--radius, 8px);
  box-shadow: 0 8px 24px rgba(0,0,0,.12), 0 2px 8px rgba(0,0,0,.06);
  z-index: 1000;
  overflow: hidden;
  min-width: 210px;
}

.profile-dropdown-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 14px 12px;
}

.profile-dropdown-divider {
  height: 1px;
  background: var(--border, #e2e8f0);
  margin: 0;
}

.profile-dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 14px;
  border: none;
  background: none;
  font-size: 13px;
  font-weight: 500;
  color: var(--text, #1e293b);
  cursor: pointer;
  text-align: left;
  transition: background .15s;
}

.profile-dropdown-item:hover {
  background: var(--bg, #f1f5f9);
}

.profile-dropdown-item svg {
  flex-shrink: 0;
  color: var(--text-muted, #64748b);
}

.profile-dropdown-logout {
  color: #ef4444;
}

.profile-dropdown-logout svg {
  color: #ef4444;
}

.profile-dropdown-logout:hover {
  background: #fef2f2;
}

/* ═══════════════════════════════════════════════════════════════
   END OF ADMIN CSS V3
   ═══════════════════════════════════════════════════════════════ */
