/* Xplorate brand: red X (#ED2024), black type, white space, deep navy from the aerial imagery */
:root {
    --brand-red: #ed2024;
    --brand-red-hover: #c9161b;
    --brand-navy: #071a3d;

    --bg: #f5f6f8;
    --panel: #ffffff;
    --text: #0b0b0c;
    --muted: #61656d;
    --border: #e4e6ea;
    --accent: var(--brand-red);
    --accent-hover: var(--brand-red-hover);
    --accent-soft: #fdecec;
    --focus: #1d6fd1;
    --link: #0b3a75;
    --danger: #b42318;
    --success: #15803d;
    --warning: #b45309;
    --climb: #16a34a;
    --descent: #2563eb;
    --radius: 8px;
    --modal-backdrop: rgba(17, 24, 39, 0.45);
    --disabled-opacity: 0.5;
    --sidebar-width: clamp(400px, 30vw, 480px);
    color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }

html, body {
    height: 100%;
    margin: 0;
}

body {
    font: 14px/1.45 "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
    -webkit-font-smoothing: antialiased;
    color: var(--text);
    background: var(--bg);
}

h1:focus { outline: none; }

.visually-hidden {
    position: absolute !important;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0, 0, 0, 0);
    white-space: nowrap; border: 0;
}

/* ---------- Layout ---------- */

.app-shell {
    display: flex;
    flex-direction: column;
    height: 100vh;
    height: 100dvh;
}

.app-body {
    flex: 1;
    min-height: 0;
    overflow: auto;
}

.planner {
    display: grid;
    grid-template-columns: var(--sidebar-width) 1fr;
    height: 100%;
}

/* The panels scroll above the footer, which has its own space: nothing is ever hidden under it */
.sidebar {
    display: flex;
    flex-direction: column;
    min-height: 0;
    background: var(--panel);
    border-right: 1px solid var(--border);
    overflow: hidden;
}

.sidebar-scroll {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
}

.sidebar-footer {
    flex-shrink: 0;
    padding: 12px 20px;
    background: var(--panel);
    border-top: 1px solid var(--border);
}

/* ---------- Slide to confirm ---------- */

.slide-confirm {
    --thumb: 36px;
    --thumb-face: var(--danger) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14M13 6l6 6-6 6'/%3E%3C/svg%3E") center / 18px no-repeat;
    position: relative;
    height: calc(var(--thumb) + 4px);
    border: 1px solid var(--border);
    border-radius: 999px;
    /* Fills pale red up to the thumb's centre (--slide 0–1) */
    background: linear-gradient(to right, var(--accent-soft) calc((100% - var(--thumb)) * var(--slide) + var(--thumb) / 2), var(--bg) 0);
    user-select: none;
}

.slide-confirm-label {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    padding-left: var(--thumb);
    color: var(--danger);
    font-size: 13px;
    font-weight: 600;
    pointer-events: none;
}

.slide-confirm input {
    position: absolute;
    inset: 1px;
    width: calc(100% - 2px);
    margin: 0;
    appearance: none;
    background: transparent;
    cursor: grab;
}
.slide-confirm input:active { cursor: grabbing; }
.slide-confirm input:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 999px; }

.slide-confirm input::-webkit-slider-thumb {
    appearance: none;
    width: var(--thumb);
    height: var(--thumb);
    border-radius: 50%;
    background: var(--thumb-face);
    box-shadow: 0 1px 3px rgb(0 0 0 / 0.25);
}
.slide-confirm input::-moz-range-thumb {
    width: var(--thumb);
    height: var(--thumb);
    border: none;
    border-radius: 50%;
    background: var(--thumb-face);
    box-shadow: 0 1px 3px rgb(0 0 0 / 0.25);
}

.slide-confirm.is-disabled { opacity: var(--disabled-opacity); }
.slide-confirm.is-disabled input { cursor: not-allowed; }

.map-area {
    position: relative;
    min-height: 0;
}

.planner-map {
    position: absolute;
    inset: 0;
    background: #dfe4e8;
}

@media (max-width: 820px) {
    .app-shell { height: auto; }
    .planner {
        grid-template-columns: 1fr;
        grid-template-rows: 55dvh auto;
        height: auto;
    }
    .map-area { order: -1; min-height: 55dvh; }
    .sidebar { border-right: none; border-top: 1px solid var(--border); overflow: visible; }
    .sidebar-scroll { overflow: visible; }
}

/* ---------- Sidebar content ---------- */

.panel {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
}

.panel h2 {
    margin: 0 0 12px;
    font-size: 12px;
    font-weight: 650;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--muted);
}

.hint {
    margin: 6px 0 10px;
    color: var(--muted);
    font-size: 12.5px;
}

.hint.is-error { color: var(--danger); }

.map-pack-progress {
    display: block;
    width: 100%;
    margin-top: 10px;
    accent-color: var(--accent);
}

/* A checkbox that expands its options underneath */
.option-group {
    margin-top: 4px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}

.check {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    font-size: 13px;
    font-weight: 550;
    cursor: pointer;
}

.check input {
    width: 16px;
    height: 16px;
    margin: 0;
    accent-color: var(--accent);
}

.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 12px;
}

/* ---------- Form fields ---------- */

.field {
    display: block;
    margin-bottom: 10px;
}

.field-label {
    display: block;
    margin-bottom: 4px;
    font-size: 12.5px;
    font-weight: 550;
}

.field-input {
    display: flex;
    align-items: center;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: #fff;
}

.field-input:focus-within { border-color: var(--focus); box-shadow: 0 0 0 3px rgba(29, 111, 209, 0.15); }

.field-input input {
    flex: 1;
    min-width: 0;
    width: 100%; /* fill the field, not the browser's default number-input width */
    border: none;
    background: transparent;
    padding: 7px 8px;
    font: inherit;
}

.field-input input:focus { outline: none; }

.field-unit {
    padding: 0 8px;
    color: var(--muted);
    font-size: 12px;
    white-space: nowrap;
}

.field > input[type=text], .field > select {
    width: 100%;
    padding: 7px 8px;
    font: inherit;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: #fff;
}

.field > input[type=text]:focus, .field > select:focus {
    outline: none;
    border-color: var(--focus);
    box-shadow: 0 0 0 3px rgba(29, 111, 209, 0.15);
}

input:disabled, select:disabled { color: var(--muted); background: #f6f7f8; }
.field-input:has(input:disabled) { background: #f6f7f8; }

/* ---------- Buttons ---------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 14px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: #fff;
    color: var(--text);
    font: inherit;
    font-weight: 550;
    cursor: pointer;
}

a.btn { text-decoration: none; }
.btn:hover:not(:disabled):not(.disabled) { background: #f5f7f9; }
.btn:focus-visible, .seg:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.btn:disabled, .btn.disabled { opacity: var(--disabled-opacity); cursor: not-allowed; }

.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-primary:hover:not(:disabled):not(.disabled) { background: var(--accent-hover); }

.btn-danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-danger:hover:not(:disabled):not(.disabled) { background: #912018; }

.btn-block { width: 100%; margin-bottom: 8px; }

/* Draw the eye (3 pulses, then still): a freshly generated mission's downloads, or a placemark slot that needs a file */
.downloads, .slot-anchor { scroll-margin-block: 24px; }
.downloads:focus, .slot-anchor:focus { outline: none; }
.downloads .btn, .attention .upload { animation: download-pulse 1.2s ease-out 3; }
@keyframes download-pulse {
    0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--focus) 55%, transparent); border-color: var(--focus); }
    100% { box-shadow: 0 0 0 10px color-mix(in srgb, var(--focus) 0%, transparent); }
}
@media (prefers-reduced-motion: reduce) {
    .downloads .btn, .attention .upload { animation: none; }
}
.btn-small { padding: 4px 10px; font-size: 12.5px; }

.btn-link {
    border: none;
    background: none;
    padding: 4px 0;
    color: var(--link);
    font-weight: 500;
}

.btn-link:hover { background: none !important; text-decoration: underline; }

/* ---------- Uploads ---------- */

.upload {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    margin-bottom: 8px;
    border: 1px dashed var(--border);
    border-radius: var(--radius);
}

.upload.is-loaded { border-style: solid; background: #f6fbf8; border-color: #cfe8d8; }
.upload.is-disabled { opacity: var(--disabled-opacity); }

.upload-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.upload-label { font-weight: 550; font-size: 13px; }
.upload-file { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.upload.is-loaded .upload-file { color: var(--success); }
.upload-error { color: var(--danger); font-size: 12px; }
.upload-btn { flex-shrink: 0; }

/* ---------- Drawing ---------- */

.segmented {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 1fr; /* equal buttons filling the row, however many there are */
    border: 1px solid var(--border);
    border-radius: 6px;
    overflow: hidden;
}

.seg {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 7px 4px;
    border: none;
    border-right: 1px solid var(--border);
    background: #fff;
    font: inherit;
    font-weight: 550;
    cursor: pointer;
}

.seg:last-child { border-right: none; }
.seg:hover { background: #f5f7f9; }
.seg-active, .seg-active:hover { background: var(--accent); color: #fff; }

.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.dot-climb { background: var(--climb); }
.dot-descent { background: var(--descent); }
.seg-active .dot { box-shadow: 0 0 0 2px #fff; }

.leg-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 6px 0;
    font-size: 13px;
}

.leg-summary div { color: var(--muted); }
.leg-actions { display: flex; gap: 6px; flex-shrink: 0; }

/* Shown at the top of the map while drawing a leg, so the way back to panning is always visible */
.drawing-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 10px 8px 12px;
    background: #fff;
    border-radius: var(--radius);
    border-left: 4px solid var(--success);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
    font-size: 13px;
    /* The notices layer lets clicks through to the map; the banner must catch them, or
       clicking Done would also drop a point on the map behind it */
    pointer-events: auto;
}
.drawing-banner.drawing-arrival { border-left-color: var(--danger); }
.drawing-done { flex-shrink: 0; animation: download-pulse 1.6s ease-out infinite; }
@media (prefers-reduced-motion: reduce) {
    .drawing-done { animation: none; }
}
.leg-summary strong { color: var(--text); font-weight: 600; }

/* ---------- Results ---------- */

.metrics {
    margin: 14px 0 8px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.metrics div {
    padding: 8px 10px;
    background: var(--bg);
    border-radius: 6px;
}

.metrics dt { font-size: 11.5px; color: var(--muted); }
.metrics dd { margin: 2px 0 0; font-size: 15px; font-weight: 650; font-variant-numeric: tabular-nums; }

/* ---------- Notices ---------- */

.notices {
    position: absolute;
    top: 12px;
    left: 50%;
    transform: translateX(-50%);
    width: min(520px, calc(100% - 120px));
    z-index: 1100;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
}

.notice {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 10px 12px;
    background: #fff;
    border-radius: var(--radius);
    border-left: 4px solid var(--brand-navy);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
    pointer-events: auto;
    white-space: pre-line;
}

.notice-error { border-left-color: var(--danger); }
.notice-warning { border-left-color: var(--warning); }
.notice-success { border-left-color: var(--success); }

.notice-body { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.notice-action { align-self: flex-start; margin-top: 6px; }

.readonly-value { display: block; font-size: 15px; font-weight: 600; padding: 4px 0 0; }

/* Flight-plan waypoints used against the weGCS limit, bottom-centre of the map */
.waypoint-meter {
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    display: flex;
    align-items: baseline;
    gap: 8px;
    padding: 6px 12px;
    background: #fff;
    border-radius: var(--radius);
    border-left: 4px solid var(--success);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    font-size: 13px;
    white-space: nowrap;
    pointer-events: auto;
}
.waypoint-meter strong { font-size: 15px; }
.waypoint-meter-left, .waypoint-meter-sep { color: var(--muted); }
.waypoint-meter-long { color: var(--warning); font-weight: 600; }
.waypoint-meter .btn { align-self: center; margin-left: 4px; }
.waypoint-meter.is-tight { border-left-color: var(--warning); }
.waypoint-meter.is-over { border-left-color: var(--danger); }
.waypoint-meter.is-over .waypoint-meter-left { color: var(--danger); font-weight: 600; }
.notice-close {
    border: none; background: none; cursor: pointer;
    font-size: 18px; line-height: 1; color: var(--muted); padding: 0 2px;
}

/* ---------- Modal ---------- */

.modal-backdrop {
    position: fixed;
    inset: 0;
    background: var(--modal-backdrop);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    z-index: 2000;
}

.modal {
    background: #fff;
    border-radius: 10px;
    padding: 20px 22px;
    width: min(460px, 100%);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
}

/* The same dialog opened as a native popover: the browser centres it in the top layer */
.modal[popover] { border: none; text-align: left; white-space: normal; color: var(--text); }
.modal[popover]::backdrop { background: var(--modal-backdrop); }

.modal h2 { margin: 0 0 12px; font-size: 17px; }
.modal p { margin: 4px 0 12px; white-space: pre-line; }

.modal-warning {
    padding: 10px 12px;
    margin-bottom: 10px;
    background: #fff7ed;
    border-left: 4px solid var(--warning);
    border-radius: 6px;
}

.modal-warning p { margin: 4px 0 0; }

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 16px;
}

/* ---------- Map (Leaflet) ---------- */

.leaflet-container.pm-drawing,
.leaflet-container.pm-drawing .leaflet-interactive { cursor: crosshair; }

.pm-marker { background: none; border: none; }

.pm-marker span {
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 2px solid #fff;
    color: #fff;
    font-weight: 700;
    line-height: 1;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.45);
}

.pm-marker.pm-climb span, .pm-marker.pm-descent span, .pm-marker.pm-descentarmed span { cursor: grab; }

.leaflet-tooltip.pm-alt {
    padding: 1px 6px;
    font-weight: 600;
    font-size: 12px;
    border: none;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* ---------- Top bar ---------- */

.topbar {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 20px;
    height: 56px;
    padding: 0 20px;
    background: #fff;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}

.topbar-left { display: flex; align-items: center; gap: 28px; align-self: stretch; min-width: 0; }

.topbar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text);
    text-decoration: none;
}

.topbar-brand img { height: 22px; width: auto; display: block; }
.topbar-product {
    padding-left: 12px;
    border-left: 1px solid var(--border);
    font-weight: 600;
    font-size: 15px;
    letter-spacing: -0.01em;
}

.topbar-nav { display: flex; gap: 22px; align-self: stretch; }

.topbar-nav a {
    display: flex;
    align-items: center;
    color: var(--muted);
    text-decoration: none;
    font-weight: 500;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
}

.topbar-nav a:hover { color: var(--text); }
.topbar-nav a.active { color: var(--text); border-bottom-color: var(--brand-red); }

.topbar-user {
    justify-self: end;
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 13px;
}

.org-name { color: var(--muted); }
.user-name { font-weight: 600; }

/* Organisation switcher: a no-JavaScript menu, one form button per organisation */
.org-menu { position: relative; }
.org-menu summary {
    cursor: pointer;
    list-style: none;
    padding: 5px 10px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: #fff;
}
.org-menu summary::-webkit-details-marker { display: none; }
.org-menu summary::after { content: " ▾"; color: var(--muted); }
.org-menu form {
    position: absolute;
    right: 0;
    top: calc(100% + 4px);
    z-index: 1200;
    display: flex;
    flex-direction: column;
    min-width: 200px;
    margin: 0;
    padding: 4px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
}
.org-menu button {
    border: none;
    background: none;
    padding: 8px 10px;
    text-align: left;
    font: inherit;
    border-radius: 4px;
    cursor: pointer;
}
.org-menu button:hover { background: var(--bg); }
.org-menu button.is-current { font-weight: 600; }

.signout-form { margin: 0; }

@media (max-width: 820px) {
    .topbar { gap: 14px; padding: 0 12px; }
    .topbar-left { gap: 14px; }
    .topbar-product, .user-name, .org-name { display: none; }
    .topbar-nav { gap: 14px; }
}

/* ---------- Sign-in and message pages ---------- */

.auth-page {
    min-height: 100vh;
    min-height: 100dvh;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(360px, 1fr);
    background: #fff;
}

/* The Xplorate hero: the "X" image (red arm and an aerial photograph, as on xplorate.io) with the strapline */
.auth-hero {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 28px;
    padding: 48px 48px 40px;
    max-height: 100dvh;
    background: #fff;
}

.auth-hero-art {
    flex: 1;
    min-height: 0;
    width: 100%;
    height: auto;
    object-fit: contain;
    object-position: left center;
}

.auth-hero-text {
    position: relative;
    max-width: 420px;
    flex-shrink: 0;
    font-weight: 300;
    font-size: 32px;
    line-height: 1.2;
    letter-spacing: -0.02em;
    color: var(--text);
}

.auth-main {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 20px;
    background: var(--bg);
}

.auth-card {
    width: min(420px, 100%);
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 30px 30px 24px;
    box-shadow: 0 12px 40px rgba(7, 26, 61, 0.08);
}

@media (max-width: 860px) {
    .auth-page { grid-template-columns: 1fr; }
    .auth-hero { display: none; }
}

.auth-card h1 { font-size: 22px; font-weight: 600; letter-spacing: -0.01em; margin: 22px 0 8px; }
.auth-card p { margin: 0 0 12px; }
.auth-brand { display: flex; flex-direction: column; gap: 6px; }
.auth-brand img { height: 26px; width: auto; align-self: flex-start; }
.auth-sub { color: var(--muted); font-size: 13px; font-weight: 500; }
.auth-card .btn-block { margin-bottom: 10px; text-decoration: none; }
.auth-footnote { margin-top: 16px !important; }

.auth-error {
    padding: 10px 12px;
    margin-bottom: 12px;
    background: #fef3f2;
    border-left: 4px solid var(--danger);
    border-radius: 6px;
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 8px 0 12px;
    color: var(--muted);
    font-size: 12px;
}

.auth-divider::before, .auth-divider::after { content: ""; flex: 1; height: 1px; background: var(--border); }

.dev-users { display: flex; flex-direction: column; gap: 8px; }
.dev-users form { margin: 0; }

.dev-user {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.dev-user:hover { border-color: var(--text); background: #fafafa; }
.dev-user span { color: var(--muted); font-size: 12.5px; }

.page-message { max-width: 520px; margin: 48px auto; padding: 0 16px; }

/* ---------- Admin pages ---------- */

.admin-page {
    max-width: 1080px;
    margin: 0 auto;
    padding: 24px 20px 48px;
}

.admin-page h1 { font-size: 22px; margin: 0 0 16px; }

.card {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 18px 20px;
    margin-bottom: 16px;
}

.card h2 {
    margin: 0 0 12px;
    font-size: 12px;
    font-weight: 650;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--muted);
}

.inline-form {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 12px;
}

.inline-form .field { margin: 0; flex: 1 1 220px; }
.inline-form .field:has(select) { flex: 0 0 140px; }
.inline-form input, .inline-form select {
    width: 100%;
    padding: 7px 8px;
    font: inherit;
    border: 1px solid var(--border);
    border-radius: 6px;
}

.notice-inline {
    padding: 10px 14px;
    margin-bottom: 16px;
    border-radius: 8px;
    background: #f0fdf4;
    border-left: 4px solid var(--success);
}

.notice-inline.is-error { background: #fef3f2; border-left-color: var(--danger); }

.invite-link {
    margin-top: 14px;
    padding: 12px 14px;
    background: #f1f5fb;
    border-radius: 8px;
}

.invite-link p { margin: 0 0 8px; }
.invite-link .hint { margin: 8px 0 0; }
.invite-link-row { display: flex; gap: 8px; }
.invite-link-row input {
    flex: 1;
    min-width: 0;
    padding: 6px 8px;
    font: 12.5px ui-monospace, Consolas, monospace;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: #fff;
}

.data-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.data-table th {
    text-align: left;
    font-weight: 600;
    color: var(--muted);
    font-size: 12px;
    padding: 6px 8px;
    border-bottom: 1px solid var(--border);
}

.data-table td { padding: 8px; border-bottom: 1px solid #f0f2f4; vertical-align: middle; }
.data-table td.actions { text-align: right; white-space: nowrap; }
.data-table td.actions > .btn { margin-left: 6px; }
.data-table td.nowrap { white-space: nowrap; }
.data-table td.details { color: var(--muted); }
.data-table select { font: inherit; padding: 4px 6px; border: 1px solid var(--border); border-radius: 6px; }
.data-table tr.is-inactive td { color: var(--muted); }
.data-table-compact td { padding: 5px 8px; }
.card:has(.data-table) { overflow-x: auto; }

/* ---------- Blazor ---------- */

#blazor-error-ui {
    color-scheme: light only;
    background: #fff7d6;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 3000;
}

#blazor-error-ui .dismiss { cursor: pointer; position: absolute; right: 0.75rem; top: 0.5rem; }
