/* Ontario Lake Maps. Phone first: a full-screen map, a search bar on top, map buttons on the right, a status
   bar at the bottom and panels ("sheets") that slide up. Light colours on purpose: they read best in sunlight. */

:root {
    --ink: #1d2b36;
    --muted: #5d6f7c;
    --line: #e1e7ec;
    --field: #c9d3db;
    --blue: #0b5cab;
    --blue-soft: #e3f0fb;
    --pink: #d6336c;
    --red: #c92a2a;
    --green: #2b8a3e;
    --paper: #ffffff;
    --shadow: 0 2px 10px rgba(16, 38, 56, 0.18);
    --safe-top: env(safe-area-inset-top, 0px);
    --safe-bottom: env(safe-area-inset-bottom, 0px);
    --bar-h: 60px;
    color-scheme: light;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    height: 100%;
    overflow: hidden;
    overscroll-behavior: none;
    font: 15px/1.4 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    color: var(--ink);
    background: #e9f1f6;
    -webkit-tap-highlight-color: transparent;
}

a { color: var(--blue); }
h1 { font-size: 22px; margin: 8px 0 12px; }
h2 { font-size: 18px; }
h3 { font-size: 15px; margin: 16px 0 6px; }
p { margin: 8px 0; }
code { background: #eef2f5; padding: 1px 4px; border-radius: 4px; }
button { font: inherit; color: inherit; cursor: pointer; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.error { color: var(--red); }
.icon { flex: none; display: block; }

/* ---------------------------------------------------------------------------------------------- map page */
.app { position: fixed; inset: 0; }
.map { position: absolute; inset: 0; }

.topbar {
    position: absolute; z-index: 5;
    top: calc(var(--safe-top) + 10px); left: 10px; right: 10px;
    display: flex; gap: 8px;
}

.search {
    flex: 1; min-width: 0; height: 44px; padding: 0 14px;
    display: flex; align-items: center; gap: 8px;
    background: var(--paper); border-radius: 22px; box-shadow: var(--shadow); color: var(--muted);
}
.search input {
    flex: 1; min-width: 0; border: 0; outline: none; background: transparent;
    font-size: 16px; /* 16px stops iPhone from zooming into the field */
    color: var(--ink);
}

.fab {
    width: 44px; height: 44px; flex: none; border: 0; border-radius: 50%;
    display: grid; place-items: center;
    background: var(--paper); box-shadow: var(--shadow); color: #34495a;
}
.fab.on { color: var(--blue); }
.fab.active { background: var(--blue); color: #fff; }

.rightbar {
    position: absolute; z-index: 5; right: 10px; top: calc(var(--safe-top) + 66px);
    display: flex; flex-direction: column; gap: 10px;
}

.banners {
    position: absolute; z-index: 4; top: calc(var(--safe-top) + 66px); left: 10px; right: 64px;
    display: flex; flex-direction: column; align-items: flex-start; gap: 6px; pointer-events: none;
}
.banners > * { pointer-events: auto; }
.banner {
    display: flex; flex-wrap: wrap; align-items: center; gap: 8px; max-width: 100%;
    padding: 8px 12px; border-radius: 12px; background: var(--paper); box-shadow: var(--shadow); font-size: 14px;
}
.banner.warn { background: #fff4e6; }
.banner-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { padding: 4px 12px; border-radius: 16px; background: rgba(255, 255, 255, 0.92); box-shadow: var(--shadow); font-size: 13px; }
.chip.loading::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 6px; border-radius: 50%; background: var(--blue); animation: pulse 1s infinite alternate; }


.bottombar {
    position: absolute; z-index: 5; left: 0; right: 0; bottom: 0;
    min-height: calc(var(--bar-h) + var(--safe-bottom));
    padding: 8px 10px calc(var(--safe-bottom) + 8px);
    display: flex; align-items: center; gap: 8px;
    background: rgba(255, 255, 255, 0.97); box-shadow: 0 -2px 10px rgba(16, 38, 56, 0.12);
}
.unit-btn {
    min-width: 44px; height: 44px; padding: 0 8px; border: 1px solid var(--field); border-radius: 10px;
    background: var(--paper); font-weight: 700; font-size: 16px;
}
.gps-status {
    flex: 1; min-width: 0; display: flex; flex-wrap: wrap; gap: 2px 10px;
    font-size: 14px; font-variant-numeric: tabular-nums;
}
.gps-status .weak { color: #e8590c; }
.gps-status .target { color: var(--blue); font-weight: 600; }
.gps-status .rec { color: var(--pink); font-weight: 600; }
.round-btn {
    width: 44px; height: 44px; flex: none; border-radius: 50%; border: 2px solid var(--pink);
    display: grid; place-items: center; background: var(--paper); color: var(--pink);
}
.round-btn.on { background: var(--pink); color: #fff; animation: pulse 1.2s infinite alternate; }
.mark-btn {
    height: 44px; flex: none; padding: 0 16px; border: 0; border-radius: 22px;
    display: flex; align-items: center; gap: 6px;
    background: var(--pink); color: #fff; font-weight: 600; font-size: 16px;
}

/* MapLibre's scale and credits sit above the status bar. */
.maplibregl-ctrl-bottom-left, .maplibregl-ctrl-bottom-right { bottom: calc(var(--bar-h) + var(--safe-bottom) + 4px); }
.maplibregl-ctrl-attrib { font-size: 11px; }

@keyframes pulse { from { opacity: 1; } to { opacity: 0.55; } }

/* ---------------------------------------------------------------------------------------------- sheets */
.sheet {
    position: absolute; z-index: 10; left: 0; right: 0; bottom: 0;
    max-height: 62vh; max-height: 62dvh;
    display: flex; flex-direction: column;
    background: var(--paper); border-radius: 16px 16px 0 0; box-shadow: 0 -4px 18px rgba(16, 38, 56, 0.22);
    padding-bottom: var(--safe-bottom);
    animation: rise 0.18s ease-out;
}
@keyframes rise { from { transform: translateY(30px); opacity: 0.4; } to { transform: none; opacity: 1; } }

@media (min-width: 768px) {
    .sheet {
        left: 10px; right: auto; bottom: auto; top: calc(var(--safe-top) + 64px); width: 390px;
        max-height: calc(100% - var(--bar-h) - 90px); border-radius: 14px; box-shadow: var(--shadow);
    }
    .topbar { right: auto; width: 390px; }
    .banners { left: 410px; }
}

.sheet-head { display: flex; align-items: center; gap: 2px; padding: 8px 6px 2px 16px; }
.sheet-head h2 { flex: 1; min-width: 0; margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sheet-head .icon-btn:first-child { margin-left: -10px; }
.sheet-body { overflow-y: auto; overscroll-behavior: contain; padding: 4px 16px 16px; -webkit-overflow-scrolling: touch; }

.icon-btn {
    width: 40px; height: 40px; flex: none; border: 0; border-radius: 50%;
    display: grid; place-items: center; background: transparent; color: #34495a;
}
.icon-btn:active { background: #eef2f5; }

.btn {
    min-height: 40px; padding: 0 14px; border: 1px solid var(--field); border-radius: 10px;
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    background: var(--paper); color: var(--ink); font-size: 15px; text-decoration: none;
}
.btn.primary { background: var(--blue); border-color: var(--blue); color: #fff; }
.btn.danger { color: var(--red); }
.btn.small { min-height: 32px; padding: 0 10px; font-size: 13px; }
.btn.wide { width: 100%; }
.btn:disabled { opacity: 0.5; cursor: default; }
.buttons { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 12px 0; }
.file-btn { position: relative; overflow: hidden; }
.file-btn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }

.list { list-style: none; padding: 0; margin: 0; }
.item {
    width: 100%; min-height: 48px; padding: 10px 4px;
    display: flex; align-items: center; gap: 10px;
    border: 0; border-bottom: 1px solid #eef1f4; background: none; text-align: left;
}
.item-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.item-main b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu .item { font-size: 16px; }
.menu .item > span:first-of-type { flex: 1; }
.count { margin-left: auto; color: var(--muted); font-variant-numeric: tabular-nums; }
.badge { flex: none; padding: 2px 8px; border-radius: 10px; background: var(--blue-soft); color: var(--blue); font-size: 12px; }
.track-row { display: flex; align-items: center; border-bottom: 1px solid #eef1f4; }
.track-row .item { border-bottom: 0; }
.track-row.on { background: #f0f6fc; }
.swatch { display: inline-block; flex: none; width: 12px; height: 12px; border-radius: 50%; vertical-align: -1px; }
.card { display: flex; flex-direction: column; gap: 2px; margin: 12px 0; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; }
.card .buttons { margin-bottom: 0; }

.facts { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 15px; }
.note { padding: 10px 12px; border-radius: 10px; background: #fff8e6; font-size: 14px; }
.notes { white-space: pre-wrap; }
.big { margin: 4px 0; font-size: 28px; font-weight: 700; }
.big .muted { font-size: 16px; font-weight: 400; }
.saved { display: inline-flex; align-items: center; gap: 4px; color: var(--green); font-size: 14px; }
.props { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; margin: 8px 0; }
.props dt { color: var(--muted); }
.props dd { margin: 0; }
.counts { list-style: none; padding: 0; margin: 8px 0; display: flex; flex-wrap: wrap; gap: 4px 16px; }

/* forms */
.form { display: flex; flex-direction: column; gap: 12px; }
.form.narrow { max-width: 360px; }
.form label { display: flex; flex-direction: column; gap: 4px; }
.form label > span { font-size: 13px; color: var(--muted); }
.form input, .form textarea, .form select {
    width: 100%; padding: 10px; border: 1px solid var(--field); border-radius: 10px;
    font: inherit; font-size: 16px; background: var(--paper); color: var(--ink);
}
.form textarea { resize: vertical; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.kinds { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; border: 0; }
.kinds legend { margin-bottom: 4px; padding: 0; font-size: 13px; color: var(--muted); }
.kind {
    display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px;
    border: 1px solid var(--field); border-radius: 16px; background: var(--paper); font-size: 14px;
}
.kind.on { border-color: var(--blue); background: var(--blue-soft); }

.settings { display: flex; flex-direction: column; }
.switch-row {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 10px 0; border-bottom: 1px solid #eef1f4;
}
.switch-row > span { display: flex; flex-direction: column; }
input[role="switch"] {
    appearance: none; -webkit-appearance: none; flex: none; position: relative; margin: 0;
    width: 46px; height: 28px; border-radius: 14px; background: #c3ccd3; transition: background 0.15s;
}
input[role="switch"]::after {
    content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%;
    background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25); transition: transform 0.15s;
}
input[role="switch"]:checked { background: var(--blue); }
input[role="switch"]:checked::after { transform: translateX(18px); }

.segmented { display: flex; margin: 8px 0; border: 1px solid var(--field); border-radius: 10px; overflow: hidden; }
.segmented button { flex: 1; min-height: 40px; border: 0; background: var(--paper); }
.segmented button.on { background: var(--blue); color: #fff; font-weight: 600; }

.legend { list-style: none; padding: 0; margin: 4px 0; columns: 2; column-gap: 16px; }
.legend li { display: flex; align-items: center; gap: 8px; padding: 3px 0; font-size: 14px; break-inside: avoid; }
.legend-line { display: inline-block; flex: none; width: 28px; height: 6px; border-radius: 3px; box-shadow: 0 0 0 1px rgba(27, 46, 60, 0.45); }
.legend-fill { display: inline-block; flex: none; width: 28px; height: 16px; border-radius: 3px; border: 1px solid rgba(42, 74, 99, 0.35); }
.launch-key { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; margin-top: 3px; font-size: 13px; color: var(--muted); }
.launch-key .launch-icon:not(:first-child) { margin-left: 6px; }
.launch-icon { flex: none; display: inline-block; vertical-align: middle; }
.launch-head { display: flex; align-items: center; gap: 10px; margin: 2px 0 6px; }

/* depth colour editor */
.presets { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.preset {
    display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 8px 10px;
    border: 1px solid var(--field); border-radius: 10px; background: var(--paper); font-size: 14px; text-align: left;
}
.preset.on { border-color: var(--blue); background: var(--blue-soft); font-weight: 600; }
.preset-strip { display: flex; width: 100%; height: 12px; border-radius: 3px; overflow: hidden; }
.preset-strip i { flex: 1; }
.ranges { list-style: none; padding: 0; margin: 4px 0; }
.ranges li { display: flex; align-items: center; gap: 10px; padding: 6px 0; border-bottom: 1px solid #eef1f4; }
.ranges .colour {
    flex: none; width: 44px; height: 36px; padding: 2px; border: 1px solid var(--field); border-radius: 8px;
    background: var(--paper); cursor: pointer;
}
.ranges .from {
    width: 64px; padding: 8px; border: 1px solid var(--field); border-radius: 8px;
    font: inherit; font-size: 16px; text-align: right; background: var(--paper); color: var(--ink);
}
.ranges .from.fixed { border-color: transparent; color: var(--muted); }
.ranges .to { flex: 1; font-size: 15px; }

/* placing a pin, framing an area: the map with one card of instructions */
.app.in-mode .maplibregl-ctrl-bottom-left, .app.in-mode .maplibregl-ctrl-bottom-right { display: none; }
.mode-card {
    position: absolute; z-index: 10; left: 0; right: 0; bottom: 0;
    padding: 14px 16px calc(var(--safe-bottom) + 14px);
    background: var(--paper); border-radius: 16px 16px 0 0; box-shadow: 0 -4px 18px rgba(16, 38, 56, 0.22);
}
.mode-card h2 { margin: 0 0 4px; }
.mode-card p { margin: 4px 0 8px; }
.mode-card .buttons { margin: 10px 0 0; }
.mode-card .field { display: flex; flex-direction: column; gap: 4px; margin: 8px 0; }
.mode-card .field > span { font-size: 13px; color: var(--muted); }
.mode-card .field input { padding: 9px 10px; border: 1px solid var(--field); border-radius: 10px; font: inherit; font-size: 16px; }
.area-status { font-weight: 600; }
.place-pin {
    position: absolute; z-index: 3; left: 50%; top: 50%; pointer-events: none;
    transform: translate(-50%, -100%); filter: drop-shadow(0 3px 3px rgba(0, 0, 0, 0.35));
}
.place-pin::after {
    content: ""; position: absolute; left: 50%; bottom: -3px; width: 6px; height: 6px; margin-left: -3px;
    border-radius: 50%; background: rgba(0, 0, 0, 0.45);
}
.area-frame {
    position: absolute; z-index: 3; pointer-events: none;
    top: calc(var(--safe-top) + 14px); left: 14px; right: 68px; bottom: 300px;
    border: 3px dashed #ffffff; border-radius: 10px; outline: 2px solid rgba(11, 92, 171, 0.9);
    box-shadow: 0 0 0 4000px rgba(20, 40, 60, 0.3);
}
.check { display: flex; align-items: center; gap: 8px; margin: 8px 0; font-size: 15px; }
.check input { width: 22px; height: 22px; flex: none; }
.btn.grow { flex: 1; }

@media (min-width: 768px) {
    .mode-card { left: 10px; right: auto; bottom: 10px; width: 400px; border-radius: 14px; box-shadow: var(--shadow); }
    .area-frame { left: 430px; right: 70px; bottom: 30px; }
}

/* marks */
.mark-pin { flex: none; display: block; }
.mark-form .where { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; background: #f3f6f9; }
.where-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.kind { min-height: 36px; }
.mark-head { display: flex; gap: 12px; align-items: flex-start; margin: 4px 0 8px; }
.mark-facts { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.actions { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 12px 0 4px; }
.action {
    min-height: 60px; padding: 8px 4px; border: 1px solid var(--field); border-radius: 12px; background: var(--paper);
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; font-size: 13px;
}
.action.primary { background: var(--blue); border-color: var(--blue); color: #fff; }
.action.on { background: var(--blue-soft); border-color: var(--blue); color: var(--blue); }
.action.danger { color: var(--red); }
.chips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 8px 0; }
.chip-btn {
    display: inline-flex; align-items: center; gap: 4px; min-height: 32px; padding: 4px 10px;
    border: 1px solid var(--field); border-radius: 16px; background: var(--paper); font-size: 13px;
}
.chip-btn.on { border-color: var(--blue); background: var(--blue-soft); font-weight: 600; }
.mark-row { display: flex; align-items: center; border-bottom: 1px solid #eef1f4; }
.mark-row .item { border-bottom: 0; }
.mark-row.on { background: #f0f6fc; }
.mark-row .dist { flex: none; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 2px; padding: 12px 8px; }
.empty p { margin: 2px 0; }

/* messages with a button (Undo) */
.toast { display: flex; align-items: center; gap: 12px; }
.toast-action {
    flex: none; padding: 4px 10px; border: 1px solid rgba(255, 255, 255, 0.6); border-radius: 8px;
    background: transparent; color: #fff; font-weight: 700;
}
.gate-card .btn.wide + .btn.wide { margin-top: 8px; }

/* first-run notice */
.gate {
    position: fixed; z-index: 50; inset: 0; padding: 16px;
    display: grid; place-items: center; background: rgba(10, 30, 50, 0.55);
}
.gate-card {
    max-width: 440px; max-height: 90vh; overflow: auto; padding: 20px;
    background: var(--paper); border-radius: 16px; box-shadow: var(--shadow);
}

.toast {
    position: absolute; z-index: 20; left: 50%; transform: translateX(-50%);
    bottom: calc(var(--bar-h) + var(--safe-bottom) + 14px);
    width: max-content; max-width: calc(100% - 32px); padding: 10px 16px;
    border-radius: 12px; background: #1d2b36; color: #fff; font-size: 14px; box-shadow: var(--shadow);
}

/* With a sheet open, messages show at the top so they don't cover its buttons. */
.app:has(.sheet) .toast { bottom: auto; top: calc(var(--safe-top) + 64px); }

/* ---------------------------------------------------------------------------------------------- other pages */
.simple-page { height: 100vh; height: 100dvh; overflow-y: auto; max-width: 760px; margin: 0 auto; padding: calc(var(--safe-top) + 16px) 16px 32px; background: var(--paper); }
.admin .card { display: block; }
.admin .card h2 { margin: 0 0 6px; }
.admin progress { width: 100%; height: 10px; }
.log {
    max-height: 320px; overflow: auto; padding: 10px; border-radius: 8px;
    background: #0f1b24; color: #d7e3ec; font-size: 12px; white-space: pre-wrap;
}

/* guide */
.guide { line-height: 1.5; }
.guide .lead { font-size: 17px; }
.guide h2 { margin: 28px 0 8px; padding-top: 4px; border-top: 1px solid var(--line); }
.guide ul, .guide ol { padding-left: 22px; margin: 8px 0; }
.guide li { margin: 6px 0; }
.guide-toc { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0; }
.guide-toc a { padding: 5px 11px; border: 1px solid var(--field); border-radius: 16px; font-size: 14px; text-decoration: none; }
.guide-card { margin: 10px 0; padding: 4px 14px 8px; border: 1px solid var(--line); border-radius: 12px; }
.guide-card.first { border-color: var(--blue); background: #f5f9fd; }
.guide-card h3 { margin: 10px 0 2px; }
.guide-pins { display: flex; gap: 8px; margin: 8px 0; }
.inline-icon { display: inline-flex; vertical-align: -4px; color: #34495a; }
.inline-icon.rec { color: var(--pink); }
.note.good { background: #ebf7ee; }

/* admin: usage */
.simple-page.usage { max-width: 1100px; }
.usage-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 8px 0; }
.usage-bar select { padding: 7px 8px; border: 1px solid var(--field); border-radius: 8px; font: inherit; background: var(--paper); }
.filter-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 16px; background: var(--blue-soft); font-size: 14px; }
.usage-map { height: 52vh; min-height: 320px; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.usage-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; margin: 8px 0; font-size: 14px; }
.usage-legend label { display: inline-flex; align-items: center; gap: 5px; }
.usage-legend i { display: inline-block; width: 12px; height: 12px; border-radius: 50%; box-sizing: border-box; }
.usage-legend .dot { background: #1c7ed6; }
.usage-legend .ring { border: 2px solid #1c7ed6; }
.usage-legend .target { border: 4px solid #1c7ed6; background: #fff; }
.usage-popup .maplibregl-popup-content { white-space: pre-line; font: 13px/1.35 system-ui, sans-serif; padding: 8px 10px; }
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th, .table td { padding: 7px 8px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.table th { font-size: 12px; color: var(--muted); font-weight: 600; white-space: nowrap; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table tr.on { background: #f0f6fc; }
.row-actions { white-space: nowrap; }

/* Admin: boat launch editor */
.launch-search { flex: 1 1 220px; min-width: 0; padding: 8px 10px; border: 1px solid var(--field); border-radius: 8px; font: inherit; }
.pick-list { margin: 4px 0 8px; padding: 6px 10px; list-style: none; border: 1px solid var(--line); border-radius: 10px; }
.pick-list li { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 4px 0; }
.pick-list .link { display: inline-flex; align-items: center; gap: 6px; text-align: left; }
.launch-edit-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; align-items: start; }
.launch-edit-layout .launch-map { height: 60vh; min-height: 340px; }
@media (min-width: 900px) {
    .launch-edit-layout:has(.launch-form) { grid-template-columns: minmax(0, 1fr) 360px; }
    .launch-edit-layout .launch-form { position: sticky; top: 8px; max-height: calc(100vh - 16px); overflow-y: auto; }
}
.launch-form { margin: 0; gap: 8px; }
.launch-form-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.launch-form-head b { flex: 1; min-width: 0; }
.launch-form .form { gap: 10px; }
.launch-form .segmented { margin: 4px 0 0; }
.launch-form .segmented button { min-height: 34px; font-size: 14px; }
.choice-label { font-size: 13px; color: var(--muted); }
.form label > .inline-field { display: flex; gap: 8px; align-items: center; font-size: inherit; color: inherit; }
.inline-field input { flex: 1; min-width: 0; }
.original { font-size: 14px; }
.original summary { cursor: pointer; color: var(--blue); }
.state-badge { flex: none; padding: 2px 8px; border-radius: 10px; font-size: 12px; background: #eef1f4; color: var(--muted); white-space: nowrap; }
.state-badge.edited { background: #e3f0fb; color: #1c7ed6; }
.state-badge.added { background: #efeafd; color: #7048e8; }
.state-badge.deleted { background: #fdecec; color: var(--red); }
.usage-legend > span { display: inline-flex; align-items: center; gap: 5px; }
.row-actions .btn { margin: 0 2px 2px 0; }
button.link { padding: 0; border: 0; background: none; color: var(--blue); text-decoration: underline; font: inherit; text-align: left; }

#blazor-error-ui {
    display: none; position: fixed; z-index: 1000; left: 0; right: 0; bottom: 0;
    padding: 10px 40px 10px 16px; background: #fff3bf; box-shadow: 0 -1px 4px rgba(0, 0, 0, 0.2);
}
#blazor-error-ui .dismiss { position: absolute; right: 12px; top: 8px; cursor: pointer; }
