:root {
  color-scheme: light;
  --bg: #f5f6f8; --panel: #ffffff; --field: #fafbfc; --line: #e4e7ec;
  --text: #202733; --muted: #697484; --accent: #d62f46; --radius: 16px;
  font-family: 'Segoe UI', Arial, sans-serif; font-size: 15px; line-height: 1.5;
  scrollbar-color: #4a5b72 var(--bg);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; color: var(--text); background: var(--bg); }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea, summary { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid #f79180; outline-offset: 3px; }
button, .button, .top-links a { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 11px 18px; border: 1px solid var(--accent); border-radius: 11px; background: var(--accent); color: #fff; font-size: 14px; font-weight: 650; cursor: pointer; text-align: center; transition: background .18s, border-color .18s; }
button:hover, .button:hover { background: #cc4033; border-color: #cc4033; }
.secondary, .top-links a { background: #1d293b; border-color: #35445b; }
.secondary:hover, .top-links a:hover { background: #29384e; border-color: #63758f; }
button:disabled { opacity: .6; cursor: wait; }
.shell { display: grid; grid-template-columns: 252px minmax(0, 1fr); min-height: 100dvh; }
.sidebar { position: sticky; top: 0; display: flex; flex-direction: column; height: 100dvh; min-height: 0; padding: 28px 16px 16px; background: #101725; border-right: 1px solid var(--line); }
.wordmark { padding: 0 12px; font-size: 26px; font-weight: 750; letter-spacing: -.04em; }
.wordmark span { display: block; margin-top: 3px; color: var(--muted); font-size: 11px; font-weight: 500; text-transform: uppercase; letter-spacing: .12em; }
.scope { margin: 26px 12px 10px; color: #8d9fb7; font-size: 10px; font-weight: 650; letter-spacing: .16em; }
.sidebar nav { display: grid; gap: 4px; }
.sidebar nav a { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 42px; padding: 10px 12px; border-radius: 10px; color: #bbc7d8; font-size: 13px; font-weight: 550; }
.sidebar nav a:hover { color: #fff; background: #1b2637; }
.sidebar nav a.selected { color: #fff; background: #2b2630; box-shadow: inset 3px 0 var(--accent); }
.region-nav { overflow-y: auto; min-height: 0; flex: 1; align-content: start; scrollbar-width: thin; }
.region-nav small { color: #9babc0; font-variant-numeric: tabular-nums; }
.sidebar-bottom { margin-top: 14px; padding: 12px 0 0; border-top: 1px solid var(--line); }
.sidebar-bottom button { width: 100%; }
.content { width: 100%; min-width: 0; margin: 0; padding: 38px clamp(20px, 3vw, 46px) 80px; }
.top { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; margin-bottom: 26px; }
.top h1 { margin: 3px 0 8px; font-size: clamp(28px, 2.7vw, 38px); line-height: 1.18; letter-spacing: -.035em; }
.top p { margin: 0; color: var(--muted); font-size: 14px; }
.kicker { margin: 0 0 9px; color: #f59c91; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .15em; }
.top-links { display: flex; flex-wrap: wrap; gap: 8px; flex-shrink: 0; }
.top-links a { font-size: 12px; }
.card { min-width: 0; padding: clamp(20px, 2.5vw, 30px); background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
.content > .card + .card, .content > .stats + .card ~ .card { margin-top: 18px; }
.card h2 { margin: 0 0 16px; font-size: 22px; line-height: 1.3; letter-spacing: -.025em; }
h3 { line-height: 1.4; }
.card-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 12px; }
.card-heading h2 { margin-bottom: 0; }
.hint { margin: 0 0 20px; color: var(--muted); font-size: 14px; line-height: 1.65; }
.hint a { color: #edb1a7; text-decoration: underline; text-underline-offset: 3px; overflow-wrap: anywhere; }
.stack { display: grid; gap: 18px; }
.fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
label:not(.check) { display: grid; gap: 8px; min-width: 0; }
label > span { color: #c7d2e1; font-size: 13px; font-weight: 600; }
input:not([type=checkbox]):not([type=hidden]), textarea, select { min-width: 0; width: 100%; min-height: 46px; padding: 11px 14px; border: 1px solid #3b4960; border-radius: 10px; background: var(--field); color: #f4f6fa; font-size: 15px; line-height: 1.5; }
input::placeholder { color: #8698b0; }
input:read-only { color: #a6b5c8; }
input[type=file] { font-size: 13px; }
input::file-selector-button { margin-right: 12px; padding: 7px 11px; border: 0; border-radius: 6px; background: #293b54; color: white; cursor: pointer; }
textarea { resize: vertical; min-height: 90px; }
select { appearance: none; padding-right: 42px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath d='m4 6 4 4 4-4' stroke='%23c7d2e1' fill='none' stroke-width='1.7' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; }
.check { display: flex; align-items: center; gap: 10px; margin: 0 0 18px; font-size: 14px; font-weight: 550; cursor: pointer; }
.check input { flex: 0 0 auto; accent-color: var(--accent); width: 18px; height: 18px; margin: 0; }
.text-field, .card > .fields + label { margin-top: 20px; }
.form-end, .inline { display: flex; align-items: center; flex-wrap: wrap; gap: 16px; }
.form-end { margin-top: 22px; }
.form-end a { color: #f4ada2; font-size: 14px; }
.inline .check { margin: 0; }
.actions { position: sticky; bottom: 16px; z-index: 3; display: flex; justify-content: flex-end; padding: 12px; border: 1px solid #3b4960; border-radius: 14px; background: #111b2af2; backdrop-filter: blur(14px); box-shadow: 0 6px 30px #0003; }
.notice { margin-bottom: 20px; padding: 15px 18px; border: 1px solid; border-radius: 12px; overflow-wrap: anywhere; }
.success { color: #c9f8e5; background: #12382f; border-color: #286b57; }
.error { color: #ffe1dc; background: #422626; border-color: #945047; }
.stats, .counts { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 20px; }
.stats > div, .counts > span { min-width: 140px; min-width: min(140px,100%); padding: 16px 20px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); }
.stats strong { display: block; margin-bottom: 4px; font-size: clamp(19px,2vw,27px); line-height: 1.35; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.stats span { color: var(--muted); font-size: 12px; }
.region-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; }
.region-card h2 { margin-bottom: 8px; }
.region-card p:not(.kicker) { color: var(--muted); font-size: 13px; }
.region-meta { margin-bottom: 18px; }
.maps { display: flex; flex-wrap: wrap; gap: 10px 16px; margin-top: 10px; color: #f1a094; font-size: 13px; }
.maps a { overflow-wrap: anywhere; }
.maps a:hover, .form-end a:hover { text-decoration: underline; text-underline-offset: 4px; }
.section-tabs, .site-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 22px; }
.section-tabs a, .site-tabs a { display: inline-flex; gap: 8px; align-items: center; min-height: 42px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 10px; background: #151e2c; color: #bbc8d9; font-size: 13px; font-weight: 600; }
.section-tabs a.selected, .site-tabs a.selected { color: #ffe7e2; background: #39262d; border-color: #965147; }
.object-filters { display: grid; grid-template-columns: 1fr 230px; gap: 16px; margin: 20px 0; }
.object-list { display: grid; }
.object { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 22px 0; border-top: 1px solid var(--line); }
.object > div { min-width: 0; }
.object h3 { margin: 0 0 8px; font-size: 16px; }
.object p { margin: 0 0 6px; color: #bdcadd; overflow-wrap: anywhere; }
.object small { color: #9caec5; }
.object-name-form { display: grid; gap: 10px; margin-top: 16px; max-width: 520px; }
.object-name-form button { justify-self: start; }
.object form, .object > .button { flex-shrink: 0; }
.tag { display: inline-block; vertical-align: middle; padding: 4px 8px; margin: 3px 3px 3px 7px; border-radius: 7px; background: #204437; color: #b5f1d0; font-size: 10px; font-weight: 650; }
.tag.off { background: #422e32; color: #ffbab2; }
.tag.warn { background: #483c28; color: #ffdf9f; }
details { margin: 16px 0; }
summary { cursor: pointer; color: #eeb7ab; }
.diff-list { max-height: 560px; overflow: auto; border-top: 1px solid var(--line); }
.diff-list > div { display: grid; grid-template-columns: 1fr auto; gap: 7px; padding: 15px 0; border-bottom: 1px solid var(--line); }
.diff-list span { color: #f1a094; font-size: 13px; }
.diff-list small { grid-column: 1/-1; color: var(--muted); }
.diff-details { grid-column: 1/-1; }
.diff-details p { display: grid; grid-template-columns: 120px 1fr auto 1fr; gap: 10px; overflow-wrap: anywhere; }
.publish { margin-top: 24px; }
.subcard { display: grid; gap: 12px; padding: 18px; border: 1px solid var(--line); border-radius: 12px; background: var(--field); }
.subcard h3 { margin: 0 0 6px; font-size: 15px; }
.city-picker { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; margin: 24px 0; padding: 20px; border: 1px solid var(--line); border-radius: 12px; }
.city-picker legend { color: #cad6e6; font-weight: 600; font-size: 14px; padding: 0 8px; }
.city-picker .check { margin: 0; padding: 6px 0; align-items: flex-start; }
.empty-state { padding: 28px 0; color: var(--muted); }
#manager-form { scroll-margin-top: 24px; margin-top: 20px; }
.login-screen { min-height: 100dvh; display: grid; place-items: center; padding: 24px; background: radial-gradient(ellipse at 50% 20%,#263046,transparent 65%); }
.login-card { display: grid; gap: 20px; width: min(450px,100%); }
.login-card h1 { margin: 0; font-size: 29px; letter-spacing: -.035em; }
.login-card .hint { margin-bottom: 0; }
@media (max-width: 1150px) { .top { flex-direction: column; } .city-picker { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media (max-width: 900px) {
  .shell { display: block; } .sidebar { position: relative; width: 100%; height: auto; padding: 18px 20px; border-right: 0; border-bottom: 1px solid var(--line); }
  .sidebar .scope { margin: 16px 0 7px; } .wordmark { padding: 0; font-size: 23px; } .wordmark span { font-size: 10px; }
  .sidebar nav { display: flex; overflow: auto; gap: 6px; padding-bottom: 3px; } .sidebar nav a { white-space: nowrap; flex-shrink: 0; }
  .sidebar-bottom { position: absolute; top: 13px; right: 20px; border: 0; margin: 0; padding: 0; } .sidebar-bottom button { padding: 8px 12px; }
  .content { padding: 28px 20px 60px; } .region-nav { max-height: none; }
}
@media (max-width: 600px) {
  :root { font-size: 14px; } .sidebar { padding: 16px; } .sidebar-bottom { right: 16px; }
  .content { padding: 24px 14px 55px; } .card { padding: 20px 16px; border-radius: 15px; } .fields, .region-grid, .object-filters { grid-template-columns: 1fr; }
  .top { gap: 16px; } .top h1 { font-size: 29px; } .top-links { width: 100%; } .top-links a { flex: 1; }
  .card-heading { flex-direction: column; align-items: flex-start; gap: 14px; } .card h2 { font-size: 20px; }
  .section-tabs { flex-wrap: nowrap; overflow: auto; padding-bottom: 5px; } .section-tabs a { white-space: nowrap; }
  .object { align-items: flex-start; flex-direction: column; gap: 14px; } .object form { width: 100%; } .object button { width: 100%; }
  .city-picker { grid-template-columns: 1fr; padding: 16px; } .stats { gap: 8px; } .stats > div { flex: 1; padding: 14px; }
  .actions { bottom: 8px; padding: 8px; } .actions button { width: 100%; } .diff-list > div { grid-template-columns: 1fr; } .diff-details p { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; } }

/* Shared light/dark palette for every admin screen. */
:root { --soft: #f0f2f5; --selected: #fdeef1; --selected-text: #b9253c; --hover: #f6f7f9; --success-bg: #edf8f2; --success-text: #23724e; --warning-bg: #fff6e1; --warning-text: #896017; --error-bg: #fff0ed; --error-text: #ab3f32; scrollbar-color: #bcc3ce var(--bg); }
:root[data-theme="dark"] { color-scheme: dark; --bg: #0f1520; --panel: #182130; --field: #121b28; --line: #303c4e; --text: #eef2f8; --muted: #a4b1c4; --accent: #ee5967; --soft: #222e40; --selected: #382733; --selected-text: #ffadb7; --hover: #202c3e; --success-bg: #193c31; --success-text: #9ee6c4; --warning-bg: #3b3223; --warning-text: #eed19b; --error-bg: #422b2c; --error-text: #ffc1b6; scrollbar-color: #4a5b72 var(--bg); }
button:hover,.button:hover { background: #b52338; border-color: #b52338; }
.secondary,.top-links a { color: var(--text); background: var(--panel); border-color: var(--line); }
.secondary:hover,.top-links a:hover { color: var(--text); background: var(--soft); border-color: var(--muted); }
.sidebar { background: var(--panel); padding-top: 30px; }
.wordmark { color: var(--accent); font-size: 24px; letter-spacing: -.025em; }
.wordmark span { color: var(--muted); text-transform: none; letter-spacing: 0; font-size: 12px; margin-top: 6px; }
.scope,.region-nav small { color: var(--muted); }
.sidebar nav a { color: var(--muted); }
.sidebar nav a:hover { color: var(--text); background: var(--hover); }
.sidebar nav a.selected { color: var(--selected-text); background: var(--selected); box-shadow: none; }
.kicker { color: var(--muted); }
.card { box-shadow: 0 2px 8px #16233b03; }
label > span,.city-picker legend { color: var(--text); }
input:not([type=checkbox]):not([type=hidden]),textarea,select { background-color: var(--field); color: var(--text); border-color: var(--line); }
input::placeholder,input:read-only { color: var(--muted); }
input::file-selector-button { background: var(--soft); color: var(--text); }
select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath d='m4 6 4 4 4-4' stroke='%23838d9c' fill='none' stroke-width='1.7' stroke-linecap='round'/%3E%3C/svg%3E"); }
.maps,.hint a,.form-end a,summary,.diff-list span { color: var(--accent); }
.section-tabs a,.site-tabs a { color: var(--muted); background: var(--panel); }
.section-tabs a.selected,.site-tabs a.selected { color: var(--selected-text); background: var(--selected); border-color: var(--accent); }
.object p { color: var(--text); }.object small { color: var(--muted); }
.actions { color: var(--text); background: var(--panel); border-color: var(--line); }
.success,.tag,.tag.good { color: var(--success-text); background: var(--success-bg); border-color: var(--success-text); }
.error,.tag.off { color: var(--error-text); background: var(--error-bg); border-color: var(--error-text); }
.tag.warn { color: var(--warning-text); background: var(--warning-bg); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.sidebar-search { margin-bottom: 12px; }.sidebar-search input { font-size: 12px !important; min-height: 38px !important; padding: 8px 11px !important; }
.overview-stats { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 16px; margin-bottom: 32px; }.overview-stats > div { min-width: 0; padding: 22px; }
.overview-heading { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin: 0 0 12px; }.overview-heading h2 { margin: 0 0 5px; font-size: 22px; letter-spacing: -.02em; }.overview-heading .hint { margin: 0; }.overview-heading label { width: 260px; flex-shrink: 0; }
.audit-caption { color: var(--muted); font-size: 12px; line-height: 1.6; margin: 0 0 18px; max-width: 850px; }
.region-grid { grid-template-columns: repeat(auto-fit,minmax(min(100%,290px),1fr)); align-items: start; gap: 18px; }
.region-card { padding: 22px; }.region-card-heading { display: flex; gap: 12px; align-items: center; margin-bottom: 20px; }.region-card-heading h2 { font-size: 19px; margin: 0 0 3px; }.region-card-heading p { margin: 0; }.region-monogram { display: grid; place-items: center; width: 44px; height: 44px; flex-shrink: 0; border-radius: 12px; background: var(--selected); color: var(--selected-text); font-size: 19px; font-weight: 700; }
.region-domains { display: grid; gap: 4px; font-size: 12px; }.region-domains span { color: var(--muted); font-size: 11px; }.region-domains span:not(:first-child) { margin-top: 10px; }.region-domains a { color: var(--accent); overflow-wrap: anywhere; }.region-domains a:hover { text-decoration: underline; }
.region-status { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; border-top: 1px solid var(--line); margin-top: 20px; padding-top: 14px; }.region-status .tag { margin: 0; }.region-status small { font-size: 10px; color: var(--muted); }
.region-card-bottom { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; margin-top: 12px; font-size: 12px; }.region-card-bottom span { color: var(--muted); }.region-card-bottom a { color: var(--accent); font-weight: 650; }
.audit-details { margin: 16px 0 0; padding-top: 12px; border-top: 1px solid var(--line); }.audit-details summary { color: var(--text); font-size: 13px; font-weight: 600; }.audit-details ul { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 8px; }.audit-details li { border-radius: 8px; padding: 10px 12px; font-size: 12px; line-height: 1.6; overflow-wrap: anywhere; }.audit-warning { background: var(--warning-bg); color: var(--warning-text); }.audit-error { background: var(--error-bg); color: var(--error-text); }.audit-info { background: var(--soft); color: var(--muted); }.audit-details a:hover { text-decoration: underline; }.audit-clear { font-size: 12px !important; color: var(--success-text) !important; margin: 16px 0 0; }
.regional-audit { margin-bottom: 20px; padding: 20px 24px; }.regional-audit h2 { font-size: 18px; }.regional-audit .audit-details { border-top: 0; padding-top: 0; margin-top: 8px; }
.login-screen { background: radial-gradient(ellipse at 50% 10%,var(--selected),transparent 65%); }.login-theme { position: absolute; top: 20px; right: 20px; }.theme-toggle { white-space: nowrap; }
@media(min-width:1500px) { .region-grid { grid-template-columns: repeat(auto-fit,minmax(320px,1fr)); } }
@media(max-width:900px) { .sidebar-search { max-width: 340px; }.sidebar nav.region-nav { margin-top: 8px; }.overview-stats { margin-bottom: 24px; }.top { flex-direction: row; flex-wrap: wrap; } }
@media(max-width:600px) { .overview-stats { grid-template-columns: 1fr; gap: 10px; }.overview-stats > div { padding: 16px 20px; }.overview-heading { align-items: stretch; flex-direction: column; }.overview-heading label { width: 100%; }.region-card { padding: 20px; }.regional-audit { padding: 18px 16px; }.top-links .theme-toggle { width: 100%; }.login-theme { top: 12px; right: 12px; }.login-screen { padding-top: 80px; } }

.audit-object { margin-top: 6px; padding-top: 6px; border-top: 1px solid var(--line); }.audit-object a { font-weight: 600; }.audit-object span { opacity: .85; }.object { scroll-margin-top: 24px; }.object:target { outline: 2px solid var(--accent, #e32945); outline-offset: 3px; }
