@font-face {
  font-family: "XXII Centar";
  src: url("fonts/XXIICentar-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: block;
}

@font-face {
  font-family: "XXII Centar";
  src: url("fonts/XXIICentar-Medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: block;
}

@font-face {
  font-family: "XXII Centar";
  src: url("fonts/XXIICentar-Bold.woff2") format("woff2");
  font-weight: 700 900;
  font-style: normal;
  font-display: block;
}

:root {
  --ink: #575757;
  --muted: #666666;
  --line: #dddddd;
  --paper: #f3f3f2;
  --card: #ffffff;
  --teal: #d90017;
  --teal-dark: #b90014;
  --teal-soft: #fae6e8;
  --lime: #d90017;
  --amber: #cf7a00;
  --amber-soft: #fff2dc;
  --red: #d90017;
  --red-soft: #fce7e9;
  --blue-soft: #e9eef4;
  --shadow: 0 18px 48px rgba(38, 38, 38, .09);
  --radius: 9px;
}

body {
  color: var(--ink);
  background: var(--paper);
  font-family: "XXII Centar", Arial, sans-serif;
  font-size: 16px;
}

h1, h2, h3, h4, h5, h6, button, input, select {
  font-family: "XXII Centar", Arial, sans-serif;
}

h1, h2, h3 { color: var(--ink); font-weight: 700; }
h1 { letter-spacing: -.035em; }
h2 { letter-spacing: -.02em; }

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
.drop-zone:focus-within {
  outline: 3px solid rgba(217, 0, 23, .3);
  outline-offset: 3px;
}

.topbar {
  height: 92px;
  padding-inline: max(28px, calc((100vw - 1360px) / 2));
  background: rgba(255, 255, 255, .98);
  border-top: 5px solid var(--red);
  border-bottom: 0;
  box-shadow: 0 8px 28px rgba(0, 0, 0, .07);
}

.brand { gap: 17px; }
.brand .ave-logo { width: 96px; height: 54px; object-fit: contain; }
.brand > span:last-child { padding-left: 15px; border-left: 1px solid #dadada; }
.brand strong { color: #575757; font-size: 17px; font-weight: 700; }
.brand small { color: var(--red); font-size: 10px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; }

.topbar nav { gap: 4px; }
.topbar nav a {
  padding: 11px 16px;
  color: #696969;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
}
.topbar nav a:hover { color: var(--red); background: #f7f7f7; }
.topbar nav a.active { color: white; background: var(--red); }
.logout-form { border-left-color: #d7d7d7; }
.logout-form button { color: var(--red); background: var(--red-soft); border-radius: 50%; }
.logout-form button:hover { background: var(--red); }

.page-shell { width: min(1360px, calc(100% - 48px)); padding-top: 48px; }
footer { width: min(1360px, calc(100% - 48px)); color: #696969; }
footer strong { color: var(--red); }

.theme-toggle {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  display: grid;
  place-items: center;
  color: #5d5d5d;
  background: white;
  border: 1px solid #d7d7d7;
  border-radius: 50%;
  box-shadow: 0 5px 16px rgba(0, 0, 0, .06);
  cursor: pointer;
  transition: color .15s ease, background .15s ease, border-color .15s ease, transform .15s ease;
}
.theme-toggle:hover { color: var(--red); background: #fff6f7; border-color: #efb9bf; transform: translateY(-1px); }
.theme-icon { grid-area: 1 / 1; width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.theme-icon-sun { display: none; }
html[data-theme="dark"] .theme-icon-moon { display: none; }
html[data-theme="dark"] .theme-icon-sun { display: block; }
.login-theme-toggle { margin-left: auto; }

.eyebrow { color: var(--red); font-size: 12px; letter-spacing: .12em; }
.page-heading h1 { font-size: clamp(42px, 4.5vw, 64px); }
.page-heading > p, .page-heading > div > p { font-size: 16px; }

.button {
  min-height: 46px;
  padding: 11px 21px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 500;
}
.button.primary { background: var(--red); box-shadow: 0 10px 24px rgba(217, 0, 23, .2); }
.button.primary:hover { background: #b70014; }
.button.destructive:hover { background: #a90012; }
.button.secondary { color: var(--red); background: white; border-color: var(--red); }
.button.secondary:hover { color: white; background: var(--red); }
.button.ghost { border-color: #bcbcbc; }
.button.tiny { min-height: 35px; padding: 6px 14px; color: var(--red); background: white; border-color: var(--red); }
.button.tiny:hover { color: white; background: var(--red); }

input, select { border-color: #cfcfcf; border-radius: 4px; }
input:focus, select:focus { border-color: var(--red); box-shadow: 0 0 0 3px rgba(217, 0, 23, .12); }
input[type="checkbox"] { accent-color: var(--red); }

.hero {
  position: relative;
  min-height: 560px;
  padding: 52px;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(25, 25, 25, .83) 0%, rgba(25, 25, 25, .58) 48%, rgba(25, 25, 25, .2) 100%),
    url("images/ave-hero.jpeg") center / cover no-repeat;
  border-radius: 10px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .16);
}
.hero::after { content: ""; position: absolute; inset: auto auto 0 0; width: 210px; height: 7px; background: var(--red); }
.hero > * { position: relative; z-index: 1; }
.hero-copy { color: white; }
.hero-copy .eyebrow { width: fit-content; padding: 7px 12px; color: white; background: var(--red); border-radius: 999px; }
.hero-copy h1 { color: white; font-size: clamp(48px, 5.4vw, 76px); }
.hero-copy h1 em { color: white; border-bottom: 6px solid var(--red); }
.hero-copy > p { color: rgba(255, 255, 255, .82); font-size: 18px; }
.mini-stats span { color: rgba(255, 255, 255, .65); }
.mini-stats strong { color: white; font-size: 26px; }

.upload-card { padding: 20px; border: 0; border-top: 6px solid var(--red); border-radius: 7px; box-shadow: 0 22px 55px rgba(0, 0, 0, .2); }
.drop-zone { border-color: #c7c7c7; border-radius: 5px; background: #f6f6f6; }
.drop-zone:hover, .drop-zone.dragover { border-color: var(--red); background: var(--red-soft); }
.upload-icon { color: var(--red); border-radius: 50%; box-shadow: 0 8px 20px rgba(217, 0, 23, .13); }
.drop-zone small { color: var(--red); }

.workflow-strip { background: white; border-top: 4px solid var(--red); border-radius: 5px; box-shadow: 0 10px 30px rgba(0, 0, 0, .05); }
.workflow-strip div > span { color: white; background: var(--red); }
.workflow-strip i { background: #d0d0d0; }

.section-block { border: 0; border-radius: 7px; box-shadow: 0 10px 32px rgba(0, 0, 0, .055); }
.section-block.danger-block { border-left: 6px solid var(--red); }
.section-heading { border-bottom: 1px solid #e3e3e3; padding-bottom: 17px; }
.section-heading .eyebrow { margin-bottom: 8px; }
.batch-list { border-color: #d9d9d9; border-radius: 5px; }
.batch-row { border-color: #e2e2e2; }
.batch-row:hover, .batch-row:focus-within { background: #fff6f7; }
.batch-state-form { border-left-color: #e2e2e2; }
.batch-state-button.restore { color: var(--red); background: var(--red-soft); border-color: #efcdd0; }
.batch-state-button.restore:hover { color: white; background: var(--red); border-color: var(--red); }
.batch-status-tabs { background: #e8e8e7; border-color: #d4d4d4; border-radius: 999px; }
.batch-status-tabs a:hover { color: var(--red); }
.batch-status-tabs a.active { background: var(--red); box-shadow: 0 5px 13px rgba(217,0,23,.18); }
.file-badge { color: white; background: var(--red); border-radius: 4px; }
.row-arrow, .text-link, .pagination a { color: var(--red); }

.summary-grid article { border: 0; border-top: 5px solid #9d9d9d; border-radius: 5px; box-shadow: 0 8px 24px rgba(0, 0, 0, .05); }
.summary-grid article.positive { border-top-color: #37875f; }
.summary-grid article.caution { border-top-color: #d98a00; }
.summary-grid article.negative { border-top-color: var(--red); }
.summary-grid strong { color: #4f4f4f; }

.review-panel { border-left: 6px solid #d98a00; border-radius: 5px; }
.destination-grid article { background: #f7f7f7; border-color: #dedede; border-radius: 5px; }
.destination-letter { color: white; background: var(--red); border-radius: 3px; }

.table-wrap { border-color: #d7d7d7; border-radius: 4px; }
th { color: white; background: #575757; font-size: 10px; }
td { border-color: #e4e4e4; }
tbody tr:hover { background: #fff5f6; }
.code-chip { color: var(--red); background: var(--red-soft); border-radius: 3px; }
.bulk-bar { background: rgba(255, 255, 255, .97); border-color: #cfcfcf; box-shadow: 0 12px 32px rgba(0, 0, 0, .13); }
.file-grid article, .rule-card, .municipality-card { background: #f7f7f7; border-color: #dedede; border-radius: 5px; }
.info-callout { background: #ededed; border-radius: 5px; }
.callout-icon { color: white; background: var(--red); }
.info-callout i { background: #c9c9c9; }
.inline-editor { background: #f3f3f3; border-radius: 5px; }
.create-panel { border-top: 6px solid var(--red); box-shadow: 0 14px 36px rgba(0, 0, 0, .09); }
.create-panel-icon { background: var(--red); }
.create-panel .create-form { background: #fff6f7; border: 1px solid #efcdd0; border-radius: 6px; }
.create-panel .button.primary { color: white; background: var(--red); border-color: var(--red); }
.create-panel .button.primary:hover { background: #b70014; border-color: #b70014; }
.recalculation-field > span { color: var(--red); }
.recalculation-field select { border-color: #e5aab0; }
.rule-arrow, .timeline > div > span { color: var(--red); }
.timeline > div > span { background: var(--red); }
.format-preview code, .month-chip { color: var(--red); background: var(--red-soft); border-radius: 3px; }
.duplicate-block { border-left-color: #d98a00; }
.archive-download { color: var(--red); }
.archive-month { border-left-color: var(--red); }
.archive-summary:hover { background: #fff6f7; }
.archive-summary:focus-visible { outline-color: rgba(217, 0, 23, .28); }
.archive-month[open] .archive-summary { background: #fff7f8; }
.archive-toggle { color: var(--red); background: #fff1f2; border-color: #efcdd0; }
.archive-month[open] .archive-toggle { color: white; background: var(--red); border-color: var(--red); }
.file-grid article.file-warning { border-color: #e2bd69; background: #fff6e5; }

.flash { background: white; border-color: #dddddd; border-left-width: 5px; border-radius: 7px; }
.flash.success { color: var(--ink); border-left-color: #37875f; }
.flash.error { color: var(--ink); border-left-color: var(--red); }
.flash.success .flash-icon { color: #2e7050; background: #e8f5ee; }
.flash.error .flash-icon { color: var(--red); background: var(--red-soft); }
.confirm-dialog { border-top-color: var(--red); border-radius: 7px; }
.confirm-dialog-icon { color: var(--red); background: var(--red-soft); }
.field-error, .field-invalid > span:first-child { color: #a00011; }
.security-banner { color: #6a000b; background: #ffe8ea; border-bottom-color: #f3b9bf; }

.login-body {
  min-height: 100svh;
  padding: clamp(20px, 4vh, 38px) clamp(16px, 4vw, 38px);
  display: grid;
  place-items: center;
  background: #ededec;
}
.login-shell {
  width: min(1160px, 100%);
  min-height: clamp(600px, calc(100svh - 76px), 680px);
  margin: 0;
  padding: 0;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
  gap: 0;
  overflow: hidden;
  background: var(--card);
  border: 1px solid #d5d5d5;
  border-top: 6px solid var(--red);
  border-radius: 10px;
  box-shadow: 0 26px 70px rgba(0, 0, 0, .16);
}
.login-intro {
  min-height: 0;
  padding: clamp(38px, 4vw, 54px);
  background:
    linear-gradient(135deg, rgba(32, 32, 32, .88), rgba(32, 32, 32, .52)),
    url("images/ave-hero.jpeg") center / cover no-repeat;
  border-radius: 0;
  box-shadow: none;
}
.login-intro::before { display: none; }
.login-intro::after { display: none; }
.login-brand { gap: 17px; }
.login-brand .ave-logo { width: 112px; height: auto; }
.login-brand > span:last-child { padding-left: 16px; border-left: 1px solid rgba(255, 255, 255, .4); }
.login-brand strong { font-size: 18px; }
.login-brand small { color: rgba(255, 255, 255, .78); letter-spacing: .08em; text-transform: uppercase; }
.login-intro h1 { max-width: 470px; font-size: clamp(46px, 4.5vw, 60px); }
.login-intro h1 em { color: white; border-bottom: 5px solid var(--red); }
.login-card {
  align-self: stretch;
  min-width: 0;
  padding: clamp(38px, 4vw, 54px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: var(--card);
  border: 0;
  border-left: 1px solid var(--line);
  border-radius: 0;
  box-shadow: none;
}
.login-lock { color: var(--red); background: var(--red-soft); border-radius: 50%; }
.login-error { color: #970010; background: #fff0f1; border-color: #efb2b9; border-radius: 4px; }
.login-submit { min-height: 52px; }

@media (max-width: 1100px) {
  .brand > span:last-child, .logout-form > span { display: none; }
  .topbar nav a { padding-inline: 10px; font-size: 13px; }
}

@media (max-width: 950px) {
  .topbar { height: 86px; }
  .brand .ave-logo { width: 82px; }
  .topbar nav a { padding-inline: 11px; }
  .hero { padding: 38px; }
  .login-shell { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 840px) {
  .login-body { padding: 16px; }
  .login-shell {
    width: min(100%, 620px);
    min-height: 0;
    grid-template-columns: 1fr;
    border-top-width: 5px;
    border-radius: 7px;
  }
  .login-intro { min-height: 280px; padding: 30px; }
  .login-brand .ave-logo { width: 92px; }
  .login-intro h1 { font-size: clamp(39px, 8vw, 47px); }
  .login-card {
    min-height: 0;
    padding: 38px 34px 40px;
    border-top: 1px solid var(--line);
    border-left: 0;
  }
}

@media (max-width: 520px) {
  .login-body { padding: 10px; }
  .login-intro { min-height: 250px; padding: 24px; }
  .login-brand { gap: 12px; }
  .login-brand .ave-logo { width: 82px; }
  .login-brand > span:last-child { padding-left: 12px; }
  .login-brand strong { font-size: 16px; }
  .login-brand small { font-size: 9px; }
  .login-intro h1 { font-size: clamp(36px, 11vw, 43px); }
  .login-card { padding: 30px 22px 34px; }
}

@media (max-width: 700px) {
  .topbar { height: auto; border-top-width: 4px; }
  .brand { width: 100%; justify-content: center; }
  .brand .ave-logo { width: 78px; height: 44px; }
  .brand > span:last-child { padding-left: 11px; }
  .topbar-actions { padding-top: 7px; border-top: 1px solid #e5e5e5; }
  .topbar nav { padding-bottom: 4px; scrollbar-width: thin; scrollbar-color: var(--red) #ececec; }
  .page-shell { width: min(100% - 24px, 1360px); }
  .hero { padding: 30px 20px; border-radius: 6px; }
  .hero-copy h1 { font-size: 45px; }
  .upload-card { border-radius: 5px; }
  .workflow-strip { border-radius: 5px; }
}

@media (max-width: 420px) {
  .login-card { padding-inline: 22px; }
  .login-card-heading { display: grid; grid-template-columns: 40px minmax(0, 1fr) 38px; gap: 8px; }
  .login-card-heading > div { min-width: 0; }
  .login-card-heading h2 { font-size: clamp(23px, 8vw, 27px); }
  .login-lock { width: 40px; height: 40px; flex-basis: 40px; }
  .login-lock svg { width: 21px; }
  .login-theme-toggle { width: 38px; height: 38px; }
}

html[data-theme="light"] { color-scheme: light; }

html[data-theme="dark"] {
  color-scheme: dark;
  --ink: #f2f2f0;
  --muted: #b8b8b5;
  --line: #3f4043;
  --paper: #151515;
  --card: #1f2022;
  --surface: #292a2c;
  --surface-hover: #33272b;
  --input: #191a1d;
  --accent-text: #ff6675;
  --teal: #d90017;
  --teal-dark: #ff6675;
  --teal-soft: #3d171c;
  --lime: #d90017;
  --amber: #f1ad3d;
  --amber-soft: #382b12;
  --red: #d90017;
  --red-soft: #3d171c;
  --blue-soft: #182a3d;
  --shadow: 0 18px 48px rgba(0, 0, 0, .38);
}

html[data-theme="dark"] body,
html[data-theme="dark"] .login-body { background: var(--paper); color: var(--ink); }
html[data-theme="dark"] h1,
html[data-theme="dark"] h2,
html[data-theme="dark"] h3 { color: var(--ink); }
html[data-theme="dark"] :is(a, button, input, select, .drop-zone):focus-visible,
html[data-theme="dark"] .drop-zone:focus-within { outline-color: rgba(255, 102, 117, .62); }

html[data-theme="dark"] .topbar {
  background: rgba(31, 32, 34, .97);
  box-shadow: 0 8px 28px rgba(0, 0, 0, .32);
}
html[data-theme="dark"] .brand > span:last-child,
html[data-theme="dark"] .logout-form { border-color: var(--line); }
html[data-theme="dark"] .brand strong { color: var(--ink); }
html[data-theme="dark"] .topbar nav a { color: var(--muted); }
html[data-theme="dark"] .topbar nav a:hover { color: var(--accent-text); background: var(--surface); }
html[data-theme="dark"] .topbar nav a.active { color: white; background: var(--red); }
html[data-theme="dark"] .logout-form button { color: var(--accent-text); background: var(--red-soft); }
html[data-theme="dark"] .logout-form button:hover { color: white; background: var(--red); }
html[data-theme="dark"] footer { color: var(--muted); border-color: var(--line); }

html[data-theme="dark"] .theme-toggle {
  color: #ffd36a;
  background: var(--surface);
  border-color: var(--line);
  box-shadow: 0 6px 18px rgba(0, 0, 0, .24);
}
html[data-theme="dark"] .theme-toggle:hover { color: #ffe394; background: #333438; border-color: #5a5c61; }

html[data-theme="dark"] :is(.eyebrow, .brand small, footer strong, .drop-zone small, .row-arrow, .text-link, .pagination a, .rule-arrow, .archive-download) { color: var(--accent-text); }
html[data-theme="dark"] :is(.format-preview code, .month-chip) { color: var(--accent-text); background: var(--red-soft); }
html[data-theme="dark"] .timeline > div > span { color: var(--accent-text); background: var(--red); }

html[data-theme="dark"] :is(input, select) {
  color: var(--ink);
  background: var(--input);
  border-color: var(--line);
}
html[data-theme="dark"] :is(input, select):focus { border-color: var(--accent-text); box-shadow: 0 0 0 3px rgba(255, 102, 117, .16); }
html[data-theme="dark"] input::placeholder { color: #85878b; opacity: 1; }
html[data-theme="dark"] :is(option, optgroup) { color: var(--ink); background: var(--input); }
html[data-theme="dark"] .recalculation-field > span { color: var(--accent-text); }
html[data-theme="dark"] .recalculation-field select { border-color: #78333c; }
html[data-theme="dark"] input:-webkit-autofill,
html[data-theme="dark"] input:-webkit-autofill:hover,
html[data-theme="dark"] input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--ink);
  box-shadow: 0 0 0 1000px var(--input) inset;
  caret-color: var(--ink);
}
html[data-theme="dark"] .input-with-icon svg { stroke: #aeb1b6; }

html[data-theme="dark"] :is(.button.secondary, .button.ghost, .button.tiny) {
  color: var(--accent-text);
  background: var(--surface);
  border-color: #6b4248;
}
html[data-theme="dark"] :is(.button.secondary, .button.tiny):hover { color: white; background: var(--red); border-color: var(--red); }
html[data-theme="dark"] .button.ghost { color: var(--ink); border-color: #5a5c61; }
html[data-theme="dark"] .button.ghost:hover { color: var(--ink); background: #333438; border-color: #707278; }

html[data-theme="dark"] :is(
  .workflow-strip,
  .batch-row,
  .empty-state,
  .summary-grid article,
  .archive-month,
  .flash,
  .login-card
) { background: var(--card); }

html[data-theme="dark"] :is(
  .drop-zone,
  .destination-grid article,
  .file-grid article,
  .rule-card,
  .municipality-card,
  .info-callout,
  .inline-editor
) { background: var(--surface); border-color: var(--line); }

html[data-theme="dark"] .upload-icon { background: var(--card); }
html[data-theme="dark"] .drop-zone:hover,
html[data-theme="dark"] .drop-zone.dragover { background: var(--red-soft); border-color: var(--accent-text); }
html[data-theme="dark"] .workflow-strip { border-top-color: var(--red); box-shadow: 0 10px 30px rgba(0, 0, 0, .18); }
html[data-theme="dark"] .workflow-strip i,
html[data-theme="dark"] .info-callout i { background: var(--line); }
html[data-theme="dark"] .section-block { box-shadow: 0 10px 32px rgba(0, 0, 0, .18); }
html[data-theme="dark"] .section-heading { border-bottom-color: var(--line); }
html[data-theme="dark"] .batch-list,
html[data-theme="dark"] .batch-row,
html[data-theme="dark"] .table-wrap,
html[data-theme="dark"] td { border-color: var(--line); }
html[data-theme="dark"] :is(.batch-row:hover, .batch-row:focus-within, tbody tr:hover) { background: var(--surface-hover); }
html[data-theme="dark"] .batch-state-form { border-left-color: var(--line); }
html[data-theme="dark"] .batch-state-button.remove:hover,
html[data-theme="dark"] .batch-state-button.remove:focus-visible { color: var(--accent-text); background: var(--red-soft); border-color: #6b4248; }
html[data-theme="dark"] .batch-state-button.restore { color: var(--accent-text); background: var(--red-soft); border-color: #6b4248; }
html[data-theme="dark"] .batch-state-button.restore:hover { color: white; background: var(--red); border-color: var(--red); }
html[data-theme="dark"] .batch-status-tabs { background: var(--surface); border-color: var(--line); }
html[data-theme="dark"] .batch-status-tabs a:hover { color: var(--accent-text); background: #333438; }
html[data-theme="dark"] .batch-status-tabs a.active { color: white; background: var(--red); }

html[data-theme="dark"] .summary-grid strong { color: var(--ink); }
html[data-theme="dark"] .summary-grid article { box-shadow: 0 8px 24px rgba(0, 0, 0, .18); }
html[data-theme="dark"] .review-panel {
  color: var(--ink);
  background: linear-gradient(105deg, #302719, #25221b);
  border-color: #66512c;
}
html[data-theme="dark"] .review-copy p,
html[data-theme="dark"] .confirm-all-form label { color: #f1c978; }
html[data-theme="dark"] .review-copy .critical-note { color: #ffadb5; background: var(--red-soft); }

html[data-theme="dark"] th { color: #f4f4f2; background: #303236; }
html[data-theme="dark"] .bulk-bar { background: rgba(31, 32, 34, .97); border-color: var(--line); box-shadow: 0 12px 32px rgba(0, 0, 0, .34); }
html[data-theme="dark"] .create-panel { background: var(--card); border-top-color: var(--red); box-shadow: 0 14px 36px rgba(0, 0, 0, .28); }
html[data-theme="dark"] .create-panel .create-form { background: var(--red-soft); border-color: #78333c; }
html[data-theme="dark"] .create-panel-icon { color: white; background: var(--red); }
html[data-theme="dark"] .create-panel .button.primary { color: white; background: var(--red); border-color: var(--red); }
html[data-theme="dark"] .create-panel .button.primary:hover { background: #b70014; border-color: #b70014; }
html[data-theme="dark"] .section-block.danger-block { border-left-color: var(--red); }

html[data-theme="dark"] .status.success { color: #9be0b8; background: #153324; }
html[data-theme="dark"] .status.warning { color: #f7c96b; background: var(--amber-soft); }
html[data-theme="dark"] .status.danger { color: #ff9ba5; background: var(--red-soft); }
html[data-theme="dark"] .status.neutral { color: #c6c6c3; background: var(--surface); }
html[data-theme="dark"] .status.info { color: #b7c9e8; background: var(--blue-soft); }
html[data-theme="dark"] .code-chip { color: #ff9ba5; background: var(--red-soft); }

html[data-theme="dark"] .file-grid article.file-warning { color: var(--ink); background: var(--amber-soft); border-color: #6a522a; }
html[data-theme="dark"] .file-warning-text { color: #f4c979; }
html[data-theme="dark"] .archive-month { border-color: var(--line); border-left-color: var(--red); box-shadow: 0 4px 14px rgba(0, 0, 0, .2); }
html[data-theme="dark"] .archive-month[open] { box-shadow: 0 8px 22px rgba(0, 0, 0, .28); }
html[data-theme="dark"] .archive-month-body { border-color: var(--line); }
html[data-theme="dark"] .archive-summary:hover,
html[data-theme="dark"] .archive-month[open] .archive-summary { background: var(--surface-hover); }
html[data-theme="dark"] .archive-summary:focus-visible { outline-color: rgba(255, 102, 117, .62); }
html[data-theme="dark"] .archive-toggle { color: var(--accent-text); background: var(--red-soft); border-color: #6d3038; }
html[data-theme="dark"] .archive-month[open] .archive-toggle { color: white; background: var(--red); border-color: var(--red); }

html[data-theme="dark"] .flash { color: var(--ink); background: var(--card); border-color: var(--line); border-left-width: 5px; }
html[data-theme="dark"] .flash.success { border-left-color: #5aa87a; }
html[data-theme="dark"] .flash.error { border-left-color: var(--accent-text); }
html[data-theme="dark"] .flash.success .flash-icon { color: #9be0b8; background: #153324; }
html[data-theme="dark"] .flash.error .flash-icon { color: #ff9ba5; background: var(--red-soft); }
html[data-theme="dark"] .flash-close:hover,
html[data-theme="dark"] .confirm-dialog-close:hover { color: var(--ink); background: var(--surface); }
html[data-theme="dark"] .confirm-dialog { color: var(--ink); background: var(--card); border-top-color: var(--red); }
html[data-theme="dark"] .confirm-dialog-icon { color: var(--accent-text); background: var(--red-soft); }
html[data-theme="dark"] .field-error,
html[data-theme="dark"] .field-invalid > span:first-child { color: #ff9ba5; }
html[data-theme="dark"] input[aria-invalid="true"],
html[data-theme="dark"] select[aria-invalid="true"] { border-color: #ff6675; box-shadow: 0 0 0 3px rgba(255, 102, 117, .16); }
html[data-theme="dark"] .security-banner { color: #ffbac1; background: #35171c; border-bottom-color: #6e2c35; }

html[data-theme="dark"] .login-shell { border-color: var(--line); border-top-color: var(--red); box-shadow: 0 26px 70px rgba(0, 0, 0, .42); }
html[data-theme="dark"] .login-card { box-shadow: none; }
html[data-theme="dark"] .login-lock { color: var(--accent-text); background: var(--red-soft); }
html[data-theme="dark"] .login-error { color: #ffabb4; background: var(--red-soft); border-color: #78333c; }

html[data-theme="dark"] .topbar-actions { border-top-color: var(--line); }
html[data-theme="dark"] .topbar nav { scrollbar-color: var(--red) var(--surface); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
