/* Shared visual language of the group homepage. Map geometry/layout stays intact. */
body.site-theme {
  --bg: #f4f6f7;
  --bg-soft: #eaf2f5;
  --surface: #ffffff;
  --surface-strong: #ffffff;
  --surface-muted: #f7f9fa;
  --paper: #ffffff;
  --paper-strong: #ffffff;
  --page: #f4f6f7;
  --line: #dce3e6;
  --line-strong: #b8cbd3;
  --ink: #172c35;
  --text: #172c35;
  --text-soft: #61717b;
  --text-dim: #61717b;
  --muted: #61717b;
  --navy: #16394c;
  --blue: #216383;
  --primary: #216383;
  --primary-dark: #16394c;
  --good: #267554;
}

body.site-theme {
  background: #f4f6f7;
  color: #172c35;
  font-family: Arial, Helvetica, sans-serif;
}
body.site-theme::before { content: none; }

body.site-theme .card,
body.site-theme .panel,
body.site-theme .box,
body.site-theme .info-box,
body.site-theme .stat {
  background: #fff;
  border-color: #dce3e6;
  border-radius: 4px;
  box-shadow: none;
}

body.site-theme .card-header,
body.site-theme .panel-head,
body.site-theme .admin-nav {
  background: #f7f9fa;
  border-color: #dce3e6;
  border-radius: 4px;
  box-shadow: none;
  backdrop-filter: none;
}
body.site-theme .message { border-radius: 4px; }

body.site-theme input,
body.site-theme select,
body.site-theme textarea,
body.site-theme .button,
body.site-theme .btn,
body.site-theme button {
  border-radius: 4px;
}

body.site-theme .button,
body.site-theme .btn {
  font-weight: 700;
}

body.site-theme table th {
  background: #f7f9fa;
  color: #52646f;
}

body.site-theme .topbar,
body.site-theme .weather-nav {
  background: #16394c;
  color: #fff;
}
body.site-theme .weather-title {
  background: #16394c;
  color: #fff;
  border-color: #16394c;
}
body.site-theme .weather-title small { color: #c6d9e2; }
body.site-theme .weather-nav__link {
  border-color: #b8cbd3;
  border-radius: 4px;
  color: #16394c;
}

body.site-theme .topbar a,
body.site-theme .weather-nav a {
  color: #e3edf1;
}

body.site-theme a:focus-visible,
body.site-theme button:focus-visible,
body.site-theme summary:focus-visible,
body.site-theme input:focus-visible,
body.site-theme select:focus-visible {
  outline: 2px solid #216383;
  outline-offset: 2px;
}

body.map-theme .site-branding {
  background: rgba(22, 57, 76, .94);
  border-color: rgba(220, 227, 230, .35);
  border-radius: 4px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .2);
}

body.auth-theme .card {
  background: #fff;
  color: #172c35;
  border: 1px solid #dce3e6;
  box-shadow: 0 12px 34px rgba(22, 57, 76, .08);
}

body.auth-theme label,
body.auth-theme .muted,
body.auth-theme p { color: #61717b; }
body.auth-theme h1 { color: #172c35; }
body.auth-theme a { color: #216383; }
body.auth-theme input {
  background: #fff;
  color: #172c35;
  border: 1px solid #b8cbd3;
}
body.auth-theme button:not(.password-toggle),
body.auth-theme .button {
  background: #16394c;
  color: #fff;
  border: 1px solid #16394c;
}
body.auth-theme button:not(.password-toggle):hover,
body.auth-theme .button:hover { background: #26566c; }
body.auth-theme .password-toggle {
  background: transparent;
  color: #61717b;
}

body.sleep-theme .box {
  background: #fff;
  color: #172c35;
  border: 1px solid #dce3e6;
}
body.sleep-theme p,
body.sleep-theme .small { color: #61717b; }
body.sleep-theme .top a,
body.sleep-theme .top button {
  background: #16394c;
  color: #fff;
  border: 1px solid #16394c;
}

/* ACMH component system. Layout/visibility rules in the feature templates stay
   in charge; these rules replace their previous ornamental presentation. */
body.site-theme {
  --shadow: none;
  --shadow-soft: none;
  --radius: 4px;
  font: 14px/1.5 Arial, Helvetica, sans-serif;
}
body.site-theme *, body.site-theme *::before, body.site-theme *::after { box-sizing: border-box; }
body.site-theme [hidden] { display: none !important; }
body.site-theme a { color: var(--blue); }
body.site-theme h1 { font-size: 30px; line-height: 1.2; letter-spacing: normal; }
body.site-theme h2 { font-size: 19px; letter-spacing: normal; }
body.site-theme h3 { font-size: 16px; letter-spacing: normal; }
body.site-theme input, body.site-theme select, body.site-theme textarea, body.site-theme button { font: inherit; }
body.site-theme input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=hidden]):not([type=file]),
body.site-theme select, body.site-theme textarea {
  color: var(--ink); background: var(--surface); border: 1px solid var(--line-strong);
  border-radius: 4px; min-height: 36px; padding: 8px 10px;
}
body.site-theme :is(input[type=checkbox], input[type=radio], input[type=range]) { accent-color: var(--navy); }
body.site-theme :is(.button, .btn, .ui-button) {
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--navy);
  border-radius: 4px; font-size: 12px; font-weight: 700; text-decoration: none;
  box-shadow: none; min-height: 36px; padding: 7px 12px;
}
body.site-theme :is(.button, .btn, .ui-button):hover { background: var(--soft, #eaf2f5); text-decoration: none; }
body.site-theme :is(.primary, .btn-primary, .btn-live) { background: var(--navy); border-color: var(--navy); color: #fff; }
body.site-theme :is(.primary, .btn-primary, .btn-live):hover { background: #26566c; color: #fff; }
body.site-theme :is(.danger, .button.danger) { color: #9f2f2f; border-color: #e3bdbd; background: #fff0f0; }
body.site-theme :is(.good, .button.good) { color: #267554; border-color: #cce0d1; background: #edf5ef; }
body.site-theme .btn-live { min-height: 44px; padding: 10px 22px; font-size: 14px; }
body.site-theme :is(.card, .panel, .info-box, .stat, .box) { border: 1px solid var(--line); border-radius: 0; box-shadow: none; backdrop-filter: none; }
body.site-theme :is(.card-header, .panel-head) { padding: 17px 19px; background: #f7f9fa; border-radius: 0; }
body.site-theme :is(.card-body, .panel-body) { padding: 18px 19px; }
body.site-theme :is(.tag, .badge) { border-radius: 3px; padding: 3px 7px; font-size: 11px; }
body.site-theme :is(.kicker, .label) { letter-spacing: normal; text-transform: none; color: var(--muted); }
body.site-theme :is(.table-scroll, .table-wrap) { border-radius: 0; background: #fff; }
body.site-theme table { border-collapse: collapse; }
body.site-theme :is(th, td) { border-color: #e7ecee; }
body.site-theme th { background: #f7f9fa; color: #52646f; font-size: 11px; }
body.site-theme td { font-size: 12px; }
body.site-theme .message { border-radius: 0; border-left: 3px solid var(--blue); backdrop-filter: none; }
body.site-theme dialog { border-radius: 4px; border: 1px solid var(--line-strong); color: var(--ink); }

/* Regular pages get the same quiet header, content width and footer. */
body.content-theme { margin: 0; padding: 0; min-height: 100dvh; display: flex; flex-direction: column; align-items: stretch; justify-content: flex-start; }
body.content-theme > :is(.page, .wrap) { width: 100%; max-width: 1280px; padding: 28px 24px 48px; margin: 0 auto; flex: 1; }
.site-header { background: #16394c; color: #fff; flex-shrink: 0; }
.site-header-inner { max-width: 1280px; margin: auto; min-height: 64px; padding: 12px 24px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
body.site-theme .site-identity { color: #fff; font-size: 17px; font-weight: 700; letter-spacing: .02em; text-decoration: none; }
body.site-theme .site-map-link { color: #fff; border: 1px solid #829eac; border-radius: 4px; padding: 7px 12px; font-weight: 700; font-size: 12px; text-decoration: none; white-space: nowrap; }
body.site-theme .site-map-link:hover { background: #26566c; }
.site-footer { max-width: 1280px; width: 100%; margin: auto; padding: 20px 24px; border-top: 1px solid #dce3e6; display: flex; align-items: center; justify-content: space-between; gap: 16px; color: #61717b; font-size: 12px; }
.legal-links { display: flex; flex-wrap: wrap; gap: 8px 18px; }
body.site-theme .legal-links a { color: #216383; text-decoration: none; }
body.site-theme .legal-links a:hover { text-decoration: underline; }
body.site-theme :is(.site-header a, .site-branding a):focus-visible { outline-color: #fff; }
body.content-theme :is(.pending-item, .result-item, .aircraft-item, .selected-box, .metric, .summary-card, .admin-nav, .nav-item) { border-radius: 4px; box-shadow: none; background-image: none; }
body.content-theme .admin-nav { border: 1px solid var(--line); padding: 12px; }
body.content-theme :is(.admin-nav a, .admin-nav button) { border-radius: 4px; }
body.content-theme :is(.admin-nav a.active, .admin-nav a.is-active) { background: var(--navy); color: #fff; }
body.content-theme :is(.pending-item, .result-item, .aircraft-item) { background: #fff; }
body.content-theme :is(.membership, .request-panel, .group-box, .aircraft-upload-panel, .aircraft-dropzone) { background: #fff; background-image: none; border: 1px solid #dce3e6; border-radius: 4px; box-shadow: none; }
body.content-theme :is(.aircraft-photo, .aircraft-photo-placeholder, .location-map, #groupLocationMap) { border-radius: 4px; }

/* One shared login component, used unchanged on the map and login page. */
.auth-page { flex: 1; display: grid; place-items: center; padding: 40px 16px; }
body.site-theme .auth-card { width: min(430px, 100%); background: #fff; border: 1px solid #dce3e6; border-radius: 4px; color: #172c35; box-shadow: none; }
body.site-theme .auth-modal-header { display: flex; justify-content: space-between; align-items: center; gap: 16px; background: #f7f9fa; border-bottom: 1px solid #dce3e6; padding: 18px 22px; }
body.site-theme .auth-modal-title { margin: 0; font-size: 23px; font-weight: 700; color: #172c35; line-height: 1.25; }
body.site-theme .auth-modal-kicker { display: none; }
body.site-theme .auth-modal-body { padding: 22px; }
body.site-theme .auth-field { display: block; margin: 0 0 16px; }
body.site-theme .auth-field label, body.site-theme .auth-field > span { display: block; margin: 0 0 6px; color: #52646f; font-size: 13px; font-weight: 700; }
body.site-theme .auth-field :is(input, select) { width: 100%; min-height: 44px; padding: 10px 12px; }
body.site-theme .password-field { position: relative; display: block; }
body.site-theme .password-field input { padding-right: 48px; }
body.site-theme .password-toggle { position: absolute; top: 50%; right: 8px; transform: translateY(-50%); display: grid; place-items: center; width: 34px; height: 34px; min-height: 0; margin: 0; padding: 0; border: 0; background: transparent; color: #61717b; cursor: pointer; }
body.site-theme .password-toggle:hover { background: #eaf2f5; color: #172c35; }
.password-toggle svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
body.site-theme .auth-actions { display: flex; gap: 10px; margin-top: 18px; }
body.site-theme :is(.auth-primary, .auth-secondary, .auth-link-button) { min-height: 44px; border-radius: 4px; padding: 10px 15px; font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; }
body.site-theme .auth-primary { flex: 1; width: 100%; background: #16394c; border: 1px solid #16394c; color: #fff; }
body.site-theme .auth-primary:hover { background: #26566c; }
body.site-theme .auth-secondary { background: #fff; border: 1px solid #b8cbd3; color: #16394c; }
body.site-theme .auth-link-button { display: block; width: 100%; text-align: center; margin-top: 12px; border: 0; background: transparent; color: #216383; text-decoration: none; }
body.site-theme .auth-link-button:hover { background: #eaf2f5; }
body.site-theme .auth-consent { display: flex; align-items: flex-start; gap: 10px; margin: 6px 0 16px; color: #52646f; font-size: 13px; line-height: 1.5; }
body.site-theme .auth-consent input { display: block; flex: 0 0 auto; width: 18px; height: 18px; min-height: 0; margin: 2px 0 0; }
body.site-theme :is(.auth-error, .error-box, .field-error, .errorlist) { color: #9f2f2f; font-size: 13px; }
body.site-theme :is(.auth-error, .error-box) { background: #fff0f0; border: 1px solid #e3bdbd; border-radius: 4px; padding: 10px 12px; margin-bottom: 14px; }
body.site-theme .auth-error { display: none; }
body.site-theme .auth-error.open { display: block; }
body.site-theme .auth-copy { color: #61717b; margin: 0 0 18px; font-size: 14px; }
.auth-card-legal { padding: 14px 22px; border-top: 1px solid #dce3e6; font-size: 11px; }
.auth-card-legal .legal-links { gap: 8px 14px; }
body.site-theme .auth-modal-overlay { background: #122936a8; backdrop-filter: none; -webkit-backdrop-filter: none; align-items: center; }
body.site-theme .auth-modal { max-height: calc(100dvh - 24px); }
body.site-theme .auth-modal-close { width: 34px; height: 34px; padding: 0; background: transparent; border: 1px solid #b8cbd3; border-radius: 4px; color: #16394c; font-size: 24px; }

/* Map panels become ACMH-style tables/cards. Map canvas, marker icons,
   clipping, transforms, selected aircraft colours and layer credits stay intact. */
body.map-theme .topbar { background: transparent; }
body.map-theme .site-branding h1 { font-size: 14px; line-height: 1.1; }
body.map-theme .utc-clock { background: #16394c; color: #fff; border: 1px solid #b8cbd3; border-radius: 4px; padding: 8px 10px; text-shadow: none; }
body.map-theme :is(.side-panel, .flight-sidebar, .user-dropdown, .loading-box, .altitude-chart-panel, .height-control, .airport-detail-panel) { background: #fff; color: #172c35; border-color: #dce3e6; border-radius: 4px; box-shadow: 0 3px 16px #16394c18; backdrop-filter: none; -webkit-backdrop-filter: none; }
body.map-theme :is(.panel-header, .flight-sidebar-header, .flight-sidebar-actions, .altitude-chart-header) { background: #f7f9fa; border-color: #dce3e6; }
body.map-theme :is(.info-card, .flight-aircraft-group, .flight-button, .track-toggle) { background: #fff; border: 1px solid #dce3e6; border-radius: 4px; box-shadow: none; color: #172c35; }
body.map-theme :is(.panel-title, .flight-sidebar-title, .info-value, .flight-aircraft-name, .flight-button-title, .weekday-title, .club-flight-section-title, .loading-title, .altitude-chart-title, .height-control-title, .height-control-value) { color: #172c35; }
body.map-theme :is(.panel-kicker, .flight-sidebar-kicker, .info-label, .flight-aircraft-meta, .flight-button-meta, .empty-flights, .loading-subtitle, .altitude-chart-meta, .airport-detail-meta) { color: #61717b; text-transform: none; letter-spacing: normal; }
body.map-theme :is(.flight-button.selected, .flight-aircraft-header:hover, .flight-button:hover) { background: #eaf2f5; border-color: #b8cbd3; }
body.map-theme :is(.panel-action, .flight-sidebar-footer a, .user-dropdown button) { background: #fff; border: 1px solid #b8cbd3; border-radius: 4px; color: #16394c; }
body.map-theme :is(.panel-action, .flight-sidebar-footer a, .user-dropdown button):hover { background: #eaf2f5; }
body.map-theme :is(.round-button, .close-button, .panel-icon-button, .flight-sidebar-close, .altitude-chart-close, .altitude-chart-tool-button) { color: #16394c; background: #fff; border: 1px solid #b8cbd3; border-radius: 4px; box-shadow: none; }
body.map-theme :is(.airspace-2d-toggle, .airport-2d-toggle, .track-airspace-color-toggle, .airspace-3d-toggle, .airport-3d-toggle, .basemap-3d-toggle) { background: #fff; color: #16394c; border: 1px solid #b8cbd3; border-radius: 4px; box-shadow: none; }
body.map-theme .panel-icon-button.active, body.map-theme .round-button.active { color: #fff; background: #16394c; border-color: #16394c; }
body.map-theme .flight-aircraft-count { background: #eaf2f5; color: #216383; border-color: #c4d3da; border-radius: 3px; }
body.map-theme .loading-spinner { border-color: #dce3e6; border-top-color: #216383; }
body.map-theme :is(.site-confirm-box, .flight-trim-box, .altitude-chart-tooltip, .mobile-flight-summary, .base-map-menu, .airport-popup-3d, .persistent-track-pill) { background: #fff; color: #172c35; border: 1px solid #dce3e6; border-radius: 4px; box-shadow: 0 3px 16px #16394c18; backdrop-filter: none; }
body.map-theme :is(.site-confirm-title, .flight-trim-title, .altitude-chart-tooltip-value, .mobile-flight-summary-title, .mobile-flight-summary-value, .airport-popup-3d-title, .airport-popup-3d-meta dd, .airport-popup-3d-row) { color: #172c35; }
body.map-theme :is(.site-confirm-text, .flight-trim-subtitle, .flight-trim-field label, .altitude-chart-tooltip-label, .mobile-flight-summary-label, .airport-popup-3d-ident, .airport-popup-3d-meta dt, .airport-popup-3d-section-title, .airport-popup-3d-row-label) { color: #61717b; }
body.map-theme :is(.site-confirm-button, .flight-trim-button, .base-map-option, .persistent-track-name, .persistent-track-close, .airport-popup-3d button) { color: #16394c; background: #fff; border: 1px solid #b8cbd3; border-radius: 4px; box-shadow: none; }
body.map-theme :is(.site-confirm-button.danger, .flight-trim-button.danger, .panel-action.danger) { background: #fff0f0; border-color: #e3bdbd; color: #9f2f2f; }
body.map-theme :is(.flight-trim-button.primary, .base-map-option.active) { background: #16394c; color: #fff; border-color: #16394c; }
body.map-theme .base-map-option.active::after { color: #fff; }
body.map-theme :is(.altitude-chart-scroll, .flight-sidebar-content) { scrollbar-color: #b8cbd3 transparent; }
body.map-theme :is(.altitude-chart-scroll, .flight-sidebar-content)::-webkit-scrollbar-thumb { background: #b8cbd3; }
body.map-theme .altitude-chart-panel.fullscreen { border-radius: 4px; }
body.map-theme .altitude-chart-cursor-line { background: #216383; }
body.map-theme .map-buttons :is(.airspace-2d-svg, .airport-2d-svg, .airspace-3d-svg, .airport-3d-svg) { filter: none; }
body.map-theme .map-buttons :is(.airspace-top, .airspace-bottom, .airspace-edge, .airspace-cross, .airport-ring, .airport-runway) { stroke: #216383; }
body.map-theme .map-buttons .active :is(.airspace-top, .airspace-bottom, .airspace-edge, .airspace-cross, .airport-ring, .airport-runway) { stroke: #fff; }
body.map-theme .round-button .base-map-paper-icon { background: #216383; border-color: #16394c; }
body.map-theme .map-buttons .track-airspace-color-toggle:not(.active) .track-airspace-color-svg :is(.track-base, .track-segment-a, .track-segment-b, .track-segment-c) { stroke: #216383; }
body.map-theme .map-buttons .track-airspace-color-svg { filter: none; }
body.map-theme .status { background: #fff; color: #52646f; border: 1px solid #dce3e6; border-radius: 4px; bottom: 40px; }
body.map-theme .map-legal-bar { position: fixed; z-index: 1400; bottom: 0; left: 0; padding: 5px 10px; background: #fffffff2; border: 1px solid #dce3e6; font-size: 11px; max-width: calc(100vw - 10px); }
body.map-theme .map-legal-bar .legal-links { gap: 4px 12px; }

/* Airport information remains an instrument view, without the old poster look. */
body.operations-theme :is(.weather-page, .operations) { max-width: 1280px; width: calc(100% - 48px); margin: auto; padding-top: 24px; }
body.operations-theme :is(.weather-nav, .topbar) { background: transparent; }
body.operations-theme .weather-title { background: #fff; color: #172c35; border: 1px solid #dce3e6; }
body.operations-theme .weather-title small { color: #61717b; letter-spacing: normal; font-size: 12px; }
body.operations-theme .weather-title h1 { font-size: 30px; letter-spacing: normal; line-height: 1.2; }
body.operations-theme :is(.met-panel, .radio-card, .scan-card, .map-shell, .met-value, .wind-readouts > div) { background: #fff; border: 1px solid #dce3e6; border-radius: 0; box-shadow: none; }
body.operations-theme .met-panel__header { background: #f7f9fa; border-color: #dce3e6; }
body.operations-theme :is(.met-panel__kicker, .radio-card__name, .scan-card__label, .met-section-title) { letter-spacing: normal; text-transform: none; font-family: Arial, Helvetica, sans-serif; }
body.operations-theme :is(.weather-nav__link, .met-panel__link, .cloud-range-switch button, .map-pill) { border: 1px solid #b8cbd3; border-radius: 4px; background: #fff; color: #16394c; font-family: Arial, Helvetica, sans-serif; }
body.operations-theme .weather-nav a.weather-nav__link { color: #16394c; }
body.operations-theme :is(.cloud-range-switch button.is-active, .map-pill.is-selected) { background: #16394c; color: #fff; }
body.operations-theme .map-shell::after { display: none; }
body.operations-theme .met-value strong { font-family: Arial, Helvetica, sans-serif; }
body.operations-theme .weather-nav a.weather-nav__link { font-size: 12px; letter-spacing: normal; font-weight: 700; }
body.operations-theme :is(.met-panel__header strong, .met-section-title strong) { font-size: 15px; letter-spacing: normal; }
body.operations-theme :is(.met-panel__kicker, .met-section-title, .wind-readouts span, .met-value > span, .cloud-legend, .cloud-history-note, .met-panel__footer, .runway-component, .weather-note) { font-size: 12px; letter-spacing: normal; font-weight: 400; }
body.operations-theme .wind-readouts strong { font-size: 20px; }
body.operations-theme :is(.wind-readouts small, .met-value small, .runway-component small) { font-size: 11px; }
body.operations-theme .met-value > span { font-weight: 700; }
body.operations-theme .met-value strong { font-size: 28px; }
body.operations-theme .runway-component strong { font-size: 13px; }
body.operations-theme .cloud-chart__empty { font-size: 11px; letter-spacing: normal; }
body.operations-theme .met-panel__footer { flex-wrap: wrap; gap: 6px; padding: 10px 12px; }
@media (min-width: 2360px) {
  body.operations-theme .weather-rail--left { top: 80px; }
  body.operations-theme .weather-rail--left .met-panel { min-height: calc(100dvh - 96px); }
}

/* Public documents intentionally share the same table/card design. */
.legal-layout { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 20px; max-width: 1280px; width: 100%; margin: auto; padding: 28px 24px 48px; flex: 1; align-items: start; }
.legal-nav { border: 1px solid #dce3e6; background: #fff; padding: 18px; }
.legal-nav h2 { margin: 0 0 14px; }
.legal-nav .legal-links { flex-direction: column; gap: 0; }
.legal-nav a { display: block; padding: 10px 0; border-top: 1px solid #e7ecee; }
.legal-document { border: 1px solid #dce3e6; padding: 26px 30px; background: #fff; min-width: 0; overflow-wrap: anywhere; }
.legal-document h1 { margin: 0 0 20px; }
.legal-document h2 { margin: 26px 0 10px; }
.legal-document p, .legal-document li { line-height: 1.7; }
.legal-document .notice { border-left: 3px solid #b57831; padding: 12px 14px; background: #f8f0e5; color: #76552f; margin-bottom: 24px; font-size: 13px; }
.legal-version { color: #61717b; font-size: 12px; padding-top: 20px; border-top: 1px solid #dce3e6; margin-top: 30px; }
.legal-overview { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.legal-overview > a { display: block; border: 1px solid #dce3e6; padding: 16px; text-decoration: none; }
.legal-overview > a:hover { background: #f7f9fa; }
.legal-overview h2 { margin: 0 0 8px; }
.legal-overview p { margin: 0; color: #61717b; }
body.sleep-theme { padding: 24px; flex-direction: column; gap: 24px; }
body.sleep-theme .box { border-radius: 0; box-shadow: none; margin-top: 70px; }
body.sleep-theme .moon { display: none; }
body.sleep-theme .site-footer { flex-wrap: wrap; }
body.sleep-theme .site-footer :is(a, span) { background: transparent; border: 0; padding: 0; }
body.django-admin-theme {
  --primary: #16394c; --secondary: #16394c; --accent: #fff;
  --body-bg: #f4f6f7; --body-fg: #172c35; --body-quiet-color: #61717b;
  --body-loud-color: #172c35; --darkened-bg: #f7f9fa; --hairline-color: #dce3e6;
  --border-color: #dce3e6; --link-fg: #216383; --link-hover-color: #16394c;
  --breadcrumbs-bg: #eaf2f5; --breadcrumbs-fg: #172c35; --breadcrumbs-link-fg: #216383;
  --selected-bg: #eaf2f5; --selected-row: #eaf2f5; --button-bg: #216383;
  --button-hover-bg: #16394c; --default-button-bg: #16394c;
  --header-bg: #16394c; --header-color: #fff; --header-link-color: #fff;
  --header-branding-color: #fff;
}
body.django-admin-theme :is(.module, #changelist, .submit-row) { background: #fff; border: 1px solid #dce3e6; border-radius: 0; box-shadow: none; }
body.django-admin-theme #header a { color: #fff; }
body.django-admin-theme #header { min-height: 64px; background: #16394c; }
body.django-admin-theme .module :is(caption, h2) { background: #f7f9fa; color: #172c35; border-bottom: 1px solid #dce3e6; font-size: 14px; text-transform: none; padding: 14px; }
body.django-admin-theme .module caption a { color: #172c35; }
body.django-admin-theme .site-footer { margin-top: 24px; }

@media (max-width: 700px) {
  .site-header-inner { padding: 12px 15px; }
  .site-header-inner .site-identity { font-size: 15px; }
  body.content-theme > :is(.page, .wrap) { padding: 18px 12px 32px; }
  .site-footer { padding: 18px 12px; flex-direction: column; align-items: flex-start; }
  .auth-page { padding: 24px 12px; }
  body.site-theme .auth-modal-overlay { align-items: center; padding: 12px; }
  body.site-theme :is(.auth-modal-body, .auth-modal-header, .auth-card-legal) { padding-left: 18px; padding-right: 18px; }
  body.operations-theme :is(.weather-page, .operations) { width: calc(100% - 24px); padding-top: 18px; }
  .legal-layout { grid-template-columns: 1fr; padding: 18px 12px 32px; gap: 14px; }
  .legal-nav { padding: 12px 16px; }
  .legal-nav h2 { display: none; }
  .legal-nav .legal-links { flex-direction: row; gap: 10px 18px; }
  .legal-nav a { border: 0; padding: 4px 0; }
  .legal-document { padding: 20px 18px; }
  .legal-overview { grid-template-columns: 1fr; }
  body.site-theme h1 { font-size: 26px; }
}
:where(.site-theme) .security-layout { max-width: 700px; margin: 28px auto; padding: 0 16px; }
:where(.site-theme) .security-layout .card { padding: 22px; }
:where(.site-theme) .security-form { display: grid; gap: 18px; }
:where(.site-theme) .security-field > label { display: block; margin-bottom: 7px; font-weight: 600; }
:where(.site-theme) .security-field > input { width: 100%; }
:where(.site-theme) .security-layout .actions,
:where(.site-theme) #vf-disconnect .actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
:where(.site-theme) .security-layout .notice.warning { border: 1px solid #e5d5a8; background: #fffaf0; padding: 14px; margin-bottom: 20px; }
:where(.site-theme) .security-check label { display: flex; gap: 10px; align-items: flex-start; }
:where(.site-theme) .security-check input { width: auto; flex-shrink: 0; }
:where(.site-theme) .security-field .muted { margin-top: 8px; font-size: 13px; }
:where(.site-theme) .errorlist { color: #9f2f2f; padding-left: 20px; }
:where(.site-theme) #vf-disconnect { max-width: 600px; width: calc(100% - 32px); padding: 0; }
:where(.site-theme) #vf-disconnect .dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px; border-bottom: 1px solid #dbe4ef; }
:where(.site-theme) #vf-disconnect h2 { margin: 0; }
:where(.site-theme) #vf-disconnect .dialog-body { padding: 18px; }
