/* air-check — design system fra Air Check Brand Pack
   Navy + ice + signal-cyan, samme grammatik som Signal-projektet. */

@import url('https://fonts.googleapis.com/css2?family=Inter+Tight:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  --navy-900: #0e1a2e;
  --navy-800: #14263f;
  --navy-700: #1c3252;
  --navy-600: #284568;
  --ice-50:  #f4f6fa;
  --ice-100: #e6ebf3;
  --ice-200: #c7d1e0;
  --ice-300: #94a3b8;
  --signal:  #6dd3ff;
  --signal-soft: rgba(109, 211, 255, 0.45);
  --paper:   #fbfbfa;

  /* Status-farver (match brand pack) */
  --st-ok-bg:      #dff3e3;
  --st-ok-fg:      #1f7a3a;
  --st-ok-stroke:  #3aa55c;
  --st-warn-bg:    #fff4d6;
  --st-warn-fg:    #8a5a00;
  --st-warn-stroke:#e0a020;
  --st-alert-bg:   #ffe1de;
  --st-alert-fg:   #a02a20;
  --st-alert-stroke:#d04a3e;
  --st-pending-bg: #ffffff;
  --st-pending-fg: var(--ice-300);

  --font-display: "Inter Tight", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
}

html, body {
  margin: 0;
  background: var(--paper);
  color: var(--navy-900);
  font-family: var(--font-display);
}

/* Mono-label (mest brugte typografi-greb fra brand pack) */
.mono { font-family: var(--font-mono); letter-spacing: 0.08em; }
.label-tiny { font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase; }

/* Kortet bruger navy-bg på alle skærm-headere */
.navy-bg     { background: var(--navy-800); color: white; }
.navy-deep   { background: var(--navy-900); color: white; }
.stripe-noise {
  background-image:
    radial-gradient(ellipse at 50% 0%, rgba(109,211,255,0.06), transparent 60%),
    linear-gradient(180deg, var(--navy-800) 0%, var(--navy-900) 100%);
}

/* Subtle film grain, kun på dark areas */
.grain { position: relative; }
.grain::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 3px 3px;
  mix-blend-mode: overlay;
}

/* Form-kontroller */
.field {
  width: 100%; box-sizing: border-box;
  background: white; border: 1px solid var(--ice-200);
  border-radius: 8px; padding: 12px 14px;
  font: 500 14px/1 var(--font-display);
  color: var(--navy-900);
}
.field:focus { outline: none; border-color: var(--navy-700); box-shadow: 0 0 0 3px rgba(20,38,63,0.10); }
.field::placeholder { color: var(--ice-300); }

.btn-primary {
  width: 100%; box-sizing: border-box; cursor: pointer;
  background: var(--navy-800); color: white; border: none;
  border-radius: 10px; padding: 14px;
  font: 600 14px/1 var(--font-display); letter-spacing: 0.01em;
}
.btn-primary:hover { background: var(--navy-700); }

.btn-sso {
  width: 100%; box-sizing: border-box; cursor: pointer;
  background: white; color: var(--navy-900);
  border: 1px solid var(--ice-200);
  border-radius: 10px; padding: 12px 14px;
  font: 500 13px/1 var(--font-display);
  display: flex; align-items: center; justify-content: center; gap: 10px;
}
.btn-sso:hover { border-color: var(--navy-700); background: var(--ice-50); }

.glow-text {
  text-shadow:
    0 0 18px rgba(109,211,255,0.25),
    0 0 2px rgba(255,255,255,0.6);
}

.dot-divider {
  height: 1px;
  background-image: radial-gradient(circle, rgba(255,255,255,0.4) 1px, transparent 1px);
  background-size: 6px 1px;
  background-repeat: repeat-x;
}

/* Animationer (delt fra brand pack) */
@keyframes ac-blip-pulse {
  0%, 100% { transform: scale(1);   opacity: 1; }
  50%      { transform: scale(1.4); opacity: 0.7; }
}
@keyframes ac-fade-in {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.pop-in { animation: ac-fade-in .35s ease both; }

/* ────────────────────────────────────────────────────────────
   Wheelmap — top-down truck/trailer-skema med status-farver
   ────────────────────────────────────────────────────────────*/

.wheelmap {
  width: 100%;
  height: auto;
  user-select: none;
  -webkit-user-select: none;
}

/* Hjul-grupper: rect-baseret pill (matchende design pack) */
.wheel rect.tire {
  fill: var(--st-pending-bg);
  stroke: var(--ice-200);
  stroke-width: 1.5;
  cursor: pointer;
  transition: fill 0.15s, stroke 0.15s, transform 0.1s;
}
.wheel:active rect.tire { transform: scale(0.97); }
.wheel:focus { outline: none; }
.wheel:focus rect.tire { stroke: var(--signal); stroke-width: 2.5; }

.wheel text { font: 600 10px var(--font-mono); fill: var(--ice-300); }

.wheel-untested rect.tire { fill: var(--st-pending-bg); stroke: var(--ice-200); stroke-dasharray: 3 3; }
.wheel-untested text       { fill: var(--ice-300); }
.wheel-ok rect.tire        { fill: var(--st-ok-bg);    stroke: var(--st-ok-stroke); }
.wheel-ok text              { fill: var(--st-ok-fg); }
.wheel-low rect.tire       { fill: var(--st-warn-bg);  stroke: var(--st-warn-stroke); }
.wheel-low text             { fill: var(--st-warn-fg); }
.wheel-critical rect.tire  { fill: var(--st-alert-bg); stroke: var(--st-alert-stroke); }
.wheel-critical text        { fill: var(--st-alert-fg); }

.wheel-leak rect.tire   { stroke: #2563eb; stroke-width: 2.5; }
.wheel-damage rect.tire { stroke: #7c3aed; stroke-width: 2.5; }

/* Active highlight: dashed cyan ring around active tile */
.wheel.selected rect.active-ring {
  fill: none;
  stroke: var(--signal);
  stroke-width: 2;
  stroke-dasharray: 4 3;
}

/* ────────────────────────────────────────────────────────────
   Status-pills til list/badge
   ────────────────────────────────────────────────────────────*/
.pill {
  font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.1em;
  text-transform: uppercase; font-weight: 600;
  padding: 4px 8px; border-radius: 4px;
  display: inline-block;
}
.pill-ok      { background: var(--st-ok-bg);    color: var(--st-ok-fg); }
.pill-warn    { background: var(--st-warn-bg);  color: var(--st-warn-fg); }
.pill-alert   { background: var(--st-alert-bg); color: var(--st-alert-fg); }
.pill-pending { background: var(--ice-100);     color: var(--navy-700); }

/* Vehicle-list rows (ny stil) */
.vehicle-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  background: white;
  border: 1px solid var(--ice-200);
  border-radius: 12px;
  margin-bottom: 8px;
  text-decoration: none;
  color: inherit;
}
.vehicle-row:active { background: var(--ice-50); }
.vehicle-row .icon-tile {
  width: 40px; height: 40px; border-radius: 8px;
  background: var(--ice-50);
  display: flex; align-items: center; justify-content: center;
  color: var(--navy-800);
}
.vehicle-row .id-line   { font: 500 11px/1 var(--font-mono); color: var(--ice-300); letter-spacing: 0.06em; }
.vehicle-row .name-line { font-weight: 600; font-size: 14px; color: var(--navy-900); margin-top: 1px; }
.vehicle-row .meta-line { font-size: 11px; color: var(--navy-600); margin-top: 1px; }

/* Legacy badges fra tidligere (bevares for bagudkompatibilitet) */
.badge-overdue { background: var(--st-alert-bg); color: var(--st-alert-fg); padding: 2px 8px; border-radius: 999px; font-size: .7rem; font-weight: 600; }
.badge-due     { background: var(--st-warn-bg);  color: var(--st-warn-fg);  padding: 2px 8px; border-radius: 999px; font-size: .7rem; font-weight: 600; }
.badge-never   { background: var(--ice-100);     color: var(--navy-700);    padding: 2px 8px; border-radius: 999px; font-size: .7rem; }

/* Leaflet z-index fix */
.leaflet-container { z-index: 0; }

/* Wireframe-tiles look */
.leaflet-tile-pane {
  filter: grayscale(0.9) contrast(1.15) brightness(0.95);
}

/* Generic stat-tile (3 kolonner i header) */
.stat-tile {
  background: white;
  border: 1px solid var(--ice-200);
  border-radius: 10px;
  padding: 10px 12px;
}
.stat-tile .label { font: 500 10px/1 var(--font-mono); letter-spacing: 0.18em; color: var(--ice-300); text-transform: uppercase; }
.stat-tile .value { font-weight: 700; font-size: 22px; color: var(--navy-900); margin-top: 2px; }
.stat-tile.tone-ok .label    { color: var(--st-ok-fg); }
.stat-tile.tone-warn .label  { color: var(--st-warn-fg); }
.stat-tile.tone-alert .label { color: var(--st-alert-fg); }

/* Scope-grid baggrund (login + skærme med dyb baggrund) */
.scope-grid {
  position: relative;
}
.scope-grid::before {
  content: "";
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 32px 32px;
  -webkit-mask-image: radial-gradient(circle at 50% 38%, black 0%, transparent 70%);
  mask-image: radial-gradient(circle at 50% 38%, black 0%, transparent 70%);
  pointer-events: none;
}

/* Concentric scope-rings used on login behind the form */
.scope-rings {
  position: absolute; inset: 0;
  pointer-events: none;
  opacity: 0.45;
}
.scope-rings circle {
  fill: none;
  stroke: rgba(109,211,255,0.22);
  stroke-width: 1;
}
