/* Split from styles.css. Keep rule order inside each file stable. */
button,
input,
select,
textarea {
  font: inherit;
}

.topbar {
  height: var(--topbar-height, 64px);
  min-height: var(--topbar-height, 64px);
  padding: calc(10px + var(--topbar-safe-top, 0px)) clamp(14px, 2.6vw, 28px) 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  position: relative;
  z-index: 3000;
  background: #102832;
  color: #fff;
}

.brand,
.account,
.field-row,
.form-actions,
.coords,
.inline-heading,
.report-card-header {
  display: flex;
  align-items: center;
}

.brand {
  gap: 10px;
  min-width: 0;
  flex: 1 1 auto;
  overflow: hidden;
}

.brand > div {
  min-width: 0;
}

.brand[href] {
  color: #fff;
  text-decoration: none;
}

.brand h1 {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  white-space: nowrap;
}

.brand-mark {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border: 2px solid rgba(255, 255, 255, 0.55);
  border-radius: 8px;
  font-weight: 800;
  letter-spacing: 0;
  background: #c94f2f;
}

.eyebrow {
  margin: 0 0 3px;
  color: #82919e;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.topbar .eyebrow {
  color: #b8c7d1;
}

.pwa-refresh-button {
  width: var(--control-height-default);
  height: var(--control-height-default);
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  padding: 0;
  border: 0;
  border-radius: var(--control-radius);
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  cursor: pointer;
}

.pwa-refresh-button:hover {
  background: rgba(255, 255, 255, 0.2);
}

.pwa-refresh-button:focus-visible {
  outline: 3px solid var(--control-focus);
  outline-offset: 2px;
}

.pwa-refresh-button svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.pwa-refresh-button.is-refreshing svg {
  animation: pwa-refresh-spin 0.7s linear infinite;
}

.menu-account-status {
  padding: 10px;
  border-bottom: 1px solid var(--line);
  color: #526371;
  font-size: 0.86rem;
  font-weight: 800;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.account-display-settings h3,
.account-display-settings .helper {
  margin: 0;
}

.account-display-settings .helper {
  margin-top: 3px;
}

.header-menu {
  position: relative;
}

.header-menu summary {
  min-height: 36px;
  width: 40px;
  display: grid;
  place-items: center;
  padding: 0;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  cursor: pointer;
  font-weight: 900;
  list-style: none;
}

.header-menu summary::-webkit-details-marker {
  display: none;
}

.hamburger-icon,
.hamburger-icon::before,
.hamburger-icon::after {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
}

.hamburger-icon {
  position: relative;
}

.hamburger-icon::before,
.hamburger-icon::after {
  content: "";
  position: absolute;
  left: 0;
}

.hamburger-icon::before {
  top: -6px;
}

.hamburger-icon::after {
  top: 6px;
}

.header-menu-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 3100;
  width: 250px;
  max-width: calc(100vw - 24px);
  display: grid;
  gap: 8px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
  overflow: hidden;
  contain: paint;
}

.header-menu-section {
  min-width: 0;
  display: grid;
  gap: 4px;
  padding: 0 0 8px;
  border-bottom: 1px solid var(--line);
}

.header-menu-section:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.header-menu-section--account {
  gap: 6px;
}

.header-menu-panel a,
.header-menu-action {
  min-width: 0;
  min-height: 38px;
  display: grid;
  align-items: center;
  padding: 0 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #24323c;
  cursor: pointer;
  font: inherit;
  font-weight: 850;
  text-align: left;
  text-decoration: none;
  overflow: hidden;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.header-menu-panel a:hover,
.header-menu-action:hover,
.header-menu-action.active {
  background: #e8f1ef;
  color: var(--primary-dark);
}

.header-menu-panel .header-account-action {
  width: 100%;
  justify-items: start;
  text-align: left;
}

.header-menu-panel .header-menu-action.nav-button {
  width: 100%;
  min-height: 38px;
  display: grid;
  place-items: center start;
  padding: 0 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #24323c;
  font: inherit;
  font-weight: 850;
  text-align: left;
}

.header-menu-panel .header-menu-action.nav-button:hover,
.header-menu-panel .header-menu-action.nav-button.active {
  background: #e8f1ef;
  color: var(--primary-dark);
}

.map-search-button {
  position: relative;
  border: 0;
  border-left: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  cursor: pointer;
}

.map-search-button::before {
  content: "";
  width: 13px;
  height: 13px;
  position: absolute;
  left: 12px;
  top: 11px;
  border: 2px solid currentColor;
  border-radius: 50%;
}

.map-search-button::after {
  content: "";
  width: 8px;
  height: 2px;
  position: absolute;
  left: 25px;
  top: 27px;
  transform: rotate(45deg);
  background: currentColor;
}

.train-cluster-popup-shell .leaflet-popup-close-button {
  width: 34px;
  height: 34px;
  color: var(--muted);
  font-size: 1.35rem;
}

.button.map-locate-button {
  position: absolute;
  left: 12px;
  top: 92px;
  z-index: 850;
  width: 34px;
  height: 34px;
  min-height: 0;
  display: grid;
  place-items: center;
  padding: 0;
  border-color: rgba(0, 0, 0, 0.18);
  border-radius: 8px;
  line-height: 1;
  box-shadow: 0 8px 24px rgba(20, 35, 48, 0.18);
}

.map-locate-button:hover .locate-icon,
.map-locate-button:focus-visible .locate-icon {
  border-color: var(--primary);
}

.map-locate-button:hover .locate-icon::before,
.map-locate-button:hover .locate-icon::after,
.map-locate-button:focus-visible .locate-icon::before,
.map-locate-button:focus-visible .locate-icon::after {
  background: var(--primary);
}

.button.map-style-button {
  width: 34px;
  height: 34px;
  min-height: 0;
  display: grid;
  place-items: center;
  padding: 0;
  border-color: rgba(0, 0, 0, 0.18);
  border-radius: 8px;
  line-height: 1;
  box-shadow: 0 8px 24px rgba(20, 35, 48, 0.18);
  transition: border-color 140ms ease, background-color 140ms ease, color 140ms ease;
}

.map-style-button:hover,
.map-style-button:focus-visible,
.map-style-button[aria-expanded="true"] {
  border-color: var(--primary);
  background: var(--primary-soft);
  color: var(--primary-dark);
}

.panel-section {
  margin: 10px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.panel-section + .panel-section {
  margin-top: 10px;
}

.section-heading {
  margin-bottom: 14px;
}

.inline-heading {
  justify-content: space-between;
  gap: 12px;
}

.helper {
  margin: -6px 0 14px;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

.account-data-tools > .button {
  width: fit-content;
}

.form-grid label,
.form-grid > *,
.panel-section,
.side-panel {
  min-width: 0;
}

label {
  display: grid;
  gap: 6px;
  color: #35424d;
  font-size: 0.86rem;
  font-weight: 750;
}

.form-field {
  display: grid;
  gap: 6px;
}

.form-field > label:first-child {
  display: block;
}

.inline-checkbox {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  font-size: 0.82rem;
}

.inline-checkbox input {
  width: 17px;
  min-height: 17px;
  margin: 0;
}

input,
select,
textarea {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: var(--field-height);
  font-size: 16px;
  border: 1px solid var(--field-border);
  border-radius: var(--field-radius);
  padding: var(--field-padding-block) var(--field-padding-inline);
  color: var(--field-text);
  background: var(--field-bg);
  transition: border-color 120ms ease, box-shadow 120ms ease, background-color 120ms ease;
}

textarea {
  resize: vertical;
}

input[type="datetime-local"] {
  min-width: 0;
  max-width: 100%;
  -webkit-appearance: none;
  appearance: none;
}

input:not([type="checkbox"]):not([type="radio"]):focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 0;
  border-color: var(--field-focus) !important;
  box-shadow: 0 0 0 3px var(--field-focus-ring);
}

input::placeholder,
textarea::placeholder {
  color: var(--field-placeholder);
  opacity: 1;
}

input:not([type="checkbox"]):not([type="radio"])[aria-invalid="true"],
select[aria-invalid="true"],
textarea[aria-invalid="true"] {
  border-color: var(--field-invalid) !important;
  box-shadow: 0 0 0 3px var(--field-invalid-ring);
}

.field-hint {
  min-height: 18px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 650;
  line-height: 1.35;
}

.field-row {
  gap: 8px;
  align-items: end;
}

.field-row label {
  flex: 1 1 auto;
}

.checkbox-line {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
}

.checkbox-line input {
  width: auto;
}

.consist-builder .field-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 42px;
}

.chip button {
  width: 20px;
  height: 20px;
  border: 0;
  border-radius: 50%;
  color: inherit;
  background: rgba(13, 107, 99, 0.13);
  cursor: pointer;
}

.button,
.icon-button {
  border: 1px solid transparent;
  border-radius: var(--control-radius);
  cursor: pointer;
  font-weight: var(--control-font-weight);
  transition: background-color 140ms ease, border-color 140ms ease, color 140ms ease;
}

.button {
  min-height: var(--control-height-default);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px var(--control-padding-inline);
  font-size: var(--control-font-size);
  line-height: 1.2;
  text-align: center;
  white-space: normal;
}

.button-primary {
  background: var(--primary);
  color: #fff;
}

.button-primary:hover {
  background: var(--primary-dark);
}

.button-secondary {
  border-color: var(--control-border);
  background: var(--control-bg);
  color: var(--control-selected-text);
}

.button.active,
.button[aria-pressed="true"] {
  background: var(--control-selected-bg);
  color: var(--control-selected-text);
}

.button-ghost {
  border: 1px solid var(--control-border);
  background: var(--control-bg);
  color: var(--control-text);
}

.button-secondary:not(:disabled):hover,
.button-ghost:not(:disabled):hover {
  background-color: var(--control-bg-hover);
  color: var(--control-selected-text);
}

.button-danger {
  background: var(--danger);
  color: #fff;
}

.icon-button {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  background: #102832;
  color: #fff;
  font-size: 1.35rem;
  line-height: 1;
}

.form-actions .button {
  width: 100%;
  min-width: 0;
  padding-inline: 10px;
  line-height: 1.15;
}

.form-actions button[type="submit"] {
  grid-column: 1 / -1;
}

.older-reports-button {
  justify-self: center;
  width: auto;
  max-width: 100%;
}

.admin-page-button {
  width: 40px;
  height: 40px;
  padding: 0;
  font-size: 1.35rem;
  line-height: 1;
}

.consent-dialog-actions .button {
  width: auto;
}

.app-toast button {
  width: 28px;
  height: 28px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
}

.app-dialog-actions .button {
  width: auto;
}

.search-grid .button {
  grid-column: 1 / -1;
}

.tab-button {
  min-height: 34px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-weight: 850;
}

.tab-button.active {
  background: #fff;
  color: var(--primary-dark);
  box-shadow: 0 4px 14px rgba(20, 35, 48, 0.1);
}

.asset-row-actions .button {
  width: auto;
  min-height: 32px;
  padding: 0 10px;
  font-size: 0.8rem;
}

.report-card-actions .button {
  flex: 1 1 150px;
}

.report-rating-button {
  min-height: 36px;
  padding: 7px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: var(--panel);
  color: var(--ink);
  font: inherit;
  font-size: 0.76rem;
  font-weight: 850;
  cursor: pointer;
}

.report-rating-button:hover,
.report-rating-button.selected-rating {
  border-color: var(--primary);
  background: var(--primary-soft);
  color: var(--primary-dark);
}

.report-rating-button:disabled {
  cursor: wait;
  opacity: 0.6;
}

.report-history-actions .button {
  flex: 1 1 140px;
}

.report-edit-location-tools .button {
  width: auto;
}

.side-panel .reports-panel .section-heading {
  margin-bottom: 12px;
}

.side-panel .reports-panel .tab-button.active {
  border-bottom: 2px solid var(--primary);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.standalone-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: var(--surface);
}

.standalone-card {
  width: min(100%, 520px);
  margin: 0;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.standalone-link {
  display: inline-grid;
  place-items: center;
  margin-top: 12px;
  text-decoration: none;
}

.content-page,
.account-page {
  min-height: 100vh;
  background: #f6f8fa;
}

.content-brand {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 1.05rem;
}

.content-home-button {
  min-height: var(--control-height-default);
  width: var(--control-height-default);
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: var(--control-radius);
  background: rgba(255, 255, 255, 0.1);
  color: #dff5f1;
  cursor: pointer;
  font: inherit;
  text-decoration: none;
  transition: background-color 140ms ease, border-color 140ms ease, color 140ms ease;
}

.content-home-button svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.content-home-button:hover {
  background: rgba(255, 255, 255, 0.18);
}

.content-menu .header-menu-panel {
  width: 230px;
}

.checkbox-row {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  color: #344450;
  font-size: 0.92rem;
  font-weight: 700;
}

.checkbox-row input {
  width: 18px;
  min-height: 18px;
  margin-top: 2px;
}

.signup-security-field {
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.account-result {
  margin-top: 14px;
}

.account-result p {
  margin: 0;
  padding: 12px;
  border-radius: 8px;
  background: #eef5f4;
  color: var(--primary-dark);
  font-weight: 800;
}

.account-result--error p {
  background: #fff0eb;
  color: #8c351f;
}

.account-result--success p {
  background: #e8f5ef;
  color: #176043;
}

@media (prefers-color-scheme: dark) {
body,
  .content-page,
  .account-page,
  .standalone-page {
    background: var(--surface);
    color: var(--ink);
  }

.topbar {
    background: #07161c;
  }

.side-panel,
  .panel-section,
  .header-menu-panel,
  .report-search,
  .report-card,
  .report-card-body,
  .content-section,
  .standalone-card,
  .leaflet-popup-content-wrapper,
  .leaflet-popup-tip {
    border-color: var(--line);
    background: var(--panel);
    color: var(--ink);
  }

input,
  select,
  textarea,
  .button-secondary,
  .button-ghost,
  .tab-button.active,
  .sheet-handle,
  .app-nav {
    border-color: var(--line);
    background: #0c1a22;
    color: var(--ink);
  }

input::placeholder,
  textarea::placeholder {
    color: #7f8f9a;
  }

label,
  .report-data-table td,
  .report-title,
  .report-notes,
  .popup-title {
    color: var(--ink);
  }

.helper,
  .field-hint,
  .report-meta,
  .popup-meta,
  .report-data-table th {
    color: var(--muted);
  }

.content-section p,
  .content-section li,
  .checkbox-row,
  .checkbox-row span {
    color: var(--ink);
  }

.button-primary {
    background: #1b716b;
    color: #fff;
  }

.button-primary:hover {
    background: #246f6c;
  }

.header-menu-panel a,
  .header-menu-action,
  .menu-account-status {
    color: var(--ink);
  }

.header-menu-panel a:hover,
  .header-menu-action:hover,
  .header-menu-action.active,
  .side-tab.active {
    border-color: #1b4d58;
    background: #11313a;
    color: var(--primary-dark);
  }

.report-summary,
  .selected-report .report-summary,
  .nav-button.active,
  .tab-button.active {
    background: #11313a;
    color: var(--primary-dark);
  }
}

@media (max-width: 1100px) {
.nav-button {
    display: grid;
    place-items: center;
    min-width: 0;
    min-height: 46px;
    padding: 0 4px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    font-size: 0.74rem;
    font-weight: 900;
    line-height: 1.1;
    text-align: center;
  }

.nav-button.active {
    background: #e8f1ef;
    color: var(--primary-dark);
  }
}

@media (max-width: 620px) {
.report-rating-button {
    width: 100%;
  }

.topbar {
    min-height: var(--topbar-height, 68px);
    align-items: center;
    flex-direction: row;
    gap: 8px;
    padding: calc(10px + var(--topbar-safe-top, 0px)) 12px 10px;
  }

.brand {
    gap: 8px;
  }

.brand-mark {
    width: 38px;
    height: 38px;
  }

.brand h1 {
    gap: 6px;
    font-size: clamp(1.12rem, 5.4vw, 1.45rem);
  }

.header-menu-panel {
    width: min(260px, calc(100vw - 24px));
  }

.form-actions .button,
  .search-grid .button,
  .admin-actions .button,
  .report-card-actions .button {
    max-width: 100%;
    width: 100%;
  }

.map-locate-button {
    width: 34px;
    height: 34px;
    max-width: none;
  }

.consent-dialog-actions .button {
    width: 100%;
  }
}

@media (max-width: 1100px) and (prefers-color-scheme: dark) {
.nav-button {
    color: var(--muted) !important;
    background: transparent !important;
  }

.nav-button.active {
    background: #11313a !important;
    color: var(--primary-dark) !important;
  }
}

:root[data-theme="dark"] body,
:root[data-theme="dark"] .content-page,
:root[data-theme="dark"] .account-page,
:root[data-theme="dark"] .standalone-page {
  background: var(--surface);
  color: var(--ink);
}

:root[data-theme="dark"] .topbar {
  background: #07161c;
}

:root[data-theme="dark"] .side-panel,
:root[data-theme="dark"] .panel-section,
:root[data-theme="dark"] .header-menu-panel,
:root[data-theme="dark"] .report-search,
:root[data-theme="dark"] .report-card,
:root[data-theme="dark"] .report-card-body,
:root[data-theme="dark"] .content-section,
:root[data-theme="dark"] .standalone-card,
:root[data-theme="dark"] .leaflet-popup-content-wrapper,
:root[data-theme="dark"] .leaflet-popup-tip,
:root[data-theme="dark"] .admin-card,
:root[data-theme="dark"] .user-card,
:root[data-theme="dark"] .info-page,
:root[data-theme="dark"] .moderation-tools {
  border-color: var(--line);
  background: var(--panel);
  color: var(--ink);
}

:root[data-theme="dark"] .report-rating-button {
  border-color: var(--line);
  background: #0c1a22;
  color: var(--ink);
}

:root[data-theme="dark"] .report-rating-button:hover,
:root[data-theme="dark"] .report-rating-button.selected-rating {
  border-color: var(--primary);
  background: #123b3a;
  color: #a7eee7;
}

:root[data-theme="dark"] .map-search-control form,
:root[data-theme="dark"] .map-search-results,
:root[data-theme="dark"] .map-search-button {
  border-color: var(--line);
  background: #0c1a22;
  color: var(--ink);
}

:root[data-theme="dark"] input,
:root[data-theme="dark"] select,
:root[data-theme="dark"] textarea,
:root[data-theme="dark"] .custom-select-input,
:root[data-theme="dark"] .custom-datalist-input,
:root[data-theme="dark"] .button-secondary,
:root[data-theme="dark"] .button-ghost,
:root[data-theme="dark"] .tab-button.active,
:root[data-theme="dark"] .sheet-handle,
:root[data-theme="dark"] .app-nav,
:root[data-theme="dark"] .search-grid {
  border-color: var(--line);
  background: #0c1a22;
  color: var(--ink);
}

:root[data-theme="dark"] label,
:root[data-theme="dark"] .report-data-table td,
:root[data-theme="dark"] .report-title,
:root[data-theme="dark"] .report-notes,
:root[data-theme="dark"] .popup-title,
:root[data-theme="dark"] .flag-reason,
:root[data-theme="dark"] .content-section p,
:root[data-theme="dark"] .content-section li,
:root[data-theme="dark"] .checkbox-row,
:root[data-theme="dark"] .checkbox-row span {
  color: var(--ink);
}

:root[data-theme="dark"] .helper,
:root[data-theme="dark"] .field-hint,
:root[data-theme="dark"] .report-meta,
:root[data-theme="dark"] .popup-meta,
:root[data-theme="dark"] .report-data-table th,
:root[data-theme="dark"] .admin-card p,
:root[data-theme="dark"] .user-card p,
:root[data-theme="dark"] .info-page p,
:root[data-theme="dark"] .moderation-tools p,
:root[data-theme="dark"] .admin-meta {
  color: var(--muted);
}

:root[data-theme="dark"] .button-primary {
  background: #1b716b;
  color: #fff;
}

:root[data-theme="dark"] .button-primary:hover {
  background: #246f6c;
}

:root[data-theme="dark"] .header-menu-panel a,
:root[data-theme="dark"] .header-menu-action,
:root[data-theme="dark"] .menu-account-status {
  color: var(--ink);
}

:root[data-theme="dark"] .header-menu-panel .header-menu-action.nav-button {
  background: transparent;
  color: var(--ink);
}

:root[data-theme="dark"] .header-menu-panel a:hover,
:root[data-theme="dark"] .header-menu-action:hover,
:root[data-theme="dark"] .header-menu-action.active,
:root[data-theme="dark"] .side-tab.active {
  border-color: #1b4d58;
  background: #11313a;
  color: var(--primary-dark);
}

:root[data-theme="dark"] .header-menu-panel .header-menu-action.nav-button:hover,
:root[data-theme="dark"] .header-menu-panel .header-menu-action.nav-button.active {
  border-color: #1b4d58;
  background: #11313a;
  color: var(--primary-dark);
}

:root[data-theme="dark"] .side-tab,
:root[data-theme="dark"] .tab-button,
:root[data-theme="dark"] .nav-button {
  color: var(--muted);
}

:root[data-theme="dark"] .report-summary,
:root[data-theme="dark"] .selected-report .report-summary,
:root[data-theme="dark"] .nav-button.active,
:root[data-theme="dark"] .tab-button.active {
  background: #11313a;
  color: var(--primary-dark);
}

:root[data-theme="dark"] .account-result p {
  background: #0c1a22;
  color: var(--primary-dark);
}

:root[data-theme="dark"] .account-result--error p,
:root[data-theme="dark"] .locked::before {
  background: #3a1d17;
  color: #ffd2c4;
}

:root[data-theme="dark"] .account-result--success p {
  background: #123020;
  color: #8ff0bd;
}

@media (max-width: 1100px) {
:root[data-theme="dark"] .nav-button {
    color: var(--muted) !important;
    background: transparent !important;
  }

:root[data-theme="dark"] .nav-button.active {
    background: #11313a !important;
    color: var(--primary-dark) !important;
  }
}

:root[data-theme="light"] body,
:root[data-theme="light"] .content-page,
:root[data-theme="light"] .account-page {
  background: #f6f8fa;
  color: var(--ink);
}

:root[data-theme="light"] .topbar,
:root[data-theme="light"] .content-header {
  background: #102832;
  color: #fff;
}

:root[data-theme="light"] .header-menu-panel,
:root[data-theme="light"] .report-search,
:root[data-theme="light"] .report-card,
:root[data-theme="light"] .report-card-body,
:root[data-theme="light"] .content-section,
:root[data-theme="light"] .standalone-card,
:root[data-theme="light"] .panel-section,
:root[data-theme="light"] .admin-card,
:root[data-theme="light"] .user-card,
:root[data-theme="light"] .info-page,
:root[data-theme="light"] .moderation-tools {
  background: #fff;
  color: var(--ink);
}

:root[data-theme="light"] input,
:root[data-theme="light"] select,
:root[data-theme="light"] textarea,
:root[data-theme="light"] .custom-select-input,
:root[data-theme="light"] .custom-datalist-input,
:root[data-theme="light"] .button-secondary,
:root[data-theme="light"] .button-ghost,
:root[data-theme="light"] .tab-button.active,
:root[data-theme="light"] .sheet-handle,
:root[data-theme="light"] .search-grid {
  border-color: #cbd5de;
  background: #fff;
  color: var(--ink);
}

:root[data-theme="light"] label,
:root[data-theme="light"] .eyebrow,
:root[data-theme="light"] .report-data-table td,
:root[data-theme="light"] .report-title,
:root[data-theme="light"] .report-notes,
:root[data-theme="light"] .popup-title,
:root[data-theme="light"] .flag-reason,
:root[data-theme="light"] .content-section p,
:root[data-theme="light"] .content-section li,
:root[data-theme="light"] .checkbox-row,
:root[data-theme="light"] .checkbox-row span {
  color: #344450;
}

:root[data-theme="light"] .helper,
:root[data-theme="light"] .field-hint,
:root[data-theme="light"] .report-meta,
:root[data-theme="light"] .popup-meta,
:root[data-theme="light"] .report-data-table th,
:root[data-theme="light"] .admin-card p,
:root[data-theme="light"] .user-card p,
:root[data-theme="light"] .info-page p,
:root[data-theme="light"] .moderation-tools p,
:root[data-theme="light"] .admin-meta {
  color: var(--muted);
}

:root[data-theme="light"] .button-primary {
  background: var(--primary);
  color: #fff;
}

:root[data-theme="light"] .button-primary:hover {
  background: var(--primary-dark);
}

:root[data-theme="light"] .header-menu-panel a,
:root[data-theme="light"] .header-menu-action,
:root[data-theme="light"] .menu-account-status {
  color: #24323c;
}

:root[data-theme="light"] .header-menu-panel a:hover,
:root[data-theme="light"] .header-menu-action:hover,
:root[data-theme="light"] .header-menu-action.active,
:root[data-theme="light"] .side-tab.active {
  border-color: #cfe1de;
  background: #e8f1ef;
  color: var(--primary-dark);
}

:root[data-theme="light"] .side-tab,
:root[data-theme="light"] .tab-button,
:root[data-theme="light"] .nav-button {
  color: var(--muted);
}

:root[data-theme="light"] .selected-report .report-summary,
:root[data-theme="light"] .nav-button.active,
:root[data-theme="light"] .tab-button.active {
  background: #e8f1ef;
  color: var(--primary-dark);
}

:root[data-theme="light"] .account-result p {
  background: #eef5f4;
  color: var(--primary-dark);
}

:root[data-theme="light"] .account-result--error p {
  background: #fff0eb;
  color: #8c351f;
}

:root[data-theme="light"] .account-result--success p {
  background: #e8f5ef;
  color: #176043;
}

@media (max-width: 1100px) {
:root[data-theme="light"] .nav-button {
    color: var(--muted) !important;
    background: transparent !important;
  }

:root[data-theme="light"] .nav-button.active {
    background: #e8f1ef !important;
    color: var(--primary-dark) !important;
  }
}

:where(a, button, summary):focus-visible {
  outline: 3px solid var(--control-focus);
  outline-offset: 3px;
}

button:disabled,
input:disabled,
select:disabled,
textarea:disabled {
  cursor: not-allowed;
  opacity: var(--control-disabled-opacity);
}

.content-section a,
.standalone-card a,
.panel-section .helper a {
  color: var(--primary-dark);
  font-weight: 750;
  text-underline-offset: 0.16em;
}

.content-section a:hover,
.standalone-card a:hover,
.panel-section .helper a:hover {
  text-decoration-thickness: 2px;
}

.account-page .standalone-page {
  min-height: calc(100dvh - 78px);
}

@media (max-width: 620px) {
.content-brand {
    min-width: 0;
    font-size: 1rem;
  }

.content-home-button {
    min-height: var(--control-height-default);
  }

.standalone-page {
    align-items: start;
    padding: 16px 12px 28px;
  }

.account-page .standalone-page {
    min-height: calc(100dvh - var(--topbar-height, 64px));
  }

.standalone-card {
    padding: 18px;
  }
}

@media (max-width: 1100px) {
.side-panel .panel-section {
    margin: 0;
    padding-bottom: 18px;
    border-radius: 0;
  }
}

.adjust-location-button {
  display: none;
}

.report-step-actions .button {
  width: 100%;
  min-width: 0;
}

.recent-report-controls select,
.recent-report-controls .button {
  min-width: 0;
}

.account-access-card .helper {
  margin: 0 0 9px;
}

@media (max-width: 1100px) {
.adjust-location-button {
    display: inline-flex;
  }
}

body .side-panel > .panel-section {
  margin: 0;
  padding: 18px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

body .side-panel .reports-panel .section-heading {
  margin: 0 2px 12px;
}

body .side-panel .reports-panel .reports-tools .tab-button.active {
  border: 0;
  border-radius: 5px;
  background: var(--primary-soft);
  box-shadow: none;
}

body .side-panel .reports-panel .report-list-section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 2px 2px 0;
}

body .side-panel .reports-panel summary.report-list-section-heading {
  cursor: pointer;
  list-style: none;
}

body .side-panel .reports-panel summary.report-list-section-heading::-webkit-details-marker {
  display: none;
}

body .side-panel .reports-panel .report-list-section--collapsible .report-list-section-heading {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--panel);
}

body .side-panel .reports-panel .report-list-section--collapsible[open] .report-list-section-heading {
  margin-bottom: 8px;
}

body .side-panel .reports-panel .report-list-section--collapsible .report-list-section-heading span::after {
  content: " +";
}

body .side-panel .reports-panel .report-list-section--collapsible[open] .report-list-section-heading span::after {
  content: " -";
}

body .side-panel .reports-panel .report-list-section-heading h3 {
  margin: 0;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

body .side-panel .reports-panel .report-list-section-heading span {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

body.app-page .topbar {
  flex: 0 0 auto;
}

@media (max-width: 1100px) {
body.app-page .app-nav:has(.nav-button[hidden]) {
    grid-template-columns: 1fr;
  }
}
