/* CORVANTA VARDAQ · customer workspace. Existing data, forms and permissions remain unchanged. */
:root { color-scheme: dark; --bg: var(--vq-midnight, #0b1220); --panel: #132134; --line: #344b62; --text: #f5f7fa; --muted: #b9c9da; --accent: var(--vq-cyan, #00d5ff); --blue: var(--vq-royal, #0066ff); --soft: #1b2e44; --warning: var(--vq-warning, #ffb300); --danger: #ff9cac; }
* { box-sizing: border-box; }
html { min-width: 320px; background: var(--bg); }
body { margin: 0; background: var(--bg); color: var(--text); font: 14px/1.6 var(--vq-font, 'Segoe UI', Arial, sans-serif); }
body.light { color-scheme: light; --bg: #f5f7fa; --panel: #fff; --line: #b8c8d9; --text: #0b1220; --muted: #40536b; --soft: #edf2f8; --accent: #0054d6; --warning: #875500; --danger: #a51c37; }
a { color: inherit; text-underline-offset: .22em; }
button, input, select, textarea { font: inherit; color: inherit; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); padding: 10px 13px; min-width: 0; max-width: 100%; }
button { cursor: pointer; min-height: 44px; font-weight: 600; transition: background 160ms, border-color 160ms, box-shadow 160ms; }
button:hover:not(:disabled) { background: var(--soft); border-color: var(--accent); }
button:active:not(:disabled) { box-shadow: inset 0 2px 4px #0002; }
button:disabled { opacity: .55; cursor: not-allowed; }
button.primary, form button[type=submit] { background: var(--blue); border-color: var(--blue); color: #fff; }
button.primary:hover:not(:disabled), form button[type=submit]:hover:not(:disabled) { background: #0055d6; border-color: #0055d6; }
input::placeholder, textarea::placeholder { color: var(--muted); opacity: .85; }
input:focus, textarea:focus, select:focus { border-color: var(--accent); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; box-shadow: 0 0 0 5px var(--bg); }
label { display: flex; flex-direction: column; gap: 6px; color: var(--muted); font-size: 12px; }
[hidden] { display: none !important; }
.skip { position: fixed; left: 16px; top: -100px; padding: 12px 18px; z-index: 100; color: var(--text); background: var(--panel); border: 1px solid var(--accent); border-radius: 8px; }
.skip:focus { top: 16px; }
.brand.vardaq-brand { display: inline-flex; text-decoration: none; max-width: 100%; }
.vardaq-lockup { display: flex; flex-direction: column; align-items: center; width: 100%; padding: 10px; border: 1px solid #d8e1ec; border-radius: 12px; background: #f5f7fa; color: #0b1220; }
.vardaq-logo { display: block; width: 100%; height: auto; object-fit: contain; }
.vardaq-tagline { display: block; color: #2a3a4a; font-size: 7px; letter-spacing: .16em; line-height: 1.6; text-align: center; }
.tagline { color: var(--muted); font-size: 10px; font-weight: 600; letter-spacing: .15em; margin: 18px 8px 0; }
#app > aside { position: fixed; width: 246px; inset: 0 auto 0 0; padding: 24px 18px; background: var(--panel); border-right: 1px solid var(--line); overflow-y: auto; }
#app > aside .vardaq-brand { width: 202px; }
nav { display: grid; gap: 5px; margin: 22px 0; }
nav button { text-align: left; border: 1px solid transparent; background: transparent; padding: 11px 13px; color: var(--muted); font-size: 13px; line-height: 1.4; }
nav button.active { background: var(--soft); color: var(--accent); border-color: var(--line); box-shadow: inset 3px 0 var(--accent); }
.sidebarFoot { display: grid; gap: 10px; border-top: 1px solid var(--line); padding-top: 20px; }
#identity { font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }
.workspace { margin-left: 246px; padding: 32px 34px; max-width: 2000px; min-width: 0; }
header { display: flex; align-items: center; gap: 24px; justify-content: space-between; flex-wrap: wrap; padding-bottom: 24px; border-bottom: 1px solid var(--line); }
header > div { min-width: 0; }
header label { max-width: 100%; }
header select { max-width: 280px; }
h1 { font-size: clamp(26px, 3vw, 36px); line-height: 1.15; letter-spacing: -.035em; margin: 8px 0; }
h2 { font-size: 19px; line-height: 1.3; letter-spacing: -.015em; margin: 0 0 16px; }
h3 { font-size: 16px; }
.eyebrow { color: var(--accent); font-size: 11px; font-weight: 650; letter-spacing: .17em; }
.filters { display: flex; gap: 12px; align-items: end; flex-wrap: wrap; margin: 24px 0 16px; padding: 18px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; }
.filters label { flex: 1 1 130px; min-width: 0; }
.filters input, .filters select { max-width: 100%; width: 100%; }
.filters button { background: var(--soft); }
.source { font-size: 12px; line-height: 1.7; color: var(--muted); border-left: 3px solid var(--accent); padding: 5px 14px; overflow-wrap: anywhere; }
#message { color: var(--warning); font-size: 13px; line-height: 1.7; overflow-wrap: anywhere; }
#message:not(:empty) { padding: 12px 16px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; }
.cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 15px; margin: 26px 0; }
.card, .panel, #detail { background: var(--panel); border: 1px solid var(--line); border-top-color: #61788e; border-radius: 17px; padding: 22px; min-width: 0; box-shadow: 0 12px 32px #0000000b, inset 0 1px #ffffff0b; }
.card span { display: block; color: var(--muted); font-size: 12px; }
.card strong { display: block; font-size: 31px; margin-top: 10px; font-weight: 650; letter-spacing: -.035em; line-height: 1.25; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.card small { display: block; color: var(--muted); font-size: 12px; margin-top: 6px; }
.grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 18px; }
.toolbar { display: flex; align-items: center; gap: 10px; margin: 20px 0; flex-wrap: wrap; }
.scroll { overflow: auto; max-width: 100%; border-radius: 9px; }
table { border-collapse: collapse; width: 100%; font-size: 12px; }
th { text-align: left; color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .04em; border-bottom: 1px solid var(--line); padding: 13px 12px; white-space: nowrap; background: var(--soft); }
td { border-bottom: 1px solid var(--line); padding: 13px 12px; vertical-align: top; max-width: 230px; overflow-wrap: anywhere; }
tbody tr:hover { background: var(--soft); }
td button { font-size: 12px; padding: 7px 10px; min-height: 38px; }
.empty { padding: 30px 20px; color: var(--muted); text-align: center; border: 1px dashed var(--line); border-radius: 12px; line-height: 1.8; }
.note { font-size: 12px; line-height: 1.7; color: var(--muted); }
.bar { height: 9px; min-width: 1px; background: var(--accent); border-radius: 4px; margin: 9px 0; }
.trend { display: flex; align-items: end; gap: 4px; height: 125px; border-bottom: 1px solid var(--line); }
.trend div { flex: 1; min-width: 3px; background: var(--accent); }
.badges { display: flex; gap: 8px; flex-wrap: wrap; }
.badge { border: 1px solid var(--line); border-radius: 7px; padding: 4px 8px; font-size: 11px; }
.unknown { color: var(--warning); }
.dl { display: grid; grid-template-columns: minmax(120px, 170px) minmax(0, 1fr); gap: 12px; margin: 18px 0; font-size: 13px; }
.dl dt { color: var(--muted); }
.dl dd { margin: 0; overflow-wrap: anywhere; }
#detail { margin-top: 24px; }
#mapPanel { margin-top: 24px; padding: 22px; border: 1px solid var(--line); border-radius: 17px; background: var(--panel); }
#map { height: 460px; border: 1px solid var(--line); border-radius: 12px; background: #0c1929; }
#mapNote, #mapStatus { color: var(--muted); font-size: 12px; line-height: 1.7; }
footer { display: flex; gap: 16px; flex-wrap: wrap; justify-content: space-between; color: var(--muted); font-size: 11px; padding: 25px 0 0; margin-top: 28px; border-top: 1px solid var(--line); }
footer a { font-weight: 650; letter-spacing: .08em; }
dialog { background: var(--panel); color: var(--text); border: 1px solid #637d95; border-radius: 20px; max-width: 640px; width: calc(100vw - 32px); max-height: 90vh; padding: 28px; box-shadow: 0 24px 90px #0007; }
dialog::backdrop { background: #030b17bb; }
#fields { display: grid; gap: 16px; margin: 22px 0; }
#editTitle { font-size: 25px; letter-spacing: -.035em; }
#editMessage { color: var(--danger); font-size: 13px; overflow-wrap: anywhere; }
textarea { min-height: 110px; resize: vertical; }
#liveStatus { color: var(--accent); font-size: 12px; }
.replay { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 20px; }
.replay input[type=range] { min-width: 130px; flex: 1; }
pre { white-space: pre-wrap; overflow-wrap: anywhere; }

/* Authentication preserves account and invitation contracts. */

.auth { width: min(1120px, calc(100% - 48px)); margin: clamp(32px, 8vh, 96px) auto; display: grid; grid-template-columns: 1.05fr 1fr; border: 1px solid #4a627a; border-radius: 26px; overflow: hidden; box-shadow: 0 30px 100px #0005; }
.auth-story { position: relative; isolation: isolate; min-width: 0; padding: clamp(28px, 4vw, 54px); background: linear-gradient(145deg, #152d47 0%, #0b1220 67%); color: #f5f7fa; }
.auth-story:before { content: ''; position: absolute; z-index: -1; inset: auto -130px -220px 35%; width: 520px; height: 580px; border: 1px solid #00d5ff35; border-radius: 45%; transform: rotate(-35deg); box-shadow: 0 0 0 35px #00d5ff05, 0 0 0 70px #00d5ff04, 0 0 0 105px #00d5ff03; pointer-events: none; }
.auth-story .vardaq-brand { width: 240px; margin-bottom: 38px; }
.auth-eyebrow { color: #00d5ff; font-size: 10px; font-weight: 650; line-height: 1.6; letter-spacing: .17em; }
.auth-story h1 { margin-bottom: 22px; font-size: clamp(26px, 3vw, 36px); color: #f5f7fa; }
.auth-headline { font-size: clamp(27px, 3.3vw, 42px); font-weight: 650; line-height: 1.15; letter-spacing: -.04em; margin-bottom: 24px; }
.auth-headline span { color: #00d5ff; }
.auth-summary { max-width: 45ch; font-size: 15px; line-height: 1.75; color: #bacbdf; }
.auth-principles { display: grid; gap: 10px; margin: 26px 0 34px; color: #dbe7f4; font-size: 12px; }
.auth-principles span { display: flex; align-items: center; gap: 10px; }
.auth-principles span:before { content: ''; width: 17px; height: 2px; background: #00d5ff; }
.auth-home { color: #c6d7e8; font-size: 12px; text-decoration: none; display: inline-block; padding: 7px 0; }
.auth-home:hover { color: #fff; text-decoration: underline; }
.auth-panel { --bg: #fff; --surface: #fff; --text: #0b1220; --muted: #435670; --line: #a9bbcd; --accent: #0054d6; --raised: #e9f0f8; color-scheme: light; position: relative; min-width: 0; padding: clamp(28px, 4vw, 54px); background: #f5f7fa; color: #0b1220; display: flex; flex-direction: column; justify-content: center; }
.auth-panel .auth-eyebrow { color: #0054d6; }
.auth-panel h2 { font-size: clamp(24px, 2.6vw, 31px); line-height: 1.2; letter-spacing: -.035em; margin-bottom: 14px; }
.auth-panel-intro { color: #435670; font-size: 14px; line-height: 1.7; }
.auth-panel form { display: grid; gap: 18px; margin: 23px 0 14px; }
.auth-panel label { font-size: 13px; font-weight: 600; color: #2a3a4a; }
.auth-panel input { width: 100%; min-height: 48px; font-size: 16px; color: #0b1220; }
.auth-panel form > button { background: #0066ff; border-color: #0066ff; color: #fff; min-height: 48px; font-size: 14px; box-shadow: 0 6px 18px #0066ff21; }
.auth-panel form > button:hover { background: #0055d6; border-color: #0055d6; }
#loginMessage { min-height: 1.6em; color: #a51c37; font-size: 13px; line-height: 1.6; overflow-wrap: anywhere; }
#loginMessage:not(:empty) { padding: 12px 14px; background: #fff0f3; border: 1px solid #d9a2af; border-radius: 9px; }
.auth-security { color: #435670; font-size: 12px; line-height: 1.7; padding-top: 16px; border-top: 1px solid #ccd7e4; }
.auth-panel details { margin-top: 14px; padding-top: 18px; border-top: 1px solid #ccd7e4; }
.auth-panel summary { cursor: pointer; font-size: 13px; font-weight: 650; color: #0054d6; padding: 8px 0; }
.auth-panel details p { color: #435670; font-size: 12px; line-height: 1.7; }
#loginMessage { color: #234b78; }
#loginMessage:not(:empty) { background: #e9f1ff; border-color: #b5c8e4; }
@media (max-width: 1200px) { #app > aside { width: 218px; padding: 20px 12px; } #app > aside .vardaq-brand { width: 190px; } .workspace { margin-left: 218px; padding: 26px 22px; } .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid { grid-template-columns: 1fr; } }
@media (max-width: 900px) { #app > aside { position: static; width: 100%; padding: 18px 22px; border-right: 0; border-bottom: 1px solid var(--line); overflow: visible; } #app > aside .vardaq-brand { width: 176px; } .tagline { margin-left: 0; } nav { display: flex; overflow-x: auto; max-width: 100%; gap: 7px; margin: 15px 0; padding: 3px; } nav button { flex: 0 0 auto; max-width: 190px; } .sidebarFoot { display: flex; align-items: center; flex-wrap: wrap; padding-top: 14px; gap: 12px; } #identity { margin-right: auto; } .workspace { margin: 0; padding: 26px 22px; } .auth { grid-template-columns: .95fr 1fr; width: calc(100% - 32px); } .auth-story, .auth-panel { padding: 30px; } .auth-story .vardaq-brand { width: 190px; } }
@media (max-width: 650px) { .auth { display: block; width: calc(100% - 28px); margin: 20px auto; border-radius: 20px; } .auth-story { padding: 26px; } .auth-story .vardaq-brand { width: 176px; margin-bottom: 24px; } .auth-story h1 { margin-bottom: 15px; font-size: 27px; } .auth-headline { font-size: 30px; margin-bottom: 15px; } .auth-summary { font-size: 14px; } .auth-principles { display: none; } .auth-home { margin-top: 5px; } .auth-panel { padding: 28px 26px; } #app > aside { padding: 18px 16px; } .workspace { padding: 22px 14px; } header { gap: 14px; padding-bottom: 20px; } header > div { flex-basis: 100%; } header > label { flex: 1; } header select { max-width: 100%; width: 100%; } .filters { padding: 14px; gap: 10px; } .filters label { flex: 1 1 135px; } .filters button { flex: 1 1 100%; } .cards { gap: 9px; } .card { padding: 15px; border-radius: 12px; } .card strong { font-size: 26px; } .card small { font-size: 11px; } .panel, #detail, #mapPanel { padding: 17px; border-radius: 14px; } .dl { grid-template-columns: 105px minmax(0, 1fr); gap: 10px; font-size: 12px; } #map { height: 330px; } dialog { padding: 22px 18px; } #editTitle { font-size: 22px; } footer { font-size: 11px; line-height: 1.7; } }
@media (prefers-reduced-motion: reduce) { *, *:before, *:after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }

/* Fill the context-specific brand width without altering the approved aspect ratio. */
.vardaq-operational .vardaq-brand .vardaq-lockup { display: flex; width: 100%; }

.vardaq-operational .vardaq-tagline { font-size: 7px; letter-spacing: .1em; }
@media (max-width: 650px) {
  .card strong { font-size: clamp(18px, 5.6vw, 26px); }
  header > label { flex: 1 1 100%; }
  .auth-story .auth-headline, .auth-story .auth-summary { display: none; }
  .auth-story { padding: 24px 26px 20px; }
  .auth-story .vardaq-brand { margin-bottom: 19px; }
  .auth-story h1 { margin-bottom: 10px; }
  .auth-story .auth-home { margin-top: 0; }
}

/* Demo status follows explicit authorised organisation metadata. */
.demo-banner { position: sticky; top: 0; z-index: 30; padding: 13px 24px; border-bottom: 1px solid #3686a0; background: #103146; color: #f5f7fa; box-shadow: 0 6px 18px #030b1726; }
.demo-banner > div { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; }
.demo-banner strong { display: block; color: #73e5ff; font-size: 13px; font-weight: 750; letter-spacing: .025em; }
.demo-banner #demoOrganisation { font-size: 12px; font-weight: 650; overflow-wrap: anywhere; }
.demo-banner p { margin: 4px 0; font-size: 12px; line-height: 1.55; color: #d3e4ee; }
.demo-banner small { display: block; font-size: 11px; line-height: 1.5; color: #b9d5e3; }
.demo-context { padding: 12px 14px; margin: 12px 0 18px; border: 1px solid #3b8299; border-radius: 9px; background: #103146; color: #d9f7ff; font-size: 12px; line-height: 1.65; }
.workspace-links { display: grid; gap: 7px; margin: 18px 0; padding: 0; }
.workspace-links a { display: block; padding: 10px 12px; border: 1px solid #496479; border-radius: 9px; color: #c7edfa; font-size: 12px; font-weight: 600; text-decoration: none; min-height: 40px; }
.workspace-links a:hover, .workspace-links a[aria-current=page] { border-color: #00d5ff; color: #fff; background: #14374b; }
body.light .workspace-links a { color: #123a5a; border-color: #9fb8cb; }
body.light .workspace-links a:hover, body.light .workspace-links a[aria-current=page] { color: #04344f; background: #dceff6; border-color: #0066aa; }
@media (max-width: 900px) { .workspace-links { display: flex; flex-wrap: wrap; overflow: visible; } .workspace-links a { flex: 0 1 auto; } }
@media (max-width: 650px) { .demo-banner { padding: 12px 14px; } .demo-banner > div { gap: 4px 10px; } .demo-banner strong { font-size: 12px; } .demo-banner p { font-size: 11px; } .demo-banner small { font-size: 10px; } }

.map-panel-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; margin-bottom: 12px; }
.map-panel-heading h2 { margin-bottom: 0; }
.map-panel-heading button, #fitFleetMap { flex: 0 0 auto; font-size: 12px; min-height: 40px; }
.map-fallback { padding: 14px; border: 1px solid var(--line); border-radius: 9px; background: var(--bg); margin-top: 12px; font-size: 12px; line-height: 1.6; }
.map-fallback p { margin: 0 0 10px; }
.maplibregl-ctrl-group { overflow: hidden; }
.maplibregl-ctrl-group button { width: 40px; height: 40px; min-height: 40px; padding: 0; border-radius: 0; color: #0b1220; background: #f5f7fa; }
.maplibregl-ctrl-group button:hover { background: #dce5ee; }
.maplibregl-ctrl-attrib { background: #f5f7fa; color: #2a3a4a; }
.maplibregl-ctrl-attrib a { color: #24496a; }
@media (max-width: 650px) { .map-panel-heading { flex-wrap: wrap; } .maplibregl-ctrl-group button { width: 44px; height: 44px; min-height: 44px; } }


html { scroll-padding-top: calc(var(--demo-banner-height, 0px) + 20px); }
@media (min-width: 901px) { body[data-demo-mode=true] #app > aside { top: var(--demo-banner-height, 0px); } }

/* Onboard risk is distinct from connectivity; text labels accompany every colour. */
[data-risk-level] { --vehicle-risk-color: #98a8b8; }
[data-risk-level=LOW] { --vehicle-risk-color: #00d5ff; }
[data-risk-level=ELEVATED] { --vehicle-risk-color: #ffb300; }
[data-risk-level=HIGH] { --vehicle-risk-color: #ff955e; }
[data-risk-level=SEVERE] { --vehicle-risk-color: #ff7185; }
[data-risk-level=CRITICAL] { --vehicle-risk-color: #f54460; }
.vehicle-risk-row > td:first-child { border-left: 3px solid var(--vehicle-risk-color); }
.vehicle-risk { min-width: 180px; max-width: 260px; padding: 10px 12px; border: 1px solid var(--line); border-left: 3px solid var(--vehicle-risk-color); border-radius: 8px; background: var(--bg); }
.risk-score-line { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; color: var(--text); }
.risk-score-line strong { font-size: 18px; font-variant-numeric: tabular-nums; line-height: 1.2; }
.risk-score-line > span { font-size: 10px; letter-spacing: .06em; font-weight: 750; }
.risk-score-meter { height: 4px; margin: 9px 0; overflow: hidden; border-radius: 3px; background: var(--line); }
.risk-score-meter > span { display: block; height: 100%; background: var(--vehicle-risk-color); }
.vehicle-risk small { display: block; margin-top: 4px; color: var(--muted); font-size: 10px; line-height: 1.5; white-space: normal; }
.vehicle-risk-detail { margin: 20px 0; }
.vehicle-risk-detail > p { color: var(--muted); font-size: 12px; line-height: 1.6; }
.risk-legend { display: flex; flex-wrap: wrap; gap: 8px 14px; margin: 12px 0; color: var(--muted); font-size: 11px; }
.risk-legend > span { display: inline-flex; align-items: center; gap: 6px; }
.risk-legend > span:before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--vehicle-risk-color); }

@media (max-width: 650px) {
  .vehicle-risk-table { width: 100%; min-width: 0; border-collapse: separate; border-spacing: 0 12px; }
  .vehicle-risk-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .vehicle-risk-table tbody, .vehicle-risk-table .vehicle-risk-row { display: block; width: 100%; }
  .vehicle-risk-table .vehicle-risk-row { margin-bottom: 16px; padding: 10px 12px; border: 1px solid var(--line); border-left: 3px solid var(--vehicle-risk-color); border-radius: 10px; background: var(--bg); }
  .vehicle-risk-table .vehicle-risk-row > td { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; width: 100%; min-width: 0; max-width: none; padding: 9px 0; border: 0; white-space: normal; overflow-wrap: anywhere; }
  .vehicle-risk-table .vehicle-risk-row > td:before { content: attr(data-label); flex: 0 0 85px; color: var(--muted); font-size: 11px; line-height: 1.6; text-transform: capitalize; }
  .vehicle-risk-table .vehicle-risk-row > td:first-child { font-size: 15px; font-weight: 700; }
  .vehicle-risk-table .vehicle-risk-row > td.risk-score-cell { display: block; }
  .vehicle-risk-table .risk-score-cell:before { display: block; margin-bottom: 8px; }
  .vehicle-risk-table .vehicle-risk { min-width: 0; max-width: none; width: 100%; }
}
