:root {
  --bg: #f6f7fb;
  --panel: #ffffff;
  --text: #172033;
  --muted: #6b7280;
  --line: #e5e7eb;
  --primary: #1d4ed8;
  --primary-dark: #1e40af;
  --secondary: #0ea5e9;
  --success: #16a34a;
  --warning: #d97706;
  --danger: #dc2626;
  --shadow: 0 18px 45px rgba(15, 23, 42, .08);
  --radius: 18px;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--bg);
}
button, input, textarea, select { font: inherit; }
a { color: var(--primary); text-decoration: none; }

.shell { display: flex; min-height: 100vh; }
.sidebar {
  width: 280px;
  background: #130f2e;
  color: #fff;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 28px;
  position: sticky;
  top: 0;
  height: 100vh;
}
.brand { display: flex; gap: 14px; align-items: center; }
.brand-mark {
  width: 44px; height: 44px; border-radius: 14px;
  background: linear-gradient(135deg, #3b82f6, #06b6d4);
  display: grid; place-items: center; font-weight: 700;
}
.brand span { display: block; color: #b9b5d5; font-size: 13px; margin-top: 2px; }
.sidebar nav { display: grid; gap: 8px; }
.sidebar nav a {
  color: #d7d3f7; padding: 12px 14px; border-radius: 12px;
}
.sidebar nav a.active, .sidebar nav a:hover { background: rgba(255,255,255,.1); color: #fff; }
.side-card {
  margin-top: auto; padding: 16px; border-radius: 16px;
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.12);
}
.side-card span { color: #c4c1dd; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; }
.side-card strong { display: block; margin-top: 8px; font-size: 14px; }

.main { flex: 1; padding: 28px; overflow-x: hidden; }
.topbar { display: flex; justify-content: space-between; align-items: center; gap: 24px; margin-bottom: 24px; }
.eyebrow { margin: 0 0 6px; color: var(--primary); font-size: 12px; text-transform: uppercase; letter-spacing: .12em; font-weight: 700; }
h1, h2 { margin: 0; }
h1 { font-size: 30px; letter-spacing: -.03em; }
h2 { font-size: 20px; letter-spacing: -.02em; }
p { margin: 6px 0 0; color: var(--muted); }
.top-actions, .filters, .import-form, .dialog-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

.btn {
  border: 0; border-radius: 12px; padding: 10px 15px; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-weight: 700; transition: .18s ease; white-space: nowrap;
}
.btn.primary { background: var(--primary); color: #fff; }
.btn.primary:hover { background: var(--primary-dark); transform: translateY(-1px); }
.btn.secondary { background: #e0f2fe; color: #0369a1; }
.btn.secondary:hover { background: #bae6fd; }
.btn.ghost { background: #fff; color: var(--text); border: 1px solid var(--line); }
.btn.ghost:hover { border-color: #c7d2fe; box-shadow: 0 8px 24px rgba(79,70,229,.08); }
.btn.danger { background: #fee2e2; color: var(--danger); }
.btn.small { padding: 7px 10px; border-radius: 10px; font-size: 13px; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none !important; }

.cards { display: grid; grid-template-columns: repeat(5, minmax(0,1fr)); gap: 14px; margin-bottom: 18px; }
.metric-card {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px; box-shadow: var(--shadow);
}
.metric-card span { color: var(--muted); font-size: 13px; }
.metric-card strong { display: block; margin-top: 8px; font-size: 30px; letter-spacing: -.04em; }

.panel {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); margin-bottom: 18px;
}
.panel-head { padding: 20px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; gap: 20px; align-items: center; }
.table-head { align-items: flex-end; }
.filters input, .filters select, .import-form input, .form-grid input, .form-grid textarea, .form-grid select {
  border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; outline: none; background: #fff; color: var(--text);
}
.filters input { min-width: 260px; }
.filters input:focus, .filters select:focus, .form-grid input:focus, .form-grid textarea:focus, .form-grid select:focus {
  border-color: #93c5fd; box-shadow: 0 0 0 4px rgba(37,99,235,.08);
}

.table-wrap { width: 100%; overflow: auto; }
table { width: 100%; border-collapse: separate; border-spacing: 0; min-width: 1180px; }
th, td { padding: 14px 12px; border-bottom: 1px solid var(--line); vertical-align: top; text-align: left; }
th { font-size: 12px; color: #64748b; text-transform: uppercase; letter-spacing: .08em; background: #fafafa; position: sticky; top: 0; }
td { font-size: 14px; }
.title-cell strong { display: block; max-width: 360px; line-height: 1.35; }
.title-cell span { display: block; color: var(--muted); font-size: 12px; margin-top: 5px; max-width: 360px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.badge { display: inline-flex; align-items: center; border-radius: 999px; padding: 5px 10px; font-size: 12px; font-weight: 700; }
.badge.run { background: #eef2ff; color: #4338ca; }
.badge.posting { background: #dcfce7; color: #15803d; }
.badge.delay { background: #fef3c7; color: #a16207; }
.badge.idle { background: #f1f5f9; color: #475569; }
.badge.error { background: #fee2e2; color: #b91c1c; }
.badge.sending_to_n8n, .badge.sent_to_n8n { background: #e0f2fe; color: #0369a1; }
.badge.completed { background: #dcfce7; color: #15803d; }
.links { display: grid; gap: 5px; min-width: 120px; }
.actions { display: flex; gap: 6px; flex-wrap: wrap; min-width: 260px; }
.empty { text-align: center; padding: 40px; color: var(--muted); }

.logs { padding: 8px 20px 20px; display: grid; gap: 10px; }
.log-item { padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; background: #fafafa; }
.log-item strong { display: block; font-size: 14px; }
.log-item span { color: var(--muted); font-size: 12px; }

.dialog { border: 0; padding: 0; border-radius: 24px; box-shadow: var(--shadow); width: min(980px, calc(100vw - 28px)); }
.dialog::backdrop { background: rgba(15, 23, 42, .46); backdrop-filter: blur(4px); }
.dialog-card { padding: 0; margin: 0; background: #fff; }
.dialog-head { padding: 22px 24px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; }
.icon-btn { border: 0; background: #f1f5f9; border-radius: 12px; width: 36px; height: 36px; cursor: pointer; font-size: 24px; line-height: 1; }
.form-grid { padding: 20px 24px; display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 14px; }
.form-grid label { display: grid; gap: 7px; color: #334155; font-size: 13px; font-weight: 700; }
.form-grid .span-2 { grid-column: span 2; }
.dialog-actions { padding: 18px 24px 24px; border-top: 1px solid var(--line); justify-content: flex-end; }
textarea { resize: vertical; }
.toast {
  position: fixed; right: 22px; bottom: 22px; background: #111827; color: #fff;
  padding: 14px 16px; border-radius: 14px; box-shadow: var(--shadow); opacity: 0; pointer-events: none;
  transform: translateY(10px); transition: .2s ease; max-width: 460px; z-index: 99;
}
.toast.show { opacity: 1; transform: translateY(0); }

@media (max-width: 1100px) {
  .shell { display: block; }
  .sidebar { width: 100%; height: auto; position: static; }
  .cards { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .topbar, .panel-head { align-items: flex-start; flex-direction: column; }
}
@media (max-width: 720px) {
  .main { padding: 16px; }
  .cards { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .span-2 { grid-column: span 1; }
  .filters input { min-width: 100%; }
}
.muted { color: var(--muted); font-size: 12px; }
.error-text { color: var(--danger) !important; white-space: normal !important; }
.loading-row { opacity: .62; }

.boot-status {
  position: fixed;
  right: 22px;
  bottom: 22px;
  background: #111827;
  color: #fff;
  padding: 14px 16px;
  border-radius: 14px;
  box-shadow: var(--shadow);
  z-index: 100;
  max-width: 520px;
}
.boot-status.error { background: #991b1b; }
.dialog.fallback-open {
  display: block;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1000;
}

.sync-hint { font-size: 13px; }
.sync-hint.ok { color: var(--success); font-weight: 700; }
.sync-hint.warn { color: var(--warning); font-weight: 700; }
.sync-summary { padding: 0 20px 20px; }
.sync-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 10px; margin-top: 16px; }
.sync-stat { border: 1px solid var(--line); background: #fafafa; border-radius: 14px; padding: 12px; }
.sync-stat span { display: block; color: var(--muted); font-size: 12px; }
.sync-stat strong { display: block; margin-top: 6px; font-size: 22px; }
.sync-changes { margin-top: 14px; border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; background: #fff; }
.sync-changes strong { display: block; margin-bottom: 8px; }
.sync-changes p { margin: 6px 0; color: var(--text); display: flex; gap: 8px; align-items: center; }
.sync-empty { padding-top: 14px; }
.sync-line { color: var(--secondary) !important; font-size: 12px !important; }
@media (max-width: 1100px) { .sync-grid { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (max-width: 720px) { .sync-grid { grid-template-columns: 1fr; } }

/* CMS-like editor modal */
.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}
.editor-dialog {
  width: calc(100vw - 28px);
  max-width: none;
  height: calc(100vh - 28px);
  max-height: none;
  border-radius: 14px;
  overflow: hidden;
}
.editor-card {
  height: 100%;
  display: grid;
  grid-template-rows: 58px minmax(0, 1fr) 58px;
}
.editor-topbar {
  border-bottom: 1px solid var(--line);
  background: #fff;
  display: grid;
  grid-template-columns: minmax(240px, 1fr) auto 44px;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
}
.editor-titleblock h2 { font-size: 16px; }
.editor-titleblock .eyebrow { margin-bottom: 2px; }
.editor-tools {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  background: #f1f5f9;
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 4px;
}
.tool-btn {
  border: 0;
  border-radius: 8px;
  background: transparent;
  padding: 8px 12px;
  cursor: pointer;
  font-weight: 700;
  color: #64748b;
}
.tool-btn.active {
  background: #fff;
  color: var(--primary);
  box-shadow: 0 3px 10px rgba(15,23,42,.08);
}
.editor-layout {
  min-height: 0;
  display: grid;
  grid-template-columns: 300px minmax(520px, 1fr) 380px;
  background: #eef0f4;
}
.editor-left,
.editor-right {
  background: #fff;
  min-height: 0;
  overflow: auto;
}
.editor-left {
  border-right: 1px solid var(--line);
}
.editor-right {
  border-left: 1px solid var(--line);
  padding: 10px;
}
.editor-main {
  min-width: 0;
  min-height: 0;
  overflow: auto;
  padding: 30px 36px;
}
.editor-paper {
  width: min(850px, 100%);
  margin: 0 auto;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 18px 48px rgba(15,23,42,.08);
  padding: 34px 34px 42px;
  min-height: calc(100vh - 180px);
}
.article-title-input {
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  padding: 10px 0 18px;
  font-size: 30px;
  line-height: 1.25;
  letter-spacing: -.03em;
  font-weight: 700;
  outline: none;
  color: var(--text);
}
.article-desc-input {
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  padding: 14px 0 18px;
  resize: vertical;
  outline: none;
  color: #334155;
  font-weight: 650;
  line-height: 1.55;
}
.article-counter {
  display: flex;
  justify-content: flex-end;
  color: var(--muted);
  font-size: 12px;
  margin-top: 4px;
}
.preview-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin: 22px 0 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
  color: #334155;
  font-weight: 700;
}
.content-html-editor {
  width: 100%;
  min-height: 520px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
  line-height: 1.55;
  color: #1f2937;
  background: #f8fafc;
}
.content-preview {
  display: none;
}
.content-mode-panel.preview-mode .content-html-editor { display: none; }
.content-mode-panel.preview-mode .content-preview { display: block; }
.content-mode-panel.html-mode .content-html-editor { display: block; }
.content-mode-panel.html-mode .content-preview { display: none; }
.article-preview {
  font-size: 17px;
  line-height: 1.72;
  color: #1f2937;
}
.article-preview h1,
.article-preview h2,
.article-preview h3,
.article-preview h4 {
  color: #111827;
  letter-spacing: -.025em;
  line-height: 1.25;
  margin: 28px 0 12px;
}
.article-preview h1 { font-size: 34px; }
.article-preview h2 { font-size: 28px; }
.article-preview h3 { font-size: 22px; }
.article-preview p { color: #1f2937; margin: 12px 0; }
.article-preview img {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
}
.article-preview figure { margin: 20px auto; }
.article-preview figcaption {
  color: var(--muted);
  font-size: 13px;
  text-align: center;
  margin-top: 8px;
}
.article-preview table {
  min-width: 0;
  border-collapse: collapse;
  border-spacing: 0;
  width: 100%;
  margin: 18px 0;
}
.article-preview th,
.article-preview td {
  border: 1px solid var(--line);
  padding: 10px;
}
.preview-empty {
  border: 1px dashed #cbd5e1;
  background: #f8fafc;
  border-radius: 14px;
  padding: 32px;
  text-align: center;
  color: var(--muted);
}
.side-section {
  padding: 18px 18px 20px;
  border-bottom: 1px solid var(--line);
}
.side-section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  color: #111827;
}
.category-search-wrap input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  outline: none;
}
.category-radio-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
  max-height: calc(100vh - 310px);
  overflow: auto;
  padding-right: 4px;
}
.category-radio {
  display: grid;
  grid-template-columns: 20px 1fr auto;
  align-items: center;
  gap: 8px;
  padding: 7px 8px;
  border-radius: 10px;
  cursor: pointer;
  color: #334155;
  font-size: 14px;
}
.category-radio:hover { background: #f8fafc; }
.category-radio input { width: 16px; height: 16px; }
.category-radio small { color: var(--muted); font-size: 11px; }
.category-radio.depth-1 span { padding-left: 16px; }
.category-radio.depth-2 span { padding-left: 34px; }
.related-add {
  width: 74px;
  height: 74px;
  border: 1px solid var(--line);
  background: #fafafa;
  color: #9ca3af;
  font-size: 26px;
  font-weight: 700;
  cursor: not-allowed;
}
.info-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  margin-bottom: 14px;
  overflow: hidden;
}
.info-card h3 {
  margin: 0 0 6px;
  background: #f5f5f5;
  padding: 13px 14px;
  font-size: 14px;
  text-align: center;
  color: #334155;
}
.info-card label {
  display: grid;
  gap: 6px;
  padding: 10px 14px;
  color: #64748b;
  font-weight: 700;
  font-size: 13px;
}
.info-card input,
.info-card textarea,
.info-card select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 10px;
  color: var(--text);
  background: #fff;
  outline: none;
  font-weight: 500;
}
.editor-bottom-bar {
  border-top: 1px solid var(--line);
  background: #fff;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
}
@media (max-width: 1280px) {
  .editor-layout { grid-template-columns: 260px minmax(420px, 1fr) 330px; }
  .editor-main { padding: 24px; }
}
@media (max-width: 980px) {
  .editor-dialog { width: 100vw; height: 100vh; border-radius: 0; }
  .editor-card { grid-template-rows: auto minmax(0, 1fr) auto; }
  .editor-layout { grid-template-columns: 1fr; overflow: auto; }
  .editor-left, .editor-right, .editor-main { border: 0; overflow: visible; }
  .editor-main { order: 1; padding: 16px; }
  .editor-left { order: 2; }
  .editor-right { order: 3; }
  .editor-paper { min-height: auto; padding: 22px; }
  .article-title-input { font-size: 24px; }
}

/* Quick edit row in dashboard list */
tr.quick-open > td { background: #f8fafc; }
.quick-edit-row td {
  background: #f8fafc;
  padding: 0;
}
.quick-edit-panel {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #ffffff, #f8fafc);
  padding: 16px;
}
.quick-edit-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}
.quick-edit-head strong { display: block; font-size: 15px; color: var(--text); }
.quick-edit-head span { display: block; margin-top: 4px; color: var(--muted); font-size: 12px; }
.quick-edit-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.quick-edit-grid {
  display: grid;
  grid-template-columns: 90px minmax(260px, 1.2fr) minmax(180px, .8fr) minmax(180px, .8fr);
  gap: 10px;
  align-items: start;
}
.quick-edit-grid label {
  display: grid;
  gap: 5px;
  color: #475569;
  font-size: 12px;
  font-weight: 700;
}
.quick-edit-grid input,
.quick-edit-grid select,
.quick-edit-grid textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  padding: 8px 9px;
  color: var(--text);
  outline: none;
  font-size: 13px;
  font-weight: 500;
}
.quick-edit-grid input:focus,
.quick-edit-grid select:focus,
.quick-edit-grid textarea:focus {
  border-color: #93c5fd;
  box-shadow: 0 0 0 3px rgba(37,99,235,.08);
}
.quick-edit-grid .span-2 { grid-column: span 2; }
@media (max-width: 1280px) {
  .quick-edit-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .quick-edit-head { flex-direction: column; }
  .quick-edit-grid { grid-template-columns: 1fr; }
  .quick-edit-grid .span-2 { grid-column: span 1; }
}

/* Basic CMS editor toolbar */
.cms-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin: -2px 0 14px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f8fafc;
}
.cms-edit-tool {
  border: 1px solid #dbe3ef;
  background: #fff;
  color: #334155;
  border-radius: 8px;
  min-height: 32px;
  padding: 6px 10px;
  cursor: pointer;
  font-weight: 700;
  font-size: 12px;
}
.cms-edit-tool:hover {
  border-color: #93c5fd;
  color: var(--primary);
  box-shadow: 0 5px 14px rgba(79,70,229,.08);
}
.cms-edit-tool.danger-lite {
  color: var(--danger);
  border-color: #fecaca;
}

/* Visual content editor improvements */
.content-preview[contenteditable="true"] {
  min-height: 520px;
  border: 1px solid transparent;
  border-radius: 12px;
  padding: 14px 8px;
  outline: none;
  cursor: text;
}
.content-preview[contenteditable="true"]:focus {
  border-color: #bfdbfe;
  box-shadow: 0 0 0 4px rgba(37,99,235, .08);
  background: #fff;
}
.content-preview[contenteditable="true"]:empty::before {
  content: attr(data-placeholder);
  color: #94a3b8;
}
.article-preview blockquote {
  margin: 18px 0;
  padding: 12px 16px;
  border-left: 4px solid #2563eb;
  background: #f8fafc;
  color: #334155;
  border-radius: 10px;
}
.article-preview ul,
.article-preview ol {
  margin: 12px 0 12px 24px;
  padding-left: 18px;
}
.article-preview li { margin: 6px 0; }
.article-preview a { color: #2563eb; text-decoration: underline; }
.cms-toolbar::after {
  content: 'Chọn vị trí trong nội dung rồi bấm công cụ để chèn/định dạng tại đúng vị trí.';
  width: 100%;
  color: #64748b;
  font-size: 12px;
  font-weight: 600;
  padding: 2px 2px 0;
}


/* Floating selection toolbar and link editor drawer */
.floating-cms-toolbar {
  position: fixed;
  z-index: 2147483000;
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 6px;
  border: 1px solid #d8dee9;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(15, 23, 42, .18);
  max-width: min(720px, calc(100vw - 20px));
  flex-wrap: wrap;
}
.floating-cms-toolbar.hidden { display: none; }
.floating-tool-btn {
  border: 0;
  border-right: 1px solid #e5e7eb;
  background: #fff;
  color: #1f2937;
  min-width: 30px;
  height: 30px;
  padding: 0 8px;
  border-radius: 5px;
  cursor: pointer;
  font-weight: 700;
  font-size: 12px;
}
.floating-tool-btn:last-child { border-right: 0; }
.floating-tool-btn:hover {
  background: #f1f5f9;
  color: var(--primary);
}

.link-editor-drawer {
  position: fixed;
  z-index: 2147483001;
  width: min(360px, calc(100vw - 24px));
  max-height: min(560px, calc(100vh - 24px));
  padding: 14px;
  overflow: auto;
  background: #fff;
  border: 1px solid #dbe3ef;
  border-radius: 14px;
  box-shadow: 0 18px 48px rgba(15, 23, 42, .28);
  display: grid;
  align-content: start;
  gap: 10px;
}
.link-editor-drawer.hidden { display: none; }
.link-editor-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--line);
}
.link-editor-head strong { font-size: 14px; color: #0f172a; }
.link-editor-head button {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 8px;
  background: #f1f5f9;
  cursor: pointer;
  font-size: 22px;
}
.link-editor-drawer label {
  display: grid;
  gap: 7px;
  color: #334155;
  font-weight: 700;
  font-size: 13px;
}
.link-editor-drawer input[type="text"],
.link-editor-drawer input[type="url"],
.link-editor-drawer select {
  width: 100%;
  min-height: 34px;
  border: 1px solid #dbe3ef;
  border-radius: 8px;
  padding: 7px 9px;
  font: inherit;
  font-weight: 500;
}
.link-editor-drawer .check-row {
  display: flex;
  grid-template-columns: none;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}
.link-preview-box {
  display: grid;
  gap: 10px;
  justify-items: center;
  padding: 16px;
  border: 1px dashed #cbd5e1;
  border-radius: 10px;
  background: #f8fafc;
}
.link-preview-box span { color: #64748b; font-size: 12px; font-weight: 700; }
.link-preview-box strong { color: #0f4c81; font-style: italic; font-size: 16px; }
.link-editor-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}
.article-preview a.btn-link {
  display: inline-block;
  padding: 8px 12px;
  border-radius: 8px;
  background: #2563eb;
  color: #fff;
  text-decoration: none;
  font-weight: 700;
}
.article-preview table {
  width: 100%;
  border-collapse: collapse;
  margin: 18px 0;
  font-size: 15px;
}
.article-preview th,
.article-preview td {
  border: 1px solid #dbe3ef;
  padding: 10px;
  vertical-align: top;
}
.article-preview th { background: #f8fafc; font-weight: 700; }
.cms-status{display:inline-flex;padding:4px 9px;border-radius:999px;font-size:12px;font-weight:700;background:#dbeafe;color:#1d4ed8}.cms-status-applied{background:#dcfce7;color:#15803d}.cms-status-failed{background:#fee2e2;color:#b91c1c}.cms-status-conflict{background:#ffedd5;color:#c2410c}.cms-status-skipped{background:#e5e7eb;color:#4b5563}.cms-status-pushing{background:#ede9fe;color:#6d28d9}.cms-manual-notice{position:fixed;right:22px;bottom:22px;z-index:10000;width:min(420px,calc(100vw - 44px));padding:16px 42px 16px 18px;border:1px solid #cbd5e1;border-radius:14px;background:#fff;box-shadow:0 16px 45px rgba(15,23,42,.2);display:grid;gap:5px}.cms-manual-notice>button{position:absolute;right:10px;top:8px;border:0;background:transparent;font-size:24px;cursor:pointer}.cms-manual-notice details{margin-top:5px;max-height:180px;overflow:auto}.cms-manual-notice details div{font-size:12px;padding:4px 0;word-break:break-all}
.sync-freshness-panel{margin-top:18px}.sync-freshness-list{display:grid;gap:8px;padding:0 20px 18px}.sync-freshness-row{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:10px;padding:10px 12px;border:1px solid #e2e8f0;border-radius:10px}.sync-freshness-row>span:nth-child(2){overflow:hidden;text-overflow:ellipsis}.sync-freshness-row small{grid-column:2/-1}
.cms-access-granted #basketPushBtn,.cms-access-granted #basketPushSelectedBtn{display:inline-flex}body:not(.cms-access-granted) #basketPushBtn,body:not(.cms-access-granted) #basketPushSelectedBtn{display:none!important}
