@layer seo-base {
:root {
  color-scheme: light dark;
  --bg: #f8faf9; --rail: #eaf1ed; --surface: #ffffff; --wash: #f1f6f3; --line: #dce7e0; --border: #8b9c92; --ink: #182820; --muted: #52655b; --accent: #1a6450; --accent-fill: #d9ede2; --on-accent: #ffffff; --green: #157153; --green-tint: #e2f2e8; --blue: #315da6; --blue-tint: #e6eefb; --amber: #8a5018; --amber-tint: #f8ebdc; --red: #a2323d; --red-tint: #f8e7e9; --slate: #607987;
  --radius: 13px;
  --font: "Inter", "Segoe UI", system-ui, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) { --bg: #121917; --rail: #19231f; --surface: #1b2521; --wash: #24322c; --line: #35453c; --border: #687e71; --ink: #eff6f1; --muted: #afc4b8; --accent: #95dfb9; --accent-fill: #254938; --on-accent: #13281f; --green: #83d8b0; --green-tint: #253f34; --blue: #9fb8fb; --blue-tint: #27374e; --amber: #efbc85; --amber-tint: #473626; --red: #f7a9af; --red-tint: #492d33; --slate: #a1b3bf; }
}
:root[data-theme="dark"] { color-scheme: dark; --bg: #121917; --rail: #19231f; --surface: #1b2521; --wash: #24322c; --line: #35453c; --border: #687e71; --ink: #eff6f1; --muted: #afc4b8; --accent: #95dfb9; --accent-fill: #254938; --on-accent: #13281f; --green: #83d8b0; --green-tint: #253f34; --blue: #9fb8fb; --blue-tint: #27374e; --amber: #efbc85; --amber-tint: #473626; --red: #f7a9af; --red-tint: #492d33; --slate: #a1b3bf; }
:root[data-theme="light"] { color-scheme: light; --bg: #f8faf9; --rail: #eaf1ed; --surface: #ffffff; --wash: #f1f6f3; --line: #dce7e0; --border: #8b9c92; --ink: #182820; --muted: #52655b; --accent: #1a6450; --accent-fill: #d9ede2; --on-accent: #ffffff; --green: #157153; --green-tint: #e2f2e8; --blue: #315da6; --blue-tint: #e6eefb; --amber: #8a5018; --amber-tint: #f8ebdc; --red: #a2323d; --red-tint: #f8e7e9; --slate: #607987; }
@supports (color: light-dark(black, white)) {
  :root:root {
    --bg: light-dark(#f8faf9, #121917);
  --rail: light-dark(#eaf1ed, #19231f);
  --surface: light-dark(#ffffff, #1b2521);
  --wash: light-dark(#f1f6f3, #24322c);
  --line: light-dark(#dce7e0, #35453c);
  --border: light-dark(#8b9c92, #687e71);
  --ink: light-dark(#182820, #eff6f1);
  --muted: light-dark(#52655b, #afc4b8);
  --accent: light-dark(#1a6450, #95dfb9);
  --accent-fill: light-dark(#d9ede2, #254938);
  --on-accent: light-dark(#ffffff, #13281f);
  --green: light-dark(#157153, #83d8b0);
  --green-tint: light-dark(#e2f2e8, #253f34);
  --blue: light-dark(#315da6, #9fb8fb);
  --blue-tint: light-dark(#e6eefb, #27374e);
  --amber: light-dark(#8a5018, #efbc85);
  --amber-tint: light-dark(#f8ebdc, #473626);
  --red: light-dark(#a2323d, #f7a9af);
  --red-tint: light-dark(#f8e7e9, #492d33);
  --slate: light-dark(#607987, #a1b3bf);
  }
}
}
:root {
  --ui-background: var(--surface); --ui-foreground: var(--ink); --ui-muted: var(--wash);
  --ui-muted-foreground: var(--muted); --ui-border: var(--line); --ui-input: var(--border);
  --ui-primary: var(--accent); --ui-primary-foreground: var(--on-accent); --ui-ring: var(--accent);
  --ui-ring-border: var(--accent); --ui-radius: 8px; --ui-font-sans: var(--font);
}
* { box-sizing: border-box; }
html { accent-color: var(--accent); scrollbar-color: var(--border) var(--bg); }
[hidden] { display: none !important; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 14px/1.52 var(--font); font-variant-numeric: tabular-nums; -webkit-font-smoothing: antialiased; }
::selection { background: var(--accent-fill); color: var(--ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
a { color: var(--accent); text-underline-offset: 3px; }
button, select, input { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .62; }
p { margin: 0; }
h1, h2, h3 { margin: 0; text-wrap: balance; font-weight: 660; }
h1 { font-size: clamp(1.9rem, 3.5vw, 2.55rem); letter-spacing: -.039em; line-height: 1.12; }
h2 { font-size: 1.12rem; letter-spacing: -.018em; line-height: 1.3; }
h3 { font-size: .98rem; line-height: 1.35; }
svg { flex: none; vertical-align: middle; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip-link { position: fixed; z-index: 5; top: 8px; left: 8px; padding: 10px; background: var(--surface); transform: translateY(-150%); }
.skip-link:focus { transform: none; }
.subtle, small, label > span, dt { color: var(--muted); }
.good-text { color: var(--green); }
.bad-text { color: var(--red); }
.warn-text { color: var(--amber); }

.shell { display: grid; grid-template-columns: 225px minmax(0, 1fr); min-height: 100dvh; }
.sidebar { background: var(--rail); border-right: 1px solid var(--line); position: sticky; top: 0; height: 100dvh; padding: 28px 14px 16px; display: flex; flex-direction: column; gap: 31px; }
.brand, .login-brand { display: flex; align-items: center; gap: 11px; text-decoration: none; color: var(--ink); font-size: 1.1rem; letter-spacing: -.024em; white-space: nowrap; }
.brand { margin-left: 9px; }
.brand-symbol { width: 39px; height: 39px; border-radius: 10px; background: var(--accent); color: var(--on-accent); display: inline-grid; place-items: center; }
.sidebar nav { display: grid; gap: 5px; }
.sidebar nav a { display: flex; align-items: center; gap: 10px; padding: 10px 11px; min-height: 43px; color: var(--muted); font-weight: 570; text-decoration: none; border-radius: 8px; white-space: nowrap; }
.sidebar nav a:hover { background: var(--wash); color: var(--ink); }
.sidebar nav a[aria-current] { background: var(--accent-fill); color: var(--accent); font-weight: 690; }
.sidebar nav a small { margin-inline-start: auto; font-size: .67rem; border: 1px solid var(--border); border-radius: 5px; padding: 0 3px; }
.sidebar-foot { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 9px; margin-top: auto; padding: 13px 2px 0; border-top: 1px solid var(--line); }
.sidebar-foot strong, .sidebar-foot small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-foot strong { font-size: .83rem; }
.sidebar-foot small { font-size: .73rem; }
.avatar { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; background: var(--accent-fill); color: var(--accent); font-size: .73rem; font-weight: 690; }
.workspace { min-width: 0; }
.utility { height: 65px; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 clamp(18px, 4vw, 46px); background: var(--surface); border-bottom: 1px solid var(--line); color: var(--muted); font-weight: 550; }
.utility > div { display: flex; align-items: center; gap: 6px; }
.demo-tag, .personal { font-size: .71rem; color: var(--muted); border: 1px solid var(--border); border-radius: 5px; padding: 1px 5px; vertical-align: middle; margin-left: 7px; font-weight: 600; letter-spacing: 0; white-space: nowrap; }
.personal { margin-left: 10px; }
.mobile-logout { display: none; }
.icon-button { border: 1px solid transparent; color: var(--muted); background: transparent; border-radius: 8px; display: inline-grid; place-items: center; min-width: 38px; min-height: 38px; padding: 0; }
.icon-button:hover { color: var(--ink); background: var(--wash); }
[data-theme-toggle] { border-color: var(--line); }
[data-theme-toggle][aria-pressed="true"] > svg:first-child,
[data-theme-toggle][aria-pressed="false"] > svg:last-child { display: none; }

main#content { max-width: 1560px; margin-inline: auto; padding: 34px clamp(18px, 4vw, 46px) 56px; }
.page-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 14px; margin-bottom: 25px; }
.page-heading p { margin-top: 8px; color: var(--muted); font-size: .96rem; max-width: 65ch; }
.page-body > * + * { margin-top: 18px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); min-width: 0; }
.kpi-band { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); margin: 0; padding: 0; }
.kpi-band > div { padding: 16px 15px 15px; min-width: 0; }
.kpi-band > div + div { border-left: 1px solid var(--line); }
.kpi-band dt { font-size: .78rem; font-weight: 620; }
.kpi-band dd { margin: 3px 0 0; font-size: clamp(1.3rem, 2.1vw, 2rem); font-weight: 680; letter-spacing: -.036em; line-height: 1.15; overflow-wrap: anywhere; }
.kpi-band dd.kpi-detail { font-size: .74rem; color: var(--muted); font-weight: 500; letter-spacing: 0; line-height: 1.38; margin-top: 6px; }
.page-body > .kpi-band { margin-bottom: 17px; }
.metric-scope { color: var(--muted); font-size: .8rem; font-weight: 640; margin-bottom: 6px; }
.metric-scope + .kpi-band { margin-top: 0; }
.chart-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.performance-charts > :last-child { grid-column: 1 / -1; }
.overview-charts, .movement-grid { grid-template-columns: minmax(0, 1.16fr) minmax(0, 1fr); }
.chart { padding: 17px 15px 13px; }
.chart-head { padding: 0 3px; }
.chart-head p, .section-heading p, .compact-head p { color: var(--muted); font-size: .83rem; margin-top: 4px; }
.chart-plot { position: relative; margin-top: 9px; min-width: 0; }
.chart-plot svg { display: block; width: 100%; max-height: 226px; overflow: visible; }
.chart-wide .chart-plot { container-type: inline-size; }
.chart-wide .chart-plot svg { max-height: none; }
.chart-wide .chart-plot .wide-plot { display: none; }
@container (width >= 720px) {
  .chart-wide .chart-plot svg { display: none; }
  .chart-wide .chart-plot .wide-plot { display: block; }
}
.chart-plot text { fill: var(--muted); font-size: 11px; font-weight: 545; }
.chart-plot .grid { stroke: var(--line); stroke-width: 1; fill: none; vector-effect: non-scaling-stroke; }
.chart-plot .reference { stroke: var(--border); stroke-dasharray: 4 5; }
.top-three-band { fill: var(--green-tint); }
.chart-plot text.axis-title, .chart-plot text.top-three-label { fill: var(--ink); font-weight: 670; }
.trace, .bar, .legend i, .series-end { --series: var(--green); }
.blue { --series: var(--blue) !important; }
.amber { --series: var(--amber) !important; }
.slate { --series: var(--slate) !important; }
.trace { color: var(--series); }
.trace .curve { fill: none; stroke: currentColor; stroke-width: 2.5; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.trace.dashed .curve { stroke-dasharray: 10 5; }
.trace.dotted .curve { stroke-dasharray: 1 5; }
.trace-marker { fill: currentColor; stroke: var(--surface); stroke-width: 1; }
.chart-plot .series-end, .chart-plot .series-end text { fill: var(--series); stroke: var(--surface); stroke-width: 3; paint-order: stroke; font-size: 16px; font-weight: 700; }
.series-end path { fill: none; stroke: var(--series); stroke-width: 1.25; }
.bar { fill: var(--series); opacity: .9; }
.chart-target line { stroke: var(--border); stroke-dasharray: 3 3; opacity: 0; pointer-events: none; }
.chart-target:hover line, .chart-target:focus line { opacity: 1; }
.chart-tip { pointer-events: none; position: absolute; top: 0; inset-inline: 12% 4%; width: fit-content; max-width: 85%; margin-inline-start: auto; z-index: 1; border: 1px solid var(--border); border-radius: 8px; padding: 7px 10px; background: var(--surface); font-size: .78rem; }
.chart-empty { display: grid; place-items: center; text-align: center; color: var(--muted); min-height: 170px; padding: 16px; }
.legend, .distribution, .movement-list, .alert-list { padding: 0; margin: 0; list-style: none; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; color: var(--muted); font-size: .76rem; padding: 7px 3px 0; }
.legend li { display: flex; align-items: center; gap: 6px; }
.legend i { width: 8px; height: 8px; border-radius: 2px; background: var(--series); }
.legend i:is(.solid, .dashed, .dotted) { width: 20px; height: 0; background: none; border-top: 2px solid var(--series); border-radius: 0; }
.legend i.dashed { border-top-style: dashed; }
.legend i.dotted { border-top-style: dotted; }
.distribution { display: grid; gap: 11px; padding: 20px 3px 5px; }
.distribution li { display: grid; grid-template-columns: 95px 1fr 30px; gap: 10px; align-items: center; font-size: .82rem; color: var(--muted); }
.distribution strong { text-align: right; color: var(--ink); }
.distribution meter { width: 100%; height: 12px; }
meter::-webkit-meter-bar { background: var(--wash); border: 0; }
meter::-webkit-meter-optimum-value { background: var(--accent); }
meter::-moz-meter-bar { background: var(--accent); }
.section-heading { margin-top: 24px; }
.section-heading + * { margin-top: 9px; }
.compact-panel { padding: 14px 15px 4px; }
.compact-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 8px; }
.compact-head a { font-size: .78rem; font-weight: 600; white-space: nowrap; }
.movement-list li { display: grid; grid-template-columns: minmax(130px, 1.7fr) minmax(55px, 1fr) auto 46px; gap: 10px; align-items: center; border-top: 1px solid var(--line); padding: 8px 0; min-height: 42px; }
.movement-list .text-button { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.movement-list .subtle { font-size: .78rem; }
.alert-list a { text-decoration: none; color: var(--ink); display: grid; grid-template-columns: 30px 1fr auto auto; align-items: center; gap: 9px; padding: 8px 0; border-top: 1px solid var(--line); }
.alert-list a:hover > span:nth-child(2) { text-decoration: underline; }
.alert-icon, .action-icon { display: inline-grid; place-items: center; width: 29px; height: 29px; border-radius: 7px; background: var(--wash); color: var(--accent); }
.alert-icon.warn { background: var(--amber-tint); color: var(--amber); }
.change { display: inline-flex; align-items: center; gap: 2px; font-weight: 650; white-space: nowrap; }
.status { font-size: .72rem; font-weight: 650; display: inline-flex; align-items: center; padding: 2px 7px; border-radius: 6px; color: var(--muted); background: var(--wash); white-space: nowrap; }
.status.good { background: var(--green-tint); color: var(--green); }
.status.warn { background: var(--amber-tint); color: var(--amber); }
.status.bad { background: var(--red-tint); color: var(--red); }
.quiet { color: var(--muted); padding: 17px; }
.text-button, .row-name { padding: 0; color: var(--accent); background: none; border: 0; text-align: start; font-weight: 650; }
.text-button:hover, .row-name:hover { text-decoration: underline; text-underline-offset: 3px; }
.button { display: inline-flex; gap: 7px; align-items: center; justify-content: center; min-height: 40px; padding: 8px 12px; border: 1px solid var(--border); border-radius: 8px; color: var(--ink); background: var(--surface); font-weight: 640; font-size: .82rem; text-decoration: none; }
.button:hover { background: var(--wash); }
.button.primary { color: var(--on-accent); background: var(--accent); border-color: var(--accent); }
.button.primary:hover { filter: brightness(.94); }

.filters { display: flex; flex-wrap: wrap; align-items: end; gap: 9px; padding: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.filters label, .action-card .mode-label, .mobile-sort { display: grid; gap: 4px; font-size: .78rem; font-weight: 620; }
.filters label { flex: 1 1 115px; min-width: 0; }
.filters .filter-search { flex: 2 1 235px; }
.filter-disclosure { flex: 3 1 350px; min-width: 0; }
.filter-fields { display: flex; align-items: end; gap: 9px; }
.filter-disclosure summary, .directory-analysis summary { display: none; }
.filter-count { min-width: 20px; padding-inline: 4px; border-radius: 5px; background: var(--accent-fill); color: var(--accent); text-align: center; }
.filters ui-input { position: relative; display: block; }
.filters ui-input > svg { position: absolute; inset: 11px auto auto 10px; color: var(--muted); }
.filters input[type="search"] { padding-left: 33px; width: 100%; }
select, input:not([type="file"]) { min-height: 38px; background: var(--surface); color: var(--ink); border: 1px solid var(--border); border-radius: 8px; padding: 6px 9px; min-width: 0; }
input::placeholder { color: var(--muted); opacity: 1; }
.table-caption { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.table-caption span, .table-note { color: var(--muted); font-size: .78rem; }
.directory-analysis-content > .chart-grid { margin-top: 14px; }
.table-caption + .table-note { margin-top: 3px; }
.table-note + .table-region, .table-caption + .table-region { margin-top: 8px; }
.table-region { container-type: inline-size; overflow: auto; max-height: min(72vh, 680px); scrollbar-gutter: stable; }
table { width: 100%; border-collapse: separate; border-spacing: 0; text-align: left; font-size: .84rem; }
thead th { position: sticky; top: 0; z-index: 1; background: var(--wash); color: var(--muted); font-size: .73rem; padding: 8px 8px; text-wrap: pretty; border-bottom: 1px solid var(--line); }
thead th button { background: transparent; color: inherit; border: 0; padding: 3px 0; font: inherit; font-weight: 680; display: inline-flex; align-items: center; gap: 3px; text-align: inherit; }
th[aria-sort] button { color: var(--accent); }
th[aria-sort="descending"] svg { transform: rotate(180deg); }
th:first-child, td:first-child { padding-left: 13px; }
th:last-child, td:last-child { padding-right: 13px; }
td, tbody th { padding: 9px 8px; border-bottom: 1px solid var(--line); }
tbody th { text-align: left; font-weight: 400; }
tr:last-child > :is(td, th) { border-bottom: 0; }
tr:hover > :is(td, tbody th) { background-color: var(--bg); }
.numeric { text-align: end; }
td.numeric { white-space: nowrap; }
.row-name { display: block; min-width: 102px; overflow-wrap: anywhere; }
td small, tbody th small { display: block; font-size: .72rem; margin-top: 2px; }
.directory-mobile, tbody th .directory-mobile { display: none; }
.no-results { padding: 20px 15px; color: var(--muted); }
.no-results p { margin-bottom: 5px; }
.mobile-sort, .filters .mobile-sort { display: none; }

.budget { padding: 16px 17px 13px; }
.budget dl { display: flex; flex-wrap: wrap; gap: 12px 36px; padding: 9px 0 0; border-top: 1px solid var(--line); margin: 0; }
.budget dt { font-size: .8rem; font-weight: 620; }
.budget dd { margin: 2px 0 0; font-size: 1.5rem; letter-spacing: -.025em; font-weight: 660; }
.actions-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.action-card { padding: 13px 14px; display: flex; flex-direction: column; align-items: flex-start; gap: 7px; }
.action-card p { flex: 1; font-size: .82rem; color: var(--muted); }
.action-card form { display: grid; gap: 8px; max-width: 100%; }
.file-picker { position: relative; display: grid; justify-items: start; gap: 4px; }
.file-picker span { color: var(--muted); font-size: .78rem; overflow-wrap: anywhere; }
.file-picker input:focus-visible + label { outline: 2px solid var(--accent); outline-offset: 3px; }
.file-picker label { cursor: pointer; }
.mode-label { grid-template-columns: auto minmax(0, 1fr); align-items: center; }
.mode-label select { min-height: 33px; }
.schedule-list { padding-inline: 15px; }
.schedule-list form { display: grid; grid-template-columns: minmax(0, 1fr) 125px auto auto; align-items: end; gap: 9px; padding: 12px 0; }
.schedule-list form + form { border-top: 1px solid var(--line); }
.schedule-list form p { color: var(--muted); font-size: .78rem; margin-top: 4px; }
.switch-label { display: flex; align-items: center; gap: 6px; font-size: .79rem; min-height: 40px; }
.schedule-time { display: flex; align-items: center; gap: 4px; border: 0; padding: 0; margin: 0; min-width: 0; }
.schedule-time legend { color: var(--muted); font-size: .78rem; font-weight: 620; padding: 0; margin-bottom: 4px; }
.schedule-time select { padding-inline: 8px 4px; }
ui-alert-dialog-content { background: var(--surface); color: var(--ink); border-radius: var(--radius); }
ui-alert-dialog-title { font-weight: 660; }
.dialog-actions { display: flex; justify-content: end; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.notices { margin: 0 0 12px; padding: 9px 12px; border-radius: 8px; border: 1px solid var(--line); background: var(--green-tint); color: var(--green); }
.notices.error, .form-error { background: var(--red-tint); color: var(--red); }
.form-error { padding: 8px 10px; border-radius: 8px; }
dialog:modal, dialog::backdrop { overscroll-behavior: contain; }
dialog::backdrop { background-color: rgba(9, 21, 15, .48); overflow: hidden; }
html:has(dialog:modal) { overflow: hidden; }
.drawer { width: min(575px, 100vw); height: 100dvh; max-width: 100%; max-height: 100%; padding: 18px; margin: 0 0 0 auto; border: 0; background: var(--bg); color: var(--ink); border-left: 1px solid var(--line); }
.drawer-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; border-bottom: 1px solid var(--line); padding-bottom: 10px; }
.drawer-head h2 { overflow-wrap: anywhere; }
.drawer .chart { margin-top: 14px; }
.detail-meta { margin: 12px 0; color: var(--muted); }
.detail-meta .status { margin-inline-start: 7px; }
.detail-section { padding-top: 15px; }
.detail-metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.detail-metrics dd { margin: 0; font-weight: 640; }
.detail-links { display: flex; flex-wrap: wrap; gap: 15px; margin-top: 13px; }
.log-lines { white-space: pre-wrap; overflow-wrap: anywhere; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 12px; font-size: .79rem; }
.empty { display: grid; justify-items: center; text-align: center; gap: 9px; padding: clamp(28px, 8vw, 78px) 20px; }
.empty-symbol { background: var(--accent-fill); color: var(--accent); display: grid; place-items: center; width: 45px; height: 45px; border-radius: 9px; margin-bottom: 4px; }
.empty p { color: var(--muted); max-width: 52ch; }
.empty a { margin-top: 5px; }
.loading-layout { display: grid; gap: 15px; }
.loading i, .login-skeleton i, .period-skeleton i { display: block; border-radius: 6px; background: var(--line); animation: breathe 1.5s ease-in-out infinite alternate; }
@keyframes breathe { to { opacity: .52; } }
.period-skeleton { display: flex; gap: 6px; padding: 4px; border: 1px solid var(--line); border-radius: 8px; }
.period-skeleton i { width: 76px; height: 25px; }
.skeleton-stats { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 12px; padding: 15px; }
.skeleton-stats i { height: 53px; }
.skeleton-chart, .skeleton-action, .skeleton-schedules { padding: 16px; display: grid; gap: 12px; }
.skeleton-chart i:first-child { height: 16px; width: 44%; }
.skeleton-chart i:last-child { height: 178px; background: var(--wash); }
.skeleton-filters { display: grid; grid-template-columns: 2fr repeat(3, 1fr); gap: 9px; padding: 12px; }
.skeleton-filters i { height: 38px; }
.skeleton-filters i:nth-child(2), .skeleton-summary { display: none; }
.skeleton-heading i { width: min(159px, 40%); height: 17px; }
.directory-loading-layout { gap: 0; }
.directory-loading-layout > * + * { margin-top: 18px; }
.directory-loading-layout > .skeleton-table { margin-top: 8px; }
.skeleton-directory-heading h2 { position: relative; width: min(159px, 40%); }
.skeleton-directory-heading i { position: absolute; inset: .23em 0; }
.skeleton-directory-filters .filter-search, .skeleton-directory-filters .filter-fields > i { min-width: 0; }
.skeleton-directory-filters .filter-fields > i { flex: 1; }
.skeleton-directory-filters i { position: relative; height: 38px; margin-top: calc(4px + .78rem * 1.52); }
.skeleton-directory-filters i::before { content: ""; position: absolute; top: calc(-4px - .78rem * 1.52); width: min(60%, 66px); height: .6rem; border-radius: 4px; background: var(--line); }
.loading .skeleton-plot { aspect-ratio: 480 / 205; max-height: 226px; background: var(--wash); }
.loading .distribution i { height: 12px; }
.skeleton-directory-analysis :is(.metric-scope, .kpi-band dt, .kpi-band dd, .chart-head h2, .chart-head p, .legend li, .distribution span, .distribution strong) {
  position: relative;
  color: transparent;
}
.skeleton-directory-analysis :is(.metric-scope, .kpi-band dt, .kpi-band dd, .chart-head h2, .chart-head p, .legend li, .distribution span, .distribution strong)::after {
  content: "";
  position: absolute;
  inset: .25em auto auto 0;
  width: min(85%, 8em);
  height: .65em;
  border-radius: 4px;
  background: var(--line);
}
.skeleton-directory-analysis .kpi-band dd:not(.kpi-detail)::after { width: min(50%, 1.7em); }
.skeleton-directory-analysis .legend li::after { inset-inline-start: 14px; width: calc(100% - 14px); }
.skeleton-directory-analysis .metric-scope::after { width: 72px; }
.skeleton-table > div { display: grid; grid-template-columns: 2fr repeat(calc(var(--skeleton-columns) - 1), 1fr); gap: 12px; padding: 12px; }
.skeleton-table > div + div { border-top: 1px solid var(--line); }
.skeleton-table > div:first-child { background: var(--wash); border-radius: var(--radius) var(--radius) 0 0; }
.skeleton-table i { height: 18px; }
.skeleton-action i:first-child { width: 28px; height: 28px; }
.skeleton-action i:nth-child(2) { width: 80%; height: 18px; }
.skeleton-action i:last-child { width: 60%; height: 38px; }
.skeleton-schedules i { height: 46px; }
@media (prefers-reduced-motion: reduce) { .loading i, .login-skeleton i, .period-skeleton i { animation: none; } }

.login-screen { min-height: 100dvh; padding: 32px 20px; display: grid; place-items: center; position: relative; background: var(--rail); }
.login-brand, .login-theme { position: absolute; top: 25px; }
.login-brand { left: 27px; }
.login-theme { right: 27px; }
.login-panel { width: min(100%, 410px); padding: 27px; }
.login-panel p { color: var(--muted); margin-top: 8px; }
.login-form, .login-skeleton { display: grid; gap: 8px; margin-top: 21px; }
.login-form label { font-size: .82rem; font-weight: 640; }
.login-form input { width: 100%; }
.login-form .password-field { display: grid; grid-template-columns: minmax(0, 1fr) 38px; align-items: center; min-height: 38px; padding-inline-end: 2px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); }
.login-form .password-field input { min-height: 36px; border: 0; background: transparent; }
.password-field:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 3px; }
.password-field input:focus-visible { outline: none; }
.password-field input::-ms-reveal { display: none; }
.password-field button { display: grid; place-items: center; height: 32px; padding: 0; color: var(--ink); background: transparent; border: 0; border-radius: 6px; }
.password-field button:hover { background: var(--wash); }
.password-field button:focus-visible { outline-offset: -2px; }
.password-field:has(input[type=password]) button svg:last-child,
.password-field:has(input[type=text]) button svg:first-child { display: none; }
.login-form ui-button, .login-form ui-button button { display: flex; width: 100%; }
.login-form ui-button { margin-top: 6px; }
.login-form .form-error { color: var(--red); }
.login-skeleton i { height: 37px; }
.login-theme button { background: var(--surface); }

@media (max-width: 1110px) {
  .shell { grid-template-columns: 190px minmax(0, 1fr); }
  .sidebar { padding-inline: 11px; }
  .kpi-band { grid-auto-flow: row; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .kpi-band > div { border-top: 1px solid var(--line); }
  .kpi-band > div:nth-child(-n+3) { border-top: 0; }
  .kpi-band > div:nth-child(3n+1) { border-left: 0; }
  .chart-plot text { font-size: 13px; }
  .skeleton-stats { grid-auto-flow: row; grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .shell { display: block; }
  .sidebar { height: auto; position: static; border-right: 0; padding: 10px 13px 0; gap: 8px; border-bottom: 1px solid var(--line); }
  .brand { margin-left: 0; }
  .brand-symbol { width: 33px; height: 33px; border-radius: 8px; }
  .sidebar nav { display: flex; overflow-x: auto; padding-bottom: 6px; scrollbar-width: thin; }
  .sidebar nav a { min-height: 38px; padding: 7px 9px; gap: 5px; }
  .sidebar nav a small, .sidebar-foot { display: none; }
  .utility { height: 48px; }
  .icon-button { min-height: 34px; min-width: 34px; }
  .mobile-logout { display: inline; }
  main#content { padding-top: 22px; }
  .mobile-sort { display: grid; max-width: 275px; }
}
@media (max-width: 620px) {
  .chart-grid, .actions-grid { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .chart-plot text { font-size: 14px; }
  .chart-plot .series-end, .chart-plot .series-end text { font-size: 18px; }
  .page-heading { align-items: flex-start; flex-direction: column; gap: 10px; margin-bottom: 17px; }
  .page-heading p { font-size: .89rem; }
  .page-body > * + * { margin-top: 12px; }
  .kpi-band { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpi-band > div { padding: 10px 9px; }
  .kpi-band > div:nth-child(n+3) { border-top: 1px solid var(--line); }
  .kpi-band > div:nth-child(2n+1) { border-left: 0; }
  .kpi-band > div:nth-child(2n) { border-left: 1px solid var(--line); }
  .directory-analysis .kpi-band > div:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .kpi-band dd { font-size: 1.5rem; }
  .drawer .kpi-band { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .drawer .kpi-band > div { border-top: 0; }
  .drawer .kpi-band > div + div { border-left: 1px solid var(--line); }
  .movement-list li { grid-template-columns: minmax(0, 1fr) auto auto; }
  .movement-city { display: none; }
  .table-caption { flex-wrap: wrap; }
  .schedule-list form { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .schedule-list form > div { grid-column: 1 / -1; }
  .schedule-list form > ui-button { grid-column: 2; }
  .budget .compact-head { flex-wrap: wrap; }
  .budget dl { gap: 10px 18px; }
  .budget dd { font-size: 1.26rem; }
  .skeleton-stats { grid-template-columns: repeat(2, 1fr); }
  .login-brand { left: 18px; }
  .login-theme { right: 18px; }
}
@container (width < 680px) {
  .table-region:not(.directory-table) {
    table, tbody, tr { display: block; }
    thead { position: absolute; width: 1px; height: 1px; clip-path: inset(50%); overflow: hidden; }
    thead button { visibility: hidden; }
    tr { padding: 8px 10px; border-bottom: 1px solid var(--line); }
    tr:last-child { border-bottom: 0; }
    td, td:first-child, td:last-child, td.numeric { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 8px; justify-items: end; align-items: center; border: 0; padding: 4px; white-space: normal; text-align: right; overflow-wrap: anywhere; }
    td::before { content: attr(data-label); justify-self: start; color: var(--muted); font-size: .76rem; text-align: left; }
    td:first-child { display: block; text-align: left; padding-block: 5px 7px; }
    td:first-child::before { display: none; }
    td:nth-child(even) { background: var(--bg); border-radius: 3px; }
  }
}
@media (max-width: 1010px) {
  .mobile-sort { display: grid; max-width: 275px; }
}
@media (max-width: 710px) {
  .table-region { max-height: none; scrollbar-gutter: auto; }
}

@media (max-width: 620px) {
  .sidebar { padding: 11px 14px 7px; gap: 9px; }
  .sidebar nav { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 3px; padding: 0; overflow: visible; }
  .sidebar nav a { padding: 4px 5px; font-size: .7rem; min-height: 35px; white-space: nowrap; }
  .sidebar nav a svg { width: 15px; height: 15px; }
  .utility { position: absolute; top: 10px; right: 13px; padding: 0; height: 34px; background: transparent; border: 0; }
  .snapshot-label { display: none; }
  .demo-tag { margin-left: 0; }
}

@media (width < 768px) {
  .chart-plot text.axis-tick { fill: var(--ink); font-size: 16px; font-weight: 650; }
  body:is([data-page=maps], [data-page=sites], [data-page=negatifs]) {
    main#content { padding-top: 10px; }
    .page-heading { margin-bottom: 8px; }
    .page-heading p { display: none; }
    .page-body > * + * { margin-top: 8px; }
    .page-body > .directory-analysis + .table-caption { margin-top: 4px; }
    .table-note, .directory-date { display: none; }
  }
  .filters { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; padding: 7px; align-items: center; }
  .filter-search > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .filter-disclosure summary { display: flex; justify-content: start; width: fit-content; min-height: 38px; }
  .filter-disclosure summary::after { content: ""; width: 6px; height: 6px; border: solid currentColor; border-width: 0 1.5px 1.5px 0; transform: translateY(-2px) rotate(45deg); }
  .filter-disclosure[open] summary::after { transform: translateY(2px) rotate(225deg); }
  .filters:has(.filter-disclosure[open]) > * { grid-column: 1 / -1; }
  .filter-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 8px; }
  .filters .mobile-sort { display: grid; max-width: none; }
  .directory-analysis { border-bottom: 1px solid var(--line); }
  .directory-analysis summary { display: list-item; cursor: pointer; padding: 3px 4px; color: var(--accent); font-size: .8rem; font-weight: 650; }
  .directory-analysis-content { padding: 6px 0 10px; }
  .directory-table { max-height: none; overflow: visible; scrollbar-gutter: auto; }
  .directory-table :is(table, tbody, tbody tr) { display: block; }
  .directory-table thead, .directory-table td, .directory-table .directory-desktop { display: none; }
  .directory-table tr { position: relative; }
  .directory-table tr:not(:last-child) { border-bottom: 1px solid var(--line); }
  .directory-table tbody th { display: block; padding: 10px 12px; border: 0; text-align: left; }
  .directory-table .row-name { min-width: 0; line-height: 1.35; text-align: left; }
  .directory-table .row-name::after { content: ""; position: absolute; inset: 0; }
  .directory-name, tbody th .directory-meta { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px; }
  .directory-table .directory-mobile { display: block; }
  .directory-table .directory-meta { display: grid; margin-top: 4px; }
  .directory-meta small { margin: 0; }
  .directory-ranking { display: flex; align-items: center; justify-content: end; gap: 8px; color: var(--muted); font-size: .75rem; font-weight: 640; }
  .directory-reviews { color: var(--muted); }
  .skeleton-filters { grid-template-columns: minmax(0, 1fr) 76px; padding: 7px; }
  .skeleton-filters i:nth-child(n+3) { display: none; }
  .skeleton-filters i:nth-child(2) { display: block; }
  .directory-loading-layout > * + * { margin-top: 8px; }
  .skeleton-directory-filters { grid-template-columns: minmax(0, 1fr) 76px; grid-row: 1; margin-top: 0; }
  .skeleton-directory-filters i { margin-top: 0; }
  .skeleton-directory-filters i::before, .skeleton-directory-filters .filter-fields > i + i { display: none; }
  .skeleton-directory-filters .filter-fields { display: flex; margin-top: 0; }
  .skeleton-directory-analysis { margin-top: 8px; }
  .skeleton-directory-analysis .directory-analysis-content { display: none; }
  .skeleton-summary { display: flex; align-items: center; min-height: calc(.8rem * 1.52 + 7px); padding: 3px 4px; border-bottom: 1px solid var(--line); gap: 6px; }
  .skeleton-summary::before { content: ""; border: 4px solid transparent; border-right: 0; border-left-color: var(--border); }
  .skeleton-summary i { height: 10px; width: 128px; }
  .skeleton-directory-heading { margin-top: 4px; }
  .loading[data-loading-view]:is([data-loading-view=maps], [data-loading-view=sites], [data-loading-view=negatifs]) .skeleton-table {
    > div { grid-template-columns: minmax(0, 1fr) 66px; gap: 6px 14px; }
    > div:first-child, i:nth-child(n+5) { display: none; }
    i:first-child { width: 82%; }
    i:nth-child(n+3) { height: 11px; }
    i:nth-child(3) { width: 63%; }
  }
  [data-loading-view=sites] .skeleton-table > div { min-height: 69px; }
  [data-loading-view=negatifs] .skeleton-table > div { min-height: 88px; }
  [data-loading-view=negatifs] .skeleton-table i:nth-child(5) { display: block; width: 52%; }
}
