@font-face { font-family: "Archivo"; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url("/assets/fonts/archivo-latin-wdth-normal.woff2") format("woff2"); }
@font-face { font-family: "Archivo"; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url("/assets/fonts/archivo-latin-ext-wdth-normal.woff2") format("woff2"); unicode-range: U+0100-024F, U+1E00-1EFF; }

/* Sama palett mis äpis (src/theme.js) */
:root {
  --bg: #0A1118; --panel: #101A24; --panel-2: #0D161F; --card: #152230; --card-hi: #1A2A3A;
  --line: #22303C; --line-2: #1A2631;
  --ink: #E7E4DC; --muted: #8A96A3; --faint: #5F6C78;
  --signal: #E8472C; --signal-dim: rgba(232,71,44,.14);
  --sea: #3C8A8F; --sea-dim: rgba(60,138,143,.16);
  --blue: #4FA8FF; --blue-dim: rgba(79,168,255,.12);
  --amber: #D9A441; --amber-dim: rgba(217,164,65,.14);
  --green: #3FB86A; --green-dim: rgba(63,184,106,.14);
  --neon: #39FF6A; --neon-dim: rgba(57,255,106,.14);
  --radius: 12px; --font: "Archivo", "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font-family: var(--font); color: var(--ink); background: var(--bg); font-size: 15px; line-height: 1.45; -webkit-font-smoothing: antialiased; color-scheme: dark; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
a { color: var(--blue); }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.muted { color: var(--muted); }

/* Brand */
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 19px; letter-spacing: .02em; color: var(--ink); }
.brand span:not(.brand-mark) { font-weight: 500; color: var(--muted); }
.brand-dark { color: var(--ink); }
.brand-logo { width: 30px; height: 30px; border-radius: 8px; flex: none; display: block; }
.brand-mark { width: 28px; height: 28px; border-radius: 8px; background: var(--signal); position: relative; flex: none; box-shadow: 0 0 18px rgba(232,71,44,.45); }
.brand-mark::after { content: ""; position: absolute; inset: 8px 7px; border-radius: 2px; background: linear-gradient(90deg, #fff 0 40%, transparent 40% 60%, #fff 60%); }

/* Auth */
.auth { min-height: 100%; display: grid; place-items: center; padding: 24px 16px;
  background: radial-gradient(ellipse 70% 50% at 50% 0%, rgba(150,40,30,.55), transparent 70%), var(--bg); }
.auth-card { width: 100%; max-width: 400px; background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 28px; }
.auth-card h1 { font-size: 22px; margin: 24px 0 4px; }
.auth-card .btn.block { margin-top: 20px; }

/* Shell */
.shell { display: grid; grid-template-columns: 248px 1fr; min-height: 100%; }
.side { background: var(--panel-2); border-right: 1px solid var(--line); color: var(--muted); padding: 18px 12px; display: flex; flex-direction: column; gap: 16px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.side .brand { padding: 4px 8px 0; }
.kswitch select { width: 100%; font: inherit; font-weight: 700; color: var(--ink); background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 10px 32px 10px 12px; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238A96A3' stroke-width='2.5'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; }
.kswitch select:disabled { opacity: 1; background-image: none; }
nav { display: flex; flex-direction: column; gap: 2px; }
nav a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; color: var(--muted); text-decoration: none; font-weight: 600; }
nav a svg { width: 19px; height: 19px; flex: none; }
nav a:hover { background: var(--card); color: var(--ink); }
nav a[aria-current="page"] { background: var(--card); color: var(--ink); box-shadow: inset 3px 0 0 var(--signal); }
nav a[aria-current="page"] svg { color: var(--signal); }
nav .sep { height: 1px; background: var(--line); margin: 10px 8px; }
.side-foot { margin-top: auto; font-size: 12px; color: var(--faint); padding: 0 8px; }
.main { min-width: 0; display: flex; flex-direction: column; }
.top { position: sticky; top: 0; z-index: 5; background: rgba(10,17,24,.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 14px; padding: 12px 28px; min-height: 64px; }
.top h1 { font-size: 20px; margin: 0; }
.top-actions { display: flex; gap: 8px; margin-left: 12px; align-items: center; }
.live-dot { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--green); font-weight: 700; }
.live-dot::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 0 rgba(63,184,106,.6); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 8px rgba(63,184,106,0); } 100% { box-shadow: 0 0 0 0 rgba(63,184,106,0); } }
.user { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--card); border: 1px solid var(--line); color: var(--sea); display: grid; place-items: center; font-weight: 700; font-size: 14px; }
.user-link { display: flex; align-items: center; gap: 10px; padding: 4px 10px 4px 4px; border-radius: 10px; color: inherit; text-decoration: none; }
.user-link:hover { background: var(--card); }
.user-link:focus-visible { outline: 2px solid var(--sea); outline-offset: 2px; }
.user-who { display: flex; flex-direction: column; line-height: 1.25; }
.user-email { color: var(--ink); font-size: 14px; font-weight: 600; }
.user-role { color: var(--muted); font-size: 12.5px; }
.user-role:empty { display: none; }
.content { padding: 24px 28px 64px; max-width: 1320px; width: 100%; }
.icon-btn.menu-btn { display: none; }
.scrim { display: none; }

/* Controls */
.btn { font: inherit; font-weight: 700; font-size: 14px; border: 1px solid var(--line); background: var(--card); color: var(--ink); border-radius: 10px; padding: 9px 14px; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; text-decoration: none; }
.btn:hover { background: var(--card-hi); }
.btn.primary { background: var(--signal); border-color: var(--signal); color: #fff; }
.btn.primary:hover { filter: brightness(1.08); }
.btn.ghost { border-color: transparent; background: transparent; color: var(--muted); }
.btn.ghost:hover { color: var(--ink); background: var(--card); }
.btn.sm { padding: 6px 10px; font-size: 13px; }
.btn.block { width: 100%; justify-content: center; }
.btn:disabled { opacity: .5; cursor: default; }
.btn svg { width: 16px; height: 16px; }
.icon-btn { border: 0; background: transparent; color: var(--ink); width: 36px; height: 36px; border-radius: 8px; display: grid; place-items: center; cursor: pointer; }
.icon-btn:hover { background: var(--card); }
.icon-btn svg { width: 20px; height: 20px; }
label { display: block; font-weight: 600; font-size: 13px; margin: 14px 0 5px; color: var(--ink); }
input, select, textarea { width: 100%; font: inherit; font-size: 14px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel-2); color: var(--ink); }
select:not([multiple]) { appearance: none; -webkit-appearance: none; padding-right: 36px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238A96A3' stroke-width='2.5'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; }
input::placeholder, textarea::placeholder { color: var(--faint); }
input:disabled { color: var(--muted); }
textarea { min-height: 80px; resize: vertical; }
input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--signal); margin: 0; }
input[type=date] { color-scheme: dark; }
.check { display: flex; align-items: center; gap: 8px; font-weight: 500; font-size: 14px; margin: 8px 0; cursor: pointer; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; }
.chip-check { position: relative; margin: 0; }
.chip-check input { position: absolute; opacity: 0; }
.chip-check span { display: inline-block; padding: 5px 10px; border: 1px solid var(--line); border-radius: 999px; font-size: 13px; font-weight: 700; cursor: pointer; color: var(--muted); }
.chip-check input:checked + span { background: var(--blue-dim); color: var(--blue); border-color: var(--blue); }
.chip-check input:focus-visible + span { outline: 2px solid var(--blue); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.toolbar { display: flex; gap: 10px; align-items: center; margin-bottom: 16px; flex-wrap: wrap; }
.toolbar input[type=search] { max-width: 280px; }
.toolbar select { width: auto; }
.seg { display: inline-flex; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 3px; }
.seg button { font: inherit; font-size: 13px; font-weight: 700; border: 0; background: transparent; padding: 6px 12px; border-radius: 7px; cursor: pointer; color: var(--muted); }
.seg button[aria-pressed="true"] { background: var(--card-hi); color: var(--ink); }

/* Cards & layout */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
.card-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid var(--line-2); gap: 12px; }
.card-head h2 { font-size: 12px; margin: 0; color: var(--muted); letter-spacing: .06em; text-transform: uppercase; }
.card-body { padding: 16px 18px; }
.cols { display: grid; grid-template-columns: repeat(12, 1fr); gap: 16px; }
.span-4 { grid-column: span 4; } .span-5 { grid-column: span 5; } .span-6 { grid-column: span 6; } .span-7 { grid-column: span 7; } .span-8 { grid-column: span 8; } .span-12 { grid-column: span 12; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 16px; }
.tile { padding: 16px 18px; }
.tile .k { font-size: 13px; color: var(--muted); font-weight: 600; }
.tile .v { font-size: 30px; font-weight: 800; letter-spacing: -.01em; margin-top: 4px; font-variant-numeric: tabular-nums; }
.tile .s { font-size: 13px; color: var(--muted); }
.empty { padding: 28px 20px; text-align: center; color: var(--muted); }

/* Tables */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--line-2); vertical-align: top; }
th { font-size: 11.5px; color: var(--muted); font-weight: 700; letter-spacing: .05em; text-transform: uppercase; background: var(--panel-2); white-space: nowrap; }
tbody tr.click { cursor: pointer; }
tbody tr.click:hover { background: var(--card); }
tbody tr:last-child td { border-bottom: 0; }
td .sub { display: block; color: var(--muted); font-size: 13px; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.nowrap { white-space: nowrap; }

/* Badges */
.badge { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 999px; white-space: nowrap; background: var(--card); color: var(--muted); border: 1px solid var(--line); }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.plain::before { display: none; }
.badge.ok { background: var(--green-dim); color: var(--green); border-color: transparent; }
.badge.warn { background: var(--amber-dim); color: var(--amber); border-color: transparent; }
.badge.bad { background: var(--signal-dim); color: var(--signal); border-color: transparent; }
.badge.info { background: var(--blue-dim); color: var(--blue); border-color: transparent; }
.badge.live { background: var(--signal); color: #fff; border-color: transparent; }

/* Lists */
.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; gap: 12px; align-items: center; padding: 12px 18px; border-bottom: 1px solid var(--line-2); }
.list li:last-child { border-bottom: 0; }
.list li.click { cursor: pointer; }
.list li.click:hover { background: var(--card); }
.list .grow { flex: 1; min-width: 0; }
.list .t { font-weight: 700; }
.list .d { color: var(--muted); font-size: 13px; }

/* Ülevaade: staatuse plaadid */
.status-tiles { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin-bottom: 16px; }
.stile { font: inherit; color: inherit; text-align: left; cursor: pointer; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; position: relative; overflow: hidden; }
.stile::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--c); }
.stile:hover { background: var(--card); }
.stile[aria-pressed="true"] { background: var(--card); border-color: var(--c); box-shadow: 0 0 0 1px var(--c) inset; }
.stile .n { font-size: 34px; font-weight: 800; line-height: 1.1; color: var(--c); font-variant-numeric: tabular-nums; }
.stile .l { font-size: 13px; color: var(--muted); font-weight: 600; margin-top: 2px; }

/* Ülevaade: meeskond */
.people { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; padding: 14px; }
.person { display: flex; gap: 12px; align-items: center; padding: 10px 12px; border-radius: 10px; background: var(--panel-2); border: 1px solid var(--line-2); cursor: pointer; font: inherit; color: inherit; text-align: left; width: 100%; }
.person:hover { border-color: var(--line); background: var(--card); }
.person .av { width: 38px; height: 38px; border-radius: 50%; flex: none; display: grid; place-items: center; font-weight: 800; font-size: 13px; color: var(--c); background: color-mix(in srgb, var(--c) 16%, transparent); border: 2px solid var(--c); }
.person .pn { font-weight: 700; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.person .pd { color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.person .ps { color: var(--c); font-size: 12px; font-weight: 700; }
.person > div { min-width: 0; }
.person .pd.pl { white-space: normal; } /* juhiload murduvad vajadusel reale, ei lõigata ära */

/* Ülevaade: aktiivne kutse */
.alarm { border-color: rgba(232,71,44,.6); background:
  radial-gradient(ellipse 90% 80% at 50% 0%, rgba(150,40,30,.55), transparent 75%), var(--panel); }
.alarm .card-head { border-color: rgba(232,71,44,.25); }
.alarm .card-head h2 { color: var(--signal); }
.alarm h3 { font-size: 22px; margin: 6px 0 4px; }
.alarm .where { color: var(--muted); font-size: 14px; }
.alarm .meta { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.alarm .crew { margin-top: 14px; font-size: 14px; }
.alarm .crew b { color: var(--muted); font-weight: 600; }
.calm { display: flex; align-items: center; gap: 12px; padding: 18px; color: var(--muted); }
.calm .ic { width: 40px; height: 40px; border-radius: 50%; background: var(--green-dim); color: var(--green); display: grid; place-items: center; flex: none; }
.calm .ic svg { width: 20px; height: 20px; }

/* Kutse logi ajajoon */
.timeline { list-style: none; margin: 4px 0 0; padding: 0; }
.timeline li { display: grid; grid-template-columns: 74px 1fr; gap: 12px; padding: 8px 0; position: relative; font-size: 14px; }
.timeline li + li { border-top: 1px solid var(--line-2); }
.timeline .tt { font-variant-numeric: tabular-nums; color: var(--muted); font-size: 13px; }
.timeline .tt small { display: block; color: var(--faint); font-size: 11px; }
.timeline .tx { border-left: 3px solid var(--c); padding-left: 10px; }
.timeline .td { display: block; color: var(--muted); font-size: 13px; }

/* Kutse jälgimine */
.map-card { overflow: hidden; display: flex; flex-direction: column; align-self: start; }
.trmap { height: 560px; background: var(--panel-2); }
.trmap .loading, .trmap .empty { padding-top: 220px; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; padding: 10px 16px; font-size: 12px; color: var(--muted); border-top: 1px solid var(--line-2); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.mk-l { display: inline-block; width: 12px; height: 12px; border-radius: 50%; }
.mk-l.scene { background: var(--signal); } .mk-l.station { background: var(--sea); border: 1.5px solid var(--ink); border-radius: 3px; } .mk-l.truck { background: var(--amber); border-radius: 3px; } .mk-l.p { background: var(--amber); border: 2px solid #fff; }
.mk { cursor: default; }
.mk.scene { width: 22px; height: 22px; border-radius: 50%; background: var(--signal); border: 3px solid #fff; box-shadow: 0 0 0 0 rgba(232,71,44,.7); animation: scenepulse 1.6s infinite; }
@keyframes scenepulse { 70% { box-shadow: 0 0 0 16px rgba(232,71,44,0); } 100% { box-shadow: 0 0 0 0 rgba(232,71,44,0); } }
.mk.station { width: 32px; height: 32px; border-radius: 9px; background: var(--sea); color: var(--ink); border: 2px solid var(--ink); display: grid; place-items: center; box-shadow: 0 2px 8px rgba(0,0,0,.55); }
.mk.station svg { width: 18px; height: 18px; }
.mk.p { width: 30px; height: 30px; border-radius: 50%; background: var(--bg); color: var(--c, var(--amber)); border: 3px solid var(--c, var(--amber)); display: grid; place-items: center; font: 800 11px var(--font); box-shadow: 0 2px 6px rgba(0,0,0,.5); }
.mk.truck { width: 34px; height: 34px; border-radius: 9px; background: var(--amber); display: grid; place-items: center; font-size: 18px; border: 2px solid #fff; box-shadow: 0 2px 6px rgba(0,0,0,.5); }
.mk.stale { filter: grayscale(1); opacity: .6; }
.steps { list-style: none; margin: 0; padding: 8px 18px 14px; }
.steps li { display: grid; grid-template-columns: 24px 1fr auto; gap: 10px; align-items: center; padding: 7px 0; color: var(--faint); font-size: 14px; }
.steps .dot { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--line); display: grid; place-items: center; }
.steps .dot svg { width: 12px; height: 12px; }
.steps li.done { color: var(--ink); }
.steps li.done .dot { background: var(--green); border-color: var(--green); color: #0A1118; }
.steps .sv { color: var(--muted); font-variant-numeric: tabular-nums; font-size: 13px; }
.grp { margin-top: 12px; }
.grp .gh { font-size: 12px; font-weight: 700; color: var(--c); letter-spacing: .04em; text-transform: uppercase; margin-bottom: 4px; }
.grp .gh span { color: var(--muted); margin-left: 4px; }
.prow { display: flex; gap: 10px; align-items: flex-start; padding: 6px 0; font-size: 14px; }
.pdot { width: 10px; height: 10px; border-radius: 50%; background: var(--c); margin-top: 5px; flex: none; }
.pl-age { display: block; font-size: 12px; color: var(--faint); }
.pl-age.fresh { color: var(--green); }
.veh-line { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 10px; background: var(--amber-dim); color: var(--ink); font-size: 14px; margin-top: 8px; }
.veh-line svg { width: 22px; height: 22px; color: var(--amber); flex: none; }
@media (max-width: 860px) { .trmap { height: 380px; } .trmap .loading, .trmap .empty { padding-top: 150px; } }
@media (prefers-reduced-motion: reduce) { .mk.scene { animation: none; } }

/* Vehicles */
.vgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.vcard { padding: 18px; cursor: pointer; text-align: left; font: inherit; color: inherit; width: 100%; }
.vcard:hover { border-color: var(--faint); }
.vcard h3 { margin: 0; font-size: 17px; }
.vcard .meta { color: var(--muted); font-size: 13px; margin: 2px 0 12px; }
.vcard dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; margin: 12px 0 0; font-size: 13px; }
.vcard dt { color: var(--muted); } .vcard dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
.vmini { display: flex; align-items: center; gap: 10px; padding: 10px 18px; border-bottom: 1px solid var(--line-2); cursor: pointer; }
.vmini:last-child { border-bottom: 0; }
.vmini:hover { background: var(--card); }
.vmini .vi { width: 32px; height: 32px; border-radius: 8px; display: grid; place-items: center; background: var(--card); color: var(--muted); flex: none; }
.vmini .vi svg { width: 18px; height: 18px; }

/* Charts */
.chart { position: relative; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart .grid line { stroke: var(--line-2); }
.chart .axis text { fill: var(--faint); font-size: 11px; }
.chart .bar { fill: var(--signal); }
.chart .bar.on { fill: #ff6a4d; }
.chart .hit { fill: transparent; cursor: default; }
.tip { position: absolute; pointer-events: none; background: var(--card-hi); border: 1px solid var(--line); color: var(--ink); font-size: 12px; padding: 6px 9px; border-radius: 6px; white-space: nowrap; transform: translate(-50%, -100%); margin-top: -8px; }
.hbar { display: grid; grid-template-columns: 140px 1fr 40px; gap: 10px; align-items: center; font-size: 13px; padding: 5px 0; }
.hbar .track, .hbar .fill { display: block; }
.hbar .track { height: 10px; background: var(--panel-2); border-radius: 4px; overflow: hidden; }
.hbar .fill { height: 100%; background: var(--signal); border-radius: 0 4px 4px 0; }
.hbar .n { text-align: right; font-variant-numeric: tabular-nums; color: var(--muted); }

/* Drawer */
.drawer-wrap { position: fixed; inset: 0; z-index: 20; }
.drawer-scrim { position: absolute; inset: 0; background: rgba(0,0,0,.55); }
.drawer { position: absolute; top: 0; right: 0; bottom: 0; width: min(560px, 100%); background: var(--panel); border-left: 1px solid var(--line); display: flex; flex-direction: column; box-shadow: -12px 0 32px rgba(0,0,0,.4); animation: slide .18s ease-out; }
@keyframes slide { from { transform: translateX(24px); opacity: .6; } }
@media (prefers-reduced-motion: reduce) { .drawer { animation: none; } .live-dot::before { animation: none; } }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.drawer-head h2 { margin: 0; font-size: 18px; }
.drawer-body { padding: 4px 20px 0; overflow-y: auto; flex: 1; min-height: 0; }
.drawer-body > *:last-child:not(form) { margin-bottom: 28px; }
.drawer-body h3 { font-size: 12px; margin: 22px 0 8px; color: var(--muted); letter-spacing: .06em; text-transform: uppercase; }
.kv { display: grid; grid-template-columns: 150px 1fr; gap: 6px 12px; font-size: 14px; margin: 12px 0; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; }
.drawer-actions { display: flex; gap: 10px; margin-top: 22px; position: sticky; bottom: 0; background: var(--panel); padding: 14px 0 20px; border-top: 1px solid var(--line-2); }
.note { background: var(--amber-dim); color: var(--amber); border-radius: 10px; padding: 10px 12px; font-size: 13px; margin: 14px 0 0; }
.msg { margin-top: 12px; font-size: 14px; padding: 10px 12px; border-radius: 10px; display: none; }
.msg.err { display: block; background: var(--signal-dim); color: #ff8a75; }
.msg.ok { display: block; background: var(--green-dim); color: var(--green); }
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); background: var(--card-hi); border: 1px solid var(--line); color: var(--ink); padding: 10px 16px; border-radius: 10px; font-size: 14px; opacity: 0; pointer-events: none; transition: opacity .2s; z-index: 30; }
.toast.show { opacity: 1; }
.loading { padding: 40px; text-align: center; color: var(--muted); }

@media (max-width: 1100px) {
  .tiles { grid-template-columns: repeat(2, 1fr); }
  .status-tiles { grid-template-columns: repeat(3, 1fr); }
  .span-4, .span-5, .span-6, .span-7, .span-8 { grid-column: span 12; }
  .stack.has-alarm { order: -1; } /* aktiivne kutse telefonis kõige üles */
}
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: fixed; left: 0; top: 0; bottom: 0; width: 264px; z-index: 15; transform: translateX(-100%); transition: transform .2s; }
  .shell.nav-open .side { transform: none; }
  .shell.nav-open .scrim { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 14; }
  .icon-btn.menu-btn { display: grid; }
  .top { padding: 10px 16px; }
  .user-who { display: none; }
  #myBtn { display: none; }
  .content { padding: 16px 16px 48px; }
  .grid2 { grid-template-columns: 1fr; }
  .hbar { grid-template-columns: 100px 1fr 32px; }
  .kv { grid-template-columns: 120px 1fr; }
  .people { grid-template-columns: 1fr; }
}
@media (max-width: 520px) { .tiles { grid-template-columns: 1fr 1fr; gap: 10px; } .tile .v { font-size: 24px; } .status-tiles { grid-template-columns: 1fr 1fr; } .top-actions .live-dot { display: none; } }

@media (max-width: 520px) { .top-actions { display: none; } }

/* Minu andmed */
.me-head { display: flex; align-items: center; gap: 16px; }
.me-head .avatar { width: 56px; height: 56px; font-size: 20px; }
.me-head h2 { margin: 0; font-size: 22px; }
.me-head p { margin: 2px 0 0; color: var(--muted); }
.qlist { list-style: none; padding: 0; margin: 8px 0 0; }
.qlist li { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-top: 1px solid var(--line); font-size: 14px; }
.qlist li:first-child { border-top: 0; }
.me-grid { gap: 16px; margin-top: 16px; }
/* Väljakutse aste (sama mis äpis) */
.lvl { --c: var(--muted); display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 3px 0 9px; border: 1px solid var(--c); border-radius: 20px; background: rgba(255,255,255,.04); color: var(--c); font-size: 10.5px; font-weight: 700; letter-spacing: .06em; white-space: nowrap; vertical-align: middle; }
.lvl b { display: grid; place-items: center; width: 16px; height: 16px; border-radius: 50%; background: var(--c); color: #0A1118; font-size: 10px; font-weight: 900; letter-spacing: 0; }
.lvl1 { --c: #5FB3B8; } .lvl2 { --c: var(--amber); } .lvl3 { --c: #F07A2E; }
.lvl4 { --c: var(--signal); background: var(--signal); color: #fff; }
.lvl4 b { background: #fff; color: var(--signal); }
/* Liikme eemaldamine */
.danger-zone { margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--line); }
.danger-zone h3 { margin-top: 0; }
.btn.danger { background: var(--signal-dim); color: #ff8a75; border-color: transparent; }
.btn.danger:hover:not(:disabled) { background: var(--signal); color: #fff; }
.btn.danger:disabled { opacity: .5; cursor: not-allowed; }
