@font-face { font-family: "Sora"; src: url("../fonts/sora.woff2") format("woff2"); font-weight: 100 800; font-display: swap; }
:root { --ink: #000; --bg: #f4f6f9; --panel: #fff; --line: #dde2e9; --text: #15171c; --muted: #5d6370; --sky: #3a8fd6; --sky-ink: #1c69ad; --red: #c0281e; --sun: #f6be1e; --ok: #1f7a4d; }
* { box-sizing: border-box; }
body.adm { margin: 0; font: 400 15px/1.55 "Sora", system-ui, sans-serif; color: var(--text); background: var(--bg); }
a { color: var(--sky-ink); }
h1, h2, h3, p { margin: 0; }
img { max-width: 100%; display: block; }
:focus-visible { outline: 3px solid var(--sky); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.mark { width: 30px; height: auto; flex: none; }
.adm-shell { display: grid; grid-template-columns: 232px minmax(0, 1fr); min-height: 100vh; }
.adm-side { background: var(--ink); color: #fff; padding: 20px 14px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.adm-brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-weight: 700; letter-spacing: .06em; padding: 4px 8px 22px; }
.adm-brand small { display: block; font-weight: 400; letter-spacing: 0; color: #9aa0ab; font-size: .78rem; }
.adm-side ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.adm-side a { display: flex; justify-content: space-between; align-items: center; padding: 9px 10px; border-radius: 4px; color: #d7dae0; text-decoration: none; font-size: .93rem; }
.adm-side a:hover { background: #1b1d22; color: #fff; }
.adm-side a[aria-current] { background: #fff; color: #000; font-weight: 600; }
.badge { background: var(--sun); color: #000; border-radius: 10px; padding: 0 8px; font-size: .75rem; font-weight: 700; }
.adm-top { display: flex; align-items: center; gap: 16px; padding: 16px 32px; background: var(--panel); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.adm-top h1 { font-size: 1.25rem; font-weight: 600; }
.adm-user { margin-left: auto; display: flex; align-items: center; gap: 18px; font-size: .9rem; }
.adm-user form { margin: 0; }
.adm-menu { display: none; }
.adm-content { padding: 28px 32px 80px; max-width: 1400px; }
.adm-solo { padding: 40px; }
@media (max-width: 900px) {
  .adm-shell { grid-template-columns: 1fr; }
  .adm-side { position: fixed; inset: 0 30% 0 0; z-index: 40; transform: translateX(-100%); transition: transform .2s; }
  .adm-side.open { transform: none; }
  .adm-menu { display: inline-block; }
  .adm-top, .adm-content { padding-inline: 16px; }
  .adm-user a:first-child { display: none; }
}
.btn { display: inline-flex; align-items: center; gap: 6px; min-height: 38px; padding: 7px 14px; border: 1px solid #b9c0ca; background: #fff; color: var(--text); border-radius: 4px; font: 500 .9rem/1.2 inherit; text-decoration: none; cursor: pointer; }
.btn:hover { border-color: var(--ink); }
.btn-primary { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn-primary:hover { background: #2a2c31; }
.btn-danger { background: #fff; border-color: var(--red); color: var(--red); }
.btn-danger:hover { background: var(--red); color: #fff; }
.linkbtn { background: none; border: 0; padding: 0; color: var(--sky-ink); text-decoration: underline; cursor: pointer; font: inherit; }
.icon { width: 32px; height: 32px; border: 1px solid var(--line); background: #fff; border-radius: 4px; cursor: pointer; }
.icon:disabled { opacity: .35; cursor: default; }
.icon.danger { color: var(--red); }
.actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 4px; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 6px; padding: 20px 22px; margin-bottom: 20px; }
.panel h2 { font-size: 1.05rem; font-weight: 600; margin-bottom: 14px; }
.panel h2:not(:first-child) { margin-top: 24px; }
.panel.empty { text-align: center; padding: 48px; color: var(--muted); }
.panel.empty p + p { margin-top: 16px; }
.narrow { max-width: 640px; }
.grid2 { display: grid; gap: 20px; }
@media (min-width: 1100px) { .grid2 { grid-template-columns: 1fr 1fr; } }
.muted, .hint { color: var(--muted); }
.hint { font-size: .84rem; margin-top: 6px; }
.err { color: var(--red); font-size: .86rem; margin-top: 6px; font-weight: 500; }
.flash { padding: 12px 16px; border-radius: 6px; margin: 16px 32px 0; border: 1px solid; font-weight: 500; }
.adm-content .flash, .login-box .flash { margin: 0 0 16px; }
.flash-ok { background: #edf8f2; border-color: #a8dbbf; color: #14532d; }
.flash-error { background: #fdf0ef; border-color: #f0b4ae; color: #7a1c14; }
.flash-info { background: #eef5fc; border-color: #b8d4ee; color: #123a5c; font-weight: 400; }
.flash-info summary { cursor: pointer; font-weight: 600; }
.flash-info p { margin-top: 8px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin-bottom: 20px; }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: 6px; padding: 18px; text-decoration: none; color: var(--text); display: grid; gap: 4px; }
.stat:hover { border-color: var(--ink); }
.stat-n { font-size: 2rem; font-weight: 700; line-height: 1; }
.stat-l { color: var(--muted); font-size: .88rem; }
.checklist { list-style: none; padding: 0; margin: 0 0 8px; display: grid; gap: 8px; }
.checklist li { display: flex; gap: 10px; align-items: baseline; }
.checklist li span:first-child { width: 18px; color: var(--muted); }
.checklist li.done span:first-child { color: var(--ok); font-weight: 700; }
.checklist li.done a { color: var(--muted); }
.feed { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; font-size: .9rem; }
.feed small { color: var(--muted); display: block; }
.toolbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.search { display: flex; gap: 8px; }
.search input { padding: 8px 12px; border: 1px solid #b9c0ca; border-radius: 4px; min-width: 240px; background: #fff; }
.tabs { display: flex; flex-wrap: wrap; gap: 4px; }
.tabs a { padding: 6px 12px; border-radius: 4px; text-decoration: none; color: var(--text); border: 1px solid transparent; }
.tabs a[aria-current] { background: #fff; border-color: var(--line); font-weight: 600; }
.tbl { width: 100%; border-collapse: collapse; background: var(--panel); border: 1px solid var(--line); border-radius: 6px; overflow: hidden; font-size: .92rem; }
.tbl th { text-align: left; font-weight: 600; color: var(--muted); font-size: .8rem; padding: 10px 14px; border-bottom: 1px solid var(--line); background: #fafbfc; }
.tbl td { padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tr.unread td { font-weight: 600; background: #fffbea; }
.row-title { font-weight: 600; color: var(--text); text-decoration: none; }
.row-title:hover { text-decoration: underline; }
.row-actions { white-space: nowrap; text-align: right; }
.row-actions a { margin-left: 10px; }
.pill { display: inline-block; padding: 2px 9px; border-radius: 10px; font-size: .76rem; font-weight: 600; background: #eceff3; color: #3a3f48; }
.pill-published, .pill-qualified { background: #e5f5ec; color: #14532d; }
.pill-draft, .pill-closed { background: #eceff3; color: #3a3f48; }
.pill-scheduled, .pill-contacted { background: #e8f1fb; color: #123a5c; }
.pill-new, .pill-warn { background: #fff4d1; color: #5c4400; }
.pager { display: flex; gap: 4px; margin-top: 18px; }
.pager a { padding: 6px 12px; border: 1px solid var(--line); border-radius: 4px; background: #fff; text-decoration: none; }
.pager a[aria-current] { background: var(--ink); color: #fff; }
.edit { display: grid; gap: 24px; align-items: start; }
@media (min-width: 1150px) { .edit { grid-template-columns: minmax(0, 1fr) 340px; } }
.edit-main { background: var(--panel); border: 1px solid var(--line); border-radius: 6px; padding: 24px; display: grid; gap: 4px; }
.sticky { position: sticky; top: 84px; }
.edit-side details summary { cursor: pointer; font-weight: 600; }
.edit-side details[open] summary { margin-bottom: 12px; }
.fld { display: grid; gap: 6px; margin-bottom: 16px; }
.fld > label, .fld-label { font-weight: 600; font-size: .9rem; }
.req { color: var(--muted); font-weight: 400; font-size: .8rem; }
.fld input:not([type="checkbox"]):not([type="radio"]):not([type="file"]), .fld select, .fld textarea, .login-box input, .install-box input, .nav-tbl input:not([type="checkbox"]), .nav-tbl select { width: 100%; padding: 8px 11px; border: 1px solid #b9c0ca; border-radius: 4px; background: #fff; min-height: 38px; }
.fld textarea { resize: vertical; }
.fld textarea.mono { font: .85rem/1.5 ui-monospace, Menlo, Consolas, monospace; }
.has-err input, .has-err textarea, .has-err select { border-color: var(--red) !important; }
fieldset { border: 1px solid var(--line); border-radius: 6px; padding: 14px 16px; margin: 0 0 16px; }
legend { font-weight: 600; padding: 0 6px; }
.check { display: flex; gap: 8px; align-items: flex-start; font-weight: 400 !important; margin: 4px 0 12px; }
.check input { margin-top: 3px; }
.danger { margin-top: 24px; }
.rte { border: 1px solid #b9c0ca; border-radius: 4px; background: #fff; }
.rte textarea { border: 0 !important; }
.rte-bar { display: flex; flex-wrap: wrap; gap: 2px; padding: 6px; border-bottom: 1px solid var(--line); background: #fafbfc; position: sticky; top: 64px; z-index: 2; }
.rte-bar button { border: 1px solid transparent; background: none; padding: 4px 9px; border-radius: 3px; cursor: pointer; font-size: .82rem; }
.rte-bar button:hover { border-color: var(--line); background: #fff; }
.rte-body { min-height: 180px; padding: 12px 14px; outline: none; line-height: 1.6; }
.rte-body:focus { box-shadow: inset 0 0 0 2px var(--sky); }
.rte-body h2 { font-size: 1.3rem; margin: 1em 0 .4em; } .rte-body h3 { font-size: 1.1rem; margin: 1em 0 .4em; }
.rte-body p { margin: 0 0 .8em; } .rte-body blockquote { border-left: 3px solid var(--sun); margin: 0; padding-left: 12px; }
.imgfield { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.imgfield-preview { width: 160px; aspect-ratio: 16 / 10; border: 1px dashed #b9c0ca; border-radius: 4px; display: grid; place-items: center; overflow: hidden; background: #fafbfc; color: var(--muted); font-size: .8rem; }
.imgfield-preview img { width: 100%; height: 100%; object-fit: cover; }
.gal-items { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 10px; }
.gal-items figure { margin: 0; width: 130px; display: grid; gap: 4px; font-size: .8rem; }
.gal-items img { aspect-ratio: 16 / 10; object-fit: cover; border-radius: 4px; border: 1px solid var(--line); }
.builder { display: grid; gap: 12px; }
.bld-list { display: grid; gap: 10px; }
.bld-card { border: 1px solid var(--line); border-left: 4px solid #c9ced6; border-radius: 6px; background: #fff; }
.bld-card.is-dark { border-left-color: #000; }
.bld-head { display: flex; align-items: center; gap: 8px; padding: 8px 10px; }
.bld-toggle { flex: 1; display: flex; gap: 10px; align-items: baseline; text-align: left; background: none; border: 0; padding: 8px 6px; cursor: pointer; min-width: 0; }
.bld-toggle::before { content: "▸"; color: var(--muted); }
.bld-toggle[aria-expanded="true"]::before { content: "▾"; }
.bld-toggle span { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: .88rem; }
.bld-ctl { display: flex; gap: 4px; flex: none; }
.bld-body { padding: 6px 18px 12px; border-top: 1px solid var(--line); }
.bld-add { display: flex; gap: 8px; padding: 12px; border: 1px dashed #b9c0ca; border-radius: 6px; background: #fafbfc; }
.bld-add select { padding: 7px 10px; border: 1px solid #b9c0ca; border-radius: 4px; }
.rep { display: grid; gap: 10px; }
.rep-item { border: 1px solid var(--line); border-radius: 4px; padding: 12px 12px 4px; background: #fafbfc; }
.rep-ctl { display: flex; gap: 6px; align-items: center; justify-content: flex-end; margin-bottom: 8px; }
.media-grid { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; }
.media-grid a { display: grid; gap: 6px; text-decoration: none; color: var(--text); font-size: .82rem; background: #fff; border: 1px solid var(--line); border-radius: 6px; padding: 8px; }
.media-grid img { aspect-ratio: 16 / 10; object-fit: cover; border-radius: 3px; }
.media-preview img { max-height: 520px; object-fit: contain; margin-bottom: 12px; background: #f0f2f5; }
.upload { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.upload label { flex-basis: 100%; }
.modal { position: fixed; inset: 0; background: rgba(0, 0, 0, .55); z-index: 100; display: grid; place-items: center; padding: 20px; }
.modal-box { background: #fff; border-radius: 8px; width: min(980px, 100%); max-height: 90vh; display: grid; grid-template-rows: auto auto auto 1fr auto; overflow: hidden; }
.modal-head, .modal-tools, .modal-foot { display: flex; gap: 10px; align-items: center; justify-content: space-between; padding: 14px 18px; }
.modal-head { border-bottom: 1px solid var(--line); }
.modal-tools input[type="search"] { flex: 1; padding: 8px 11px; border: 1px solid #b9c0ca; border-radius: 4px; }
.modal-tools input[type="file"] { display: none; }
.modal-foot { border-top: 1px solid var(--line); justify-content: flex-end; }
.modal .hint { padding: 0 18px; }
.pick-grid { list-style: none; margin: 0; padding: 12px 18px; overflow-y: auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.pick { width: 100%; display: grid; gap: 4px; border: 2px solid transparent; border-radius: 6px; background: #fafbfc; padding: 6px; cursor: pointer; font-size: .78rem; text-align: left; }
.pick img { aspect-ratio: 16 / 10; object-fit: cover; border-radius: 3px; }
.pick[aria-pressed="true"] { border-color: var(--sky); background: #eef5fc; }
.nav-tbl td { vertical-align: middle; }
.nav-tbl .num { width: 70px; }
.link-cell { display: flex; gap: 6px; }
.link-cell select:first-child { width: 110px !important; flex: none; }
.warn-row td { background: #fffbea; }
.settings-nav { position: sticky; top: 66px; background: var(--bg); padding: 8px 0; z-index: 5; margin-bottom: 12px; }
.settings fieldset { background: #fff; scroll-margin-top: 130px; }
.sticky-bottom { position: sticky; bottom: 0; background: var(--bg); padding: 12px 0; }
.dl { display: grid; gap: 10px; margin: 0 0 20px; }
.dl div { display: grid; grid-template-columns: 130px 1fr; gap: 12px; }
.dl dt { color: var(--muted); }
.dl dd { margin: 0; }
.msg { background: #fafbfc; border: 1px solid var(--line); border-radius: 4px; padding: 14px; white-space: normal; }
.note { border-top: 1px solid var(--line); padding-top: 10px; margin-top: 12px; }
.note small { color: var(--muted); }
.adm-login { display: grid; place-items: center; min-height: 100vh; background: var(--ink); }
.login-box { width: min(440px, 100%); background: #fff; border-radius: 8px; padding: 32px; display: grid; gap: 16px; }
.install-box { width: min(620px, 100%); margin: 40px 0; }
.login-box form { display: grid; gap: 14px; }
.login-box label { display: grid; gap: 6px; font-weight: 600; font-size: .9rem; }
.login-box h1 { font-size: 1.3rem; }
.login-brand { display: flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: .07em; }
.login-alt { font-size: .9rem; }
