:root { color-scheme: dark; font-family: Inter, "Segoe UI", sans-serif; color: #e8edf2; background: #111820; --muted: #aab7c3; --line: #30404e; --accent: #79dfb3; --modified: #342f1b; --yellow: #f0d477; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
header { display: flex; align-items: center; justify-content: space-between; padding: 24px 32px; border-bottom: 1px solid var(--line); gap: 20px; }
h1 { font-size: 25px; font-weight: 600; margin: 5px 0 0; letter-spacing: -.5px; }
h2 { margin: 0 0 10px; font-size: 23px; }
h3 { font-size: 15px; color: var(--accent); }
.eyebrow { color: var(--accent); font-size: 11px; letter-spacing: 2px; }
button { cursor: pointer; border: 1px solid #4a6173; border-radius: 5px; padding: 9px 13px; color: #e8edf2; background: #243342; font: inherit; font-size: 13px; }
button:hover:not(:disabled) { background: #32485a; }
button.primary { background: var(--accent); border-color: var(--accent); color: #10291d; font-weight: 700; }
button.primary:hover:not(:disabled) { background: #a4f1ce; }
button:disabled { opacity: .45; cursor: default; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
#account { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font-size: 13px; }
#status { margin: 0; padding: 13px 32px; min-height: 45px; background: #1b2732; color: var(--muted); font-size: 14px; }
.error, #status.error { color: #ffb5aa; }
#status.error { background: #351f24; }
main { display: grid; grid-template-columns: 260px minmax(0, 1fr); min-height: calc(100vh - 145px); }
aside { border-right: 1px solid var(--line); padding: 22px 18px; }
label { font-size: 13px; color: var(--muted); display: block; margin-bottom: 7px; }
input, select { color: #e8edf2; background: #111c26; border: 1px solid #465866; border-radius: 4px; padding: 9px 10px; font: inherit; font-size: 14px; max-width: 100%; }
input:disabled, select:disabled { opacity: .65; }
input[aria-invalid="true"] { border-color: #ff9689; outline-color: #ff9689; }
input[type="search"] { width: 100%; }
#entity-list { margin-top: 20px; }
.entity { display: block; width: 100%; text-align: left; border: 0; background: transparent; padding: 10px; margin: 3px 0; }
.entity.active { background: #29453e; color: #a4f1ce; }
.entity small { display: block; color: var(--muted); margin-top: 3px; font-size: 11px; }
#editor { padding: 28px 32px; max-width: 1400px; min-width: 0; }
.meta { color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.editor-toolbar { position: sticky; top: 0; z-index: 1; padding: 12px 0; margin: 16px 0 10px; background: #111820; border-bottom: 1px solid var(--line); }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
.change-status { color: var(--muted); font-size: 12px; margin: 10px 0 0; }
.field-search { max-width: 460px; margin: 10px 0; }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 11px; letter-spacing: .7px; text-transform: uppercase; color: var(--muted); padding: 12px 10px; border-bottom: 1px solid var(--line); }
td { padding: 13px 10px; border-bottom: 1px solid #27343f; font-size: 14px; vertical-align: middle; }
.settings-table td:first-child { width: 48%; }
.settings-table input, .settings-table select { width: 145px; }
.settings-table tr.different { background: var(--modified); }
.settings-table tr.different td:first-child { box-shadow: inset 3px 0 var(--yellow); }
.setting-label { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.unit { display: block; font-size: 11px; color: var(--muted); margin-top: 4px; }
.badge { display: inline-block; color: var(--yellow); border: 1px solid #786636; border-radius: 4px; padding: 2px 6px; font-size: 10px; white-space: nowrap; }
.invalid .badge { color: #ffb5aa; border-color: #ad6259; }
.legend { font-size: 12px; color: var(--muted); margin: 12px 0; }
.group-row th { padding-top: 24px; font-size: 13px; color: var(--accent); background: #17232d; text-transform: none; letter-spacing: 0; }
.reset { padding: 5px 8px; font-size: 11px; }
label[for="publish-reason"] { margin-top: 24px; }
.publish-reason { width: 100%; }
.recovery { border: 1px solid var(--line); padding: 12px; margin-top: 16px; font-size: 13px; }
.recovery summary { cursor: pointer; }
dialog { background: #17232d; color: #e8edf2; border: 1px solid var(--line); border-radius: 8px; padding: 24px; width: min(1080px, 94vw); max-height: 85vh; }
dialog::backdrop { background: #0009; }
.dialog-heading { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; gap: 20px; }
.dialog-heading h2 { margin: 0; }
#history-status:empty { display: none; }
#history-status { font-size: 13px; padding: 10px 0; }
.history-table { min-width: 690px; }
.history-table > tbody > tr > td { font-size: 13px; overflow-wrap: anywhere; }
.history-table > tbody > tr > td:first-child { width: 25%; }
.history-table button { white-space: nowrap; }
.history-detail > td { padding: 18px; background: #111c26; }
.changes-table td:first-child { width: 50%; }
.changes-table { margin-top: 12px; }
#history-list > button { margin-top: 16px; }
#busy-dialog { width: min(300px, 85vw); text-align: center; padding: 30px; }
#busy-label { margin: 16px 0 0; font-size: 15px; }
.spinner { display: inline-block; width: 32px; height: 32px; border: 3px solid #465866; border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation: none; } }
@media (max-width: 850px) {
  header { padding: 18px; flex-wrap: wrap; }
  main { grid-template-columns: 1fr; }
  aside { border-right: 0; border-bottom: 1px solid var(--line); max-height: 280px; overflow: auto; }
  #editor { padding: 20px 12px; }
  td, th { padding: 10px 6px; }
  .settings-table { min-width: 520px; }
  .settings-table input, .settings-table select { width: 110px; }
  #status { padding: 12px 18px; }
  h1 { font-size: 20px; }
  dialog { padding: 16px; }
}
