/* ============================================================================================================
   VONDL app material - the screens of every suite app (portal, CMS, admin, tools).
   Scoped under html[data-ui="app"] so it never leaks into the public website, which has its own material
   (Vondl.Website.Design/site.css) on the same tokens. Components in Vondl.Design.Ui render exactly these classes.
   ============================================================================================================ */

html[data-ui="app"] *,
html[data-ui="app"] *::before,
html[data-ui="app"] *::after { box-sizing: border-box; }

html[data-ui="app"] {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-size-adjust: 100%;
}

html[data-ui="app"] body {
    margin: 0;
    font-family: var(--v-font-body);
    font-size: var(--v-font-size-sm);
    line-height: 1.6;
    color: var(--v-text);
    background: var(--v-bg-subtle);
}

:where(html[data-ui="app"] h1, html[data-ui="app"] h2, html[data-ui="app"] h3, html[data-ui="app"] h4) {
    font-family: var(--v-font-heading);
    color: var(--v-text-strong);
    line-height: 1.25;
    font-weight: 700;
    margin: 0;
}

:where(html[data-ui="app"] a) { color: var(--v-text-link); text-decoration: none; }
:where(html[data-ui="app"] a:hover) { text-decoration: underline; }
html[data-ui="app"] img { max-width: 100%; display: block; }
html[data-ui="app"] :focus-visible { outline: none; box-shadow: var(--v-focus-ring); border-radius: 6px; }
html[data-ui="app"] code, html[data-ui="app"] kbd { font-family: var(--v-font-mono); font-size: 0.92em; }

/* --- Utility --------------------------------------------------------------------------------------------- */
.v-gradient-text {
    background: var(--v-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.v-muted { color: var(--v-text-secondary); }
.v-small { font-size: var(--v-font-size-xs); }
.v-stack { display: flex; flex-direction: column; gap: var(--v-space-4); }
.v-stack-sm { display: flex; flex-direction: column; gap: var(--v-space-2); }
.v-row { display: flex; align-items: center; gap: var(--v-space-3); flex-wrap: wrap; }
.v-row-end { justify-content: flex-end; }
.v-spacer { flex: 1; }
.v-truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.v-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); border: 0; }
.v-grid { display: grid; gap: var(--v-space-4); grid-template-columns: repeat(var(--v-cols, 2), minmax(0, 1fr)); }
.v-grid[data-cols="3"] { --v-cols: 3; }
.v-grid[data-cols="4"] { --v-cols: 4; }
@media (max-width: 900px) { .v-grid { grid-template-columns: 1fr; } }

/* --- Logo (the gradient V tile + wordmark, as on vondl.com) ---------------------------------------------- */
.v-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: var(--v-font-heading);
    font-weight: 800;
    font-size: calc(var(--v-logo-size, 34px) * 0.56);
    letter-spacing: -0.01em;
    color: var(--v-text-strong);
    text-decoration: none !important;
    white-space: nowrap;
}
.v-logo-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: var(--v-logo-size, 34px);
    height: var(--v-logo-size, 34px);
    flex-shrink: 0;
    border-radius: calc(var(--v-logo-size, 34px) * 0.265);
    background: var(--v-gradient);
    color: var(--v-white);
    font-size: calc(var(--v-logo-size, 34px) * 0.5);
    font-weight: 800;
    line-height: 1;
}
.v-logo-app { font-weight: 500; color: var(--v-text-secondary); }
.v-logo.inverse, .v-logo.inverse .v-logo-app { color: var(--v-white); }
.v-logo.inverse .v-logo-app { opacity: 0.6; }

/* --- Buttons (pill, as on vondl.com) --------------------------------------------------------------------- */
.v-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 9px 20px;
    min-height: 38px;
    border: 1px solid transparent;
    border-radius: var(--v-radius-pill);
    font-family: var(--v-font-body);
    font-size: var(--v-font-size-sm);
    font-weight: 600;
    line-height: 1.2;
    cursor: pointer;
    text-decoration: none !important;
    white-space: nowrap;
    transition: transform var(--v-duration) var(--v-ease), box-shadow var(--v-duration) var(--v-ease),
                background var(--v-duration) var(--v-ease), border-color var(--v-duration) var(--v-ease);
}
.v-btn:disabled, .v-btn[aria-disabled="true"] { opacity: 0.55; cursor: not-allowed; transform: none !important; box-shadow: none !important; }
.v-btn-primary { background: var(--v-gradient); color: var(--v-text-on-brand); }
.v-btn-primary:hover { transform: translateY(-1px); box-shadow: var(--v-shadow-glow); }
.v-btn-dark { background: var(--v-navy-800); color: var(--v-white); }
.v-btn-dark:hover { background: var(--v-navy-700); }
.v-btn-secondary { background: var(--v-surface); color: var(--v-text-strong); border-color: var(--v-border-strong); }
.v-btn-secondary:hover { background: var(--v-surface-hover); }
.v-btn-ghost { background: transparent; color: var(--v-text-secondary); }
.v-btn-ghost:hover { background: var(--v-surface-hover); color: var(--v-text-strong); }
.v-btn-danger { background: var(--v-crit); color: var(--v-white); }
.v-btn-danger:hover { filter: brightness(1.08); }
.v-btn-sm { padding: 6px 14px; min-height: 30px; font-size: var(--v-font-size-xs); }
.v-btn-lg { padding: 14px 32px; min-height: 48px; font-size: 0.95rem; }
.v-btn-block { width: 100%; }
.v-btn-icon { padding: 0; width: 36px; min-height: 36px; }
.v-btn svg { flex-shrink: 0; }

/* --- Icon ------------------------------------------------------------------------------------------------ */
.v-icon { width: 16px; height: 16px; flex-shrink: 0; display: inline-block; vertical-align: -3px; }
.v-icon-lg { width: 20px; height: 20px; }

/* --- App shell: top bar + rail (drawer on small screens, no JavaScript) --------------------------------- */
.v-shell { min-height: 100vh; min-height: 100dvh; display: grid; grid-template-columns: var(--v-rail-w) minmax(0, 1fr); grid-template-rows: var(--v-topbar-h) 1fr; }
.v-shell.no-rail { grid-template-columns: minmax(0, 1fr); }
.v-topbar {
    grid-column: 1 / -1;
    position: sticky;
    top: 0;
    z-index: 40;
    display: flex;
    align-items: center;
    gap: var(--v-space-4);
    padding: 0 var(--v-space-5);
    height: var(--v-topbar-h);
    background: color-mix(in srgb, var(--v-surface) 92%, transparent);
    backdrop-filter: blur(var(--v-glass-blur));
    -webkit-backdrop-filter: blur(var(--v-glass-blur));
    border-bottom: 1px solid var(--v-border);
}
.v-topbar-end { margin-left: auto; display: flex; align-items: center; gap: var(--v-space-2); }
.v-rail {
    position: sticky;
    top: var(--v-topbar-h);
    height: calc(100vh - var(--v-topbar-h));
    overflow-y: auto;
    padding: var(--v-space-4) var(--v-space-3);
    background: var(--v-surface);
    border-right: 1px solid var(--v-border);
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.v-rail-label {
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--v-text-muted);
    padding: var(--v-space-4) var(--v-space-3) var(--v-space-1);
}
.v-nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: var(--v-radius-ctl);
    color: var(--v-text-secondary) !important;
    font-weight: 500;
    text-decoration: none !important;
    transition: background var(--v-duration) var(--v-ease), color var(--v-duration) var(--v-ease);
}
.v-nav-item:hover { background: var(--v-surface-hover); color: var(--v-text-strong) !important; }
.v-nav-item.active { background: var(--v-accent-soft); color: var(--v-accent-strong) !important; }
html[data-theme="dark"] .v-nav-item.active { color: var(--v-coral-300) !important; }
.v-nav-count { margin-left: auto; font-size: 0.7rem; font-weight: 600; background: var(--v-accent); color: var(--v-white); border-radius: 50px; padding: 1px 7px; }
.v-main { min-width: 0; padding: var(--v-space-8) var(--v-space-8) var(--v-space-16); }
.v-main.narrow { max-width: 880px; margin: 0 auto; width: 100%; }
.v-drawer-toggle { display: none; }
.v-drawer-button { display: none; }
@media (max-width: 960px) {
    .v-shell { grid-template-columns: minmax(0, 1fr); }
    .v-drawer-button { display: inline-flex; }
    .v-rail { position: fixed; top: var(--v-topbar-h); left: 0; bottom: 0; width: min(280px, 82vw); height: auto; z-index: 39;
              transform: translateX(-100%); transition: transform var(--v-duration) var(--v-ease); box-shadow: var(--v-shadow-pop); }
    .v-drawer-toggle:checked ~ .v-rail { transform: translateX(0); }
    .v-main { padding: var(--v-space-6) var(--v-space-4) var(--v-space-12); }
}

/* --- Page header ----------------------------------------------------------------------------------------- */
.v-page-head { display: flex; align-items: flex-end; gap: var(--v-space-4); flex-wrap: wrap; margin-bottom: var(--v-space-6); }
.v-page-head h1 { font-size: var(--v-font-size-2xl); letter-spacing: -0.01em; }
.v-page-head .v-page-sub { color: var(--v-text-secondary); margin-top: 4px; }
.v-page-head .v-page-actions { margin-left: auto; display: flex; gap: var(--v-space-2); flex-wrap: wrap; }
.v-page-back { display: inline-flex; align-items: center; gap: 6px; font-size: var(--v-font-size-xs); color: var(--v-text-secondary) !important; margin-bottom: 6px; }
.v-section-label {
    display: inline-block;
    font-size: var(--v-font-size-xs);
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--v-text-muted);
}

/* --- Panel ----------------------------------------------------------------------------------------------- */
.v-panel { background: var(--v-surface); border: 1px solid var(--v-border); border-radius: var(--v-radius-md); box-shadow: var(--v-shadow-sm); }
.v-panel-head { display: flex; align-items: center; gap: var(--v-space-3); padding: var(--v-space-4) var(--v-space-5); border-bottom: 1px solid var(--v-border); }
.v-panel-head h2 { font-size: var(--v-font-size-md); }
.v-panel-head .v-panel-sub { color: var(--v-text-secondary); font-size: var(--v-font-size-xs); }
.v-panel-head .v-panel-actions { margin-left: auto; display: flex; gap: var(--v-space-2); }
.v-panel-body { padding: var(--v-space-5); }
.v-panel.flush .v-panel-body { padding: 0; }
.v-panel-foot { padding: var(--v-space-3) var(--v-space-5); border-top: 1px solid var(--v-border); display: flex; gap: var(--v-space-2); justify-content: flex-end; }

/* --- Stat ------------------------------------------------------------------------------------------------ */
.v-stat { background: var(--v-surface); border: 1px solid var(--v-border); border-radius: var(--v-radius-md); padding: var(--v-space-5); display: flex; flex-direction: column; gap: 4px; text-decoration: none !important; color: inherit; }
a.v-stat:hover { border-color: var(--v-border-strong); box-shadow: var(--v-shadow-md); }
.v-stat-label { font-size: var(--v-font-size-xs); font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--v-text-muted); }
.v-stat-value { font-family: var(--v-font-heading); font-size: var(--v-font-size-3xl); font-weight: 700; color: var(--v-text-strong); line-height: 1.1; }
.v-stat-value.brand { background: var(--v-gradient); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.v-stat-hint { font-size: var(--v-font-size-xs); color: var(--v-text-secondary); }

/* --- Forms ----------------------------------------------------------------------------------------------- */
.v-form { display: flex; flex-direction: column; gap: var(--v-space-4); }
.v-form-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: var(--v-space-4); }
.v-form-grid > * { grid-column: span 6; }
.v-form-grid > .span-3 { grid-column: span 3; }
.v-form-grid > .span-2 { grid-column: span 2; }
.v-form-grid > .span-4 { grid-column: span 4; }
@media (max-width: 700px) { .v-form-grid > .span-2, .v-form-grid > .span-3, .v-form-grid > .span-4 { grid-column: span 6; } }
.v-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.v-field-label { font-size: var(--v-font-size-xs); font-weight: 600; color: var(--v-text-strong); display: flex; gap: 6px; align-items: baseline; }
.v-field-label .v-optional { font-weight: 400; color: var(--v-text-muted); }
.v-field-help { font-size: var(--v-font-size-xs); color: var(--v-text-secondary); }
.v-field-error { font-size: var(--v-font-size-xs); color: var(--v-crit); font-weight: 500; }
.v-input, .v-select, .v-textarea,
html[data-ui="app"] input[type="text"], html[data-ui="app"] input[type="email"], html[data-ui="app"] input[type="password"],
html[data-ui="app"] input[type="url"], html[data-ui="app"] input[type="number"], html[data-ui="app"] input[type="search"],
html[data-ui="app"] input[type="tel"], html[data-ui="app"] input[type="date"], html[data-ui="app"] input[type="datetime-local"],
html[data-ui="app"] select, html[data-ui="app"] textarea {
    width: 100%;
    font: inherit;
    font-size: var(--v-font-size-sm);
    color: var(--v-text);
    background: var(--v-field);
    border: 1px solid var(--v-border-strong);
    border-radius: var(--v-radius-ctl);
    padding: 9px 12px;
    min-height: 40px;
    transition: border-color var(--v-duration) var(--v-ease), box-shadow var(--v-duration) var(--v-ease);
}
html[data-ui="app"] textarea { min-height: 96px; resize: vertical; line-height: 1.55; }
html[data-ui="app"] input:focus, html[data-ui="app"] select:focus, html[data-ui="app"] textarea:focus { outline: none; border-color: var(--v-border-focus); box-shadow: var(--v-focus-ring); }
html[data-ui="app"] input[aria-invalid="true"], html[data-ui="app"] .invalid { border-color: var(--v-crit) !important; }
html[data-ui="app"] input[type="checkbox"], html[data-ui="app"] input[type="radio"] { accent-color: var(--v-coral-600); width: 16px; height: 16px; }
.v-code-input { font-family: var(--v-font-mono) !important; font-size: 1.5rem !important; letter-spacing: 0.4em; text-align: center; }
.validation-message { color: var(--v-crit); font-size: var(--v-font-size-xs); }

.v-switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; }
.v-switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.v-switch-track { width: 36px; height: 20px; border-radius: 20px; background: var(--v-border-strong); position: relative; transition: background var(--v-duration) var(--v-ease); flex-shrink: 0; }
.v-switch-track::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: var(--v-white); box-shadow: var(--v-shadow-sm); transition: transform var(--v-duration) var(--v-ease); }
.v-switch input:checked + .v-switch-track { background: var(--v-gradient-coral); }
.v-switch input:checked + .v-switch-track::after { transform: translateX(16px); }
.v-switch input:focus-visible + .v-switch-track { box-shadow: var(--v-focus-ring); }
.v-switch input:disabled + .v-switch-track { opacity: 0.5; }

/* --- 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-ctl); border: 1px solid transparent; background: var(--v-info-soft); color: var(--v-text); }
.v-notice .v-icon { margin-top: 2px; color: var(--v-info); }
.v-notice-title { font-weight: 600; color: var(--v-text-strong); }
.v-notice-body { flex: 1; min-width: 0; }
.v-notice.success { background: var(--v-good-soft); }
.v-notice.success .v-icon { color: var(--v-good); }
.v-notice.warning { background: var(--v-warn-soft); }
.v-notice.warning .v-icon { color: var(--v-warn); }
.v-notice.error { background: var(--v-crit-soft); }
.v-notice.error .v-icon { color: var(--v-crit); }
.v-notice.brand { background: var(--v-accent-soft); }
.v-notice.brand .v-icon { color: var(--v-accent-strong); }

/* --- Chip & status dot ----------------------------------------------------------------------------------- */
.v-chip { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px; border-radius: 50px; font-size: 0.72rem; font-weight: 600; line-height: 1.6; white-space: nowrap; background: var(--v-bg-muted); color: var(--v-text-secondary); }
.v-chip.good { background: var(--v-good-soft); color: var(--v-good); }
.v-chip.warn { background: var(--v-warn-soft); color: var(--v-warn); }
.v-chip.crit { background: var(--v-crit-soft); color: var(--v-crit); }
.v-chip.info { background: var(--v-info-soft); color: var(--v-info); }
.v-chip.brand { background: var(--v-gradient); color: var(--v-white); }
.v-chip.outline { background: transparent; border: 1px solid var(--v-border-strong); }
.v-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; background: var(--v-text-muted); }
.v-dot.good { background: var(--v-good); }
.v-dot.warn { background: var(--v-warn); }
.v-dot.crit { background: var(--v-crit); }

/* --- Table ----------------------------------------------------------------------------------------------- */
.v-table-wrap { overflow-x: auto; }
.v-table { width: 100%; border-collapse: collapse; font-size: var(--v-font-size-sm); }
.v-table th { text-align: left; font-size: 0.7rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--v-text-muted); padding: 10px 16px; border-bottom: 1px solid var(--v-border); white-space: nowrap; }
.v-table td { padding: 12px 16px; border-bottom: 1px solid var(--v-border); vertical-align: middle; }
.v-table tr:last-child td { border-bottom: none; }
.v-table tbody tr:hover td { background: var(--v-surface-hover); }
.v-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.v-table .actions { text-align: right; white-space: nowrap; }
.v-table-foot { padding: 10px 16px; color: var(--v-text-secondary); font-size: var(--v-font-size-xs); border-top: 1px solid var(--v-border); }

/* --- Tabs ------------------------------------------------------------------------------------------------ */
.v-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--v-border); margin-bottom: var(--v-space-5); overflow-x: auto; }
.v-tab { appearance: none; background: none; border: none; font: inherit; font-weight: 600; font-size: var(--v-font-size-sm); color: var(--v-text-secondary) !important; padding: 10px 14px; border-bottom: 2px solid transparent; margin-bottom: -1px; cursor: pointer; white-space: nowrap; text-decoration: none !important; display: inline-flex; gap: 6px; align-items: center; }
.v-tab:hover { color: var(--v-text-strong) !important; }
.v-tab.active { color: var(--v-text-strong) !important; border-image: var(--v-gradient) 1; border-bottom-width: 2px; border-bottom-style: solid; }
.v-tab-count { font-size: 0.7rem; background: var(--v-bg-muted); border-radius: 50px; padding: 0 7px; }

/* --- Segmented ------------------------------------------------------------------------------------------- */
.v-segmented { display: inline-flex; padding: 3px; gap: 2px; background: var(--v-bg-muted); border-radius: 50px; }
.v-segmented button { appearance: none; border: none; background: transparent; font: inherit; font-size: var(--v-font-size-xs); font-weight: 600; color: var(--v-text-secondary); padding: 5px 12px; border-radius: 50px; cursor: pointer; }
.v-segmented button.active { background: var(--v-surface); color: var(--v-text-strong); box-shadow: var(--v-shadow-sm); }

/* --- Empty state ----------------------------------------------------------------------------------------- */
.v-empty { text-align: center; padding: var(--v-space-12) var(--v-space-6); color: var(--v-text-secondary); display: flex; flex-direction: column; align-items: center; gap: var(--v-space-2); }
.v-empty-icon { width: 48px; height: 48px; border-radius: 14px; background: var(--v-accent-soft); color: var(--v-accent-strong); display: flex; align-items: center; justify-content: center; margin-bottom: var(--v-space-2); }
.v-empty h3 { font-size: var(--v-font-size-lg); }

/* --- App tiles (the portal) ------------------------------------------------------------------------------ */
.v-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: var(--v-space-4); }
.v-tile {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: var(--v-space-3);
    padding: var(--v-space-6);
    min-height: 168px;
    background: var(--v-surface);
    border: 1px solid var(--v-border);
    border-radius: var(--v-radius-lg);
    color: inherit !important;
    text-decoration: none !important;
    overflow: hidden;
    transition: transform var(--v-duration) var(--v-ease), box-shadow var(--v-duration) var(--v-ease), border-color var(--v-duration) var(--v-ease);
}
.v-tile::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; background: var(--v-tile-accent, var(--v-gradient)); }
a.v-tile:hover { transform: translateY(-2px); box-shadow: var(--v-shadow-lg); border-color: var(--v-border-strong); }
.v-tile-icon { width: 44px; height: 44px; border-radius: 12px; display: flex; align-items: center; justify-content: center; background: var(--v-tile-accent, var(--v-gradient)); color: var(--v-white); }
.v-tile-icon .v-icon { width: 22px; height: 22px; }
.v-tile-name { font-family: var(--v-font-heading); font-weight: 700; font-size: var(--v-font-size-lg); color: var(--v-text-strong); display: flex; gap: 8px; align-items: center; }
.v-tile-desc { color: var(--v-text-secondary); font-size: var(--v-font-size-sm); line-height: 1.55; }
.v-tile-foot { margin-top: auto; display: flex; align-items: center; gap: 6px; font-size: var(--v-font-size-xs); font-weight: 600; color: var(--v-text-secondary); }
.v-tile.soon { opacity: 0.7; }
.v-tile.soon .v-tile-icon { filter: grayscale(0.4); }

/* --- Auth scene (sign-in pages): dark brand pitch beside a light card ------------------------------------ */
.v-auth { min-height: 100vh; min-height: 100dvh; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); background: var(--v-bg); }
.v-auth-pitch {
    position: relative;
    overflow: hidden;
    background: var(--v-navy-950);
    color: var(--v-white);
    padding: var(--v-space-10) var(--v-space-12);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.v-auth-pitch::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(232, 141, 141, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(232, 141, 141, 0.04) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: radial-gradient(ellipse 80% 70% at 60% 50%, black 20%, transparent 75%);
    -webkit-mask-image: radial-gradient(ellipse 80% 70% at 60% 50%, black 20%, transparent 75%);
}
.v-auth-pitch::after {
    content: "";
    position: absolute;
    width: 520px;
    height: 520px;
    right: -120px;
    top: 20%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(232, 141, 141, 0.16), rgba(240, 168, 104, 0.06) 45%, transparent 70%);
    filter: blur(40px);
}
.v-auth-pitch > * { position: relative; z-index: 1; }
.v-auth-pitch h1 { font-family: var(--v-font-heading); color: var(--v-white); font-size: clamp(2rem, 3.4vw, 3rem); line-height: 1.12; letter-spacing: -0.02em; max-width: 14em; }
.v-auth-pitch p { color: rgba(255, 255, 255, 0.55); font-size: 1rem; max-width: 30em; margin: var(--v-space-5) 0 0; }
.v-auth-code { font-family: var(--v-font-mono); color: rgba(240, 168, 104, 0.55); font-size: 0.8rem; }
.v-auth-code b { color: var(--v-orange-500); font-weight: 500; }
.v-auth-side { display: flex; flex-direction: column; padding: var(--v-space-8) var(--v-space-6); }
.v-auth-tools { display: flex; justify-content: flex-end; gap: var(--v-space-2); min-height: 36px; }
.v-auth-card { width: 100%; max-width: 400px; margin: auto; display: flex; flex-direction: column; gap: var(--v-space-5); padding: var(--v-space-8) 0; }
.v-auth-card h2 { font-size: var(--v-font-size-2xl); letter-spacing: -0.01em; }
.v-auth-card .v-auth-lead { color: var(--v-text-secondary); margin-top: -8px; }
.v-auth-foot { display: flex; justify-content: center; gap: var(--v-space-4); font-size: var(--v-font-size-xs); color: var(--v-text-muted); }
.v-auth-foot a { color: var(--v-text-secondary); }
.v-divider { display: flex; align-items: center; gap: var(--v-space-3); color: var(--v-text-muted); font-size: var(--v-font-size-xs); }
.v-divider::before, .v-divider::after { content: ""; flex: 1; height: 1px; background: var(--v-border); }
@media (max-width: 900px) {
    .v-auth { grid-template-columns: 1fr; }
    .v-auth-pitch { padding: var(--v-space-6); min-height: 0; gap: var(--v-space-6); }
    .v-auth-pitch h1 { font-size: 1.6rem; }
    .v-auth-pitch .v-auth-pitch-extra { display: none; }
}

/* --- Dialog ---------------------------------------------------------------------------------------------- */
.v-scrim { position: fixed; inset: 0; z-index: 90; background: rgba(15, 15, 35, 0.45); backdrop-filter: blur(3px); display: flex; align-items: center; justify-content: center; padding: var(--v-space-4); }
.v-dialog { width: 100%; max-width: 520px; max-height: calc(100vh - 32px); overflow: auto; background: var(--v-surface); border: 1px solid var(--v-border); border-radius: var(--v-radius-lg); box-shadow: var(--v-shadow-pop); }
.v-dialog.wide { max-width: 820px; }
.v-dialog-head { display: flex; align-items: flex-start; gap: var(--v-space-3); padding: var(--v-space-5) var(--v-space-6) 0; }
.v-dialog-head h2 { font-size: var(--v-font-size-lg); }
.v-dialog-body { padding: var(--v-space-4) var(--v-space-6); }
.v-dialog-foot { display: flex; justify-content: flex-end; gap: var(--v-space-2); padding: var(--v-space-4) var(--v-space-6) var(--v-space-5); }

/* --- Menu (details/summary popover) ---------------------------------------------------------------------- */
.v-menu { position: relative; }
.v-menu > summary { list-style: none; cursor: pointer; }
.v-menu > summary::-webkit-details-marker { display: none; }
.v-menu-pop { position: absolute; right: 0; top: calc(100% + 6px); min-width: 220px; z-index: 60; background: var(--v-surface-raised); border: 1px solid var(--v-border); border-radius: var(--v-radius-md); box-shadow: var(--v-shadow-pop); padding: 6px; display: flex; flex-direction: column; }
.v-menu-head { padding: 8px 10px 10px; border-bottom: 1px solid var(--v-border); margin-bottom: 4px; }
.v-menu-head strong { display: block; color: var(--v-text-strong); }
.v-menu-head span { font-size: var(--v-font-size-xs); color: var(--v-text-secondary); }
.v-menu-item { appearance: none; border: none; background: none; font: inherit; text-align: left; display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; color: var(--v-text) !important; cursor: pointer; text-decoration: none !important; width: 100%; }
.v-menu-item:hover { background: var(--v-surface-hover); }
.v-menu-item.danger { color: var(--v-crit) !important; }
.v-avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--v-gradient); color: var(--v-white); font-weight: 700; font-size: 0.8rem; display: inline-flex; align-items: center; justify-content: center; font-family: var(--v-font-heading); }

/* --- Definition list ------------------------------------------------------------------------------------- */
.v-dl { display: grid; grid-template-columns: max-content 1fr; gap: 8px 24px; margin: 0; }
.v-dl dt { color: var(--v-text-secondary); font-size: var(--v-font-size-xs); font-weight: 600; padding-top: 2px; }
.v-dl dd { margin: 0; color: var(--v-text); min-width: 0; overflow-wrap: anywhere; }

/* --- Code box (e-mailed code shown in demo mode) --------------------------------------------------------- */
.v-codebox { font-family: var(--v-font-mono); font-size: 1.6rem; letter-spacing: 0.35em; text-align: center; padding: 14px; border-radius: var(--v-radius-md); background: var(--v-bg-deep); color: var(--v-orange-500); }

/* --- Swatches (design gallery) --------------------------------------------------------------------------- */
.v-swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: var(--v-space-3); }
.v-swatch { border: 1px solid var(--v-border); border-radius: var(--v-radius-md); overflow: hidden; background: var(--v-surface); }
.v-swatch-color { height: 64px; }
.v-swatch-name { padding: 8px 10px; font-family: var(--v-font-mono); font-size: 0.72rem; color: var(--v-text-secondary); }

/* --- Reduced motion -------------------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
    html[data-ui="app"] *, html[data-ui="app"] *::before, html[data-ui="app"] *::after { transition: none !important; animation: none !important; }
}

/* --- Print ----------------------------------------------------------------------------------------------- */
@media print {
    .v-topbar, .v-rail, .v-page-actions, .v-btn { display: none !important; }
    .v-shell { display: block; }
    .v-main { padding: 0; }
    .v-panel { box-shadow: none; }
}

/* --- Blazor error bar ------------------------------------------------------------------------------------ */
#blazor-error-ui.v-errorbar { display: none; position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 100; background: var(--v-navy-800); color: var(--v-white); padding: 10px 16px; border-radius: 50px; box-shadow: var(--v-shadow-pop); font-size: var(--v-font-size-sm); gap: 12px; align-items: center; }
#blazor-error-ui.v-errorbar a { color: var(--v-orange-300); }
#blazor-error-ui.v-errorbar .dismiss { background: none; border: none; color: inherit; font-size: 1.1rem; cursor: pointer; }
