@import url('https://fonts.googleapis.com/css2?family=Lato:wght@300;400;700;900&family=Roboto:wght@400;500;700&display=swap');

:root {
    /* ── Lemaro Brand Identity ──────────────────────────────── */
    --lemaro-navy:         #003366;   /* hoofd­kleur logo              */
    --lemaro-orange:       #E65100;   /* vlam-accent kleur            */
    --lemaro-orange-hover: #CF4900;   /* 10% donkerder hover-state    */
    --bg-light:            #F8FAFC;   /* dashboard achtergrond        */
    --text-main:           #1E293B;   /* primaire tekstkleur          */

    /* ── Component design tokens ───────────────────────────── */
    --brand-navy:          #003366;   /* alias → --lemaro-navy         */
    --brand-orange:        #E65100;   /* alias → --lemaro-orange       */
    --brand-orange-hover:  #CF4900;   /* alias → --lemaro-orange-hover */
    --c-border:            #e5e7eb;
    --c-radius-lg:         1.5rem;
    --c-radius-sm:         0.375rem;

    /* ── Surface / text tokens ─────────────────────────────── */
    --c-surface:           #ffffff;
    --c-surface-2:         #F8FAFC;
    --c-ink:               #1E293B;
    --c-muted:             #5f6973;

    /* ── Shadow tokens ─────────────────────────────────────── */
    --c-shadow-sm:         0 1px 3px rgba(15, 23, 42, 0.08);
    --c-shadow-md:         0 4px 16px rgba(15, 23, 42, 0.12);

    /* ── Semantic colour tokens ─────────────────────────────── */
    --c-danger:            #DC2626;
    --c-danger-border:     #FCA5A5;
    --c-danger-subtle:     #FEF2F2;
    --c-success:           #16a34a;
    --c-success-border:    #86efac;
    --c-success-subtle:    #f0fdf4;
    --c-warning:           #d97706;
    --c-warning-border:    #fcd34d;
    --c-warning-subtle:    #FFFBEB;

    /* ── Legacy aliases (voor bestaande layouts) ────────────── */
    --lemaro-gold: #f4bc4d;
    --lemaro-blue: #003366;           /* → navy, was #0e4f8a          */
    --lemaro-blue-bright: #1396df;
    --lemaro-ink: #1E293B;            /* → text-main                  */
    --lemaro-muted: #5f6973;
    --lemaro-surface: #ffffff;
    --lemaro-surface-soft: #F8FAFC;   /* → bg-light                   */
    --lemaro-border: #d9e2ea;
    --lemaro-heading-font: 'Roboto', 'Segoe UI', sans-serif;
    --lemaro-body-font: 'Lato', 'Segoe UI', sans-serif;

    /* ── Dense UI tokens ─────────────────────────────────────── */
    --ld-btn-height:        1.875rem;       /* enterprise compact button height (30px)  */
    --ld-font-size-compact: 0.85rem;        /* reduced font-size for dense layouts      */
    --ld-padding-compact:   0.25rem 0.625rem; /* compact padding for toolbar/filter elements */
}

html,
body {
    margin: 0;
    padding: 0;
    font-family: var(--lemaro-body-font);
    color: var(--lemaro-ink);
    background: #ffffff;
}

body {
    min-height: 100vh;
}

* {
    box-sizing: border-box;
}

a {
    color: var(--lemaro-orange);
}

a:hover {
    color: #d96e1d;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    margin-top: 0;
    font-family: var(--lemaro-heading-font);
    color: var(--lemaro-ink);
}

h1:focus {
    outline: none;
}

p {
    line-height: 1.65;
}

.valid.modified:not([type=checkbox]) {
    outline: none;
}

.invalid {
    outline: none;
}

.validation-message {
    color: #e50000;
}

.blazor-error-boundary {
    background: #b32121;
    padding: 1rem 1rem 1rem 1.2rem;
    color: #ffffff;
    border-radius: 0.85rem;
}

.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;
}

/* ============================================================
   GLOBAL FORM FIELD STYLE — matches Login page exactly
   Use these two classes on every text/select/date input and its
   label across the dashboard for a fully consistent look.
   ============================================================ */
.ld-field-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    color: #003366;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.25rem;
}

.ld-field-input {
    height: 2.375rem;
    padding: 0.5rem 0.75rem;
    border: 1px solid #CBD5E1;
    border-radius: 0.5rem;
    background: #FFFFFF;
    color: #0F172A;
    font-family: var(--lemaro-body-font);
    font-size: 0.875rem;
    font-weight: 500;
    width: 100%;
    box-sizing: border-box;
    transition: all 0.15s;
}

.ld-field-input:hover {
    border-color: #94A3B8;
}

.ld-field-input:focus {
    outline: none;
    border-color: #003366;
    box-shadow: 0 0 0 3px rgba(0, 51, 102, 0.12);
    background: #F0F8FF;
}

.ld-field-input:disabled {
    background: #F8FAFC;
    color: #94A3B8;
    cursor: not-allowed;
}

/* FluentUI text fields/selects render their input in shadow DOM with
   their own default font — force it to match the rest of the app so
   FluentUI-based forms look identical to native ld-field-input forms. */
fluent-text-field::part(control),
fluent-select::part(control),
fluent-text-area::part(control),
fluent-number-field::part(control) {
    font-family: var(--lemaro-body-font);
}

/* ============================================================
   LEMARO DASHBOARD — Global shared design tokens
   Reusable utility classes aligned to Customers.razor standard
   ============================================================ */

/* ── Card baseline ───────────────────────────────────────── */
.ld-card {
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    border-radius: 1rem;
    box-shadow: 0 1px 3px rgba(15,23,42,0.06), 0 1px 2px rgba(15,23,42,0.04);
}

.ld-card--accent-top {
    border-top: 3px solid var(--lemaro-navy);
}

/* ── Page grid baseline ──────────────────────────────────── */
.ld-page {
    display: grid;
    gap: 1.25rem;
    padding-bottom: 1.5rem;
}

/* ── Eyebrow label ───────────────────────────────────────── */
.ld-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--lemaro-navy);
}

/* ── Action button ───────────────────────────────────────── */
.ld-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: var(--ld-btn-height);
    padding: 0 0.875rem;
    border-radius: 0.5rem;
    font-weight: 600;
    font-size: var(--ld-font-size-compact);
    cursor: pointer;
    border: 1px solid transparent;
    transition: background 100ms ease, color 100ms ease, border-color 100ms ease;
    text-decoration: none;
    line-height: 1;
    white-space: nowrap;
}

.ld-btn--primary {
    background: var(--lemaro-orange);
    color: #ffffff;
    border-color: var(--lemaro-orange);
}

.ld-btn--primary:hover {
    background: var(--lemaro-orange-hover);
    border-color: var(--lemaro-orange-hover);
    color: #ffffff;
}

.ld-btn--secondary {
    background: #F1F5F9;
    color: #1E293B;
    border-color: #E2E8F0;
}

.ld-btn--secondary:hover {
    background: #E2E8F0;
}

.ld-btn--ghost {
    background: transparent;
    color: #1E293B;
    border-color: #E2E8F0;
}

.ld-btn--ghost:hover {
    background: #F1F5F9;
}

.ld-btn--danger {
    background: #DC2626;
    color: #ffffff;
    border-color: #DC2626;
}

.ld-btn--danger:hover {
    background: #b91c1c;
    border-color: #b91c1c;
    color: #ffffff;
}

.ld-btn:disabled,
.ld-btn[disabled] {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ── Page header card ────────────────────────────────────── */
.ld-page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    border-radius: 1rem;
    padding: 1.5rem 1.75rem;
    box-shadow: 0 1px 3px rgba(15,23,42,0.06), 0 1px 2px rgba(15,23,42,0.04);
}

.ld-page-header h1 {
    margin: 0.35rem 0 0.25rem;
    font-size: clamp(1.5rem, 2.5vw, 2rem);
    line-height: 1.1;
    color: var(--lemaro-navy);
    font-weight: 700;
    letter-spacing: -0.02em;
}

.ld-page-header p {
    margin: 0;
    color: #64748B;
    font-size: 0.9rem;
    max-width: 60ch;
}

.ld-page-header__copy {
    display: grid;
    gap: 0;
}

.ld-page-header__actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}

/* ── Alert variants ──────────────────────────────────────── */
.ld-alert {
    padding: 0.875rem 1.25rem;
    border-radius: 0.625rem;
    font-size: 0.9rem;
    font-weight: 500;
    border: 1px solid transparent;
}

.ld-alert--error {
    background: #FEF2F2;
    border-color: #FECACA;
    color: #991B1B;
}

.ld-alert--success {
    background: #F0FDF4;
    border-color: #A7F3D0;
    color: #059669;
}

.ld-alert--warning {
    background: #FFFBEB;
    border-color: #FDE68A;
    color: #D97706;
}

/* ── Form field checkbox + validation ────────────────────── */
.ld-field-checkbox {
    width: 1rem;
    height: 1rem;
    border-radius: 0.25rem;
    cursor: pointer;
    accent-color: var(--lemaro-navy);
}

.ld-field-validation {
    font-size: 0.6875rem;
    color: #dc2626;
    margin-top: 0.125rem;
}

/* ── Form-wrapping card (dikke navy rand) ────────────────── */
.ld-form-card {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    background: #FFFFFF;
    border: 2px solid var(--lemaro-navy);
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: 0 4px 6px rgba(15,23,42,0.1), 0 2px 4px rgba(15,23,42,0.06);
}

/* ── Form action buttons (Opslaan/Annuleren onder een EditForm) ── */
.ld-form-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 2.375rem;
    padding: 0 1.125rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 700;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.15s;
    white-space: nowrap;
}

.ld-form-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.ld-form-btn--primary {
    background: var(--lemaro-orange);
    color: #fff;
    border-color: var(--lemaro-orange);
}

.ld-form-btn--primary:hover:not(:disabled) {
    background: var(--lemaro-orange-hover);
    border-color: var(--lemaro-orange-hover);
}

.ld-form-btn--ghost {
    background: transparent;
    color: #0F172A;
    border-color: #E2E8F0;
}

.ld-form-btn--ghost:hover:not(:disabled) {
    background: #F1F5F9;
    border-color: #CBD5E1;
}

.ld-form-btn--danger {
    background: #DC2626;
    color: #fff;
    border-color: #DC2626;
}

.ld-form-btn--danger:hover:not(:disabled) {
    background: #B91C1C;
    border-color: #B91C1C;
}

/* ── Upload dropzone ──────────────────────────────────────── */
.ld-dropzone {
    position: relative;
    border: 2px dashed #CBD5E1;
    border-radius: 0.75rem;
    background: #F8FAFC;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 8rem;
    transition: border-color 0.15s, background 0.15s;
    cursor: pointer;
}

.ld-dropzone--active {
    border-color: #003366;
    background: #F0F8FF;
}

.ld-dropzone:hover {
    border-color: #94A3B8;
}

.ld-dropzone__label {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    text-align: center;
}

.ld-dropzone__icon {
    font-size: 2rem;
    line-height: 1;
}

.ld-dropzone__text {
    font-size: 0.8125rem;
    color: #64748B;
    font-weight: 500;
}

.ld-dropzone__pending {
    font-size: 0.75rem;
    color: #4F46E5;
    font-weight: 600;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ld-dropzone__fileinput {
    position: absolute;
    inset: 0;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

/* ── JA/NEE toggle switch (was scoped to UserForm.razor.css as
   .userform-switch — promoted to global because InspectorAgendas.razor
   and InspectorAgendaPermissies.razor reuse the same pattern, and
   Blazor CSS isolation means a *.razor.css class never applies outside
   its own component) ─────────────────────────────────────────────── */
.ld-toggle {
    position: relative;
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
}

.ld-toggle__input {
    position: absolute;
    inset: 0;
    margin: 0;
    opacity: 0;
    cursor: pointer;
}

.ld-toggle__track {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 0.15rem;
    width: 4.5rem;
    min-height: 2rem;
    padding: 0.15rem;
    border-radius: 0.5rem;
    background: #CBD5E1;
    border: 1px solid #94A3B8;
    transition: background 0.18s ease, border-color 0.18s ease;
}

.ld-toggle__segment {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 1.5rem;
    border-radius: 0.35rem;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.ld-toggle__segment--on {
    background: rgba(100,116,139,0.5);
    color: #ffffff;
}

.ld-toggle__segment--off {
    background: #ffffff;
    color: #64748B;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.ld-toggle__input:checked + .ld-toggle__track {
    background: #059669;
    border-color: #047857;
}

.ld-toggle__input:checked + .ld-toggle__track .ld-toggle__segment--on {
    background: rgba(255,255,255,0.25);
    color: #ffffff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.ld-toggle__input:checked + .ld-toggle__track .ld-toggle__segment--off {
    background: transparent;
    color: rgba(255,255,255,0.7);
    box-shadow: none;
}

.ld-toggle__input:focus-visible + .ld-toggle__track {
    outline: 2px solid var(--lemaro-navy);
    outline-offset: 2px;
}

/* ── Stat card (KPI / numbers) ───────────────────────────── */
.ld-stat-card {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 0.875rem 1rem;
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    border-top: 3px solid var(--lemaro-navy);
    border-radius: 0.75rem;
    box-shadow: 0 1px 3px rgba(15,23,42,0.06), 0 1px 2px rgba(15,23,42,0.04);
    min-width: 5rem;
}

.ld-stat-card__label {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #64748B;
}

.ld-stat-card__value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #0F172A;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

/* ── Content panel / section card ────────────────────────── */
.ld-panel {
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    border-radius: 1rem;
    box-shadow: 0 1px 3px rgba(15,23,42,0.06), 0 1px 2px rgba(15,23,42,0.04);
    padding: 1.25rem;
}

.ld-panel h2,
.ld-panel h3 {
    margin: 0 0 0.25rem;
    color: var(--lemaro-navy);
    font-weight: 700;
    letter-spacing: -0.02em;
}

.ld-panel p {
    margin: 0;
    color: #64748B;
    font-size: 0.9rem;
}

/* ── Error / not-found shell ─────────────────────────────── */
.ld-error-shell {
    min-height: 60vh;
    display: grid;
    place-items: center;
    padding: 2rem;
}

.ld-error-card {
    text-align: center;
    max-width: 460px;
    padding: 2.5rem 2rem;
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    border-top: 3px solid var(--lemaro-navy);
    border-radius: 1rem;
    box-shadow: 0 1px 3px rgba(15,23,42,0.06), 0 4px 12px rgba(15,23,42,0.06);
}

.ld-error-card__code {
    display: block;
    font-size: 4rem;
    font-weight: 900;
    color: var(--lemaro-navy);
    line-height: 1;
    margin-bottom: 0.5rem;
}

.ld-error-card h1,
.ld-error-card h2 {
    font-size: 1.5rem;
    color: var(--lemaro-navy);
    margin: 0 0 0.75rem;
}

.ld-error-card p {
    color: #64748B;
    margin: 0 0 1.5rem;
    font-size: 0.95rem;
}

.ld-error-card__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
}

/* ── Home page navigation tiles ──────────────────────────── */
.home-tiles {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.25rem;
    padding: 2rem;
}

.home-tile {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 9rem;
    padding: 1.5rem;
    background-size: cover;
    background-position: center;
    border: 1px solid #E2E8F0;
    border-top: 3px solid var(--lemaro-navy);
    border-radius: 1rem;
    box-shadow: 0 1px 3px rgba(15,23,42,0.06), 0 1px 2px rgba(15,23,42,0.04);
    text-decoration: none;
    transition: box-shadow 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.home-tile:hover {
    border-top-color: var(--lemaro-orange);
    box-shadow: 0 1px 3px rgba(15,23,42,0.06), 0 4px 12px rgba(15,23,42,0.08);
    transform: translateY(-2px);
}

.home-tile__label {
    font-weight: 700;
    font-size: 1.1rem;
    color: #FFFFFF;
    text-align: center;
    text-shadow: 0 1px 3px rgba(0,0,0,0.65);
}