html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

a, .btn-link {
    color: #006bb7;
}

.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

.content {
    padding-top: 1.1rem;
}

h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}

/* --- Native subject/body inputs in the template editor (kept native for cursor-token JS) --- */
.aiolos-tpl-input {
    width: 100%;
    box-sizing: border-box;
    padding: 0.6rem 0.75rem;
    border: 1px solid var(--mud-palette-lines-inputs, #e4e4e7);
    border-radius: 8px;
    font-family: 'Geist', system-ui, sans-serif;
    font-size: 0.9rem;
    background: #ffffff;
    color: var(--mud-palette-text-primary, #18181b);
    transition: border-color 0.12s ease, box-shadow 0.12s ease;
}

.aiolos-tpl-input:focus {
    outline: none;
    border-color: var(--mud-palette-primary, #ec3013);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--mud-palette-primary, #ec3013) 22%, transparent);
}

/* --- Company switcher select in the (neutral) app bar --- */
.aiolos-company-select {
    background-color: #ffffff;
    color: #18181b;
    border: 1px solid var(--mud-palette-lines-inputs, #e4e4e7);
    border-radius: 8px;
    padding: 0.3rem 0.6rem;
    font-size: 0.9rem;
    font-family: 'Geist', system-ui, sans-serif;
    max-width: 12rem;
}

/* ============================================================================
   Login screen — a calm, product-branded sign-in for OnderhoudsMail: a teal
   brand panel with a soft recurring-reminder motif beside a precise form.
   Pinned to the viewport on desktop so the page itself never scrolls.
   Only Login.razor uses EmptyLayout, so these rules are safe to scope here.
   ============================================================================ */
.empty-layout {
    min-height: 100dvh;
}

.login-page {
    --ink: #0a2a2c;
    --teal: #0e6f66;
    --teal-lite: #3fb4a6;
    --surface: #eef4f3;
    --paper: #ffffff;
    --ember: #e2603a;
    --ember-deep: #c64d29;
    --muted: #5c7674;
    --line: #d8e6e3;

    min-height: 100dvh;
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    color: var(--ink);
}

/* Desktop: pin to the viewport so the page itself never scrolls. */
@media (min-width: 861px) {
    .login-page { height: 100dvh; overflow: hidden; }
    .login-brand { overflow: hidden; }
    .login-panel { overflow-y: auto; }
}

/* ---------- Brand / thesis panel ---------- */
.login-brand {
    position: relative;
    color: #eaf6f3;
    padding: clamp(1.75rem, 3vw, 3rem);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 1.75rem;
    background:
        radial-gradient(120% 90% at 12% 8%, #12514b 0%, rgba(18, 81, 75, 0) 55%),
        linear-gradient(150deg, #0b3a37 0%, #0c4741 45%, #0a2f2c 100%);
}

/* Soft concentric rings radiating from the mark — recurring reminders going out. */
.login-ambient { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.login-ambient circle { fill: none; stroke: var(--teal-lite); stroke-width: 1.25; }

.login-brand > * { position: relative; z-index: 1; }

.login-brand-top { display: flex; align-items: center; gap: 0.7rem; }
.login-mark { width: 40px; height: 40px; flex: 0 0 auto; }
.login-wordmark { font-weight: 800; font-size: 1.15rem; letter-spacing: -0.01em; color: #f3fbf9; }
.login-wordmark b { color: var(--teal-lite); font-weight: 800; }

.login-eyebrow { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.2em; text-transform: uppercase; color: var(--teal-lite); margin: 0 0 0.9rem; }
.login-promise { font-size: clamp(1.7rem, 2.4vw, 2.3rem); line-height: 1.06; letter-spacing: -0.02em; font-weight: 800; margin: 0 0 0.9rem; text-wrap: balance; color: #f6fdfb; max-width: 15ch; }
.login-lede { font-size: 0.98rem; line-height: 1.55; color: #bcd8d3; margin: 0; max-width: 36ch; }

.login-brand-foot { display: flex; gap: 0.5rem 1.4rem; flex-wrap: wrap; font-size: 0.82rem; color: #9cc4be; }
.login-brand-foot span { display: inline-flex; align-items: center; gap: 0.45rem; }
.login-brand-foot .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--teal-lite); }

/* ---------- Form panel ---------- */
.login-panel { display: flex; align-items: center; justify-content: center; background: var(--surface); padding: 2rem 1.5rem; }
.login-form { width: 100%; max-width: 384px; animation: login-rise 0.5s ease both; }
@keyframes login-rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.login-brand-sm { display: none; align-items: center; gap: 0.6rem; margin-bottom: 1.5rem; }
.login-brand-sm .login-mark { width: 34px; height: 34px; }
.login-brand-sm .login-wordmark { color: var(--ink); font-size: 1.05rem; }
.login-brand-sm .login-wordmark b { color: var(--teal); }

.login-title { font-size: 1.55rem; font-weight: 700; letter-spacing: -0.01em; margin: 0 0 0.35rem; }
.login-subtitle { color: var(--muted); margin: 0 0 1.5rem; font-size: 0.95rem; }

.login-field { display: flex; flex-direction: column; gap: 0.4rem; margin-bottom: 1.05rem; }
.login-field label { font-size: 0.82rem; font-weight: 600; color: #33514f; }
.login-input { width: 100%; padding: 0.72rem 0.9rem; font-size: 1rem; font-family: inherit; color: var(--ink); background: var(--paper); border: 1px solid var(--line); border-radius: 11px; transition: border-color 0.15s ease, box-shadow 0.15s ease; }
.login-input::placeholder { color: #9db4b1; }
.login-input:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px rgba(14, 111, 102, 0.16); }

.login-remember { display: flex; align-items: center; gap: 0.55rem; margin: 0.2rem 0 1.4rem; }
.login-remember input { width: 1.05rem; height: 1.05rem; accent-color: var(--teal); }
.login-remember label { font-size: 0.9rem; color: #3c5b58; }

.login-submit { width: 100%; padding: 0.82rem 1rem; font-size: 1rem; font-weight: 700; font-family: inherit; color: #fff; background: var(--ember); border: none; border-radius: 11px; cursor: pointer; box-shadow: 0 8px 18px -8px rgba(226, 96, 58, 0.7); transition: background 0.15s ease, transform 0.06s ease; }
.login-submit:hover { background: var(--ember-deep); }
.login-submit:active { transform: translateY(1px); }
.login-submit:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

.login-foot { margin: 1.4rem 0 0; font-size: 0.8rem; color: var(--muted); text-align: center; }
.login-error { background: #fdece6; border: 1px solid #f4c3b2; color: #a23a1c; padding: 0.7rem 0.85rem; border-radius: 10px; font-size: 0.9rem; margin-bottom: 1.1rem; }
.login-field .validation-message { font-size: 0.8rem; }

@media (max-width: 860px) {
    .login-page { grid-template-columns: 1fr; }
    .login-brand { display: none; }
    .login-brand-sm { display: flex; }
    .login-panel { align-items: flex-start; padding-top: clamp(2.5rem, 10vh, 5rem); }
}
@media (prefers-reduced-motion: reduce) {
    .login-form { animation: none; }
}

/* ============================================================================
   List / table pages — card "shell" + contained filters.
   These rules target MudBlazor COMPONENTS (MudTable, MudPaper, MudChip …), so
   they must live in this GLOBAL sheet: Blazor CSS isolation does not add the
   scoped marker to child components, so the same rules in a .razor.css would
   silently never match.
   ============================================================================ */

.vf-page {
    width: 100%;
    padding-bottom: 1.5rem;
}

/* Header row: title/subtitle on the left, primary actions on the right. */
.vf-page-header {
    gap: 1rem;
}

.vf-page-header .mud-typography-body2 {
    color: #a1a1aa;
}

/* The card that wraps a filter row + table (replaces plain-on-background lists).
   2026 SaaS: a white card with a hairline border, soft radius and a barely-there shadow. */
.vf-page-shell {
    background: #ffffff;
    border: 1px solid #e7e7e4;
    border-radius: 12px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.04);
    padding: 1.25rem;
}

/* Detail/edit pages keep using MudCard; give those the same shell look so the whole app
   shares one card system (the card's own MudCardContent handles the inner padding). */
.vf-page .mud-card {
    border: 1px solid #e7e7e4;
    border-radius: 12px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}

/* Outlined MudPaper used as an inset sub-panel (e.g. a timing-rule row) reads as a faint
   recessed strip on the white card — the design's #fafaf9-on-white inset. */
.vf-page .mud-paper-outlined {
    background-color: #fafaf9;
    border-color: #ececea;
}

/* Filter grid sitting inside the shell, above the table. Centre each cell so
   clear buttons / switches line up with the input fields beside them. */
.vf-contained-filter {
    width: 100%;
    margin-bottom: 1rem;
    align-items: center;
}

.vf-contained-filter .mud-input-control {
    width: 100%;
}

/* Table styling within the shell. */
.vf-page-shell .mud-table {
    background: transparent;
}

.vf-page-shell .mud-table-head th {
    color: #a1a1aa;
    font-size: .7rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    border-bottom: 1px solid #ececea;
}

.vf-page-shell .mud-table-body td {
    padding-top: .85rem;
    padding-bottom: .85rem;
    border-bottom: 1px solid #f0f0ee;
}

.vf-page-shell .mud-table-row {
    transition: background-color 120ms ease;
}

.vf-page-shell .mud-table-row:hover {
    background: rgba(0,0,0,0.02);
}

.vf-clickable-table .mud-table-row {
    cursor: pointer;
}

/* Row action buttons: quiet until hovered/focused. */
.vf-row-actions {
    min-width: max-content;
}

.vf-row-actions-stop {
    display: inline-flex;
}

.vf-row-actions .mud-icon-button {
    opacity: .68;
    transition: background-color 120ms ease, color 120ms ease, opacity 120ms ease;
}

.vf-row-actions .mud-icon-button:hover,
.mud-table-row:hover .vf-row-actions .mud-icon-button {
    opacity: 1;
}

/* Softer, pastel chips (only inside list pages). */
.vf-page .mud-chip {
    font-weight: 600;
}

.vf-page .mud-chip.mud-chip-filled.mud-chip-color-success {
    background-color: #dcfce7;
    color: #15803d;
}

/* Primary chips follow the tenant accent; info chips read as a neutral tag. */
.vf-page .mud-chip.mud-chip-filled.mud-chip-color-primary {
    background-color: color-mix(in srgb, var(--mud-palette-primary, #ec3013) 12%, white);
    color: color-mix(in srgb, var(--mud-palette-primary, #ec3013) 72%, black);
}

.vf-page .mud-chip.mud-chip-filled.mud-chip-color-info {
    background-color: #efeceb;
    color: #444141;
}

.vf-page .mud-chip.mud-chip-filled.mud-chip-color-warning {
    background-color: #fef3c7;
    color: #b45309;
}

.vf-page .mud-chip.mud-chip-filled.mud-chip-color-error {
    background-color: #fee2e2;
    color: #b91c1c;
}

.vf-page .mud-chip.mud-chip-filled.mud-chip-color-default {
    background-color: #f1f5f9;
    color: #475569;
}

/* Mobile: header stacks, and table rows become stacked cards (MudTable Breakpoint). */
@media (max-width: 960px) {
    .vf-page-header {
        align-items: stretch !important;
        flex-direction: column !important;
    }

    .vf-page-shell {
        padding: .85rem;
        border-radius: 12px;
    }

    .vf-contained-filter {
        margin-bottom: .75rem;
    }

    .vf-page-shell .mud-sm-table .mud-table-row {
        display: block;
        width: 100%;
        margin: 0 0 .85rem;
        border: 1px solid #e7e7e4;
        border-radius: 10px;
        background: #fafaf9;
        box-shadow: none;
        overflow: hidden;
    }

    .vf-page-shell .mud-sm-table .mud-table-cell {
        display: grid;
        grid-template-columns: minmax(6rem, 40%) minmax(0, 1fr);
        gap: .75rem;
        align-items: center;
        width: 100%;
        padding: .7rem 1rem !important;
        border-bottom: 1px solid #f0f0ee;
        text-align: right !important;
        overflow-wrap: anywhere;
    }

    .vf-page-shell .mud-sm-table .mud-table-cell:last-child {
        border-bottom: 0;
    }

    .vf-page-shell .mud-sm-table .mud-table-cell::before {
        color: #a1a1aa;
        font-size: .72rem;
        font-weight: 600;
        letter-spacing: 0.06em;
        text-align: left;
        text-transform: uppercase;
    }

    .vf-page-shell .mud-sm-table .mud-table-cell > * {
        min-width: 0;
        justify-self: end;
    }
}
