/* Terrasis Drive console */
:root {
  --accent: #0f766e;
  --accent-2: #14b8a6;
  --accent-ink: #ffffff;
  --accent-soft: #ccfbf1;
  --bg: #f4f7f6;
  --panel: #ffffff;
  --panel-2: #f8faf9;
  --text: #0f1f1c;
  --muted: #5b6b68;
  --border: #dfe7e5;
  --danger: #dc2626;
  --warn: #d97706;
  --ok: #16a34a;
  --shadow: 0 1px 2px rgba(15, 31, 28, .06), 0 4px 16px rgba(15, 31, 28, .06);
  --radius: 10px;
  --topbar: 56px;
  --sidebar: 232px;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --accent: #2dd4bf; --accent-2: #14b8a6; --accent-ink: #042f2e; --accent-soft: #134e4a;
    --bg: #0b1413; --panel: #111d1b; --panel-2: #152422; --text: #e3efec; --muted: #8ea6a1;
    --border: #22403b; --shadow: 0 1px 2px rgba(0,0,0,.4), 0 4px 16px rgba(0,0,0,.3);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --accent: #2dd4bf; --accent-2: #14b8a6; --accent-ink: #042f2e; --accent-soft: #134e4a;
  --bg: #0b1413; --panel: #111d1b; --panel-2: #152422; --text: #e3efec; --muted: #8ea6a1;
  --border: #22403b; --shadow: 0 1px 2px rgba(0,0,0,.4), 0 4px 16px rgba(0,0,0,.3);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 14px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased; overflow: hidden;
}
a { color: var(--accent); }
h1, h2, h3, h4 { margin: 0 0 .5rem; line-height: 1.2; }
h2 { font-size: 1.25rem; } h3 { font-size: 1.05rem; }
.muted { color: var(--muted); } .small { font-size: 12px; }
.mono { font-family: var(--mono); }
.spacer { flex: 1; }
.hidden { display: none !important; }

/* ---------- shell ---------- */
.topbar {
  position: fixed; inset: 0 0 auto 0; height: var(--topbar); z-index: 1100;
  display: flex; align-items: center; gap: 8px; padding: 0 12px;
  background: var(--panel); border-bottom: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); font-size: 17px; }
.brand-mark { color: var(--accent); display: flex; }
.brand-text b { color: var(--accent); }
.sidebar {
  position: fixed; top: var(--topbar); bottom: 0; left: 0; width: var(--sidebar); z-index: 1050;
  background: var(--panel); border-right: 1px solid var(--border);
  display: flex; flex-direction: column; justify-content: space-between; padding: 10px 8px;
  transition: transform .2s ease;
}
.nav-item {
  display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 8px;
  color: var(--text); text-decoration: none; font-weight: 500; margin-bottom: 2px;
}
.nav-item:hover { background: var(--panel-2); }
.nav-item.active { background: var(--accent-soft); color: var(--accent); }
.nav-ico { display: flex; opacity: .9; }
.user-box { border-top: 1px solid var(--border); padding: 10px 8px 4px; display: flex; flex-direction: column; gap: 4px; }
.user-email { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-box .btn { align-self: flex-start; margin-top: 4px; }
.view { position: fixed; top: var(--topbar); left: var(--sidebar); right: 0; bottom: 0; overflow: auto; outline: none; }
.menu-btn { display: none; }
.nav-scrim { display: none; }

body.logged-out .sidebar, body.logged-out .menu-btn { display: none; }
body.logged-out .view { left: 0; }

@media (max-width: 860px) {
  .menu-btn { display: inline-flex; }
  .sidebar { transform: translateX(-100%); box-shadow: var(--shadow); }
  body.nav-open .sidebar { transform: none; }
  body.nav-open .nav-scrim { display: block; position: fixed; inset: var(--topbar) 0 0 0; background: rgba(0,0,0,.35); z-index: 1040; }
  .view { left: 0; }
  .brand-text { font-size: 15px; }
}

/* ---------- controls ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 7px 14px; border-radius: 8px; border: 1px solid var(--border);
  background: var(--panel); color: var(--text); font: inherit; font-weight: 500; cursor: pointer;
  white-space: nowrap; min-height: 34px;
}
.btn:hover { border-color: var(--accent); }
.btn:disabled { opacity: .55; cursor: default; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn.ghost { background: transparent; }
.btn.small { padding: 3px 10px; min-height: 28px; font-size: 13px; }
.btn.active { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.btn-group { display: inline-flex; }
.btn-group .btn { border-radius: 0; margin-left: -1px; }
.btn-group .btn:first-child { border-radius: 8px 0 0 8px; margin-left: 0; }
.btn-group .btn:last-child { border-radius: 0 8px 8px 0; }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px;
  border: 0; border-radius: 8px; background: transparent; color: var(--text); cursor: pointer; font-size: 20px;
}
.icon-btn:hover { background: var(--panel-2); }
input, select, textarea {
  font: inherit; color: var(--text); background: var(--panel); border: 1px solid var(--border);
  border-radius: 8px; padding: 7px 10px; min-height: 34px; max-width: 100%;
}
input:focus, select:focus, textarea:focus, .btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
input[type="checkbox"] { min-height: 0; accent-color: var(--accent); }
input[type="range"] { accent-color: var(--accent); padding: 0; border: 0; background: transparent; }
.field { display: flex; flex-direction: column; gap: 4px; margin-bottom: 12px; }
.field-label { font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; }
.field-hint { font-size: 12px; color: var(--muted); }
.form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 0 16px; }

.toolbar { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; margin-bottom: 14px; }
.toolbar .field { margin-bottom: 0; }

/* ---------- cards / tables ---------- */
.page-pad { padding: 20px; max-width: 1400px; }
.page-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.page-head h2 { margin: 0; }
.card { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.card + .card { margin-top: 16px; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.cards .card + .card { margin-top: 0; }
.error-card { max-width: 520px; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin-bottom: 16px; }
.kpi { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 14px; }
.kpi-v { font-size: 22px; font-weight: 700; }
.kpi-l { font-size: 12px; color: var(--muted); }
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--panel); }
table.tbl { width: 100%; border-collapse: collapse; }
.tbl th, .tbl td { padding: 9px 12px; text-align: left; border-bottom: 1px solid var(--border); white-space: nowrap; }
.tbl th { font-size: 12px; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); background: var(--panel-2); position: sticky; top: 0; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr.clickable { cursor: pointer; }
.tbl tbody tr.clickable:hover { background: var(--panel-2); }
.tbl td.num, .tbl th.num { text-align: right; font-variant-numeric: tabular-nums; }
.pager { display: flex; align-items: center; gap: 10px; justify-content: flex-end; padding: 10px 0; }
.badge { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--panel-2); border: 1px solid var(--border); }
.badge.good { background: #dcfce7; color: #166534; border-color: #bbf7d0; }
.badge.fair { background: #fef9c3; color: #854d0e; border-color: #fde68a; }
.badge.poor { background: #ffedd5; color: #9a3412; border-color: #fed7aa; }
.badge.bad { background: #fee2e2; color: #991b1b; border-color: #fecaca; }
.badge.accent { background: var(--accent-soft); color: var(--accent); border-color: transparent; }
.chips { display: flex; flex-wrap: wrap; gap: 4px; }
.chip { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; padding: 1px 7px; border-radius: 999px; color: #fff; }

.skeleton-wrap { padding: 20px; display: flex; flex-direction: column; gap: 12px; }
.skeleton { height: 16px; border-radius: 6px; background: linear-gradient(90deg, var(--panel-2), var(--border), var(--panel-2)); background-size: 200% 100%; animation: sk 1.2s infinite linear; }
@keyframes sk { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.empty { padding: 32px 16px; text-align: center; }
.empty-title { font-weight: 600; margin-bottom: 4px; }

/* ---------- toasts / modal ---------- */
.toasts { position: fixed; right: 16px; bottom: 16px; z-index: 3000; display: flex; flex-direction: column; gap: 8px; max-width: min(420px, calc(100vw - 32px)); }
.toast { display: flex; align-items: flex-start; gap: 8px; padding: 10px 12px; border-radius: 8px; background: var(--panel); color: var(--text); border: 1px solid var(--border); border-left: 4px solid var(--accent); box-shadow: var(--shadow); transition: opacity .3s, transform .3s; }
.toast span { flex: 1; word-break: break-word; }
.toast.out { opacity: 0; transform: translateY(8px); }
.toast-error { border-left-color: var(--danger); }
.toast-warn { border-left-color: var(--warn); }
.toast-success { border-left-color: var(--ok); }
.toast-x { border: 0; background: none; color: var(--muted); cursor: pointer; font-size: 18px; line-height: 1; }
.modal-back { position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 2500; display: flex; align-items: center; justify-content: center; padding: 16px; }
.modal { background: var(--panel); border-radius: 12px; width: min(520px, 100%); max-height: calc(100vh - 32px); display: flex; flex-direction: column; box-shadow: 0 20px 60px rgba(0,0,0,.35); border: 1px solid var(--border); }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.modal-head h3 { margin: 0; }
.modal-body { padding: 16px; overflow: auto; }
.modal-body .field input, .modal-body .field select { width: 100%; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--border); }

/* ---------- login ---------- */
.login-wrap { min-height: 100%; display: flex; align-items: center; justify-content: center; padding: 24px 16px;
  background: radial-gradient(1200px 600px at 10% -10%, rgba(20,184,166,.18), transparent 60%), radial-gradient(900px 500px at 110% 110%, rgba(15,118,110,.18), transparent 60%); }
.login-card { width: min(400px, 100%); }
.login-card h2 { font-size: 1.4rem; }
.login-card .field input { width: 100%; }
.login-card .btn.primary { width: 100%; margin-top: 4px; min-height: 40px; }
.otp-boxes { display: flex; gap: 8px; justify-content: space-between; margin: 8px 0 16px; }
.otp-boxes input { width: 100%; max-width: 52px; height: 54px; text-align: center; font-size: 22px; font-weight: 700; font-family: var(--mono); padding: 0; }
.dev-hint { margin: 8px 0; padding: 8px 10px; border-radius: 8px; background: var(--accent-soft); color: var(--accent); font-size: 13px; cursor: pointer; }
.login-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; font-size: 13px; }
.linkish { background: none; border: 0; color: var(--accent); cursor: pointer; font: inherit; padding: 0; }
.linkish:disabled { color: var(--muted); cursor: default; }

/* ---------- map pages ---------- */
.map-page { position: absolute; inset: 0; display: grid; grid-template-columns: 1fr 340px; }
.map-page.left { grid-template-columns: 340px 1fr; }
.map-box { position: relative; min-height: 0; min-width: 0; }
.map-box .leaflet-container, .map-fill { position: absolute; inset: 0; }
.side { background: var(--panel); border-left: 1px solid var(--border); display: flex; flex-direction: column; min-height: 0; min-width: 0; }
.map-page.left .side { border-left: 0; border-right: 1px solid var(--border); }
.side-head { padding: 12px 14px; border-bottom: 1px solid var(--border); display: flex; flex-direction: column; gap: 8px; }
.side-head h3 { margin: 0; }
.side-body { flex: 1; overflow: auto; min-height: 0; }
.list-item { padding: 10px 14px; border-bottom: 1px solid var(--border); cursor: pointer; display: flex; gap: 10px; align-items: center; }
.list-item:hover { background: var(--panel-2); }
.list-item.selected { background: var(--accent-soft); }
.list-main { flex: 1; min-width: 0; }
.list-title { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.map-error { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: var(--muted); padding: 20px; text-align: center; }
.map-overlay { position: absolute; z-index: 800; left: 50%; top: 10px; transform: translateX(-50%); background: var(--panel); color: var(--text); padding: 6px 12px; border-radius: 999px; box-shadow: var(--shadow); font-size: 13px; border: 1px solid var(--border); }
@media (max-width: 860px) {
  .map-page, .map-page.left { grid-template-columns: 1fr; grid-template-rows: 55% 45%; }
  .map-page.left .side { order: 2; border-right: 0; border-top: 1px solid var(--border); }
  .side { border-left: 0; border-top: 1px solid var(--border); }
}

.leaflet-container { font: inherit; background: var(--panel-2); }
:root[data-theme="dark"] .osm-tiles { filter: invert(1) hue-rotate(180deg) brightness(.9) contrast(.9) saturate(.6); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .osm-tiles { filter: invert(1) hue-rotate(180deg) brightness(.9) contrast(.9) saturate(.6); } }
.leaflet-popup-content-wrapper, .leaflet-popup-tip { background: var(--panel); color: var(--text); }
.leaflet-control-layers, .leaflet-bar a { background: var(--panel); color: var(--text); border-color: var(--border) !important; }
.veh-divicon, .evt-divicon, .pin-divicon { background: none; border: 0; }
.veh-icon { position: relative; filter: drop-shadow(0 1px 2px rgba(0,0,0,.45)); }
.veh-icon svg { transition: transform .4s linear; display: block; }
.veh-icon.selected svg circle { stroke: #fde047; stroke-width: 3.5; }
.veh-label { position: absolute; left: 50%; top: 100%; transform: translateX(-50%); white-space: nowrap; font-size: 11px; font-weight: 600; background: rgba(15,31,28,.82); color: #fff; padding: 0 5px; border-radius: 4px; margin-top: 2px; }
.evt-icon { width: 22px; height: 22px; border-radius: 50%; color: #fff; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 800; border: 2px solid #fff; box-shadow: 0 1px 3px rgba(0,0,0,.4); }
.evt-icon.active { transform: scale(1.35); box-shadow: 0 0 0 3px rgba(253,224,71,.8); }
.pin { width: 26px; height: 26px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); display: flex; align-items: center; justify-content: center; border: 2px solid #fff; box-shadow: 0 1px 3px rgba(0,0,0,.4); }
.pin span { transform: rotate(45deg); color: #fff; font-weight: 800; font-size: 12px; }
.cluster-icon { background: none; border: 0; }
.cluster { border-radius: 50%; color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 12px; border: 2px solid rgba(255,255,255,.9); box-shadow: 0 1px 4px rgba(0,0,0,.35); }
.map-legend { background: var(--panel); color: var(--text); padding: 8px 10px; border-radius: 8px; box-shadow: var(--shadow); font-size: 12px; border: 1px solid var(--border); }
.legend-title { font-weight: 700; margin-bottom: 4px; }
.legend-row { display: flex; align-items: center; gap: 6px; line-height: 1.6; }
.legend-sw { width: 14px; height: 8px; border-radius: 2px; display: inline-block; }

/* ---------- playback ---------- */
.pb { position: absolute; inset: 0; display: grid; grid-template-columns: minmax(0, 1fr) 320px; grid-template-rows: minmax(0, 1fr) auto; }
.pb-main { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); min-height: 0; }
.pb-video { position: relative; background: #000; min-height: 0; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.pb-video video.main { width: 100%; height: 100%; object-fit: contain; background: #000; }
.pb-video video.pip { position: absolute; right: 10px; bottom: 10px; width: 32%; max-width: 260px; aspect-ratio: 16/9; object-fit: cover; border: 2px solid #fff; border-radius: 6px; background: #000; cursor: pointer; box-shadow: 0 2px 10px rgba(0,0,0,.5); z-index: 3; }
.pb-novideo { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; color: #cbd5e1; gap: 6px; text-align: center; padding: 16px; background: repeating-linear-gradient(45deg, #0b1413, #0b1413 10px, #0f1b19 10px, #0f1b19 20px); z-index: 2; }
.pb-novideo .big { font-size: 28px; font-weight: 700; font-family: var(--mono); color: #fff; }
.pb-vtag { position: absolute; left: 10px; top: 10px; z-index: 4; background: rgba(0,0,0,.6); color: #fff; border-radius: 6px; padding: 2px 8px; font-size: 12px; font-family: var(--mono); }
.pb-map { position: relative; min-height: 0; }
.pb-side { grid-row: 1 / span 2; grid-column: 2; background: var(--panel); border-left: 1px solid var(--border); display: flex; flex-direction: column; min-height: 0; }
.pb-bottom { grid-column: 1; background: var(--panel); border-top: 1px solid var(--border); padding: 8px 12px 10px; }
.pb-controls { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pb-time { font-family: var(--mono); font-size: 13px; min-width: 150px; }
.pb-scrub { position: relative; margin: 8px 0 4px; height: 26px; }
.pb-scrub input { position: absolute; inset: 0; width: 100%; z-index: 2; margin: 0; height: 26px; }
.pb-cover { position: absolute; left: 0; right: 0; top: 18px; height: 5px; z-index: 1; border-radius: 3px; background: var(--border); overflow: hidden; }
.pb-cover span { position: absolute; top: 0; bottom: 0; background: var(--accent-2); opacity: .8; }
.pb-cover span.front { background: #a78bfa; top: 2px; }
.pb-ticks span { position: absolute; top: 2px; width: 2px; height: 10px; z-index: 1; border-radius: 1px; }
.pb-chart { width: 100%; height: 120px; display: block; cursor: crosshair; }
.pb-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 12px 14px; border-bottom: 1px solid var(--border); }
.pb-stats .kpi { padding: 6px 8px; }
.pb-stats .kpi-v { font-size: 15px; }
.evt-row { display: flex; gap: 10px; padding: 8px 14px; border-bottom: 1px solid var(--border); cursor: pointer; align-items: center; }
.evt-row:hover { background: var(--panel-2); }
.evt-row.current { background: var(--accent-soft); }
.evt-row .evt-icon { flex: none; }
.kbd { font-family: var(--mono); font-size: 11px; border: 1px solid var(--border); border-radius: 4px; padding: 0 4px; background: var(--panel-2); }
@media (max-width: 1100px) {
  .pb { position: static; display: block; }
  .pb-main { grid-template-columns: 1fr; }
  .pb-video { aspect-ratio: 16/9; }
  .pb-map { height: 46vh; }
  .pb-side { border-left: 0; border-top: 1px solid var(--border); max-height: none; }
}

/* ---------- timeline ---------- */
.tl { position: relative; padding: 8px 14px 16px 14px; }
.tl-item { position: relative; padding: 10px 10px 10px 34px; border-radius: 8px; cursor: pointer; }
.tl-item:hover, .tl-item.selected { background: var(--panel-2); }
.tl-item::before { content: ""; position: absolute; left: 15px; top: 0; bottom: 0; width: 2px; background: var(--border); }
.tl-item:first-child::before { top: 18px; } .tl-item:last-child::before { bottom: calc(100% - 18px); }
.tl-dot { position: absolute; left: 9px; top: 13px; width: 14px; height: 14px; border-radius: 50%; border: 3px solid var(--panel); box-shadow: 0 0 0 2px var(--accent); background: var(--accent); }
.tl-item.stop .tl-dot { background: var(--panel); box-shadow: 0 0 0 2px var(--muted); border-radius: 3px; }
.tl-time { font-size: 12px; color: var(--muted); font-family: var(--mono); }
.tl-title { font-weight: 600; }

/* ---------- geofence ---------- */
.gf-form { padding: 12px 14px; border-bottom: 1px solid var(--border); background: var(--panel-2); }
.gf-form .field input, .gf-form .field select { width: 100%; }
.drawing-hint { font-size: 13px; color: var(--accent); margin-bottom: 8px; }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 16px; overflow-x: auto; }
.tab { padding: 9px 14px; border: 0; background: none; color: var(--muted); font: inherit; font-weight: 600; cursor: pointer; border-bottom: 2px solid transparent; white-space: nowrap; }
.tab.active { color: var(--accent); border-bottom-color: var(--accent); }
.hbar { display: flex; align-items: center; gap: 8px; margin: 6px 0; }
.hbar-label { width: 110px; font-size: 13px; flex: none; }
.hbar-track { flex: 1; height: 14px; background: var(--panel-2); border-radius: 4px; overflow: hidden; }
.hbar-fill { height: 100%; border-radius: 4px; }
.hbar-v { width: 44px; text-align: right; font-variant-numeric: tabular-nums; font-size: 13px; }
canvas.chart { width: 100%; height: 240px; display: block; }
@media (max-width: 600px) {
  .page-pad { padding: 12px; }
  .toolbar > * { flex: 1 1 140px; }
}

/* ---------- public download page ---------- */
.dl-body { overflow: auto; }
.dl-card { width: min(520px, 100%); }
.dl-head { display: flex; gap: 14px; align-items: center; margin-bottom: 16px; }
.dl-head h2 { margin: 0; }
.dl-btn { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 48px; font-size: 16px; text-decoration: none; margin: 4px 0 14px; }
.dl-meta { display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; margin: 0 0 16px; font-size: 13px; }
.dl-meta dt { color: var(--muted); }
.dl-meta dd { margin: 0; min-width: 0; }
.dl-sha { font-size: 11px; word-break: break-all; }
.dl-steps { padding-left: 20px; margin: 0 0 10px; }
.dl-steps li { margin-bottom: 6px; }
.dl-card h3 { margin-top: 14px; }
.login-app { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border); font-size: 13px; text-decoration: none; }

/* ---------- admin: app health ---------- */
.health-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin-bottom: 8px; }
.health-tiles .card + .card { margin-top: 0; }
.health-tile { border-left: 4px solid var(--border); }
.health-tile.ok { border-left-color: var(--ok); }
.health-tile.warn { border-left-color: var(--warn); }
.health-tile.bad { border-left-color: var(--danger); }
.health-big { font-size: 26px; font-weight: 700; margin: 4px 0; }
.section-title { margin: 18px 0 8px; }
.report-stack { max-height: 50vh; overflow: auto; white-space: pre-wrap; word-break: break-word; background: var(--panel-2); padding: 10px; border-radius: 8px; border: 1px solid var(--border); }
