/* Gesner Ops colour style AW "Blue Hour" (batch 10). Loaded after app.css.
   Deep blue sky fading to a pale ice blue horizon with a thin pink line, dark turbine silhouettes.
   Revert: remove the theme.css <link> in index.html (or restore index.before-blue-hour.html). */
:root {
  --bg: #050a1a; --bg-elev: #070d1f; --card: rgba(4,8,20,0.72); --card-hover: rgba(12,20,40,0.80);
  --border: rgba(190,215,255,0.16); --text: #ffffff; --muted: #b3c2d8; --accent: #c9f31d; --accent-2: #9fc2ff;
  --online: #2fd27a; --offline: #ff4d4d; --danger: #ff6b6b; --ok: #4ade80;
  --shadow: 0 8px 24px rgba(0,0,6,0.50); --card-2: rgba(255,255,255,0.06);
  --glass: rgba(4,8,20,0.72); --solid: #070d1f; --field: #050a1a; --lime: #c9f31d;
}
html { background: #020308 !important; }
body { background: transparent !important; color: #ffffff; }
body::before { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: url("../media/bg-blue-hour.png?v=bluehour2") center / cover no-repeat, #020308; }

/* ---------- Home (as previewed) ---------- */
.app-header { background: transparent !important; }
.app-header h1 { color: #c9f31d !important; text-shadow: none !important; }
.weather-card, .status-tile, .site-map-card, .action-btn, .date-chip, .bell-btn, .sync-banner.ok {
  background: var(--glass) !important; border: 1px solid var(--border) !important; color: #ffffff !important;
  box-shadow: var(--shadow) !important; -webkit-backdrop-filter: blur(3px) !important; backdrop-filter: blur(3px) !important; }
.sync-banner.ok { color: var(--muted) !important; }
.metric { background: rgba(255,255,255,0.06) !important; }
.weather-card .wx-label, .weather-card .wx-desc, .metric .k, .site-map-card-sub, .action-btn .ab-sub,
.app-header .subtitle, .wx-fallback { color: var(--muted) !important; }
.weather-card .wx-temp, .metric .v, .status-tile .name, .site-map-card-title, .action-btn .ab-title { color: #ffffff !important; }
.weather-card .wx-wind { color: #c9f31d !important; }
.date-chip .dot { background: #c9f31d !important; box-shadow: 0 0 0 4px rgba(201,243,29,0.18) !important; }
.action-btn .ab-icon, .action-btn.sync .ab-icon, .sheet-item .si-icon {
  background: rgba(201,243,29,0.10) !important; border: 1px solid rgba(201,243,29,0.50) !important; color: #c9f31d !important; }
.action-btn .chev, .site-map-card .chev { color: #c9f31d !important; }
.action-btn.primary { background: var(--glass) !important; border-color: rgba(201,243,29,0.45) !important; }
.action-btn:active, .status-tile:active, .site-map-card:active { background: var(--card-hover) !important; }
.section-title { display: inline-block !important; color: #c9f31d !important; background: rgba(3,6,16,0.90) !important;
  border: 1px solid rgba(190,210,255,0.28) !important; padding: 4px 12px !important; border-radius: 999px !important; }

/* Status badges: driven only by the real .online / .offline class the app sets from open work logs */
.status-tile.online .icon-wrap { background: rgba(34,197,94,0.14) !important; color: #2fd27a !important; }
.status-tile.online .badge { background: #15803d !important; color: #ffffff !important; border: 1px solid #86efac !important;
  box-shadow: 0 0 0 2px rgba(0,0,0,0.55) !important; font-weight: 800 !important; }
.status-tile.offline { border: 2px solid #ff4d4d !important; }
.status-tile.offline .icon-wrap { background: rgba(255,77,77,0.16) !important; color: #ff5a5a !important; }
.status-tile.offline .badge { background: #dc2626 !important; color: #ffffff !important; border: 1px solid #ffb3b3 !important;
  box-shadow: 0 0 0 2px rgba(0,0,0,0.55) !important; font-weight: 800 !important; }

/* Low parts bell: pale red instead of amber */
.bell-btn { color: var(--muted) !important; }
.bell-btn.has-alert { color: #ff8a8a !important; border-color: rgba(255,120,120,0.55) !important; }

/* ---------- Shared controls on every other screen ---------- */
.back-btn { background: var(--glass) !important; border: 1px solid var(--border) !important; color: #ffffff !important; }
.btn { border-color: var(--border); }
.btn-primary { background: #03130a !important; color: #c9f31d !important; border: 1px solid rgba(201,243,29,0.55) !important; }
.btn-secondary { background: var(--glass) !important; color: #ffffff !important; border: 1px solid var(--border) !important; }
.btn-danger { background: rgba(220,38,38,0.22) !important; border: 1px solid rgba(255,120,120,0.55) !important; color: #ffd0d0 !important; }
a { color: #c9f31d; }

.form-card, .log-card, .tracker-card, .sheet-table-wrap, .empty-state {
  background: var(--glass) !important; border-color: var(--border) !important; color: #ffffff !important;
  box-shadow: var(--shadow) !important; -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.empty-state { border-style: dashed !important; color: var(--muted) !important; }
.log-card:active { background: var(--card-hover) !important; }
.log-card .lc-entry { color: #c9f31d !important; }
.log-card .lc-meta, .log-card--line .ll-k { color: var(--muted) !important; }

.field label, .field .hint, .hint, .type-meanings span, .confirm-msg, .tracker-grid .k, .detail-row .dk { color: var(--muted); }
.field input, .field select, .field textarea, #inv-view-search, .part-row-fields select, .part-row-fields input, .proc-search,
input[type="text"], input[type="search"], input[type="number"], input[type="date"], input[type="time"], input[type="tel"], input[type="email"], select, textarea {
  background: var(--field) !important; color: #ffffff !important; border: 1px solid rgba(190,215,255,0.28) !important;
  color-scheme: dark; }
.field input::placeholder, .field textarea::placeholder, input::placeholder, textarea::placeholder { color: #8797b0 !important; opacity: 1; }
.field input:focus, .field select:focus, .field textarea:focus, #inv-view-search:focus, .proc-search:focus,
input:focus, select:focus, textarea:focus {
  outline: none; border-color: rgba(201,243,29,0.70) !important; box-shadow: 0 0 0 3px rgba(201,243,29,0.18) !important; }
select option, select optgroup { background: #070d1f; color: #ffffff; }
input[type="checkbox"], input[type="radio"] { accent-color: #c9f31d; }

.segmented label, .log-view-btn { background: var(--field) !important; color: #ffffff !important; border: 1px solid var(--border) !important; }
.segmented label:has(input:checked), .log-view-btn.is-active {
  background: rgba(201,243,29,0.14) !important; border-color: rgba(201,243,29,0.60) !important; color: #c9f31d !important; }

.detail-row, .part-row, .photo-thumb, .photo-detail-item { background: rgba(5,10,26,0.85) !important; border-color: var(--border) !important; }
.guide-box { background: rgba(159,194,255,0.08) !important; border: 1px solid rgba(159,194,255,0.24) !important; color: #ffffff !important; }
.guide-box.empty { color: var(--muted) !important; }
.guide-link { background: none !important; border: 0 !important; color: #c9f31d !important; text-decoration: underline !important; }
.rule-note, .sync-note { color: var(--muted) !important; background: rgba(4,8,20,0.72) !important; border: 1px solid var(--border) !important; }
.check-list input:checked + label { color: var(--muted) !important; }

.pill { background: rgba(179,194,216,0.16) !important; color: #dbe5f5 !important; }
.pill.ok { background: rgba(21,128,61,0.35) !important; color: #b6f5cb !important; }
.pill.warn { background: rgba(220,38,38,0.25) !important; color: #ffc4c4 !important; }
.sheet-table th { background: rgba(0,0,0,0.40) !important; color: #c9f31d !important; }
.sheet-table td { color: #ffffff; }
.sheet-table tr.row-zero td { color: #ffb3b3 !important; }
.sheet-table tr.row-zero td:nth-child(3) { color: #ff6b6b !important; }

/* Procedure attach search */
.proc-attach-results:not(:empty) { background: rgba(5,10,26,0.95) !important; border-color: var(--border) !important; }
.proc-attach-item { color: #ffffff !important; }
.proc-attach-item:active, .proc-attach-item:focus { background: rgba(201,243,29,0.12) !important; }
.proc-attach-item .pai-mod { color: var(--muted) !important; }
.proc-attach-picked { background: rgba(21,128,61,0.25) !important; border-color: rgba(134,239,172,0.50) !important; color: #d6fbe2 !important; }

/* Sync banners: dark glass with coloured edge (no light peach / pink boxes) */
.sync-banner.warn { background: rgba(4,8,20,0.80) !important; color: #dbe5f5 !important; border: 1px solid rgba(159,194,255,0.45) !important; }
.sync-banner.err { background: rgba(60,8,12,0.85) !important; color: #ffd0d0 !important; border: 1px solid rgba(255,120,120,0.60) !important; }

/* Toasts */
.toast { background: #070d1f !important; color: #ffffff !important; border: 1px solid var(--border) !important; }
.toast.ok { border-color: rgba(134,239,172,0.60) !important; }
.toast.err { border-color: rgba(255,120,120,0.65) !important; }

/* ---------- Bottom sheets, guide peek, procedure popup ---------- */
.sheet-backdrop { background: rgba(0,2,10,0.62) !important; }
.sheet { background: #070d1f !important; border: 1px solid rgba(190,215,255,0.22) !important; color: #ffffff !important; }
.sheet .handle { background: rgba(190,215,255,0.35) !important; }
.sheet-item { color: #ffffff !important; }
.sheet-item:active { background: rgba(255,255,255,0.06) !important; }
.sheet-cancel { background: rgba(255,255,255,0.05) !important; color: #ffffff !important; border: 1px solid var(--border) !important; }
.guide-modal-summary, .guide-modal-more, .guide-modal-more summary { color: var(--muted) !important; }
.guide-modal-steps { background: rgba(255,255,255,0.06) !important; color: #ffffff !important; border: 1px solid var(--border); }
.guide-iframe-wrap, .proc-iframe-wrap { background: #050a1a !important; border: 1px solid var(--border) !important; }
.guide-iframe, .proc-iframe { background: #050a1a !important; }

/* ---------- Orientation, Site Map overlay ---------- */
.orient-video-wrap { background: #020308 !important; border-color: var(--border) !important; }
.site-map-thumb { background: #050a1a !important; border-color: var(--border) !important; }
.site-map-overlay, .site-map-viewport { background: #020308 !important; }
.site-map-overlay-bar, .site-map-hint { background: rgba(4,8,20,0.94) !important; color: #ffffff; }
.site-map-hint { color: var(--muted) !important; }
.site-map-close { background: var(--glass) !important; color: #ffffff !important; border: 1px solid var(--border) !important; }

/* ---------- Small fixes found while checking every screen ---------- */
:root { color-scheme: dark; }
/* Hub buttons built in JS have no space between title and sub text */
.action-btn .ab-title::after { content: " "; }
/* "Ready to put" and other warn pills: soft pink instead of amber, kept apart from offline red */
.pill.warn { background: rgba(236,150,196,0.20) !important; color: #ffc8e6 !important; }
/* Helper text that sits straight on the sky (not in a card) gets a dark glass strip so it stays readable over the light horizon */
.panel > p.hint, .orient-viewer > p.hint, .orient-foot {
  background: rgba(4,8,20,0.72) !important; border: 1px solid var(--border); border-radius: 12px;
  padding: 8px 12px !important; color: #dbe5f5 !important; }
