/* =========================================================================
   VONDL components. Every rule reads tokens (var(--v-…)); no raw colours here.
   Class names are v-prefixed so they never collide with an app's own sheet.
   ========================================================================= */

/* ---- Base ---------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    background: var(--v-bg);
    color: var(--v-text);
    font-family: var(--v-font-body);
    font-size: var(--v-text-md);
    line-height: var(--v-leading);
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
    font-family: var(--v-font-heading);
    color: var(--v-heading);
    line-height: 1.2;
    letter-spacing: -0.01em;
    margin: 0 0 var(--v-space-3);
    font-weight: 700;
}

h1 { font-size: var(--v-text-2xl); }
h2 { font-size: var(--v-text-xl); }
h3 { font-size: var(--v-text-lg); }
h4 { font-size: var(--v-text-md); }
h1:focus { outline: none; }

p { margin: 0 0 var(--v-space-3); }

a { color: var(--v-link); text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }

code, kbd, .v-mono { font-family: var(--v-font-mono); font-size: 0.92em; }
code { background: var(--v-surface-2); padding: 0.1em 0.35em; border-radius: var(--v-radius-xs); word-break: break-all; }

::selection { background: var(--v-coral-300); color: var(--v-navy-900); }

:focus-visible { outline: none; box-shadow: var(--v-focus); border-radius: var(--v-radius-xs); }
/* Blazor moves focus to the page heading after navigation (for screen readers); that is not a visible focus. */
h1:focus-visible, h1:focus, [tabindex="-1"]:focus-visible { box-shadow: none; }

hr { border: 0; border-top: 1px solid var(--v-border); margin: var(--v-space-4) 0; }

img { max-width: 100%; }

.v-sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---- Utilities (the only ones; layout is what components are for) -------- */
.v-row { display: flex; align-items: center; gap: var(--v-space-2); flex-wrap: wrap; }
.v-row.v-nowrap { flex-wrap: nowrap; }
.v-row.v-top { align-items: flex-start; }
.v-row.v-between { justify-content: space-between; }
.v-stack { display: flex; flex-direction: column; gap: var(--v-space-3); }
.v-grow { flex: 1 1 auto; min-width: 0; }
.v-muted { color: var(--v-text-2); }
.v-faint { color: var(--v-text-3); }
.v-small { font-size: var(--v-text-sm); }
.v-xsmall { font-size: var(--v-text-xs); }
.v-num { font-variant-numeric: tabular-nums; }
.v-right { text-align: right; }
.v-truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.v-break { word-break: break-word; overflow-wrap: anywhere; }
.v-pre { white-space: pre-line; }
.v-nowrap-text { white-space: nowrap; }
.v-mt-1 { margin-top: var(--v-space-1); }
.v-mt-2 { margin-top: var(--v-space-2); }
.v-mt-3 { margin-top: var(--v-space-3); }
.v-mt-4 { margin-top: var(--v-space-4); }
.v-mb-3 { margin-bottom: var(--v-space-3); }
.v-ol { margin: 0; padding-left: 18px; }
.v-ol > li { margin-bottom: 4px; }
.v-strong { font-weight: 600; color: var(--v-heading); }
.v-gradient-text { background: var(--v-gradient); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---- Logo ---------------------------------------------------------------- */
.v-logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--v-heading); }
.v-logo-mark {
    display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 9px;
    background: var(--v-gradient); color: var(--v-on-brand);
    font-family: var(--v-font-heading); font-weight: 800; font-size: 17px; box-shadow: var(--v-shadow-glow);
}
.v-logo-word { font-family: var(--v-font-heading); font-weight: 800; font-size: 19px; letter-spacing: 0.02em; }
.v-logo-product { font-family: var(--v-font-heading); font-weight: 500; font-size: 19px; color: var(--v-text-2); }
.v-logo.v-logo-lg .v-logo-mark { width: 44px; height: 44px; border-radius: 12px; font-size: 23px; }
.v-logo.v-logo-lg .v-logo-word, .v-logo.v-logo-lg .v-logo-product { font-size: 24px; }

/* ---- App shell (top bar) ------------------------------------------------- */
.v-topbar {
    position: sticky; top: 0; z-index: 40; height: var(--v-topbar-h);
    background: color-mix(in srgb, var(--v-surface) 88%, transparent);
    backdrop-filter: saturate(160%) blur(14px);
    border-bottom: 1px solid var(--v-border);
}
.v-topbar::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--v-gradient); opacity: 0.85; }
.v-topbar-inner { max-width: var(--v-page-max); height: 100%; margin: 0 auto; padding: 0 var(--v-space-4); display: flex; align-items: center; gap: var(--v-space-4); }
.v-nav { display: flex; align-items: center; gap: 2px; }
.v-nav a, .v-nav button.v-nav-link {
    display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: var(--v-radius-sm);
    color: var(--v-text-2); text-decoration: none; font-weight: 500; font-size: var(--v-text-md);
    background: none; border: 0; cursor: pointer; font-family: inherit;
}
.v-nav a:hover, .v-nav button.v-nav-link:hover { color: var(--v-heading); background: var(--v-hover); }
.v-nav a.active { color: var(--v-heading); background: var(--v-accent-tint); }
.v-nav-end { margin-left: auto; }
.v-nav-toggle { display: none; margin-left: auto; background: none; border: 0; color: var(--v-heading); padding: 8px; border-radius: var(--v-radius-sm); cursor: pointer; }
.v-nav-count {
    display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: var(--v-radius-full);
    background: var(--v-gradient); color: var(--v-on-brand); font-size: 11px; font-weight: 700;
}

@media (max-width: 860px) {
    .v-topbar-inner { flex-wrap: wrap; }
    .v-nav-toggle { display: inline-flex; }
    .v-nav-panel { display: none; }
    .v-topbar.open { height: auto; }
    .v-topbar.open .v-nav-panel {
        display: flex; flex-direction: column; align-items: stretch; width: 100%; padding-bottom: var(--v-space-3);
    }
    .v-topbar.open .v-nav { flex-direction: column; align-items: stretch; }
    .v-nav-end { margin-left: 0; }
}
@media (min-width: 861px) {
    .v-nav-panel { display: flex; align-items: center; flex: 1; gap: var(--v-space-4); }
}

/* Bottom tab bar (phones only) */
.v-tabbar { display: none; }
@media (max-width: 860px) {
    .v-tabbar {
        display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; background: var(--v-surface);
        border-top: 1px solid var(--v-border); padding-bottom: env(safe-area-inset-bottom);
    }
    .v-tabbar a {
        flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 4px 6px; position: relative;
        font-size: var(--v-text-xs); font-weight: 600; color: var(--v-text-2); text-decoration: none; min-height: 52px;
    }
    .v-tabbar a .v-ico { width: 20px; height: 20px; }
    .v-tabbar a.active { color: var(--v-heading); }
    .v-tabbar a.active::before { content: ""; position: absolute; top: 0; left: 25%; right: 25%; height: 2px; background: var(--v-gradient); border-radius: 2px; }
    .v-tabbar .v-nav-count { position: absolute; top: 4px; left: calc(50% + 6px); }
    main.v-has-tabbar { padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
    /* The tab bar holds the main destinations; the menu keeps only the rest (account, theme, log out). */
    .v-topbar-tabs .v-nav-panel > .v-nav:not(.v-nav-end) { display: none; }
}

/* ---- Page ---------------------------------------------------------------- */
.v-page { max-width: var(--v-page-max); margin: 0 auto; padding: var(--v-space-6) var(--v-space-4) var(--v-space-12); }
.v-page-head { display: flex; align-items: flex-end; gap: var(--v-space-4); flex-wrap: wrap; margin-bottom: var(--v-space-5); }
.v-page-head h1 { margin: 0; }
.v-page-head .v-sub { color: var(--v-text-2); margin-top: 4px; }
.v-page-head .v-back { display: inline-flex; align-items: center; gap: 4px; font-size: var(--v-text-sm); color: var(--v-text-2); text-decoration: none; margin-bottom: 6px; }
.v-page-head .v-back:hover { color: var(--v-heading); }
.v-page-actions { margin-left: auto; display: flex; gap: var(--v-space-2); flex-wrap: wrap; align-items: center; }
.v-section { margin-bottom: var(--v-space-5); }
.v-section-label { font-size: var(--v-text-xs); letter-spacing: 0.06em; text-transform: uppercase; color: var(--v-text-2); font-weight: 600; margin: 0 0 var(--v-space-2); }

/* ---- Grid ---------------------------------------------------------------- */
.v-grid { display: grid; gap: var(--v-space-4); grid-template-columns: repeat(var(--v-cols, 3), minmax(0, 1fr)); }
.v-grid.v-grid-auto { grid-template-columns: repeat(auto-fill, minmax(var(--v-min, 300px), 1fr)); }
.v-grid.v-grid-tight { gap: var(--v-space-2); }
@media (max-width: 980px) { .v-grid:not(.v-grid-auto) { grid-template-columns: repeat(min(var(--v-cols, 3), 2), minmax(0, 1fr)); } }
@media (max-width: 620px) { .v-grid:not(.v-grid-auto) { grid-template-columns: minmax(0, 1fr); } .v-grid.v-grid-keep { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.v-split { display: grid; gap: var(--v-space-4); grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); align-items: start; }
@media (max-width: 980px) { .v-split { grid-template-columns: minmax(0, 1fr); } }

/* ---- Panel --------------------------------------------------------------- */
.v-panel { background: var(--v-surface); border: 1px solid var(--v-border); border-radius: var(--v-radius-lg); box-shadow: var(--v-shadow-sm); min-width: 0; }
.v-panel-head { display: flex; align-items: center; gap: var(--v-space-3); padding: var(--v-space-4) var(--v-space-5) 0; flex-wrap: wrap; }
.v-panel-head h2, .v-panel-head h3 { font-size: var(--v-text-lg); margin: 0; }
.v-panel-head .v-panel-sub { color: var(--v-text-2); font-size: var(--v-text-sm); }
.v-panel-head .v-panel-actions { margin-left: auto; display: flex; gap: var(--v-space-2); align-items: center; flex-wrap: wrap; }
.v-panel-body { padding: var(--v-space-4) var(--v-space-5) var(--v-space-5); }
.v-panel-foot { border-top: 1px solid var(--v-border); padding: var(--v-space-3) var(--v-space-5); color: var(--v-text-2); font-size: var(--v-text-sm); }
.v-panel.v-flush > .v-panel-head { padding-bottom: var(--v-space-3); }
.v-panel.v-accent { position: relative; overflow: hidden; }
.v-panel.v-accent::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: var(--v-gradient); }
.v-panel.v-muted-panel { opacity: 0.62; }
.v-panel.v-interactive { transition: box-shadow var(--v-fast) var(--v-ease), transform var(--v-fast) var(--v-ease); }
.v-panel.v-interactive:hover { box-shadow: var(--v-shadow-md); }

/* ---- Stat ---------------------------------------------------------------- */
.v-stat { padding: var(--v-space-3) var(--v-space-4); }
.v-stat-label { font-size: var(--v-text-xs); text-transform: uppercase; letter-spacing: 0.06em; color: var(--v-text-2); font-weight: 600; }
.v-stat-value { font-family: var(--v-font-heading); font-size: var(--v-text-lg); font-weight: 700; color: var(--v-heading); font-variant-numeric: tabular-nums; }
.v-stat-value.v-big { font-size: var(--v-text-3xl); line-height: 1.1; }
.v-stat-foot { font-size: var(--v-text-sm); color: var(--v-text-2); }

/* ---- Buttons ------------------------------------------------------------- */
.v-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    min-height: 38px; padding: 0 16px; border-radius: var(--v-radius-sm);
    border: 1px solid var(--v-border-strong); background: var(--v-surface); color: var(--v-heading);
    font-family: var(--v-font-body); font-size: var(--v-text-md); font-weight: 600; line-height: 1; white-space: nowrap;
    cursor: pointer; text-decoration: none; transition: background var(--v-fast) var(--v-ease), box-shadow var(--v-fast) var(--v-ease), transform var(--v-fast) var(--v-ease);
}
.v-btn:hover { background: var(--v-hover); }
.v-btn:active { transform: translateY(1px); }
.v-btn:disabled, .v-btn[aria-disabled="true"] { opacity: 0.5; cursor: not-allowed; transform: none; }
.v-btn-primary { background: var(--v-gradient); color: var(--v-on-brand); border-color: transparent; box-shadow: var(--v-shadow-glow); }
.v-btn-primary:hover { background: var(--v-gradient); filter: saturate(1.1) brightness(1.03); }
.v-btn-dark { background: var(--v-inverse-bg); color: var(--v-inverse-text); border-color: transparent; }
.v-btn-dark:hover { background: var(--v-inverse-bg); opacity: 0.9; }
.v-btn-ghost { background: transparent; border-color: transparent; color: var(--v-text-2); }
.v-btn-ghost:hover { color: var(--v-heading); }
.v-btn-danger { color: var(--v-crit); border-color: color-mix(in srgb, var(--v-crit) 40%, transparent); }
.v-btn-danger:hover { background: var(--v-crit-tint); }
.v-btn-danger.v-btn-solid { background: var(--v-crit); color: var(--v-white); border-color: transparent; }
.v-btn-link { background: none; border: 0; padding: 0; min-height: 0; color: var(--v-link); font-weight: 500; }
.v-btn-link:hover { background: none; text-decoration: underline; }
.v-btn-sm { min-height: 30px; padding: 0 11px; font-size: var(--v-text-sm); border-radius: var(--v-radius-xs); }
.v-btn-lg { min-height: 46px; padding: 0 22px; font-size: var(--v-text-lg); }
.v-btn-block { width: 100%; }
.v-btn-icon { padding: 0; width: 38px; }
.v-btn-sm.v-btn-icon { width: 30px; }
.v-btn .v-spinner { width: 14px; height: 14px; }

/* ---- Forms --------------------------------------------------------------- */
.v-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: var(--v-space-4); min-width: 0; }
.v-field:last-child { margin-bottom: 0; }
.v-label { font-size: var(--v-text-sm); font-weight: 600; color: var(--v-heading); }
.v-label .v-req { color: var(--v-crit); margin-left: 2px; }
.v-label .v-opt { color: var(--v-text-3); font-weight: 400; }
.v-help { font-size: var(--v-text-sm); color: var(--v-text-2); }
.v-error { font-size: var(--v-text-sm); color: var(--v-crit); }

.v-input {
    width: 100%; min-height: 40px; padding: 8px 12px; border-radius: var(--v-radius-sm);
    border: 1px solid var(--v-border-strong); background: var(--v-surface); color: var(--v-text);
    font-family: var(--v-font-body); font-size: var(--v-text-md); line-height: 1.4;
    transition: border-color var(--v-fast) var(--v-ease), box-shadow var(--v-fast) var(--v-ease);
}
.v-input::placeholder { color: var(--v-text-3); }
.v-input:focus { outline: none; border-color: var(--v-coral-400); box-shadow: var(--v-focus); }
.v-input:disabled, .v-input[readonly] { background: var(--v-surface-2); }
.v-input.v-sm { min-height: 32px; padding: 4px 10px; font-size: var(--v-text-sm); }
select.v-input { appearance: none; padding-right: 34px; cursor: pointer;
    background-image: linear-gradient(45deg, transparent 50%, var(--v-text-2) 50%), linear-gradient(135deg, var(--v-text-2) 50%, transparent 50%);
    background-position: calc(100% - 18px) 55%, calc(100% - 13px) 55%; background-size: 5px 5px; background-repeat: no-repeat; }
textarea.v-input { min-height: 90px; resize: vertical; }
textarea.v-input.v-mono { font-family: var(--v-font-mono); font-size: var(--v-text-sm); }
.v-input-group { display: flex; gap: var(--v-space-2); align-items: stretch; flex-wrap: wrap; }
.v-input-group > .v-input { flex: 1 1 260px; }
.v-form-grid { display: grid; gap: 0 var(--v-space-3); grid-template-columns: repeat(2, minmax(0, 1fr)); }
.v-form-grid > .v-span-2 { grid-column: 1 / -1; }
@media (max-width: 620px) { .v-form-grid { grid-template-columns: minmax(0, 1fr); } }

.v-check { display: flex; align-items: flex-start; gap: 10px; padding: 5px 0; cursor: pointer; }
.v-check input { appearance: none; flex: none; width: 18px; height: 18px; margin: 1px 0 0; border-radius: 5px; border: 1.5px solid var(--v-border-strong); background: var(--v-surface); cursor: pointer; display: grid; place-items: center; }
.v-check input:checked { background: var(--v-gradient); border-color: transparent; }
.v-check input:checked::after { content: ""; width: 9px; height: 5px; border: 2px solid var(--v-on-brand); border-top: 0; border-right: 0; transform: translateY(-1px) rotate(-45deg); }
.v-check input:focus-visible { box-shadow: var(--v-focus); }
.v-check .v-check-text { display: flex; flex-direction: column; }
.v-check .v-check-help { font-size: var(--v-text-sm); color: var(--v-text-2); }

.v-switch { position: relative; display: inline-flex; flex: none; width: 40px; height: 23px; cursor: pointer; }
.v-switch input { position: absolute; inset: 0; opacity: 0; cursor: pointer; margin: 0; }
.v-switch .v-track { width: 100%; height: 100%; border-radius: var(--v-radius-full); background: var(--v-border-strong); transition: background var(--v-fast) var(--v-ease); position: relative; }
.v-switch .v-track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 17px; height: 17px; border-radius: 50%; background: var(--v-white); box-shadow: var(--v-shadow-sm); transition: transform var(--v-fast) var(--v-ease); }
.v-switch input:checked + .v-track { background: var(--v-gradient); }
.v-switch input:checked + .v-track::after { transform: translateX(17px); }
.v-switch input:focus-visible + .v-track { box-shadow: var(--v-focus); }
.v-switch input:disabled + .v-track { opacity: 0.5; }

.v-setting { display: flex; align-items: center; gap: var(--v-space-4); padding: var(--v-space-3) 0; border-top: 1px solid var(--v-border); }
.v-setting:first-child { border-top: 0; padding-top: 0; }
.v-setting-text { flex: 1; min-width: 0; }
.v-setting-title { font-weight: 600; color: var(--v-heading); }
.v-setting-desc { font-size: var(--v-text-sm); color: var(--v-text-2); }

.v-details > summary { cursor: pointer; color: var(--v-text-2); font-size: var(--v-text-sm); font-weight: 500; list-style: none; display: inline-flex; align-items: center; gap: 6px; }
.v-details > summary::-webkit-details-marker { display: none; }
.v-details > summary::before { content: "›"; transition: transform var(--v-fast); display: inline-block; }
.v-details[open] > summary::before { transform: rotate(90deg); }
.v-details > .v-details-body { margin-top: var(--v-space-3); }

/* ---- Chip & status dot --------------------------------------------------- */
.v-chip {
    display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 9px; border-radius: var(--v-radius-full);
    font-size: var(--v-text-xs); font-weight: 600; white-space: nowrap; line-height: 1;
    background: var(--v-surface-2); color: var(--v-text-2); border: 1px solid var(--v-border);
}
.v-chip-good { background: var(--v-good-tint); color: var(--v-good); border-color: transparent; }
.v-chip-warn { background: var(--v-warn-tint); color: var(--v-warn); border-color: transparent; }
.v-chip-crit { background: var(--v-crit-tint); color: var(--v-crit); border-color: transparent; }
.v-chip-info { background: var(--v-info-tint); color: var(--v-info); border-color: transparent; }
.v-chip-idle { background: var(--v-idle-tint); color: var(--v-text-2); border-color: transparent; }
.v-chip-brand { background: var(--v-gradient); color: var(--v-on-brand); border-color: transparent; }
.v-chip-outline { background: transparent; }

.v-dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; flex: none; background: var(--v-idle); }
.v-dot-good { background: var(--v-good); }
.v-dot-warn { background: var(--v-warn); }
.v-dot-crit { background: var(--v-crit); }
.v-dot-info { background: var(--v-info); }
.v-dot-pulse { animation: v-pulse 2s infinite; }
@keyframes v-pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--v-coral-400) 50%, transparent); } 70% { box-shadow: 0 0 0 7px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }

/* ---- Notice -------------------------------------------------------------- */
.v-notice { display: flex; gap: var(--v-space-3); align-items: flex-start; padding: var(--v-space-3) var(--v-space-4); border-radius: var(--v-radius-md); border: 1px solid transparent; margin-bottom: var(--v-space-4); font-size: var(--v-text-md); }
.v-notice > .v-ico { margin-top: 2px; flex: none; }
.v-notice-body { flex: 1; min-width: 0; }
.v-notice-title { font-weight: 700; margin-bottom: 2px; }
.v-notice-info { background: var(--v-info-tint); color: var(--v-text); }
.v-notice-info > .v-ico, .v-notice-info .v-notice-title { color: var(--v-info); }
.v-notice-good { background: var(--v-good-tint); color: var(--v-text); }
.v-notice-good > .v-ico, .v-notice-good .v-notice-title { color: var(--v-good); }
.v-notice-warn { background: var(--v-warn-tint); color: var(--v-text); }
.v-notice-warn > .v-ico, .v-notice-warn .v-notice-title { color: var(--v-warn); }
.v-notice-crit { background: var(--v-crit-tint); color: var(--v-text); }
.v-notice-crit > .v-ico, .v-notice-crit .v-notice-title { color: var(--v-crit); }
.v-notice-close { background: none; border: 0; color: var(--v-text-2); cursor: pointer; padding: 2px; border-radius: var(--v-radius-xs); }

/* ---- Table --------------------------------------------------------------- */
.v-table-wrap { overflow-x: auto; }
.v-table { width: 100%; border-collapse: collapse; font-size: var(--v-text-md); }
.v-table th { text-align: left; font-size: var(--v-text-xs); text-transform: uppercase; letter-spacing: 0.05em; color: var(--v-text-2); font-weight: 600; padding: 8px var(--v-space-4); border-bottom: 1px solid var(--v-border); white-space: nowrap; }
.v-table td { padding: 9px var(--v-space-4); border-bottom: 1px solid var(--v-border); vertical-align: middle; }
.v-table tbody tr:last-child td { border-bottom: 0; }
.v-table tbody tr:hover td { background: var(--v-hover); }
.v-table th.v-right, .v-table td.v-right { text-align: right; }
.v-table td.v-num, .v-table td.v-nowrap-text, .v-table th { white-space: nowrap; }
.v-table td a { color: var(--v-heading); text-decoration: none; font-weight: 500; }
.v-table td a:hover { color: var(--v-link); text-decoration: underline; }
.v-table tr.v-dim td { color: var(--v-text-3); }
.v-table-empty { padding: var(--v-space-4) var(--v-space-5); color: var(--v-text-2); }
.v-table-foot { padding: var(--v-space-2) var(--v-space-5); color: var(--v-text-3); font-size: var(--v-text-sm); border-top: 1px solid var(--v-border); }

/* ---- Lists ----------------------------------------------------------------- */
.v-list { list-style: none; margin: 0; padding: 0; }
.v-list > li { padding: var(--v-space-3) 0; border-top: 1px solid var(--v-border); }
.v-list > li:first-child { border-top: 0; padding-top: 0; }
.v-list.v-list-compact > li { padding: 6px 0; }
.v-detail { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 6px var(--v-space-4); margin: 0; }
.v-detail dt { color: var(--v-text-2); font-size: var(--v-text-sm); }
.v-detail dd { margin: 0; color: var(--v-text); }

/* ---- Empty state ----------------------------------------------------------- */
.v-empty { text-align: center; padding: var(--v-space-12) var(--v-space-4); color: var(--v-text-2); display: flex; flex-direction: column; align-items: center; gap: var(--v-space-2); }
.v-empty > .v-ico { width: 34px; height: 34px; color: var(--v-accent); margin-bottom: var(--v-space-2); }
.v-empty-title { font-family: var(--v-font-heading); font-size: var(--v-text-lg); font-weight: 700; color: var(--v-heading); }
.v-empty-actions { display: flex; gap: var(--v-space-2); flex-wrap: wrap; justify-content: center; margin-top: var(--v-space-3); }

/* ---- Tabs & segmented ------------------------------------------------------ */
.v-tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--v-border); margin-bottom: var(--v-space-4); overflow-x: auto; }
.v-tab { background: none; border: 0; border-bottom: 2px solid transparent; padding: 9px 14px; margin-bottom: -1px; color: var(--v-text-2); font-weight: 600; cursor: pointer; font-family: inherit; font-size: var(--v-text-md); white-space: nowrap; text-decoration: none; }
.v-tab:hover { color: var(--v-heading); }
.v-tab.active { color: var(--v-heading); border-image: var(--v-gradient) 1; border-bottom: 2px solid; }
.v-tab-count { margin-left: 6px; font-size: var(--v-text-xs); color: var(--v-text-3); }
.v-seg { display: inline-flex; padding: 3px; gap: 2px; background: var(--v-surface-2); border: 1px solid var(--v-border); border-radius: var(--v-radius-sm); flex-wrap: wrap; }
.v-seg button { border: 0; background: none; padding: 5px 12px; border-radius: var(--v-radius-xs); color: var(--v-text-2); font-weight: 600; font-size: var(--v-text-sm); cursor: pointer; font-family: inherit; }
.v-seg button .v-faint { margin-left: 5px; font-variant-numeric: tabular-nums; }
.v-seg button.active { background: var(--v-surface); color: var(--v-heading); box-shadow: var(--v-shadow-sm); }

/* ---- Toolbar --------------------------------------------------------------- */
.v-toolbar { display: flex; flex-wrap: wrap; gap: var(--v-space-2); align-items: center; margin-bottom: var(--v-space-4); }
.v-toolbar .v-input { width: auto; min-width: 200px; }
.v-toolbar .v-field { margin-bottom: 0; }
.v-toolbar-grow { flex: 1 1 240px; max-width: 340px; }

/* ---- Dialog ---------------------------------------------------------------- */
.v-scrim { position: fixed; inset: 0; background: var(--v-scrim); z-index: 80; display: grid; place-items: center; padding: var(--v-space-4); animation: v-fade var(--v-fast) var(--v-ease); }
.v-dialog { width: min(520px, 100%); max-height: calc(100vh - 32px); overflow: auto; background: var(--v-surface); border-radius: var(--v-radius-xl); box-shadow: var(--v-shadow-lg); border: 1px solid var(--v-border); }
.v-dialog-head { display: flex; align-items: center; gap: var(--v-space-3); padding: var(--v-space-5) var(--v-space-5) 0; }
.v-dialog-head h2 { margin: 0; font-size: var(--v-text-xl); }
.v-dialog-body { padding: var(--v-space-4) var(--v-space-5); }
.v-dialog-foot { display: flex; justify-content: flex-end; gap: var(--v-space-2); padding: 0 var(--v-space-5) var(--v-space-5); flex-wrap: wrap; }
@keyframes v-fade { from { opacity: 0; } to { opacity: 1; } }

/* ---- Spinner ------------------------------------------------------------- */
.v-spinner { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--v-border-strong); border-top-color: var(--v-coral-500); animation: v-spin 0.8s linear infinite; display: inline-block; flex: none; }
@keyframes v-spin { to { transform: rotate(360deg); } }
.v-loading { display: flex; align-items: center; gap: var(--v-space-3); color: var(--v-text-2); padding: var(--v-space-4) 0; }

/* ---- Icons ----------------------------------------------------------------- */
.v-ico { width: 16px; height: 16px; flex: none; vertical-align: -3px; }
.v-ico.v-ico-lg { width: 22px; height: 22px; }

/* ---- Auth scene -------------------------------------------------------------- */
.v-auth { min-height: calc(100vh - var(--v-topbar-h)); display: grid; place-items: center; padding: var(--v-space-8) var(--v-space-4);
    background: radial-gradient(1200px 500px at 50% -10%, color-mix(in srgb, var(--v-orange-300) 22%, transparent), transparent 70%); }
.v-auth-card { width: min(440px, 100%); background: var(--v-surface); border: 1px solid var(--v-border); border-radius: var(--v-radius-xl); box-shadow: var(--v-shadow-lg); padding: var(--v-space-8) var(--v-space-6) var(--v-space-6); position: relative; overflow: hidden; }
.v-auth-card::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; background: var(--v-gradient); }
.v-auth-card.v-auth-wide { width: min(720px, 100%); }
.v-auth-logo { display: flex; justify-content: center; margin-bottom: var(--v-space-5); }
.v-auth-card h1 { text-align: center; font-size: var(--v-text-2xl); margin-bottom: var(--v-space-2); }
.v-auth-sub { text-align: center; color: var(--v-text-2); margin-bottom: var(--v-space-5); }
.v-auth-foot { margin-top: var(--v-space-5); padding-top: var(--v-space-4); border-top: 1px solid var(--v-border); font-size: var(--v-text-sm); color: var(--v-text-2); text-align: center; }

/* ---- Reconnect / error bar ----------------------------------------------------- */
#blazor-error-ui { display: none; position: fixed; bottom: 0; left: 0; right: 0; z-index: 100; padding: 10px 20px; background: var(--v-inverse-bg); color: var(--v-inverse-text); }
#blazor-error-ui .reload { color: var(--v-coral-300); margin-left: 8px; }
#blazor-error-ui .dismiss { cursor: pointer; position: absolute; right: 16px; top: 8px; }

/* ---- Print ------------------------------------------------------------------ */
@media print {
    .v-topbar, .v-page-actions, .v-btn { display: none !important; }
    body { background: var(--v-white); }
    .v-panel { box-shadow: none; }
}

/* ---- Sparkline ------------------------------------------------------------- */
.v-spark { display: inline-block; vertical-align: middle; overflow: visible; }
.v-spark polyline { fill: none; stroke: var(--v-series-1); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.v-spark circle { fill: var(--v-series-1); }

/* ---- Selection bar (bulk actions) -------------------------------------------- */
.v-bulkbar { position: sticky; top: calc(var(--v-topbar-h) + 8px); z-index: 30; display: flex; flex-wrap: wrap; align-items: center; gap: var(--v-space-2);
    padding: var(--v-space-2) var(--v-space-3); margin-bottom: var(--v-space-4); background: var(--v-inverse-bg); color: var(--v-inverse-text);
    border-radius: var(--v-radius-md); box-shadow: var(--v-shadow-lg); }
.v-bulkbar .v-btn { background: transparent; color: var(--v-inverse-text); border-color: color-mix(in srgb, var(--v-inverse-text) 35%, transparent); }
.v-bulkbar .v-btn:hover { background: color-mix(in srgb, var(--v-inverse-text) 12%, transparent); }
.v-bulkbar .v-input { background: var(--v-surface); color: var(--v-text); }
.v-bulkbar .v-field { margin: 0; }
.v-selectable { position: relative; }
.v-selectable.v-selected > .v-panel { outline: 2px solid var(--v-coral-500); outline-offset: 2px; }
.v-select-box { position: absolute; top: 10px; right: 12px; z-index: 2; }
