.content-editor-shell { display: grid; gap: 1rem; }
.content-editor-hero { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; padding: 1.35rem; }
.content-editor-hero h2 { margin: .2rem 0; font-size: clamp(1.35rem, 2vw, 1.9rem); }
.content-editor-hero p { margin: 0; color: var(--admin-muted, #64748b); }
.content-editor-hero [data-content-save-state] { color: #15803d; font-weight: 800; }
.content-editor-hero [data-content-save-state].dirty { color: #b45309; }
.content-editor-main-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .65rem; }
.content-page-tabs, .content-language-tabs { display: flex; flex-wrap: wrap; gap: .45rem; }
.content-page-tabs { padding: .4rem; overflow-x: auto; border: 1px solid #e2e8f0; border-radius: 16px; background: #fff; }
.content-page-tabs button, .content-language-tabs button { border: 0; border-radius: 10px; padding: .7rem .95rem; background: transparent; color: #475569; font: inherit; font-weight: 800; cursor: pointer; white-space: nowrap; }
.content-page-tabs button:hover, .content-language-tabs button:hover { background: #f8fafc; color: #5b21b6; }
.content-page-tabs button.active, .content-language-tabs button.active { background: #ede9fe; color: #5b21b6; }
.content-editor-toolbar { display: grid; grid-template-columns: minmax(210px, 1fr) auto auto; align-items: center; gap: 1rem; padding: 1rem 1.2rem; }
.content-editor-toolbar small { display: block; margin-bottom: .45rem; color: #64748b; font-weight: 700; }
.content-section-stats { display: flex; gap: .65rem; }
.content-section-stats span { display: grid; min-width: 105px; padding: .6rem .75rem; border-radius: 12px; background: #f8fafc; color: #64748b; font-size: .76rem; }
.content-section-stats b { color: #1e293b; font-size: 1.15rem; }
.admin-btn.danger-outline { border: 1px solid #fecaca; color: #b91c1c; background: #fff; }
.content-section-list { display: grid; gap: .9rem; }
.content-section-card { overflow: hidden; border: 1px solid #e2e8f0; border-radius: 16px; background: #fff; box-shadow: 0 8px 28px rgb(15 23 42 / 4%); }
.content-section-card.is-hidden { border-style: dashed; opacity: .78; }
.content-section-card > header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .9rem 1.1rem; border-bottom: 1px solid #e2e8f0; background: #f8fafc; }
.content-section-card > header > div:first-child { display: flex; align-items: center; gap: .65rem; }
.content-section-card h3 { margin: 0 0 .15rem; font-size: 1rem; }
.content-section-card header small { color: #64748b; }
.content-section-grip { width: 20px; color: #94a3b8; }
.content-section-actions { display: flex; align-items: center; gap: .35rem; }
.content-section-actions .admin-icon-btn:disabled { opacity: .35; cursor: default; }
.content-editor-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; padding: 1.1rem; }
.content-editor-field { display: grid; gap: .42rem; min-width: 0; color: #334155; font-size: .85rem; font-weight: 800; }
.content-editor-field:has(textarea) { grid-column: 1 / -1; }
.content-editor-field input, .content-editor-field textarea { width: 100%; box-sizing: border-box; border: 1px solid #cbd5e1; border-radius: 11px; padding: .72rem .8rem; background: #fff; color: #0f172a; font: inherit; font-weight: 500; line-height: 1.55; resize: vertical; }
.content-editor-field input:focus, .content-editor-field textarea:focus { outline: 3px solid rgb(124 58 237 / 12%); border-color: #7c3aed; }
.content-editor-field small { justify-self: end; color: #94a3b8; font-weight: 500; }
.content-editor-field small b { color: #64748b; }
.content-editor-toggle { display: flex; align-items: center; gap: .6rem; min-height: 44px; font-weight: 800; }
.content-editor-toggle input { width: 18px; height: 18px; accent-color: #7c3aed; }
.content-visibility-switch { position: relative; display: inline-flex; }
.content-visibility-switch input { position: absolute; opacity: 0; pointer-events: none; }
.content-visibility-switch span { width: 42px; height: 24px; border-radius: 999px; background: #cbd5e1; cursor: pointer; transition: .2s; }
.content-visibility-switch span::after { content: ""; display: block; width: 18px; height: 18px; margin: 3px; border-radius: 50%; background: #fff; box-shadow: 0 1px 4px rgb(15 23 42 / 25%); transition: .2s; }
.content-visibility-switch input:checked + span { background: #7c3aed; }
.content-visibility-switch input:checked + span::after { transform: translateX(18px); }
[dir="rtl"] .content-visibility-switch input:checked + span::after { transform: translateX(-18px); }

@media (max-width: 900px) {
  .content-editor-hero { align-items: stretch; flex-direction: column; }
  .content-editor-main-actions { justify-content: stretch; }
  .content-editor-main-actions > * { flex: 1 1 auto; justify-content: center; }
  .content-editor-toolbar { grid-template-columns: 1fr; }
  .content-editor-toolbar > .admin-btn { justify-self: start; }
}

@media (max-width: 620px) {
  .content-editor-fields { grid-template-columns: 1fr; padding: .85rem; }
  .content-editor-field { grid-column: 1; }
  .content-section-card > header { align-items: flex-start; }
  .content-section-grip { display: none; }
  .content-section-stats { width: 100%; }
  .content-section-stats span { flex: 1; }
  .content-editor-main-actions { display: grid; grid-template-columns: 1fr; }
}
