/* ============================================================
   m3c Docs — panel de administración
   ============================================================ */
:root {
  --bg: #04070c;
  --panel: #0a1220;
  --panel-2: #0d1726;
  --line: rgba(0, 200, 255, 0.12);
  --line-strong: rgba(0, 200, 255, 0.3);
  --cyan: #00c8ff;
  --cyan-soft: #5fdcff;
  --text: #e8f4fa;
  --text-dim: #8fa4b5;
  --text-faint: #5f7283;
  --red: #ff4d6d;
  --green: #3ddc97;
  --font-display: 'Unbounded', sans-serif;
  --font-body: 'Chakra Petch', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}
* { margin: 0; padding: 0; box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  background: radial-gradient(ellipse 70% 40% at 50% -5%, rgba(0, 140, 200, 0.1), transparent 60%), var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px; line-height: 1.55; min-height: 100vh;
}
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #15304a; border-radius: 5px; }
button { font-family: inherit; }

/* ---------- Botones ---------- */
.btn-primary, .btn-ghost {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-display); font-size: 12px; font-weight: 600;
  letter-spacing: 0.05em; text-transform: uppercase;
  padding: 12px 22px; border-radius: 4px; cursor: pointer;
  transition: all 0.3s var(--ease);
  clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px);
}
.btn-primary { background: linear-gradient(135deg, #00b4e6, #0090d4); color: #021018; border: none; box-shadow: 0 0 18px rgba(0, 200, 255, 0.2); }
.btn-primary:hover { box-shadow: 0 0 26px rgba(0, 200, 255, 0.45); transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--cyan-soft); border: 1px solid var(--line-strong); }
.btn-ghost:hover { background: rgba(0, 200, 255, 0.08); }
.btn-sm { padding: 9px 16px; font-size: 11px; }
.btn-danger { color: var(--red); border-color: rgba(255, 77, 109, 0.4); }
.btn-danger:hover { background: rgba(255, 77, 109, 0.1); }

/* ---------- Auth ---------- */
.auth-screen { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; }
.auth-card {
  width: 100%; max-width: 400px;
  background: rgba(10, 18, 32, 0.85);
  border: 1px solid var(--line); border-radius: 10px;
  padding: 40px 36px; text-align: center;
  backdrop-filter: blur(12px); animation: cardIn 0.7s var(--ease);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.55), 0 0 60px rgba(0, 200, 255, 0.06);
}
@keyframes cardIn { from { opacity: 0; transform: translateY(24px) scale(0.98); } }
.auth-logo { width: 84px; margin-bottom: 16px; filter: drop-shadow(0 0 18px rgba(0, 200, 255, 0.45)); }
.auth-card h1 { font-family: var(--font-display); font-size: 17px; font-weight: 600; color: #fff; }
.auth-sub { color: var(--text-dim); font-size: 13px; margin: 8px 0 26px; }
.auth-card form { display: flex; flex-direction: column; gap: 16px; text-align: left; }
.auth-error { color: var(--red); font-size: 13px; }
.auth-back { display: inline-block; margin-top: 22px; color: var(--text-dim); font-size: 13px; text-decoration: none; transition: color 0.3s; }
.auth-back:hover { color: var(--cyan); }

label span { display: block; font-size: 11px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-dim); margin-bottom: 6px; }
input, textarea, select {
  width: 100%; background: #060c16; border: 1px solid var(--line); border-radius: 5px;
  color: var(--text); font-family: var(--font-body); font-size: 14px; padding: 11px 13px;
  transition: border-color 0.3s, box-shadow 0.3s; resize: vertical;
}
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(0, 200, 255, 0.12); }
select { cursor: pointer; }

/* ---------- Layout ---------- */
.panel { display: flex; min-height: 100vh; }
.sidebar {
  width: 224px; flex-shrink: 0;
  background: rgba(6, 11, 19, 0.92);
  border-right: 1px solid var(--line);
  display: flex; flex-direction: column;
  padding: 22px 14px; position: sticky; top: 0; height: 100vh;
}
.sidebar-brand { display: flex; align-items: center; gap: 10px; padding: 0 10px 22px; border-bottom: 1px solid var(--line); margin-bottom: 18px; }
.sidebar-brand img { height: 36px; filter: drop-shadow(0 0 8px rgba(0, 200, 255, 0.4)); }
.sidebar-brand span { font-family: var(--font-display); font-weight: 700; font-size: 15px; color: #fff; }
.sidebar-brand em { font-style: normal; color: var(--cyan); }
.sidebar-nav { display: flex; flex-direction: column; gap: 4px; flex: 1; }
.sidebar-foot { display: flex; flex-direction: column; gap: 4px; border-top: 1px solid var(--line); padding-top: 14px; }
.nav-item {
  display: flex; align-items: center; gap: 11px; width: 100%;
  background: none; border: none; border-radius: 6px; color: var(--text-dim);
  font-family: var(--font-body); font-size: 14px; font-weight: 500;
  padding: 11px 12px; cursor: pointer; text-align: left; text-decoration: none;
  transition: background 0.25s, color 0.25s;
}
.nav-item svg { width: 18px; height: 18px; flex-shrink: 0; }
.nav-item:hover { background: rgba(0, 200, 255, 0.06); color: var(--text); }
.nav-item.active { background: linear-gradient(90deg, rgba(0, 200, 255, 0.14), rgba(0, 200, 255, 0.04)); color: var(--cyan-soft); box-shadow: inset 2px 0 0 var(--cyan); }

.content { flex: 1; min-width: 0; padding: 32px clamp(20px, 4vw, 44px); }
.view-head { margin-bottom: 26px; position: relative; }
.view-head h2 { font-family: var(--font-display); font-size: 22px; font-weight: 700; color: #fff; }
.view-head p { color: var(--text-dim); font-size: 13px; margin-top: 4px; }
.view-head .btn-primary { position: absolute; right: 0; top: 4px; }

/* ---------- Cards / form ---------- */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 22px 24px; margin-bottom: 22px; }
.card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; flex-wrap: wrap; gap: 10px; }
.card-head h3 { font-family: var(--font-display); font-size: 13px; font-weight: 600; letter-spacing: 0.04em; color: #fff; text-transform: uppercase; }
.form-grid { display: flex; flex-direction: column; gap: 16px; max-width: 620px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-grid button { align-self: flex-start; }

/* ---------- Lista de páginas ---------- */
.pages-group { margin-bottom: 26px; }
.pages-group-title {
  font-family: var(--font-display); font-size: 12px; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--cyan-soft);
  margin-bottom: 12px; display: flex; align-items: center; gap: 8px;
}
.pages-group-title .count { color: var(--text-faint); font-weight: 400; }
.page-row {
  display: flex; align-items: center; gap: 16px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 8px;
  padding: 14px 18px; margin-bottom: 10px;
  transition: border-color 0.25s, transform 0.2s var(--ease);
}
.page-row:hover { border-color: var(--line-strong); }
.page-row .pr-order { display: flex; flex-direction: column; gap: 2px; }
.page-row .pr-order button {
  width: 22px; height: 18px; border: 1px solid var(--line); background: rgba(0, 200, 255, 0.04);
  color: var(--text-dim); border-radius: 4px; cursor: pointer; font-size: 9px; line-height: 1;
  display: flex; align-items: center; justify-content: center; transition: 0.2s;
}
.page-row .pr-order button:hover { color: var(--cyan); border-color: var(--line-strong); }
.page-row .pr-order button:disabled { opacity: 0.25; cursor: default; }
.page-row .info { flex: 1; min-width: 0; }
.page-row .info h4 { font-family: var(--font-display); font-size: 14px; font-weight: 600; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.page-row .info p { font-size: 12px; color: var(--text-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.page-row .pr-slug { font-family: var(--font-mono); font-size: 11px; color: var(--text-faint); }
.badge { font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; padding: 3px 9px; border-radius: 20px; flex-shrink: 0; }
.badge.pub { color: var(--green); border: 1px solid rgba(61, 220, 151, 0.35); background: rgba(61, 220, 151, 0.08); }
.badge.draft { color: var(--text-faint); border: 1px solid var(--line); }
.row-actions { display: flex; gap: 8px; flex-shrink: 0; }
.icon-btn {
  width: 34px; height: 34px; display: flex; align-items: center; justify-content: center;
  background: rgba(0, 200, 255, 0.06); border: 1px solid var(--line); border-radius: 5px;
  color: var(--text-dim); cursor: pointer; transition: all 0.25s;
}
.icon-btn svg { width: 16px; height: 16px; }
.icon-btn:hover { color: var(--cyan); border-color: var(--line-strong); }
.icon-btn.danger:hover { color: var(--red); border-color: rgba(255, 77, 109, 0.4); background: rgba(255, 77, 109, 0.07); }
.empty-state { text-align: center; color: var(--text-dim); padding: 50px 20px; border: 1px dashed var(--line-strong); border-radius: 10px; }

/* ---------- Secciones ---------- */
.cats-list { display: flex; flex-direction: column; gap: 10px; max-width: 640px; }
.cat-row {
  display: flex; align-items: center; gap: 14px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 14px 18px;
}
.cat-row .info { flex: 1; }
.cat-row .info h4 { font-family: var(--font-display); font-size: 14px; color: #fff; }
.cat-row .info p { font-size: 12px; color: var(--text-faint); }

/* ---------- Switch ---------- */
.switch { display: inline-flex; align-items: center; gap: 9px; cursor: pointer; user-select: none; }
.switch input { display: none; }
.switch-track { width: 40px; height: 22px; border-radius: 12px; background: #1a2738; border: 1px solid var(--line); position: relative; transition: 0.3s; flex-shrink: 0; }
.switch-track::after { content: ''; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: var(--text-dim); transition: 0.3s; }
.switch input:checked + .switch-track { background: rgba(0, 200, 255, 0.25); border-color: var(--cyan); }
.switch input:checked + .switch-track::after { transform: translateX(18px); background: var(--cyan); }
.switch-label { font-size: 12px; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.06em; }

/* ============================================================
   EDITOR
   ============================================================ */
.editor-view { display: flex; flex-direction: column; height: calc(100vh - 64px); }
.editor-topbar { display: flex; align-items: center; gap: 16px; margin-bottom: 16px; }
.editor-status { color: var(--text-faint); font-size: 12px; }
.editor-top-actions { margin-left: auto; display: flex; align-items: center; gap: 16px; }

.editor-meta { display: grid; grid-template-columns: 1fr 220px 220px; gap: 14px; margin-bottom: 16px; }
.editor-meta label span { margin-bottom: 5px; }
.editor-meta input, .editor-meta select { padding: 9px 12px; }
.editor-meta .em-title { grid-column: 1; }
.editor-meta .em-summary { grid-column: 1 / -1; }

/* Barra de idioma del editor */
.editor-langbar { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; flex-wrap: wrap; }
.elb-label { font-size: 11px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-dim); }
.elb-hint { font-size: 12px; color: var(--text-faint); }
.lang-seg { display: flex; gap: 2px; background: #060c16; border: 1px solid var(--line); border-radius: 7px; padding: 3px; }
.lang-seg button {
  padding: 6px 16px; border: none; border-radius: 5px; background: none; cursor: pointer;
  font-family: var(--font-body); font-size: 13px; font-weight: 600; color: var(--text-dim); transition: all 0.2s;
}
.lang-seg button.active { background: linear-gradient(135deg, #00b4e6, #0090d4); color: #021018; }
.ai-btn { margin-left: auto; }
.ai-btn[disabled] { opacity: 0.5; cursor: not-allowed; }
.lang-tag { font-style: normal; font-size: 9px; letter-spacing: 0.1em; color: var(--cyan-soft); border: 1px solid var(--line-strong); border-radius: 3px; padding: 1px 5px; margin-left: 4px; vertical-align: middle; }

/* Modal de IA */
.ai-source { width: 100%; min-height: 220px; font-family: var(--font-mono); font-size: 12.5px; line-height: 1.6; }
.ai-drop { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 4px; }
.ai-file-btn {
  font-size: 12px; font-weight: 600; color: var(--cyan-soft);
  border: 1px dashed var(--line-strong); border-radius: 6px; padding: 8px 14px; cursor: pointer; transition: all 0.2s;
}
.ai-file-btn:hover { background: rgba(0, 200, 255, 0.06); }
.ai-note { font-size: 12px; color: var(--text-faint); }
.ai-spinner { display: flex; flex-direction: column; align-items: center; gap: 16px; padding: 26px 10px; text-align: center; }
.ai-spinner .ring { width: 34px; height: 34px; border: 3px solid var(--line); border-top-color: var(--cyan); border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.ai-spinner p { color: var(--text-dim); font-size: 13px; }
.ai-disabled-note { font-size: 12px; color: var(--red); margin-top: 10px; }

/* Toolbar */
.editor-toolbar {
  display: flex; align-items: center; flex-wrap: wrap; gap: 4px;
  background: var(--panel); border: 1px solid var(--line);
  border-radius: 8px 8px 0 0; padding: 7px 10px;
}
.editor-toolbar button {
  min-width: 32px; height: 32px; padding: 0 9px;
  background: rgba(0, 200, 255, 0.04); border: 1px solid transparent; border-radius: 5px;
  color: var(--text-dim); font-family: var(--font-body); font-size: 13px; cursor: pointer;
  transition: all 0.2s; display: inline-flex; align-items: center; justify-content: center;
}
.editor-toolbar button:hover { color: var(--cyan); border-color: var(--line); background: rgba(0, 200, 255, 0.1); }
.editor-toolbar i { width: 1px; height: 20px; background: var(--line); margin: 0 5px; display: inline-block; }
.editor-toolbar .tb-code { color: var(--cyan-soft); border-color: var(--line); font-weight: 600; }
.editor-toolbar .tb-spacer { flex: 1; }

.tb-dropdown { position: relative; }
.tb-menu {
  position: absolute; top: 38px; left: 0; z-index: 20;
  background: var(--panel-2); border: 1px solid var(--line-strong); border-radius: 8px;
  padding: 6px; min-width: 170px; box-shadow: 0 18px 50px rgba(0, 0, 0, 0.6);
}
.tb-menu button { display: flex !important; width: 100%; justify-content: flex-start !important; height: auto; padding: 9px 12px; gap: 8px; }

.tb-modes { display: flex; gap: 2px; background: #060c16; border: 1px solid var(--line); border-radius: 6px; padding: 2px; }
.tb-modes button { height: 28px; min-width: 30px; border-radius: 4px; }
.tb-modes button.active { background: rgba(0, 200, 255, 0.16); color: var(--cyan); }

/* Split */
.editor-split {
  flex: 1; min-height: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 0;
  border: 1px solid var(--line); border-top: none; border-radius: 0 0 8px 8px; overflow: hidden;
}
.editor-split.mode-edit { grid-template-columns: 1fr; }
.editor-split.mode-edit .preview-pane { display: none; }
.editor-split.mode-preview { grid-template-columns: 1fr; }
.editor-split.mode-preview .editor-pane { display: none; }
.editor-pane { border-right: 1px solid var(--line); min-width: 0; background: #050a12; }
.editor-split.mode-edit .editor-pane, .editor-split.mode-preview .preview-pane { border-right: none; }
#pgBody {
  width: 100%; height: 100%; border: none; border-radius: 0; resize: none;
  background: #050a12; padding: 20px 22px;
  font-family: var(--font-mono); font-size: 14px; line-height: 1.7; color: #cfe8f2;
}
#pgBody:focus { box-shadow: none; }
.preview-pane { overflow-y: auto; background: #04080e; padding: 24px 28px; min-width: 0; }

/* ---------- Prosa de la vista previa (igual que la web) ---------- */
.prose { font-size: 15px; max-width: 760px; }
.prose > *:first-child { margin-top: 0; }
.prose h1 { font-family: var(--font-display); font-weight: 700; font-size: 30px; line-height: 1.2; color: #fff; margin: 0 0 6px; }
.prose h2 { font-family: var(--font-display); font-weight: 600; font-size: 22px; color: #fff; margin: 38px 0 14px; padding-bottom: 9px; border-bottom: 1px solid var(--line); }
.prose h3 { font-family: var(--font-display); font-weight: 600; font-size: 17px; color: #fff; margin: 28px 0 11px; }
.prose h4 { font-size: 15px; color: var(--cyan-soft); margin: 22px 0 9px; }
.prose p { margin: 13px 0; color: var(--text); }
.prose a { color: var(--cyan); border-bottom: 1px solid rgba(0, 200, 255, 0.3); }
.prose strong { color: #fff; font-weight: 700; }
.prose em { color: var(--cyan-soft); font-style: normal; }
.prose ul, .prose ol { margin: 13px 0; padding-left: 24px; }
.prose li { margin: 5px 0; }
.prose li::marker { color: var(--cyan); }
.prose img { max-width: 100%; border-radius: 8px; border: 1px solid var(--line); margin: 16px 0; }
.prose hr { border: none; border-top: 1px solid var(--line); margin: 30px 0; }
.prose .anchor { display: none; }
code.inline { font-family: var(--font-mono); font-size: 0.88em; background: rgba(0, 200, 255, 0.08); border: 1px solid var(--line); color: var(--cyan-soft); padding: 2px 6px; border-radius: 4px; }

.code-block { position: relative; margin: 18px 0; background: #060c15; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.code-bar { display: flex; align-items: center; justify-content: space-between; padding: 7px 13px; background: rgba(0, 200, 255, 0.04); border-bottom: 1px solid var(--line); min-height: 36px; }
.code-lang { font-family: var(--font-mono); font-size: 11px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--cyan-soft); }
.code-copy { margin-left: auto; font-family: var(--font-body); font-size: 11px; font-weight: 600; text-transform: uppercase; color: var(--text-dim); background: rgba(0, 200, 255, 0.06); border: 1px solid var(--line); border-radius: 5px; padding: 4px 11px; cursor: pointer; transition: all 0.2s; }
.code-copy:hover { color: var(--cyan); border-color: var(--line-strong); }
.code-copy.done { color: #04111a; background: var(--cyan); border-color: var(--cyan); }
.code-block pre { margin: 0; padding: 15px 17px; overflow-x: auto; }
.code-block code { font-family: var(--font-mono); font-size: 13px; line-height: 1.7; color: #cfe8f2; white-space: pre; }
.tok-com { color: #5a7385; font-style: italic; }
.tok-str { color: #6fe3c2; }
.tok-num { color: #ff9f6b; }
.tok-kw { color: #4cc8ff; font-weight: 600; }

.table-wrap { margin: 18px 0; overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; }
.prose table { width: 100%; border-collapse: collapse; font-size: 14px; }
.prose th, .prose td { padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--line); }
.prose th { font-family: var(--font-display); font-size: 12px; font-weight: 600; text-transform: uppercase; color: var(--cyan-soft); background: rgba(0, 200, 255, 0.05); }
.prose tbody tr:last-child td { border-bottom: none; }
.prose blockquote { margin: 16px 0; padding: 4px 18px; border-left: 3px solid var(--cyan-dim, #0a82a8); color: var(--text-dim); font-style: italic; }

.callout { margin: 20px 0; border: 1px solid var(--line); border-left-width: 3px; border-radius: 8px; padding: 13px 16px; background: rgba(13, 24, 38, 0.5); }
.callout-head { display: flex; align-items: center; gap: 9px; margin-bottom: 5px; }
.callout-icon { width: 22px; height: 22px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; border-radius: 5px; font-size: 13px; font-weight: 700; }
.callout-title { font-family: var(--font-display); font-size: 13px; font-weight: 600; }
.callout-body > *:first-child { margin-top: 0; } .callout-body > *:last-child { margin-bottom: 0; }
.callout-body p { color: var(--text); }
.callout-info { border-left-color: var(--cyan); } .callout-info .callout-icon { background: rgba(0, 200, 255, 0.16); color: var(--cyan); } .callout-info .callout-title { color: var(--cyan-soft); }
.callout-tip { border-left-color: #b07bff; } .callout-tip .callout-icon { background: rgba(176, 123, 255, 0.16); color: #c39bff; } .callout-tip .callout-title { color: #c39bff; }
.callout-success { border-left-color: #3ddc97; } .callout-success .callout-icon { background: rgba(61, 220, 151, 0.16); color: #3ddc97; } .callout-success .callout-title { color: #6fe3c2; }
.callout-warning { border-left-color: #ffb454; } .callout-warning .callout-icon { background: rgba(255, 180, 84, 0.16); color: #ffb454; } .callout-warning .callout-title { color: #ffc878; }
.callout-danger { border-left-color: #ff5d73; } .callout-danger .callout-icon { background: rgba(255, 93, 115, 0.16); color: #ff5d73; } .callout-danger .callout-title { color: #ff8a99; }

/* ---------- Modal ---------- */
.modal { position: fixed; inset: 0; z-index: 200; display: flex; align-items: center; justify-content: center; background: rgba(2, 5, 9, 0.75); backdrop-filter: blur(6px); padding: 20px; animation: fadeIn 0.25s; }
@keyframes fadeIn { from { opacity: 0; } }
.modal-card { width: 100%; max-width: 520px; max-height: 90vh; overflow-y: auto; background: var(--panel-2); border: 1px solid var(--line-strong); border-radius: 10px; padding: 28px 30px; animation: cardIn 0.4s var(--ease); box-shadow: 0 30px 90px rgba(0, 0, 0, 0.6); }
.modal-card h3 { font-family: var(--font-display); font-size: 16px; color: #fff; margin-bottom: 20px; }
.modal-card .form-grid { max-width: none; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; }

/* ---------- Toast ---------- */
.toast { position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%); z-index: 300; background: #0c1624; border: 1px solid var(--line-strong); color: var(--text); font-size: 14px; padding: 13px 22px; border-radius: 6px; box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5), 0 0 24px rgba(0, 200, 255, 0.12); animation: toastIn 0.35s var(--ease); }
.toast.error { border-color: rgba(255, 77, 109, 0.5); }
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, 12px); } }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .editor-split { grid-template-columns: 1fr; }
  .editor-split .preview-pane { display: none; }
  .editor-split.mode-preview { } .editor-split.mode-preview .preview-pane { display: block; } .editor-split.mode-preview .editor-pane { display: none; }
  .editor-meta { grid-template-columns: 1fr 1fr; }
  .editor-meta .em-title { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
  .panel { flex-direction: column; }
  .sidebar { width: 100%; height: auto; position: static; flex-direction: row; align-items: center; padding: 10px 14px; overflow-x: auto; }
  .sidebar-brand { border: none; padding: 0 14px 0 0; margin: 0; }
  .sidebar-nav { flex-direction: row; } .sidebar-foot { flex-direction: row; border: none; padding: 0; }
  .nav-item span { display: none; }
  .view-head .btn-primary { position: static; margin-top: 12px; }
  .form-row { grid-template-columns: 1fr; }
  .editor-meta { grid-template-columns: 1fr; }
  .editor-view { height: auto; }
  .editor-split { min-height: 60vh; }
}
