@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  --bg: #F8FAFC;
  --surface: #FFFFFF;
  --surface-2: #F1F5F9;
  --border: #E2E8F0;
  --border-hi: #CBD5E1;
  --text: #0F172A;
  --muted: #64748B;
  --dim: #94A3B8;
  --navy: #002156;
  --navy-light: rgba(0, 33, 86, 0.05);
  --navy-mid: rgba(0, 33, 86, 0.14);
  --gold: #C9A96E;
  --gold-bg: rgba(201, 169, 110, 0.12);
  --gold-border: rgba(201, 169, 110, 0.45);
  --en: #3B82F6;
  --en-bg: rgba(59, 130, 246, 0.08);
  --en-border: rgba(59, 130, 246, 0.3);
  --id: #EF4444;
  --id-bg: rgba(239, 68, 68, 0.07);
  --id-border: rgba(239, 68, 68, 0.3);
  --green: #10B981;
  --green-bg: rgba(16, 185, 129, 0.08);
  --green-border: rgba(16, 185, 129, 0.3);
  --red: #EF4444;
  --red-bg: rgba(239, 68, 68, 0.07);
  --red-border: rgba(239, 68, 68, 0.25);
  --sidebar: 220px;
  --topbar: 52px;
  --r: 7px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, Menlo, monospace;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08), 0 2px 4px rgba(0,0,0,0.04);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; background: var(--bg); color: var(--text); font-family: var(--font); -webkit-font-smoothing: antialiased; }
#root { height: 100%; }
.root { display: grid; grid-template-columns: var(--sidebar) 1fr; grid-template-rows: var(--topbar) 1fr; height: 100vh; overflow: hidden; }

/* ─── Topbar ──────────────────────────────────────────────────────────────── */
.topbar {
  grid-column: 1/-1;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 18px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  gap: 12px;
  z-index: 10;
}
.brand { display: flex; align-items: center; gap: 8px; }
.brand-mark {
  width: 28px; height: 28px;
  background: var(--navy);
  border-radius: 6px;
  display: grid; place-items: center;
  font-size: 12px; font-weight: 800; color: #fff;
  letter-spacing: -0.02em;
}
.brand-name { font-size: 13px; font-weight: 700; letter-spacing: 0.01em; color: var(--text); }
.brand-sub { font-size: 10px; color: var(--dim); font-family: var(--mono); }
.topbar-right { display: flex; align-items: center; gap: 8px; }
.changes-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--gold); animation: pulse 1.8s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1 } 50% { opacity: .3 } }

.save-btn {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 16px;
  background: var(--navy); color: #fff;
  border: none; border-radius: var(--r);
  font-family: var(--font); font-size: 12px; font-weight: 600;
  cursor: pointer; transition: .15s; white-space: nowrap;
  box-shadow: var(--shadow-sm);
}
.save-btn:hover:not(:disabled) { opacity: .85; }
.save-btn:disabled { opacity: .4; cursor: not-allowed; background: var(--surface-2); color: var(--muted); border: 1px solid var(--border); box-shadow: none; }
.save-btn.saved { background: var(--green); }
.save-btn.error { background: var(--red); }

.hamburger {
  display: none; background: none;
  border: 1px solid var(--border); border-radius: var(--r);
  padding: 5px 8px; color: var(--muted); cursor: pointer; font-size: 14px;
}
.token-wrap { display: flex; align-items: center; }
.token-input {
  width: 180px; padding: 6px 10px;
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--r); color: var(--text);
  font-family: var(--mono); font-size: 11px; transition: .15s;
}
.token-input:focus { outline: none; border-color: var(--navy-mid); }
.token-input::placeholder { color: var(--dim); }

/* ─── Sidebar ─────────────────────────────────────────────────────────────── */
.sidebar {
  background: var(--surface);
  border-right: 1px solid var(--border);
  overflow-y: auto; padding: 8px 0;
}
.sidebar::-webkit-scrollbar { width: 3px; }
.sidebar::-webkit-scrollbar-thumb { background: var(--border); }

.sidebar-group {
  font-size: 9.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: var(--dim); font-family: var(--mono);
  padding: 14px 14px 5px;
}
.nav-item {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 14px;
  cursor: pointer; font-size: 12.5px; font-weight: 500;
  color: var(--muted);
  border-left: 2px solid transparent;
  transition: .1s; letter-spacing: .005em;
}
.nav-item:hover { background: var(--surface-2); color: var(--text); }
.nav-item.active {
  background: var(--navy-light);
  border-left-color: var(--navy);
  color: var(--navy);
  font-weight: 600;
}
.nav-icon { width: 15px; text-align: center; flex-shrink: 0; opacity: .8; }
.sidebar-divider { height: 1px; background: var(--border); margin: 6px 14px; }

/* ─── Main ────────────────────────────────────────────────────────────────── */
.main {
  overflow-y: auto;
  padding: 24px 28px 56px;
  background: var(--bg);
}
.main::-webkit-scrollbar { width: 5px; }
.main::-webkit-scrollbar-thumb { background: var(--border-hi); border-radius: 3px; }

.sec-header {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 22px; padding-bottom: 18px;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}
.sec-title { font-size: 20px; font-weight: 700; letter-spacing: -.025em; color: var(--text); }
.file-chip {
  font-size: 10px; font-family: var(--mono); color: var(--dim);
  background: var(--surface-2); padding: 2px 8px;
  border-radius: 4px; border: 1px solid var(--border);
  margin-left: auto;
}

/* ─── Status Bar ──────────────────────────────────────────────────────────── */
.status-bar {
  display: flex; align-items: center; gap: 7px;
  padding: 9px 13px; border-radius: var(--r);
  font-size: 11px; font-family: var(--mono);
  margin-bottom: 18px;
  border: 1px solid var(--border);
  color: var(--muted); background: var(--surface);
}
.status-bar.saved { background: var(--green-bg); border-color: var(--green-border); color: var(--green); }
.status-bar.error { background: var(--red-bg); border-color: var(--red-border); color: var(--red); }
.s-dot { width: 5px; height: 5px; border-radius: 50%; background: currentColor; flex-shrink: 0; }

/* ─── Loading ─────────────────────────────────────────────────────────────── */
.loading-wrap {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  height: 260px; gap: 14px; color: var(--dim);
}
.spinner {
  width: 20px; height: 20px;
  border: 2px solid var(--border);
  border-top-color: var(--navy);
  border-radius: 50%; animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.load-txt { font-size: 11px; font-family: var(--mono); letter-spacing: .06em; }

/* ─── Fields ──────────────────────────────────────────────────────────────── */
.fields { display: flex; flex-direction: column; gap: 14px; }
.bilingual-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.field-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 12px 14px;
  transition: border-color .12s, box-shadow .12s;
  box-shadow: var(--shadow-sm);
}
.field-card:focus-within { border-color: var(--border-hi); box-shadow: var(--shadow-md); }
.field-card.en:focus-within { border-left: 2px solid var(--en); }
.field-card.id:focus-within { border-left: 2px solid var(--id); }
.field-card.shared:focus-within { border-left: 2px solid var(--gold); }

.field-label { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; }
.field-label-text { font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }

.badge { font-size: 9px; font-weight: 700; font-family: var(--mono); letter-spacing: .05em; padding: 2px 6px; border-radius: 4px; text-transform: uppercase; }
.badge.en { background: var(--en-bg); color: var(--en); border: 1px solid var(--en-border); }
.badge.id { background: var(--id-bg); color: var(--id); border: 1px solid var(--id-border); }
.badge.shared { background: var(--gold-bg); color: #9B7A3F; border: 1px solid var(--gold-border); }

.field-input, .field-textarea {
  width: 100%; background: transparent; border: none; outline: none;
  color: var(--text); font-family: var(--font); font-size: 13px; line-height: 1.6; resize: vertical;
}
.field-input::placeholder, .field-textarea::placeholder { color: var(--dim); }
.field-textarea { min-height: 72px; }

.array-divider {
  font-size: 9px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: var(--dim); font-family: var(--mono);
  margin-top: 24px; margin-bottom: 10px;
  display: flex; align-items: center; gap: 10px;
}
.array-divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }

/* ─── Article List ────────────────────────────────────────────────────────── */
.article-list { display: flex; flex-direction: column; gap: 8px; }
.article-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r); padding: 14px 16px;
  cursor: pointer; transition: border-color .12s, box-shadow .12s;
  box-shadow: var(--shadow-sm);
}
.article-card:hover { border-color: var(--border-hi); box-shadow: var(--shadow-md); }
.article-name { font-size: 13px; font-weight: 600; color: var(--text); }
.article-path { font-size: 10px; font-family: var(--mono); color: var(--dim); margin-top: 4px; }

/* ─── Buttons ─────────────────────────────────────────────────────────────── */
.back-btn {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 14px;
  background: var(--surface); color: var(--muted);
  border: 1px solid var(--border); border-radius: var(--r);
  font-family: var(--font); font-size: 12px; font-weight: 600;
  cursor: pointer; transition: .12s; white-space: nowrap;
  box-shadow: var(--shadow-sm);
}
.back-btn:hover { color: var(--text); border-color: var(--border-hi); }

.btn-sm {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 10px;
  background: var(--surface-2); color: var(--muted);
  border: 1px solid var(--border); border-radius: 5px;
  font-family: var(--font); font-size: 11px; font-weight: 600;
  cursor: pointer; transition: .12s;
}
.btn-sm:hover { background: var(--navy-light); color: var(--navy); border-color: var(--navy-mid); }

/* ─── Asset Manager ───────────────────────────────────────────────────────── */
.asset-section-label {
  font-size: 9px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: var(--dim); font-family: var(--mono);
  padding: 18px 0 8px;
  display: flex; align-items: center; gap: 10px;
}
.asset-section-label::after { content: ''; flex: 1; height: 1px; background: var(--border); }

.asset-row {
  display: flex; align-items: center; gap: 14px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r); padding: 12px 16px;
  margin-bottom: 8px; transition: border-color .12s;
  box-shadow: var(--shadow-sm);
}
.asset-row:hover { border-color: var(--border-hi); }

.asset-thumb {
  width: 44px; height: 44px; border-radius: 5px;
  object-fit: contain; background: var(--surface-2);
  border: 1px solid var(--border); flex-shrink: 0;
}
.asset-thumb-placeholder {
  width: 44px; height: 44px; border-radius: 5px;
  background: var(--surface-2); border: 1px solid var(--border);
  flex-shrink: 0; display: grid; place-items: center; color: var(--dim);
}
.asset-info { flex: 1; min-width: 0; }
.asset-label { font-size: 13px; font-weight: 600; color: var(--text); margin-bottom: 2px; }
.asset-filename { font-size: 10px; font-family: var(--mono); color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.asset-meta { font-size: 10px; color: var(--dim); margin-top: 2px; }

.ganti-btn {
  display: flex; align-items: center; gap: 5px;
  padding: 6px 14px; flex-shrink: 0;
  background: var(--surface-2); color: var(--muted);
  border: 1px solid var(--border); border-radius: var(--r);
  font-family: var(--font); font-size: 11px; font-weight: 600;
  cursor: pointer; transition: .12s; white-space: nowrap;
}
.ganti-btn:hover { background: var(--navy-light); color: var(--navy); border-color: var(--navy-mid); }

/* ─── Section Actions ─────────────────────────────────────────────────────── */
.sec-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }

.btn-primary-action {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 14px;
  background: var(--navy); color: #fff;
  border: none; border-radius: var(--r);
  font-family: var(--font); font-size: 12px; font-weight: 600;
  cursor: pointer; transition: .12s;
  box-shadow: var(--shadow-sm);
}
.btn-primary-action:hover { opacity: .85; }

/* ─── Info Note ───────────────────────────────────────────────────────────── */
.field-card.info { background: #EFF6FF; border-color: #BFDBFE; }
.info-note { font-size: 11px; color: #1D4ED8; line-height: 1.6; }

/* ─── Field Group Title ───────────────────────────────────────────────────── */
.field-group-title {
  font-size: 13px; font-weight: 700; color: var(--text);
  margin-top: 10px; margin-bottom: 4px; letter-spacing: -0.01em;
}

/* ─── URL / Asset Upload Field (page editor) ─────────────────────────────── */
.asset-url-field { display: flex; flex-direction: column; gap: 6px; }

.asset-url-filename {
  font-size: 11px; font-weight: 600; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.asset-url-upload-btn {
  display: inline-flex; align-items: center; gap: 5px;
  align-self: flex-start;
  padding: 5px 12px;
  background: var(--surface-2); color: var(--muted);
  border: 1px solid var(--border); border-radius: 5px;
  font-family: var(--font); font-size: 11px; font-weight: 600;
  cursor: pointer; transition: .12s; white-space: nowrap;
}
.asset-url-upload-btn:hover { background: var(--navy-light); color: var(--navy); border-color: var(--navy-mid); }

.asset-url-hint {
  display: flex; align-items: flex-start; gap: 5px;
  font-size: 10px; color: var(--dim); line-height: 1.5;
  margin-top: 2px;
}

/* ─── Block Image Upload (article editor) ─────────────────────────────────── */
.block-image-upload-btn {
  display: inline-flex; align-items: center; gap: 4px; align-self: flex-start;
  padding: 4px 10px;
  background: var(--surface-2); color: var(--muted);
  border: 1px solid var(--border); border-radius: 5px;
  font-family: var(--font); font-size: 11px; font-weight: 600;
  cursor: pointer; transition: .12s;
}
.block-image-upload-btn:hover { background: var(--navy-light); color: var(--navy); border-color: var(--navy-mid); }

/* ─── Modal ───────────────────────────────────────────────────────────────── */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(15,23,42,0.25);
  backdrop-filter: blur(4px); z-index: 200;
  display: flex; align-items: center; justify-content: center;
}
.modal {
  background: var(--surface); border-radius: 10px;
  width: 420px; max-width: 95vw;
  box-shadow: var(--shadow-md), 0 20px 60px rgba(0,0,0,0.12);
  border: 1px solid var(--border); overflow: hidden;
}
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--border);
}
.modal-header h2 { font-size: 15px; font-weight: 700; color: var(--text); }
.close-btn {
  display: flex; align-items: center; justify-content: center;
  width: 26px; height: 26px;
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 5px; color: var(--muted); cursor: pointer; transition: .12s;
}
.close-btn:hover { color: var(--text); border-color: var(--border-hi); }
.modal-body { padding: 20px; }
.modal-footer { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 20px; border-top: 1px solid var(--border); }

.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 11px; font-weight: 600; color: var(--muted); margin-bottom: 5px; letter-spacing: .04em; text-transform: uppercase; }
.form-group input, .form-group textarea {
  width: 100%; padding: 8px 10px;
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--r); color: var(--text);
  font-family: var(--mono); font-size: 12px; transition: .15s;
}
.form-group input:focus, .form-group textarea:focus { outline: none; border-color: var(--border-hi); box-shadow: 0 0 0 3px var(--navy-light); }
.form-group input:disabled { opacity: .5; cursor: not-allowed; }
.help-text { font-size: 10px; color: var(--dim); margin-top: 5px; line-height: 1.5; }

.btn-primary {
  display: flex; align-items: center; gap: 6px;
  padding: 7px 18px;
  background: var(--navy); color: #fff;
  border: none; border-radius: var(--r);
  font-family: var(--font); font-size: 12px; font-weight: 600;
  cursor: pointer; transition: .15s;
}
.btn-primary:hover { opacity: .85; }
.btn-secondary {
  display: flex; align-items: center; gap: 6px;
  padding: 7px 16px;
  background: var(--surface); color: var(--muted);
  border: 1px solid var(--border); border-radius: var(--r);
  font-family: var(--font); font-size: 12px; font-weight: 600;
  cursor: pointer; transition: .15s;
}
.btn-secondary:hover { color: var(--text); border-color: var(--border-hi); }

/* ─── Mobile ──────────────────────────────────────────────────────────────── */
@media (max-width: 700px) {
  .root { grid-template-columns: 1fr; }
  .sidebar {
    display: none; position: fixed;
    top: var(--topbar); left: 0;
    width: var(--sidebar); height: calc(100vh - var(--topbar));
    z-index: 100;
    box-shadow: 4px 0 24px rgba(0,0,0,0.1);
  }
  .sidebar.open { display: block; }
  .hamburger { display: block; }
  .bilingual-row { grid-template-columns: 1fr; }
}

/* ─── Settings Button ─────────────────────────────────────────────────────── */
.settings-btn {
  display: flex; align-items: center; justify-content: center;
  width: 30px; height: 30px;
  background: var(--surface-2); color: var(--muted);
  border: 1px solid var(--border); border-radius: var(--r);
  cursor: pointer; transition: .12s; flex-shrink: 0;
}
.settings-btn:hover { color: var(--text); border-color: var(--border-hi); }

/* ─── Visibility Toggle ───────────────────────────────────────────────────── */
.vis-switch {
  display: inline-flex; align-items: center;
  position: relative; width: 32px; height: 18px;
  border-radius: 10px; flex-shrink: 0;
}
.vis-switch-track {
  position: absolute; inset: 0; border-radius: 10px;
  background: var(--border-hi); transition: .2s;
}
.vis-switch-thumb {
  position: absolute; left: 2px; top: 2px;
  width: 14px; height: 14px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,0.2);
  transition: .2s; z-index: 1;
}
.vis-switch.vis-on .vis-switch-track { background: var(--green); }
.vis-switch.vis-on .vis-switch-thumb { transform: translateX(14px); }

/* ─── Settings Modal Buttons ──────────────────────────────────────────────── */
.save-settings-btn {
  display: flex; align-items: center; gap: 6px;
  padding: 7px 18px;
  background: var(--navy); color: #fff;
  border: none; border-radius: var(--r);
  font-family: var(--font); font-size: 12px; font-weight: 600;
  cursor: pointer; transition: .15s;
}
.save-settings-btn:hover { opacity: .85; }
.clear-settings-btn {
  display: flex; align-items: center; gap: 6px;
  padding: 7px 16px;
  background: var(--surface); color: var(--red);
  border: 1px solid var(--red-border); border-radius: var(--r);
  font-family: var(--font); font-size: 12px; font-weight: 600;
  cursor: pointer; transition: .15s;
}
.clear-settings-btn:hover { background: var(--red-bg); }

/* ─── Status Dismiss ──────────────────────────────────────────────────────── */
.status-dismiss {
  display: flex; align-items: center; justify-content: center;
  width: 18px; height: 18px; margin-left: auto; flex-shrink: 0;
  background: none; border: none; color: currentColor;
  cursor: pointer; border-radius: 3px; opacity: .6; transition: .12s;
}
.status-dismiss:hover { opacity: 1; }

/* ─── Field Card — always-visible colored left border ─────────────────────── */
/* These rules have lower specificity than the :focus-within rules above,
   so the focused color still wins when the field is focused. */
.field-card.en  { border-left: 2px solid var(--en-border); }
.field-card.id  { border-left: 2px solid var(--id-border); }
.field-card.shared { border-left: 2px solid var(--gold-border); }

/* ─── Article List ────────────────────────────────────────────────────────── */
.article-name-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; flex-wrap: wrap;
}
.article-actions-row { display: flex; align-items: center; gap: 6px; }
.btn-sm-danger {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 10px;
  background: var(--red-bg); color: var(--red);
  border: 1px solid var(--red-border); border-radius: 5px;
  font-family: var(--font); font-size: 11px; font-weight: 600;
  cursor: pointer; transition: .12s;
}
.btn-sm-danger:hover { background: var(--red); color: #fff; }

/* ─── Article Status Badge ────────────────────────────────────────────────── */
.article-status-badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px; border-radius: 4px;
  font-size: 10px; font-weight: 700; font-family: var(--mono);
  letter-spacing: .04em; flex-shrink: 0;
}
.article-status-badge.live {
  background: var(--green-bg); color: var(--green);
  border: 1px solid var(--green-border);
}
.article-status-badge.draft {
  background: var(--surface-2); color: var(--muted);
  border: 1px solid var(--border);
}
.article-status-badge.loading {
  background: var(--surface-2); color: var(--dim);
  border: 1px solid var(--border);
  letter-spacing: .2em; font-size: 8px;
}

/* ─── Article Publish Bar ─────────────────────────────────────────────────── */
.article-publish-bar {
  position: sticky; bottom: 0;
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 14px 20px;
  margin: 32px -28px -56px;
  border-top: 1px solid var(--border);
  background: var(--surface);
  box-shadow: 0 -4px 16px rgba(0,0,0,0.06);
  flex-wrap: wrap;
}
.article-publish-bar.is-live { background: #ecfdf5; border-top-color: var(--green-border); }
.article-publish-status { display: flex; align-items: center; gap: 8px; }
.btn-publish {
  display: flex; align-items: center; gap: 6px;
  padding: 7px 18px;
  background: var(--green); color: #fff;
  border: none; border-radius: var(--r);
  font-family: var(--font); font-size: 12px; font-weight: 600;
  cursor: pointer; transition: .15s;
}
.btn-publish:hover { opacity: .85; }
.btn-publish:disabled { opacity: .4; cursor: not-allowed; }

/* ─── Article Editor ──────────────────────────────────────────────────────── */
.article-editor-main { padding-bottom: 0; }

/* ─── Body Editor (WYSIWYG) ───────────────────────────────────────────────── */
.body-editor {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r); overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.body-editor.en { border-left: 2px solid var(--en-border); }
.body-editor.id { border-left: 2px solid var(--id-border); }
.body-editor.en:focus-within { border-left-color: var(--en); }
.body-editor.id:focus-within { border-left-color: var(--id); }

.body-editor-header {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 12px 0;
}
.body-editor-hint {
  font-size: 10px; color: var(--dim);
  font-family: var(--mono); letter-spacing: .04em;
}
.editor-toolbar {
  display: flex; align-items: center; gap: 3px; flex-wrap: wrap;
  padding: 7px 12px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
}
.tb-btn {
  padding: 3px 8px;
  background: var(--surface); color: var(--muted);
  border: 1px solid var(--border); border-radius: 4px;
  font-family: var(--font); font-size: 11px; font-weight: 600;
  cursor: pointer; transition: .1s; white-space: nowrap;
}
.tb-btn:hover { color: var(--navy); border-color: var(--navy-mid); background: var(--navy-light); }
.tb-sep { width: 1px; height: 16px; background: var(--border); margin: 0 2px; flex-shrink: 0; }
.wysiwyg-editor {
  min-height: 200px; max-height: 500px; overflow-y: auto;
  padding: 12px 14px; outline: none;
  font-size: 13.5px; line-height: 1.7; color: var(--text);
  font-family: var(--font);
}
.wysiwyg-editor:empty::before {
  content: attr(data-placeholder);
  color: var(--dim); pointer-events: none;
}
.wysiwyg-editor h2 { font-size: 16px; font-weight: 700; margin: 12px 0 6px; }
.wysiwyg-editor h3 { font-size: 14px; font-weight: 700; margin: 10px 0 4px; }
.wysiwyg-editor p { margin: 0 0 10px; }
.wysiwyg-editor ul, .wysiwyg-editor ol { padding-left: 20px; margin: 0 0 10px; }
.wysiwyg-editor li { margin-bottom: 3px; }
.wysiwyg-editor blockquote {
  border-left: 3px solid var(--gold); padding-left: 12px;
  color: var(--muted); margin: 8px 0; font-style: italic;
}
.wysiwyg-editor a { color: var(--navy); text-decoration: underline; }
.wysiwyg-editor img { max-width: 100%; border-radius: 4px; margin: 6px 0; }
.wysiwyg-editor code {
  font-family: var(--mono); font-size: 12px;
  background: var(--surface-2); padding: 1px 4px; border-radius: 3px;
}
