/* ────────────────────────────────────────────────────────────────────────────
   VE Dash — Vlieg Engineering dashboard, styled after Rodly.Dashboard.

   Shell: MainLayout (side navigation + page) and SideNav (menu in Components/Layout/DashNavigation.cs).
   Every page starts with <PageHeader>; the page content follows directly (the shell provides the gutter).

   Reusable building blocks (prefer these for new pages):
   - Page header   <PageHeader Eyebrow Title Accent Lead> (+ <Actions>, + child content for a bar under the title)
                   or raw: .page-header > .page-header__inner > .page-header__text (.page-header__eyebrow/__title/__lead) + .page-header__actions
   - Section title .ve-section-title (small uppercase label above a block); .section-title is the legacy equivalent
   - Card / panel  <ContentCard Title Actions Flush> or .ve-card (+ .ve-card__header, .ve-card__title, .ve-card__text, .ve-card__body,
                   modifiers .ve-card--flush (no padding, e.g. around a table) and .ve-card--hover)
   - Data table    .ve-table-wrap > table.ve-table (cell helpers .is-num, .is-muted, .is-actions; row .is-selected;
                   .ve-table--clickable for clickable rows; .ve-table__primary / .ve-table__secondary for two-line cells)
   - Filter table  .ve-filter-card > .ve-filter-toolbar (.ve-filter-search, .ve-filter-toggle) + <ActiveFilters> + table.ve-filter-table
                   with <ColumnFilter> in the headers (see Tickets and CRM)
   - Status badge  <StatusBadge Variant="BadgeVariant.Info" Dot> or .ve-badge .ve-badge--neutral|info|warning|success|danger (+ .ve-badge__dot)
   - Buttons       .hbtn + .hbtn--primary|outline|ghost|danger|on-dark, size .hbtn--sm, round .hbtn--icon; small icon button .icon-button(--danger)
   - Messages      .ve-message .ve-message--info|success|warning|danger (Bootstrap .alert-* are styled the same)
   - Empty/loading <EmptyState Icon Title Text>, <LoadingIndicator>, .ve-spinner
   - Landscape     .legend (dots and icons with a label, in the bar under a page header), .product-swatch (the colour of a product,
                   set with --product) and .spin (an icon that turns while its work runs); shared by Release and Uptime
   - Markdown      .markdown-body around rendered markdown (headings, lists, code, pre, tables, blockquote, images)
   Colours and sizes are the --ve-* tokens below; use them instead of literal values.
──────────────────────────────────────────────────────────────────────────── */

@font-face {
    font-family: "Poppins";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("fonts/poppins/Poppins-Regular.ttf") format("truetype");
}

@font-face {
    font-family: "Poppins";
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url("fonts/poppins/Poppins-Medium.ttf") format("truetype");
}

@font-face {
    font-family: "Poppins";
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url("fonts/poppins/Poppins-SemiBold.ttf") format("truetype");
}

@font-face {
    font-family: "Poppins";
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url("fonts/poppins/Poppins-Bold.ttf") format("truetype");
}

/* ── Design tokens ───────────────────────────────────────────────────────── */

:root {
    --ve-blue: #2563eb;
    --ve-blue-light: #60a5fa;
    --ve-blue-bright: #1986f2;
    --ve-navy: #1e3a8a;
    --ve-ink: #0f172a;
    --ve-ink-2: #111a2e;
    --ve-ink-deep: #0b1220;
    --ve-text: #0f172a;
    --ve-text-2: #1e293b;
    --ve-muted: #64748b;
    --ve-muted-2: #475569;
    --ve-muted-light: #94a3b8;
    --ve-text-on-dark: #e2e8f0;
    --ve-muted-on-dark: #94a3b8;
    --ve-surface: #ffffff;
    --ve-surface-2: #f8fafc;
    --ve-surface-3: #f1f5f9;
    --ve-line: rgba(37, 99, 235, 0.12);
    --ve-line-strong: rgba(37, 99, 235, 0.2);
    --ve-tint: rgba(37, 99, 235, 0.07);
    --ve-success: #16a34a;
    --ve-warning: #f59e0b;
    --ve-danger: #dc2626;
    --ve-danger-deep: #b32121;
    --ve-gradient: linear-gradient(135deg, #60a5fa 0%, #2563eb 100%);
    --ve-radius: 10px;
    --ve-radius-lg: 16px;
    --ve-radius-pill: 999px;
    --ve-shadow: 0 8px 22px rgba(37, 99, 235, 0.12);
    --ve-shadow-lg: 0 30px 80px rgba(2, 6, 23, 0.25);
    --ve-focus: 0 0 0 4px rgba(25, 134, 242, 0.15);
    --ve-ease: cubic-bezier(0.2, 0.75, 0.15, 1);
    --ve-font: "Poppins", "Segoe UI", sans-serif;
    --ve-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    /* Layout: the horizontal padding of a page and the width of the side navigation (--ve-nav-width follows the navigation). */
    --ve-gutter: 2.5rem;
    --ve-nav-expanded: 15rem;
    --ve-nav-collapsed: 3.6rem;
    --ve-nav-width: 0px;
    /* Legacy names, kept for the existing (scoped) styles: */
    --ve-bg: var(--ve-surface);
    --ve-bg-soft: var(--ve-surface-2);
    --ve-blue-soft: var(--ve-tint);
    --ve-blue-border: var(--ve-line-strong);
    --ve-ink-soft: var(--ve-ink);
    --ve-slate: var(--ve-muted-2);
    --ve-slate-2: #334155;
    --ve-border: var(--ve-line-strong);
    --ve-border-soft: var(--ve-line);
    --ve-radius-card: var(--ve-radius-lg);
}

body:has(.side-nav) {
    --ve-nav-width: var(--ve-nav-expanded);
}

body:has(.side-nav--collapsed) {
    --ve-nav-width: var(--ve-nav-collapsed);
}

@media (max-width: 900px) {
    :root {
        --ve-gutter: 1.25rem;
    }

    body:has(.side-nav),
    body:has(.side-nav--collapsed) {
        --ve-nav-width: 0px;
    }
}

/* ── Reset / base ─────────────────────────────────────────────────────────── */

*,
*::before,
*::after {
    box-sizing: border-box;
}

/* The space of the scrollbar is always reserved: a page that gets shorter (e.g. a filter) does not get wider. */
html {
    scrollbar-gutter: stable;
}

html,
body {
    margin: 0;
    padding: 0;
    font-family: var(--ve-font);
    color: var(--ve-text);
    background-color: var(--ve-surface);
}

/* Without a session (the login), the page is dark from the first paint (html.auth-boot, see App.razor): the login reloads after every step
   and must not flash white. The shell of the layout is transparent meanwhile, until the login itself renders. */
html.auth-boot,
html.auth-boot body {
    background:
        radial-gradient(60rem 40rem at 15% 110%, rgba(25, 134, 242, 0.22), transparent 60%),
        linear-gradient(160deg, var(--ve-ink-deep) 0%, var(--ve-ink-2) 100%) fixed;
    background-color: var(--ve-ink-deep);
    min-height: 100vh;
}

html.auth-boot .dash {
    background: transparent;
}

body {
    min-height: 100vh;
}

button {
    font: inherit;
}

a {
    text-decoration: none;
    color: inherit;
}

h1:focus {
    outline: none;
}

code {
    font-family: var(--ve-mono);
    font-size: 0.85em;
    color: var(--ve-navy);
}

/* ── Page header (full-bleed dark hero, see PageHeader.razor) ─────────────── */

.page-header {
    position: relative;
    overflow: hidden;
    margin: 0 calc(-1 * var(--ve-gutter)) 1.75rem;
    color: var(--ve-text-on-dark);
    background:
        radial-gradient(50rem 30rem at 10% 120%, rgba(25, 134, 242, 0.28), transparent 60%),
        radial-gradient(30rem 20rem at 95% -20%, rgba(96, 165, 250, 0.18), transparent 60%),
        linear-gradient(160deg, var(--ve-ink-deep) 0%, var(--ve-ink-2) 100%);
}

    /* Blueprint grid: */
    .page-header::before {
        content: "";
        position: absolute;
        inset: -64px;
        background-image:
            linear-gradient(rgba(148, 163, 184, 0.12) 1px, transparent 1px),
            linear-gradient(90deg, rgba(148, 163, 184, 0.12) 1px, transparent 1px);
        background-size: 64px 64px;
        mask-image: radial-gradient(ellipse at 30% 60%, #000 10%, transparent 70%);
        pointer-events: none;
    }

.page-header__inner {
    position: relative;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 2rem;
    padding: 2.4rem var(--ve-gutter) 1.8rem;
}

.page-header--compact .page-header__inner {
    padding-top: 1.5rem;
    padding-bottom: 1.3rem;
    align-items: center;
}

.page-header__eyebrow {
    margin: 0 0 0.6rem;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--ve-blue-light);
}

.page-header__title {
    margin: 0;
    font-size: clamp(1.6rem, 2.6vw, 2.4rem);
    font-weight: 700;
    line-height: 1.05;
    letter-spacing: -0.03em;
    color: #ffffff;
}

.page-header--compact .page-header__title {
    font-size: clamp(1.3rem, 2vw, 1.7rem);
}

.page-header__accent {
    background: linear-gradient(90deg, var(--ve-blue-light), var(--ve-blue-bright));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.page-header__lead {
    max-width: 44rem;
    margin: 0.7rem 0 0;
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--ve-muted-on-dark);
}

.page-header__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    flex: 0 0 auto;
}

.page-header__bar {
    position: relative;
    padding: 0 var(--ve-gutter) 1.2rem;
}

@media (max-width: 860px) {
    .page-header__inner {
        flex-direction: column;
        align-items: flex-start;
        padding-top: 1.6rem;
        padding-bottom: 1.2rem;
    }
}

/* ── Headings (legacy page classes, still used inside panels) ─────────────── */

.page-title {
    font-size: clamp(1.6rem, 2.6vw, 2.2rem);
    font-weight: 700;
    line-height: 1.1;
    color: var(--ve-ink);
    margin: 0 0 0.5rem;
    letter-spacing: -0.03em;
}

.page-subtitle {
    font-size: 0.88rem;
    color: var(--ve-muted-2);
    line-height: 1.6;
    margin: 0 0 1.25rem;
    max-width: 46rem;
}

.section-title,
.ve-section-title {
    margin: 0 0 0.75rem;
    font-size: 0.78rem;
    font-weight: 600;
    line-height: 1.4;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--ve-muted);
}

.page-shell {
    padding: 0 0 3rem;
}

/* ── Grid, cards & stat tiles ─────────────────────────────────────────────── */

.ve-card {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 1.1rem 1.25rem;
    border: 1px solid var(--ve-line);
    border-radius: var(--ve-radius-lg);
    background: var(--ve-surface);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    transition: box-shadow 0.2s, border-color 0.2s, transform 0.2s;
}

.ve-card + .ve-card {
    margin-top: 1rem;
}

.ve-card--hover:hover {
    border-color: var(--ve-line-strong);
    box-shadow: var(--ve-shadow);
    transform: translateY(-1px);
}

.ve-card--flush {
    padding: 0;
    gap: 0;
    overflow: hidden;
}

.ve-card__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.ve-card--flush .ve-card__header {
    padding: 0.9rem 1.25rem;
    border-bottom: 1px solid var(--ve-line);
}

.ve-card__title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--ve-ink);
}

.ve-card__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

.ve-card__body {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    min-width: 0;
}

.ve-card__text {
    margin: 0;
    font-size: 0.85rem;
    line-height: 1.55;
    color: var(--ve-muted-2);
}

.ve-card--flush .ve-table-wrap {
    border: none;
    border-radius: 0;
    margin: 0;
}

/* Bootstrap cards (analytics) get the same look: */
.card {
    border: 1px solid var(--ve-line);
    border-radius: var(--ve-radius-lg);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    background: var(--ve-surface);
}

.card-header {
    background: transparent;
    border-bottom: 1px solid var(--ve-line);
    font-weight: 600;
    color: var(--ve-ink);
}

.card-body {
    padding: 1.1rem 1.25rem;
}

.analytics-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
}

.analytics-summary .card-body {
    padding: 1rem 1.2rem;
}

.analytics-summary__value {
    font-size: 1.7rem;
    font-weight: 700;
    color: var(--ve-ink);
    line-height: 1.1;
    letter-spacing: -0.03em;
}

.analytics-summary__label {
    margin-top: 0.35rem;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--ve-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* ── Buttons ──────────────────────────────────────────────────────────────── */

.hbtn,
.btn.token-btn,
.billing-footer-open-btn,
.view-toggle-btn,
.client-button,
.tag-add-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    border-radius: var(--ve-radius-pill);
    font-family: inherit;
    font-weight: 600;
    line-height: 1.2;
    cursor: pointer;
    white-space: nowrap;
    text-decoration: none;
    transition: opacity 0.2s, box-shadow 0.2s, background-color 0.2s, border-color 0.2s, color 0.2s;
}

.hbtn {
    padding: 0.8rem 1.5rem;
    font-size: 0.92rem;
    border: 1px solid transparent;
}

.hbtn--primary,
.btn.token-btn,
.billing-footer-open-btn {
    background: var(--ve-gradient);
    color: #ffffff;
    box-shadow: 0 8px 22px rgba(37, 99, 235, 0.24);
    border: 1px solid transparent;
}

    .hbtn--primary:hover,
    .btn.token-btn:hover,
    .billing-footer-open-btn:hover {
        opacity: 0.88;
        color: #ffffff;
    }

.hbtn--outline {
    background: var(--ve-surface);
    color: var(--ve-navy);
    border: 1px solid var(--ve-line-strong);
}

    .hbtn--outline:hover {
        background: rgba(37, 99, 235, 0.05);
        color: var(--ve-navy);
    }

.hbtn--ghost {
    background: transparent;
    color: var(--ve-navy);
    box-shadow: none;
}

    .hbtn--ghost:hover {
        background: var(--ve-tint);
        color: var(--ve-navy);
    }

.hbtn--danger {
    background: var(--ve-danger);
    color: #ffffff;
    box-shadow: 0 8px 22px rgba(220, 38, 38, 0.2);
}

    .hbtn--danger:hover {
        opacity: 0.88;
        color: #ffffff;
    }

.hbtn--on-dark {
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.25);
}

    .hbtn--on-dark:hover {
        background: rgba(255, 255, 255, 0.2);
        color: #ffffff;
    }

.hbtn--sm {
    padding: 0.55rem 1.1rem;
    font-size: 0.85rem;
}

.hbtn--icon {
    padding: 0.5rem;
    border-radius: var(--ve-radius-pill);
}

.hbtn:disabled,
.hbtn.is-disabled {
    opacity: 0.55;
    cursor: default;
    pointer-events: none;
}

.icon-button {
    display: inline-grid;
    place-items: center;
    width: 2rem;
    height: 2rem;
    padding: 0;
    border: 1px solid transparent;
    border-radius: 8px;
    background: transparent;
    color: var(--ve-muted-2);
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}

    .icon-button:hover:not(:disabled) {
        background: var(--ve-tint);
        color: var(--ve-navy);
    }

    .icon-button:disabled {
        opacity: 0.4;
        cursor: default;
    }

    .icon-button--danger:hover:not(:disabled) {
        background: rgba(220, 38, 38, 0.08);
        color: var(--ve-danger);
    }

/* Bootstrap buttons, aligned with .hbtn */
.btn {
    border-radius: var(--ve-radius-pill);
    font-weight: 600;
    font-family: inherit;
}

.btn-primary {
    background: var(--ve-gradient);
    border: none;
    color: #ffffff;
    box-shadow: 0 8px 22px rgba(37, 99, 235, 0.24);
}

    .btn-primary:hover,
    .btn-primary:focus {
        background: var(--ve-gradient);
        opacity: 0.88;
        color: #ffffff;
    }

.btn-outline-secondary {
    color: var(--ve-navy);
    border-color: var(--ve-line-strong);
    background: var(--ve-surface);
}

    .btn-outline-secondary:hover {
        color: var(--ve-navy);
        background: var(--ve-tint);
        border-color: var(--ve-line-strong);
    }

.btn-outline-danger {
    color: var(--ve-danger);
    border-color: rgba(220, 38, 38, 0.35);
    background: var(--ve-surface);
}

    .btn-outline-danger:hover {
        color: #ffffff;
        background: var(--ve-danger);
        border-color: var(--ve-danger);
    }

.btn-danger {
    background: var(--ve-danger);
    border: none;
}

    .btn-danger:hover {
        background: var(--ve-danger-deep);
    }

.btn-link {
    color: var(--ve-blue);
    text-decoration: none;
}

    .btn-link:hover {
        color: var(--ve-navy);
    }

.btn-close {
    border-radius: 50%;
}

/* ── Forms ────────────────────────────────────────────────────────────────── */

.form-label {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--ve-muted);
    margin-bottom: 0.35rem;
}

.form-control,
.form-select {
    width: 100%;
    border-radius: var(--ve-radius);
    border: 1px solid var(--ve-line-strong);
    background-color: var(--ve-surface);
    color: var(--ve-text);
    font-family: inherit;
    font-size: 0.88rem;
    padding: 0.55rem 0.8rem;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.form-select {
    padding-right: 2.25rem;
}

    .form-control:focus,
    .form-select:focus {
        outline: none;
        border-color: var(--ve-blue-bright);
        box-shadow: var(--ve-focus);
    }

    .form-control:disabled,
    .form-select:disabled {
        background-color: var(--ve-surface-3);
        color: var(--ve-muted);
    }

.form-control-sm,
.form-select-sm {
    border-radius: 8px;
    font-size: 0.82rem;
    padding: 0.35rem 0.6rem;
}

.form-select-sm {
    padding-right: 2rem;
}

.form-check-input {
    accent-color: var(--ve-blue);
    border-color: rgba(37, 99, 235, 0.35);
}

    .form-check-input:checked {
        background-color: var(--ve-blue);
        border-color: var(--ve-blue);
    }

    .form-check-input:focus {
        box-shadow: var(--ve-focus);
    }

.form-check-label {
    color: var(--ve-text-2);
    font-size: 0.88rem;
}

/* MudBlazor inputs & popovers */
.mud-input-control,
.mud-select,
.mud-input-label {
    font-family: inherit;
    color: var(--ve-text-2);
}

.mud-input-outlined .mud-input-outlined-border {
    border-radius: var(--ve-radius);
}

.mud-popover {
    background: var(--ve-surface);
    border: 1px solid var(--ve-line);
    border-radius: 12px;
    box-shadow: 0 12px 32px rgba(2, 6, 23, 0.16);
    overflow: hidden;
}

    .mud-popover .mud-list-item {
        font-family: inherit;
        color: var(--ve-text-2);
    }

        .mud-popover .mud-list-item:hover {
            background: var(--ve-tint);
            color: var(--ve-ink);
        }

        .mud-popover .mud-list-item.mud-selected-item {
            background: var(--ve-tint);
            color: var(--ve-blue);
            font-weight: 600;
        }

            .mud-popover .mud-list-item.mud-selected-item:hover {
                background: rgba(37, 99, 235, 0.12);
                color: var(--ve-blue);
            }

.input-item {
    padding-bottom: 1rem;
}

.tfc-meta,
.tfc-desc,
.tfc-addr,
.tfc-action {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.tfc-action {
    justify-content: flex-end;
}

    .tfc-meta .form-label,
    .tfc-desc .form-label,
    .tfc-addr .form-label,
    .tfc-action .form-label {
        margin-bottom: 0.3rem;
    }

/* ── Messages, alerts & badges ────────────────────────────────────────────── */

.alert,
.ve-message {
    display: block;
    border: 1px solid transparent;
    border-radius: var(--ve-radius);
    padding: 0.75rem 1rem;
    font-size: 0.86rem;
    line-height: 1.5;
}

    .alert a,
    .ve-message a {
        font-weight: 600;
        text-decoration: underline;
        color: inherit;
    }

.alert-info,
.ve-message--info {
    background: rgba(37, 99, 235, 0.08);
    border-color: rgba(37, 99, 235, 0.12);
    color: var(--ve-navy);
}

.alert-success,
.ve-message--success {
    background: rgba(22, 163, 74, 0.1);
    border-color: rgba(22, 163, 74, 0.16);
    color: #15803d;
}

.alert-warning,
.ve-message--warning {
    background: rgba(245, 158, 11, 0.12);
    border-color: rgba(245, 158, 11, 0.2);
    color: #b45309;
}

.alert-danger,
.ve-message--danger {
    background: rgba(220, 38, 38, 0.08);
    border-color: rgba(220, 38, 38, 0.14);
    color: var(--ve-danger-deep);
}

.badge {
    border-radius: var(--ve-radius-pill);
    font-weight: 600;
    padding: 0.35em 0.65em;
}

.ve-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.18rem 0.6rem;
    border-radius: var(--ve-radius-pill);
    font-size: 0.72rem;
    font-weight: 600;
    line-height: 1.5;
    white-space: nowrap;
    background: var(--ve-surface-3);
    color: var(--ve-muted-2);
}

.ve-badge__dot {
    width: 0.45rem;
    height: 0.45rem;
    border-radius: 50%;
    background: currentColor;
}

.ve-badge--neutral { background: var(--ve-surface-3); color: var(--ve-muted-2); }
.ve-badge--info { background: rgba(37, 99, 235, 0.1); color: var(--ve-navy); }
.ve-badge--success { background: rgba(22, 163, 74, 0.12); color: #15803d; }
.ve-badge--warning { background: rgba(245, 158, 11, 0.14); color: #b45309; }
.ve-badge--danger { background: rgba(220, 38, 38, 0.1); color: var(--ve-danger-deep); }

.text-danger {
    color: var(--ve-danger) !important;
}

.text-muted {
    color: var(--ve-muted) !important;
}

.muted {
    color: var(--ve-muted);
}

.mono {
    font-family: var(--ve-mono);
    font-size: 0.8rem;
}

/* ── Tables ───────────────────────────────────────────────────────────────── */

.ve-table-wrap,
.so-table-wrapper,
.tgc-table-wrapper,
.travel-table-scroll,
.table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border: 1px solid var(--ve-line);
    border-radius: var(--ve-radius-lg);
    background: var(--ve-surface);
    margin: 0.5rem 0 1.75rem;
}

.ve-table,
.cix-grid-table,
.tgc-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--ve-surface);
    font-size: 0.86rem;
}

.cix-grid-table {
    min-width: 1100px;
    table-layout: fixed;
}

    .ve-table th,
    .cix-grid-table .th-cix,
    .tgc-th {
        padding: 0.7rem 1rem;
        text-align: left;
        font-size: 0.68rem;
        font-weight: 600;
        letter-spacing: 0.12em;
        text-transform: uppercase;
        color: var(--ve-muted);
        background: var(--ve-surface-2);
        border-bottom: 1px solid var(--ve-line);
        white-space: nowrap;
    }

    .ve-table td,
    .cix-grid-table .td-cix,
    .tgc-td {
        padding: 0.7rem 1rem;
        color: var(--ve-text-2);
        border-bottom: 1px solid var(--ve-line);
        vertical-align: top;
        word-break: break-word;
    }

    .ve-table td {
        vertical-align: middle;
    }

    .ve-table tbody tr:last-child td,
    .cix-grid-table .tr-cix:last-child .td-cix {
        border-bottom: none;
    }

    .ve-table tbody tr,
    .cix-grid-table .tr-cix .td-cix {
        transition: background 0.15s;
    }

        .ve-table tbody tr:hover,
        .cix-grid-table .tr-cix:hover .td-cix {
            background: var(--ve-surface-2);
        }

.ve-table--clickable tbody tr {
    cursor: pointer;
}

.ve-table tbody tr.is-selected {
    background: rgba(37, 99, 235, 0.06);
}

.ve-table .is-num {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.ve-table .is-muted {
    color: var(--ve-muted);
}

.ve-table .is-actions {
    text-align: right;
    white-space: nowrap;
}

.ve-table__primary {
    display: block;
    font-weight: 600;
    color: var(--ve-ink);
}

.ve-table__secondary {
    display: block;
    font-size: 0.75rem;
    color: var(--ve-muted);
}

.cix-grid-table .tr-cix.not-billable .td-cix {
    color: var(--ve-muted-light);
    text-decoration: line-through;
}

.cix-grid-table .tr-cix.so-totals-row .td-cix,
.cix-grid-table tfoot .td-cix {
    background: var(--ve-surface-2);
    border-top: 1px solid var(--ve-line);
    font-weight: 700;
    color: var(--ve-ink);
}

.col-billable { width: 70px; text-align: center; }
.col-date { width: 110px; }
.col-tags { width: 200px; }
.col-notes { width: auto; }
.col-hours { width: 130px; text-align: right; }

.hours-input {
    width: 84px;
    text-align: right;
}

.hours-overridden {
    color: var(--ve-blue);
    font-weight: 600;
}

/* S&O / month overview tables */
.so-table {
    table-layout: auto;
    min-width: 1100px;
}

.so-col-user {
    min-width: 160px;
    white-space: nowrap;
}

.so-col-month {
    min-width: 60px;
    text-align: right !important;
    font-variant-numeric: tabular-nums;
}

.so-col-total {
    min-width: 72px;
    text-align: right !important;
    background: var(--ve-surface-2);
    border-left: 1px solid var(--ve-line);
    font-variant-numeric: tabular-nums;
}

.so-has-hours {
    color: var(--ve-text-2);
}

.so-empty {
    color: var(--ve-muted-light);
}

.so-year-total {
    color: var(--ve-blue);
}

.so-table .overview-group-separator .td-cix.overview-group-label {
    background: rgba(37, 99, 235, 0.06);
    color: var(--ve-navy);
    font-size: 0.68rem;
    font-weight: 600;
    padding: 0.45rem 1rem;
    border-top: 1px solid var(--ve-line);
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.so-table .overview-group-separator:hover .td-cix {
    background: rgba(37, 99, 235, 0.06) !important;
}

/* Tag summary table inside the offcanvas */
.tgc-table {
    min-width: 520px;
}

.tgc-th-hours,
.tgc-th-total,
.tgc-td-hours,
.tgc-td-total {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.tgc-tr:hover {
    background: var(--ve-surface-2);
}

.tgc-td-total {
    color: var(--ve-blue);
}

.tgc-zero {
    color: var(--ve-muted-light);
}

.tgc-tr-total {
    background: var(--ve-surface-2);
}

    .tgc-tr-total .tgc-td {
        border-top: 1px solid var(--ve-line);
        border-bottom: none;
        color: var(--ve-ink);
    }

    .tgc-tr-total .tgc-td-total {
        color: var(--ve-blue);
    }

/* ── Timesheet groups ─────────────────────────────────────────────────────── */

.user-timesheet {
    margin-bottom: 1.75rem;
}

.user-timesheet-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 0.6rem;
}

.user-timesheet-name {
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--ve-ink);
}

.user-timesheet-total {
    font-size: 1rem;
    font-weight: 700;
    color: var(--ve-blue);
}

.tag-group {
    margin-left: 1.25rem;
    margin-bottom: 1.1rem;
    background: var(--ve-surface);
    border: 1px solid var(--ve-line);
    border-radius: var(--ve-radius-lg);
    overflow-x: auto;
}

.tag-group-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.7rem 1rem;
    background: var(--ve-surface-2);
    border-bottom: 1px solid var(--ve-line);
    border-left: 4px solid var(--ve-blue);
}

.tag-group-name {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--ve-ink);
}

.tag-group-total {
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--ve-blue);
}

.tag-group .cix-grid-table {
    border: none;
    border-radius: 0;
    box-shadow: none;
}

.note-group {
    margin: 0.5rem 0.75rem 0.75rem 0.75rem;
    border: 1px solid var(--ve-line);
    border-radius: 12px;
    overflow-x: auto;
}

.note-group-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0.85rem;
    background: var(--ve-surface);
    border-bottom: 1px solid var(--ve-line);
    border-left: 3px solid var(--ve-muted-light);
}

.note-group-name,
.note-group-total {
    font-size: 0.86rem;
    font-weight: 600;
    color: var(--ve-muted-2);
}

.note-group .cix-grid-table {
    border: none;
    border-radius: 0;
    box-shadow: none;
    width: 100%;
}

/* ── Pill selectors & view toggles (Rodly filter chips / segmented control) ── */

.client-button-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.client-button {
    padding: 0.4rem 0.9rem;
    font-size: 0.8rem;
    font-weight: 500;
    background: var(--ve-surface);
    color: var(--ve-text-2);
    border: 1px solid var(--ve-line-strong);
}

    .client-button:hover {
        background: var(--ve-tint);
        color: var(--ve-text-2);
    }

    .client-button.active {
        background: var(--ve-ink);
        border-color: var(--ve-ink);
        color: #ffffff;
    }

.view-toggle {
    display: inline-flex;
    gap: 0.2rem;
    padding: 0.2rem;
    background: var(--ve-surface-3);
    border-radius: var(--ve-radius-pill);
}

.view-toggle-btn {
    padding: 0.4rem 0.95rem;
    font-size: 0.82rem;
    font-weight: 500;
    background: transparent;
    color: var(--ve-muted-2);
    border: none;
}

    .view-toggle-btn:hover {
        color: var(--ve-ink);
    }

    .view-toggle-btn.active {
        background: var(--ve-ink);
        color: #ffffff;
    }

/* ── Pie chart & legend ───────────────────────────────────────────────────── */

.overview-chart-wrapper {
    min-width: 0;
    height: 380px;
}

.overview-employee-filter {
    min-width: 180px;
    max-width: 240px;
    background: var(--ve-surface-2);
    border: 1px solid var(--ve-line);
    border-radius: var(--ve-radius-lg);
    padding: 1rem 1.1rem;
    font-size: 0.86rem;
}

.overview-employee-filter--row {
    min-width: 0;
    max-width: none;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.25rem 1.25rem;
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 0 0 0.5rem;
    margin-bottom: 1rem;
    box-shadow: none;
}

.overview-employee-filter__label {
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--ve-muted);
}

.pie-legend {
    min-width: 180px;
    max-width: 260px;
    font-size: 0.86rem;
    flex-shrink: 0;
    background: var(--ve-surface);
    border: 1px solid var(--ve-line);
    border-radius: var(--ve-radius-lg);
    padding: 0.85rem;
}

.pie-legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.22rem 0.35rem;
    border-radius: 8px;
    transition: background-color 0.15s;
}

    .pie-legend-item.pie-legend-hovered {
        background: var(--ve-tint);
    }

.pie-legend-swatch {
    width: 12px;
    height: 12px;
    border-radius: 4px;
    flex-shrink: 0;
}

.pie-legend-name {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pie-legend-hours {
    font-variant-numeric: tabular-nums;
    color: var(--ve-muted-2);
}

.pie-legend-total {
    display: flex;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--ve-ink);
}

.pie-subtag-table {
    width: 400px;
    flex-shrink: 0;
    background: var(--ve-surface);
    border: 1px solid var(--ve-line);
    border-radius: var(--ve-radius-lg);
    padding: 0.85rem;
}

.pie-tooltip,
.bar-tooltip {
    position: fixed;
    pointer-events: none;
    z-index: 9999;
    background: rgba(15, 23, 42, 0.92);
    color: #ffffff;
    padding: 0.35rem 0.7rem;
    border-radius: 8px;
    font-size: 0.8rem;
    white-space: nowrap;
}

/* ── Stacked monthly bar chart ───────────────────────────────────────────── */

.bar-chart-wrap {
    min-width: 0;
}

.bar-chart-layout {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
}

    .bar-chart-layout .bar-chart-scaffold {
        flex: 1;
        min-width: 0;
    }

.bar-chart-scaffold {
    display: grid;
    grid-template-columns: 36px 52px 1fr;
    grid-template-rows: 340px auto;
    column-gap: 0.5rem;
    row-gap: 0.5rem;
}

.bar-chart-y-title {
    grid-column: 1;
    grid-row: 1;
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--ve-muted);
}

.bar-chart-y-axis {
    grid-column: 2;
    grid-row: 1;
    position: relative;
}

.bar-chart-y-tick {
    position: absolute;
    right: 0.35rem;
    transform: translateY(50%);
    font-size: 0.7rem;
    color: var(--ve-muted);
    white-space: nowrap;
}

.bar-chart-plot {
    grid-column: 3;
    grid-row: 1;
    position: relative;
    height: 340px;
}

.bar-chart-gridline {
    position: absolute;
    left: 0;
    right: 0;
    border-top: 1px dashed var(--ve-line-strong);
    pointer-events: none;
}

.bar-chart {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: flex-end;
    gap: 0.5rem;
}

.bar-chart__col {
    flex: 1;
    min-width: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
}

.bar-chart__col--selected .bar-chart__track {
    box-shadow: 0 0 0 2px var(--ve-blue), 0 8px 20px rgba(37, 99, 235, 0.25);
}

.bar-chart__track {
    position: relative;
    flex: 1;
    width: 100%;
    max-width: 46px;
    display: flex;
    align-items: flex-end;
    background: var(--ve-surface-3);
    border-radius: 8px 8px 0 0;
}

.bar-chart__bar {
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    border-radius: 8px 8px 0 0;
    overflow: hidden;
}

.bar-chart__segment {
    width: 100%;
}

.bar-chart__value {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1;
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--ve-ink);
    white-space: nowrap;
    pointer-events: none;
}

.bar-chart__label {
    margin-top: 0.5rem;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--ve-muted);
    white-space: nowrap;
    flex-shrink: 0;
}

.bar-chart-x-title {
    grid-column: 3;
    grid-row: 2;
    text-align: center;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--ve-muted);
}

.bar-legend {
    flex-shrink: 0;
    width: 220px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.45rem;
}

.bar-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--ve-text-2);
}

/* ── Tag chips & add form ─────────────────────────────────────────────────── */

.tag-list {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
}

.tag-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: #ffffff;
    border-radius: var(--ve-radius-pill);
    padding: 0.2rem 0.65rem;
    font-size: 0.75rem;
    font-weight: 600;
}

.tag-remove-btn {
    background: transparent;
    border: none;
    color: #ffffff;
    line-height: 1;
    font-size: 0.9rem;
    cursor: pointer;
    padding: 0;
    opacity: 0.8;
}

    .tag-remove-btn:hover {
        opacity: 1;
    }

.tag-add-btn {
    padding: 0.25rem 0.75rem;
    font-size: 0.78rem;
    background: var(--ve-surface);
    color: var(--ve-blue);
    border: 1px dashed var(--ve-line-strong);
}

    .tag-add-btn:hover {
        background: var(--ve-tint);
    }

.tag-add-form {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    align-items: center;
    background: var(--ve-surface-2);
    border: 1px solid var(--ve-line);
    border-radius: 12px;
    padding: 0.75rem;
}

/* ── Travel registration ──────────────────────────────────────────────────── */

.travel-add-form {
    background: var(--ve-surface);
    border: 1px solid var(--ve-line);
    border-radius: var(--ve-radius-lg);
    padding: 1.2rem 1.25rem;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.travel-form-row {
    display: grid;
    grid-template-columns: 130px 1fr 2fr auto;
    gap: 0.75rem 1rem;
    align-items: start;
    margin-bottom: 0.75rem;
}

    .travel-form-row:last-child {
        margin-bottom: 0;
    }

.travel-toggle-switch {
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
    gap: 0.6rem;
}

    .travel-toggle-switch input[type="checkbox"] {
        position: absolute;
        opacity: 0;
        width: 0;
        height: 0;
    }

.travel-toggle-track {
    position: relative;
    display: inline-block;
    width: 2.3rem;
    height: 1.3rem;
    border-radius: var(--ve-radius-pill);
    background: #cbd5e1;
    transition: background 0.2s ease;
}

.travel-toggle-switch input:checked + .travel-toggle-track {
    background: var(--ve-blue);
}

.travel-toggle-thumb {
    position: absolute;
    top: 0.15rem;
    left: 0.15rem;
    width: 1rem;
    height: 1rem;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.3);
    transition: transform 0.2s var(--ve-ease);
}

.travel-toggle-switch input:checked + .travel-toggle-track .travel-toggle-thumb {
    transform: translateX(1rem);
}

.travel-toggle-label {
    font-size: 0.88rem;
    color: var(--ve-text-2);
}

.travel-removed-row td {
    color: var(--ve-muted-light);
    text-decoration: line-through;
    background: var(--ve-surface-2);
}

.travel-new-row td {
    background: rgba(37, 99, 235, 0.06) !important;
}

.travel-action-btn {
    min-width: 160px;
    padding: 0.35rem 0;
    font-size: 0.85rem;
    font-weight: 600;
    line-height: 1.5;
    text-align: center;
    white-space: nowrap;
    border-radius: var(--ve-radius-pill);
}

/* ── Fixed totals footer (next to the side navigation) ────────────────────── */

.billing-footer {
    position: fixed;
    left: var(--ve-nav-width);
    right: 0;
    bottom: 0;
    z-index: 900;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(18px);
    border-top: 1px solid var(--ve-line);
    box-shadow: 0 -10px 30px rgba(15, 23, 42, 0.06);
    padding: 0.8rem var(--ve-gutter);
    transition: left 0.25s ease;
}

.billing-footer-inner {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.billing-footer-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--ve-muted-2);
    margin-right: auto;
}

.billing-footer-total {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--ve-ink);
}

    .billing-footer-total strong {
        color: var(--ve-blue);
    }

.billing-footer-open-btn {
    padding: 0.55rem 1.1rem;
    font-size: 0.85rem;
}

/* ── Offcanvas, drawers & modals (Rodly drawer / modal look) ──────────────── */

.offcanvas {
    border: none;
    box-shadow: -20px 0 60px rgba(2, 6, 23, 0.3);
}

.modal-content {
    border: none;
    border-radius: 18px;
    box-shadow: 0 30px 80px rgba(2, 6, 23, 0.35);
    overflow: hidden;
}

.offcanvas-header,
.modal-header {
    border-bottom: 1px solid var(--ve-line);
    padding: 1.2rem 1.6rem 1rem;
}

.offcanvas-title,
.modal-title {
    font-size: 1.15rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: var(--ve-ink);
}

.offcanvas-body,
.modal-body {
    padding: 1.2rem 1.6rem;
}

.modal-footer {
    border-top: 1px solid var(--ve-line);
    padding: 0.9rem 1.6rem;
}

.summary-offcanvas {
    width: 600px !important;
}

.offcanvas-backdrop,
.modal-backdrop {
    background-color: #020617;
}

    .offcanvas-backdrop.show,
    .modal-backdrop.show {
        opacity: 0.45;
    }

.mud-overlay-drawer .mud-overlay-scrim,
.mud-overlay-scrim.mud-overlay-dark {
    background-color: rgba(2, 6, 23, 0.45) !important;
}

/* Tag chips inside the offcanvas */
.tgc-section-label {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--ve-blue-bright);
    margin-bottom: 0.6rem;
}

.tgc-quick-links {
    margin-bottom: 0.6rem;
    font-size: 0.85rem;
}

.tgc-chip-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 0.5rem;
}

.tgc-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.8rem;
    font-size: 0.8rem;
    font-weight: 500;
    border-radius: var(--ve-radius-pill);
    border: 1px solid var(--ve-line-strong);
    background: var(--ve-surface);
    color: var(--ve-text-2);
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
    line-height: 1.4;
    white-space: nowrap;
}

    .tgc-chip:hover:not(.active) {
        background: var(--ve-tint);
    }

    .tgc-chip.active {
        background: var(--ve-ink);
        border-color: var(--ve-ink);
        color: #ffffff;
    }

/* ── Empty, loading & skeleton states ─────────────────────────────────────── */

.ve-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 3rem 1rem;
    text-align: center;
    color: var(--ve-muted);
}

.ve-empty__icon {
    font-size: 2rem;
    line-height: 1;
    color: var(--ve-muted-light);
}

.ve-empty__title {
    color: var(--ve-ink);
    font-weight: 600;
}

.ve-empty__text {
    margin: 0;
    max-width: 28rem;
    font-size: 0.88rem;
}

.loading-state {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    min-height: 8rem;
    padding: 2rem 1rem;
    color: var(--ve-muted);
    font-size: 0.9rem;
}

.ve-spinner {
    display: inline-block;
    flex: 0 0 auto;
    width: 1.1rem;
    height: 1.1rem;
    border: 2px solid rgba(37, 99, 235, 0.18);
    border-top-color: var(--ve-blue);
    border-radius: 50%;
    animation: ve-spin 0.8s linear infinite;
}

.spinner-border {
    color: var(--ve-blue);
}

.hbtn .spinner-border,
.billing-footer .spinner-border {
    color: currentColor;
}

/* Home / leave skeletons (prerender of charts and tables) */
.home-skeleton {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--ve-line);
    border-radius: var(--ve-radius-lg);
    background: var(--ve-surface);
    margin: 0.5rem 0 1.75rem;
}

    .home-skeleton::after {
        content: "";
        position: absolute;
        inset: 0;
        transform: translateX(-100%);
        pointer-events: none;
        background: linear-gradient(90deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.65) 50%, rgba(255, 255, 255, 0) 100%);
        animation: home-skeleton-shimmer 1.6s infinite;
    }

@keyframes home-skeleton-shimmer {
    100% { transform: translateX(100%); }
}

.home-skeleton--chart {
    height: 365px;
    display: flex;
    padding: 1.25rem 1.25rem 1rem;
}

.home-skeleton__chart {
    flex: 1;
    display: flex;
    align-items: flex-end;
    gap: 0.5rem;
}

.home-skeleton__chart-col {
    flex: 1;
    min-width: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.home-skeleton__chart-track {
    flex: 1;
    width: 100%;
    max-width: 46px;
    background: var(--ve-surface-3);
    border-radius: 8px 8px 0 0;
}

.home-skeleton__chart-label {
    margin-top: 0.5rem;
    width: 60%;
    height: 0.6rem;
    border-radius: var(--ve-radius-pill);
    background: var(--ve-surface-3);
    flex-shrink: 0;
}

.home-skeleton--table {
    display: flex;
    flex-direction: column;
}

.home-skeleton--table-lg {
    height: 345px;
}

.home-skeleton--table-sm {
    height: 175px;
}

.home-skeleton--table-verlof {
    height: 177px;
}

.home-skeleton__table-head {
    flex-shrink: 0;
    height: 2.6rem;
    background: var(--ve-surface-2);
    border-bottom: 1px solid var(--ve-line);
}

.home-skeleton__table-rows {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.home-skeleton__table-row {
    position: relative;
    flex: 1;
    border-bottom: 1px solid var(--ve-line);
}

    .home-skeleton__table-row:last-child {
        border-bottom: none;
    }

    .home-skeleton__table-row::after {
        content: "";
        position: absolute;
        left: 1rem;
        right: 1rem;
        top: 50%;
        height: 0.7rem;
        transform: translateY(-50%);
        border-radius: var(--ve-radius-pill);
        background: var(--ve-surface-3);
    }

/* ── Markdown content ─────────────────────────────────────────────────────── */

.markdown-body {
    font-size: 0.9rem;
    line-height: 1.65;
    color: var(--ve-text-2);
    overflow-wrap: anywhere;
}

    .markdown-body > :first-child {
        margin-top: 0;
    }

    .markdown-body > :last-child {
        margin-bottom: 0;
    }

    .markdown-body h1,
    .markdown-body h2,
    .markdown-body h3,
    .markdown-body h4 {
        margin: 1.5em 0 0.5em;
        font-weight: 600;
        line-height: 1.25;
        letter-spacing: -0.01em;
        color: var(--ve-ink);
    }

    .markdown-body h1 {
        font-size: 1.5rem;
        font-weight: 700;
        letter-spacing: -0.02em;
        padding-bottom: 0.3em;
        border-bottom: 1px solid var(--ve-line);
    }

    .markdown-body h2 {
        font-size: 1.2rem;
        padding-bottom: 0.25em;
        border-bottom: 1px solid var(--ve-line);
    }

    .markdown-body h3 {
        font-size: 1.02rem;
    }

    .markdown-body h4 {
        font-size: 0.78rem;
        letter-spacing: 0.12em;
        text-transform: uppercase;
        color: var(--ve-muted);
    }

    .markdown-body p,
    .markdown-body ul,
    .markdown-body ol,
    .markdown-body blockquote,
    .markdown-body pre,
    .markdown-body table {
        margin: 0 0 1em;
    }

    .markdown-body ul,
    .markdown-body ol {
        padding-left: 1.5em;
    }

    .markdown-body li + li {
        margin-top: 0.25em;
    }

    .markdown-body li > ul,
    .markdown-body li > ol {
        margin: 0.25em 0 0;
    }

    .markdown-body li > input[type=checkbox] {
        margin-right: 0.4em;
        accent-color: var(--ve-blue);
    }

    .markdown-body a {
        color: var(--ve-blue);
        font-weight: 500;
    }

        .markdown-body a:hover {
            text-decoration: underline;
        }

    .markdown-body strong {
        font-weight: 600;
        color: var(--ve-ink);
    }

    .markdown-body code {
        padding: 0.12em 0.4em;
        border-radius: 6px;
        background: var(--ve-surface-3);
        color: var(--ve-navy);
        font-family: var(--ve-mono);
        font-size: 0.85em;
    }

    .markdown-body pre {
        padding: 0.9rem 1rem;
        overflow: auto;
        border: 1px solid var(--ve-line);
        border-radius: var(--ve-radius);
        background: var(--ve-surface-2);
        font-size: 0.8rem;
        line-height: 1.55;
    }

        .markdown-body pre code {
            padding: 0;
            border-radius: 0;
            background: transparent;
            color: var(--ve-text);
            font-size: inherit;
            white-space: pre;
        }

    .markdown-body blockquote {
        padding: 0.5rem 1rem;
        border-left: 3px solid var(--ve-line-strong);
        border-radius: 0 8px 8px 0;
        background: var(--ve-surface-2);
        color: var(--ve-muted-2);
    }

        .markdown-body blockquote > :last-child {
            margin-bottom: 0;
        }

    .markdown-body table {
        display: block;
        width: max-content;
        max-width: 100%;
        overflow: auto;
        border-collapse: collapse;
        font-size: 0.85rem;
    }

    .markdown-body th,
    .markdown-body td {
        padding: 0.5rem 0.8rem;
        border: 1px solid var(--ve-line);
        text-align: left;
    }

    .markdown-body th {
        background: var(--ve-surface-2);
        font-weight: 600;
        color: var(--ve-ink);
    }

    .markdown-body hr {
        height: 1px;
        margin: 1.5em 0;
        border: none;
        background: var(--ve-line-strong);
        opacity: 1;
    }

    .markdown-body img {
        max-width: 100%;
        border-radius: var(--ve-radius);
    }

/* ── Blazor error UI & validation ─────────────────────────────────────────── */

#blazor-error-ui {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(220, 38, 38, 0.96);
    color: #ffffff;
    padding: 0.6rem 1.25rem 0.7rem;
    z-index: 9999;
    font-size: 0.9rem;
    gap: 1rem;
}

    #blazor-error-ui .reload {
        color: #ffffff;
        font-weight: 600;
    }

    #blazor-error-ui .dismiss {
        margin-left: auto;
        cursor: pointer;
    }

.blazor-error-boundary {
    background: var(--ve-danger-deep);
    padding: 1rem;
    color: #ffffff;
    border-radius: var(--ve-radius);
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.valid.modified:not([type=checkbox]) {
    outline: 1px solid var(--ve-success);
}

.invalid {
    outline: 1px solid var(--ve-danger);
}

.validation-message {
    font-size: 0.75rem;
    color: var(--ve-danger);
}

/* ── Animations ───────────────────────────────────────────────────────────── */

@keyframes ve-rise {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: none; }
}

@keyframes ve-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes ve-spin {
    to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}

/* ── Responsive ───────────────────────────────────────────────────────────── */

@media (max-width: 900px) {
    .pie-subtag-table {
        width: 100%;
    }

    .travel-form-row {
        grid-template-columns: 1fr;
    }

    .billing-footer-inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.6rem;
    }
}

@media (max-width: 640px) {
    .view-toggle {
        flex-wrap: wrap;
    }

    .view-toggle-btn {
        flex: 1;
        padding: 0.4rem 0.75rem;
        font-size: 0.8rem;
    }

    .travel-add-form .col {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

/* ────────────────────────────────────────────────────────────────────────────
   Filter table: a card with a toolbar (search, toggles, count), a row with the active filters and a fixed-layout table whose
   column headers open a filter menu (<ColumnFilter>, <ActiveFilters>). Used by Tickets and CRM.
──────────────────────────────────────────────────────────────────────────── */

/* Not a flush ContentCard: that clips the column menus. */
.ve-filter-card {
    border: 1px solid var(--ve-line);
    border-radius: var(--ve-radius-lg);
    background: var(--ve-surface);
    box-shadow: 0 1px 2px rgba(2, 6, 23, 0.04);
}

.ve-filter-toolbar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.6rem;
    padding: 0.9rem 1.1rem;
    border-bottom: 1px solid var(--ve-line);
}

.ve-filter-spacer {
    flex: 1;
}

.ve-filter-count {
    font-size: 0.8rem;
    color: var(--ve-muted);
}

.ve-filter-search {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: min(320px, 100%);
    height: 2.25rem;
    padding: 0 0.8rem;
    border: 1px solid var(--ve-line-strong);
    border-radius: var(--ve-radius-pill);
    background: var(--ve-surface);
    color: var(--ve-muted);
}

    .ve-filter-search:focus-within {
        box-shadow: var(--ve-focus);
        border-color: var(--ve-blue);
    }

    .ve-filter-search input {
        flex: 1;
        min-width: 0;
        border: none;
        outline: none;
        background: transparent;
        font-size: 0.875rem;
        color: var(--ve-text);
    }

.ve-filter-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    height: 2.25rem;
    padding: 0 0.9rem;
    border: 1px solid var(--ve-line-strong);
    border-radius: var(--ve-radius-pill);
    background: var(--ve-surface);
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--ve-muted-2);
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

    .ve-filter-toggle:hover {
        border-color: var(--ve-blue);
        color: var(--ve-blue);
    }

    .ve-filter-toggle.is-active {
        background: var(--ve-ink);
        border-color: var(--ve-ink);
        color: #ffffff;
    }

/* Always there with a fixed height: setting a filter never pushes the table down. */
.ve-filter-active {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    height: 3rem;
    padding: 0 1.1rem;
    border-bottom: 1px solid var(--ve-line);
    overflow-x: auto;
    scrollbar-width: none;
}

.ve-filter-active__none {
    font-size: 0.8rem;
    color: var(--ve-muted-light);
}

.ve-filter-chip {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    gap: 0.35rem;
    padding: 0.25rem 0.7rem;
    border: 1px solid var(--ve-blue);
    border-radius: var(--ve-radius-pill);
    background: var(--ve-tint);
    font-size: 0.8rem;
    color: var(--ve-navy);
    cursor: pointer;
    transition: border-color 0.15s ease;
}

.ve-filter-chip__column {
    color: var(--ve-muted);
}

.ve-filter-link {
    flex-shrink: 0;
    border: none;
    background: none;
    padding: 0.2rem 0.4rem;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--ve-blue);
    cursor: pointer;
}

    .ve-filter-link:hover {
        text-decoration: underline;
    }

.ve-filter-table-wrap {
    position: relative;
    overflow: visible;
    margin: 0;
    border: none;
    border-radius: 0 0 var(--ve-radius-lg) var(--ve-radius-lg);
}

/* Fixed layout: the columns keep their width whatever the filters show (set the widths with <colgroup>). */
.ve-filter-table {
    table-layout: fixed;
    width: 100%;
}

    .ve-filter-table th,
    .ve-filter-table td:not(.ve-filter-table__wrap) {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .ve-filter-table tbody tr {
        animation: ve-filter-fade-in 0.18s ease both;
        transition: background-color 0.15s ease;
    }

/* The menu of a column must not be clipped by its header cell: */
.ve-filter-table th.ve-filter-th {
    position: relative;
    overflow: visible;
}

.ve-filter-th__button {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.15rem 0.35rem;
    margin-left: -0.35rem;
    border: none;
    border-radius: 6px;
    background: none;
    font: inherit;
    letter-spacing: inherit;
    text-transform: inherit;
    color: inherit;
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease;
}

    .ve-filter-th__button:hover {
        background: var(--ve-tint);
        color: var(--ve-blue);
    }

    .ve-filter-th__button.is-filtered {
        color: var(--ve-blue);
    }

    .ve-filter-th__button i {
        font-size: 0.7rem;
    }

.ve-filter-scrim {
    position: fixed;
    inset: 0;
    z-index: 20;
}

.ve-filter-popover {
    position: absolute;
    top: calc(100% - 0.3rem);
    left: 0.5rem;
    z-index: 21;
    min-width: 13rem;
    max-height: 22rem;
    overflow-y: auto;
    padding: 0.4rem;
    border: 1px solid var(--ve-line-strong);
    border-radius: var(--ve-radius);
    background: var(--ve-surface);
    box-shadow: var(--ve-shadow-lg);
    text-transform: none;
    letter-spacing: normal;
    font-weight: 400;
    animation: ve-filter-pop-in 0.14s ease both;
    transform-origin: top left;
}

.ve-filter-popover__option {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.4rem 0.5rem;
    border-radius: 6px;
    font-size: 0.85rem;
    color: var(--ve-text-2);
    cursor: pointer;
}

    .ve-filter-popover__option:hover {
        background: var(--ve-surface-3);
    }

    .ve-filter-popover__option span:first-of-type {
        flex: 1;
    }

.ve-filter-popover__count {
    font-size: 0.72rem;
    color: var(--ve-muted-light);
}

.ve-filter-popover__footer {
    display: flex;
    justify-content: space-between;
    padding: 0.35rem 0.2rem 0.1rem;
    margin-top: 0.3rem;
    border-top: 1px solid var(--ve-line);
}

@keyframes ve-filter-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes ve-filter-pop-in {
    from { opacity: 0; transform: translateY(-4px) scale(0.98); }
    to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
    .ve-filter-table tbody tr,
    .ve-filter-popover {
        animation: none;
    }
}

/* ── Landscape (Release and Uptime) ───────────────────────────────────────── */

/* The legend in the bar under a page header: */
.legend {
    display: flex;
    flex-wrap: wrap;
    gap: 1.2rem;
    font-size: 0.8rem;
    color: var(--ve-muted-on-dark);
}

    .legend span {
        display: inline-flex;
        align-items: center;
        gap: 0.45rem;
    }

/* The colour of a product, before its name; the element sets --product. */
.product-swatch {
    flex: none;
    width: 0.6rem;
    height: 0.6rem;
    border-radius: 3px;
    background: var(--product);
}

/* An icon that turns while its work runs. */
.spin {
    display: inline-block;
    animation: ve-spin 1s linear infinite;
}
