/* ========== Microsoft Fluent 2 Design System ========== */
/* Design tokens: https://fluent2.microsoft.design/design-tokens */

:root {
    /* Fluent 2 typography */
    --fluent-font-family: "Segoe UI Variable", "Segoe UI", -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif;
    --fluent-font-size-200: 0.75rem;
    --fluent-font-size-300: 0.875rem;
    --fluent-font-size-400: 1rem;
    --fluent-font-size-500: 1.125rem;
    --fluent-font-size-600: 1.25rem;
    --fluent-font-weight-regular: 400;
    --fluent-font-weight-semibold: 600;
    --fluent-font-weight-bold: 700;
    /* Neutral palette (light theme) */
    --fluent-color-neutral-background-1: #faf9f8;
    --fluent-color-neutral-background-2: #ffffff;
    --fluent-color-neutral-background-3: #f3f2f1;
    --fluent-color-neutral-background-4: #edebe9;
    --fluent-color-neutral-foreground-1: #242424;
    --fluent-color-neutral-foreground-2: #616161;
    --fluent-color-neutral-foreground-3: #424242;
    --fluent-color-neutral-stroke-1: #edebe9;
    --fluent-color-neutral-stroke-2: #e1dfdd;
    /* Brand */
    --fluent-color-brand-background: #0078d4;
    --fluent-color-brand-background-hover: #106ebe;
    --fluent-color-brand-background-pressed: #005a9e;
    --fluent-color-brand-foreground: #ffffff;
    /* Semantic */
    --fluent-color-success-background: #dff6dd;
    --fluent-color-success-foreground: #107c10;
    --fluent-color-warning-background: #fff4ce;
    --fluent-color-warning-foreground: #817400;
    --fluent-color-info-background: #cce4f7;
    --fluent-color-info-foreground: #005a9e;
    --fluent-color-danger-background: #fde7e9;
    --fluent-color-danger-foreground: #a80000;
    /* Border radius */
    --fluent-border-radius-medium: 4px;
    --fluent-border-radius-large: 8px;
    --fluent-border-radius-xlarge: 12px;
    /* Stroke */
    --fluent-stroke-width-thin: 1px;
    --fluent-stroke-width-thick: 2px;
    /* Shadow - Fluent 2 elevation */
    --fluent-shadow-2: 0 1.6px 3.6px rgba(0, 0, 0, 0.13), 0 0.3px 0.9px rgba(0, 0, 0, 0.11);
    --fluent-shadow-4: 0 3.2px 7.2px rgba(0, 0, 0, 0.13), 0 0.6px 1.8px rgba(0, 0, 0, 0.11);
    /* Spacing */
    --fluent-spacing-horizontal-s: 8px;
    --fluent-spacing-horizontal-m: 16px;
    --fluent-spacing-horizontal-l: 24px;
    --fluent-spacing-vertical-s: 4px;
    --fluent-spacing-vertical-m: 8px;
    --fluent-spacing-vertical-l: 16px;
}

* {
    box-sizing: border-box;
}

body {
    font-family: var(--fluent-font-family);
    font-size: var(--fluent-font-size-400);
    color: var(--fluent-color-neutral-foreground-1);
    background-color: var(--fluent-color-neutral-background-1);
    min-height: 100vh;
    margin: 0;
    line-height: 1.5;
}

/* ========== Navigation – Fluent 2 App Bar ========== */
.fluent-nav {
    background: var(--fluent-color-neutral-background-2) !important;
    border-bottom: var(--fluent-stroke-width-thin) solid var(--fluent-color-neutral-stroke-1);
    box-shadow: var(--fluent-shadow-2);
    padding: var(--fluent-spacing-vertical-m) var(--fluent-spacing-horizontal-m);
}

.fluent-nav .navbar-brand {
    font-size: var(--fluent-font-size-500);
    font-weight: var(--fluent-font-weight-semibold);
    color: var(--fluent-color-neutral-foreground-1) !important;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
}

.fluent-nav .navbar-brand:hover {
    color: var(--fluent-color-brand-background) !important;
}

.fluent-nav .navbar-brand i {
    color: var(--fluent-color-brand-background);
    margin-right: var(--fluent-spacing-horizontal-s);
}

.fluent-nav .nav-link {
    color: var(--fluent-color-neutral-foreground-2) !important;
    font-size: var(--fluent-font-size-300);
    padding: var(--fluent-spacing-vertical-m) var(--fluent-spacing-horizontal-s);
    border-radius: var(--fluent-border-radius-medium);
    text-decoration: none;
}

.fluent-nav .nav-link:hover {
    color: var(--fluent-color-neutral-foreground-1) !important;
    background: var(--fluent-color-neutral-background-3);
}

.fluent-nav .nav-link.active {
    color: var(--fluent-color-brand-background) !important;
    font-weight: var(--fluent-font-weight-semibold);
    background: transparent;
}

.fluent-nav .navbar-toggler {
    border: var(--fluent-stroke-width-thin) solid var(--fluent-color-neutral-stroke-2);
    border-radius: var(--fluent-border-radius-medium);
    color: var(--fluent-color-neutral-foreground-1);
}

.fluent-nav .navbar-toggler:hover {
    background: var(--fluent-color-neutral-background-3);
}

/* ========== Main content ========== */
main.container-fluid {
    position: relative;
    z-index: 1;
    padding: var(--fluent-spacing-horizontal-l);
    margin-top: var(--fluent-spacing-vertical-l);
    color: var(--fluent-color-neutral-foreground-1);
}

main.container-fluid h1,
main.container-fluid h2,
main.container-fluid h3,
main.container-fluid h4,
main.container-fluid h5,
main.container-fluid .h1,
main.container-fluid .h2,
main.container-fluid .h3,
main.container-fluid .h4,
main.container-fluid .h5 {
    color: var(--fluent-color-neutral-foreground-1);
    font-weight: var(--fluent-font-weight-semibold);
}

/* ========== Cards – Fluent 2 Card ========== */
.fluent-card {
    background: var(--fluent-color-neutral-background-2);
    border: var(--fluent-stroke-width-thin) solid var(--fluent-color-neutral-stroke-1);
    border-radius: var(--fluent-border-radius-large);
    box-shadow: var(--fluent-shadow-2);
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.fluent-card:hover {
    border-color: var(--fluent-color-neutral-stroke-2);
    box-shadow: var(--fluent-shadow-4);
}

.fluent-card-header {
    padding: var(--fluent-spacing-vertical-l) var(--fluent-spacing-horizontal-m);
    border-bottom: var(--fluent-stroke-width-thin) solid var(--fluent-color-neutral-stroke-1);
    background: var(--fluent-color-neutral-background-3);
    border-top-left-radius: var(--fluent-border-radius-large);
    border-top-right-radius: var(--fluent-border-radius-large);
    color: var(--fluent-color-neutral-foreground-1);
    font-weight: var(--fluent-font-weight-semibold);
    font-size: var(--fluent-font-size-400);
}

.fluent-card-body {
    padding: var(--fluent-spacing-horizontal-m);
    color: var(--fluent-color-neutral-foreground-1);
}

.fluent-card .text-muted {
    color: var(--fluent-color-neutral-foreground-2) !important;
}

/* ========== Form controls – Fluent 2 Input ========== */
.fluent-card .form-label,
.fluent-card .form-check-label,
.fluent-card th,
.fluent-card .table {
    color: var(--fluent-color-neutral-foreground-1);
}

.fluent-card .table td {
    color: var(--fluent-color-neutral-foreground-1);
}

.fluent-card .form-control,
.fluent-card .form-select {
    font-family: var(--fluent-font-family);
    font-size: var(--fluent-font-size-400);
    color: var(--fluent-color-neutral-foreground-1);
    background: var(--fluent-color-neutral-background-2);
    border: var(--fluent-stroke-width-thick) solid var(--fluent-color-neutral-stroke-2);
    border-radius: var(--fluent-border-radius-medium);
    padding: var(--fluent-spacing-vertical-m) var(--fluent-spacing-horizontal-s);
    min-height: 32px;
}

.fluent-card .form-control::placeholder {
    color: var(--fluent-color-neutral-foreground-2);
}

.fluent-card .form-control:focus,
.fluent-card .form-select:focus {
    outline: none;
    border-color: var(--fluent-color-brand-background);
    box-shadow: 0 0 0 2px rgba(0, 120, 212, 0.25);
}

.fluent-card .form-select {
    background-color: var(--fluent-color-neutral-background-2);
}

.fluent-card .form-select option {
    background: var(--fluent-color-neutral-background-2);
    color: var(--fluent-color-neutral-foreground-1);
}

/* Checkbox – Fluent 2 */
.fluent-card .form-check-input {
    width: 16px;
    height: 16px;
    border: var(--fluent-stroke-width-thick) solid var(--fluent-color-neutral-stroke-2);
    border-radius: var(--fluent-border-radius-medium);
}

.fluent-card .form-check-input:checked {
    background-color: var(--fluent-color-brand-background);
    border-color: var(--fluent-color-brand-background);
}

.fluent-card .form-check-input:focus {
    box-shadow: 0 0 0 2px rgba(0, 120, 212, 0.25);
}

/* ========== Tables – Fluent 2 ========== */
.fluent-card .table {
    --bs-table-bg: transparent;
    --bs-table-border-color: var(--fluent-color-neutral-stroke-1);
    border-color: var(--fluent-color-neutral-stroke-1);
    font-size: var(--fluent-font-size-300);
}

.fluent-card .table-striped > tbody > tr:nth-of-type(odd) {
    --bs-table-striped-bg: var(--fluent-color-neutral-background-3);
}

.fluent-card .table thead th {
    border-bottom: var(--fluent-stroke-width-thick) solid var(--fluent-color-neutral-stroke-2);
    background: var(--fluent-color-neutral-background-3);
    font-weight: var(--fluent-font-weight-semibold);
}

.fluent-card .table td,
.fluent-card .table th {
    padding: var(--fluent-spacing-vertical-m) var(--fluent-spacing-horizontal-s);
    vertical-align: middle;
}

/* ========== Buttons – Fluent 2 Button ========== */
.btn {
    font-family: var(--fluent-font-family);
    font-weight: var(--fluent-font-weight-semibold);
    font-size: var(--fluent-font-size-300);
    border-radius: var(--fluent-border-radius-medium);
    padding: var(--fluent-spacing-vertical-m) var(--fluent-spacing-horizontal-m);
    border: var(--fluent-stroke-width-thick) solid transparent;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.btn-primary,
.btn-fluent-primary {
    background: var(--fluent-color-brand-background);
    border-color: var(--fluent-color-brand-background);
    color: var(--fluent-color-brand-foreground) !important;
}

.btn-primary:hover,
.btn-fluent-primary:hover {
    background: var(--fluent-color-brand-background-hover);
    border-color: var(--fluent-color-brand-background-hover);
    color: var(--fluent-color-brand-foreground) !important;
}

.btn-outline-primary {
    background: transparent;
    border-color: var(--fluent-color-brand-background);
    color: var(--fluent-color-brand-background);
}

.btn-outline-primary:hover {
    background: rgba(0, 120, 212, 0.08);
    border-color: var(--fluent-color-brand-background-hover);
    color: var(--fluent-color-brand-background-hover);
}

.btn-outline-secondary {
    background: transparent;
    border-color: var(--fluent-color-neutral-stroke-2);
    color: var(--fluent-color-neutral-foreground-1);
}

.btn-outline-secondary:hover {
    background: var(--fluent-color-neutral-background-3);
    border-color: var(--fluent-color-neutral-foreground-2);
    color: var(--fluent-color-neutral-foreground-1);
}

.btn-outline-danger {
    border-color: var(--fluent-color-danger-foreground);
    color: var(--fluent-color-danger-foreground);
}

.btn-outline-danger:hover {
    background: var(--fluent-color-danger-background);
    color: var(--fluent-color-danger-foreground);
}

.btn-success { background: var(--fluent-color-success-foreground); border-color: var(--fluent-color-success-foreground); color: #fff !important; }
.btn-info { background: var(--fluent-color-info-foreground); border-color: var(--fluent-color-info-foreground); color: #fff !important; }
.btn-warning { background: var(--fluent-color-warning-foreground); border-color: var(--fluent-color-warning-foreground); color: #fff !important; }
.btn-danger { background: var(--fluent-color-danger-foreground); border-color: var(--fluent-color-danger-foreground); color: #fff !important; }

/* ========== Keukenoverzicht – Fluent 2 table ========== */
.keuken-tabel-wrapper {
    background: var(--fluent-color-neutral-background-2);
    border: var(--fluent-stroke-width-thin) solid var(--fluent-color-neutral-stroke-1);
    border-radius: var(--fluent-border-radius-large);
    padding: var(--fluent-spacing-horizontal-m);
    margin: var(--fluent-spacing-vertical-m) 0;
}

.keuken-tabel-wrapper .table {
    --bs-table-bg: var(--fluent-color-neutral-background-2);
    --bs-table-border-color: var(--fluent-color-neutral-stroke-1);
    color: var(--fluent-color-neutral-foreground-1);
}

.keuken-tabel-wrapper .table td,
.keuken-tabel-wrapper .table th {
    color: var(--fluent-color-neutral-foreground-1);
    border-color: var(--fluent-color-neutral-stroke-1);
}

.keuken-tabel-wrapper thead th {
    background: var(--fluent-color-neutral-background-4);
    color: var(--fluent-color-neutral-foreground-1);
    font-weight: var(--fluent-font-weight-semibold);
}

.keuken-tabel-wrapper thead th.text-muted,
.keuken-tabel-wrapper thead th .text-muted {
    color: var(--fluent-color-neutral-foreground-2) !important;
}

.keuken-tabel-wrapper tbody tr:nth-of-type(odd) td {
    background: var(--fluent-color-neutral-background-3);
}

.keuken-tabel-wrapper tbody tr:nth-of-type(even) td {
    background: var(--fluent-color-neutral-background-2);
}

.keuken-tabel-wrapper .table-success,
.keuken-tabel-wrapper td.table-success {
    background: var(--fluent-color-success-background) !important;
    color: var(--fluent-color-success-foreground) !important;
}

.keuken-tabel-wrapper .table-warning,
.keuken-tabel-wrapper td.table-warning {
    background: var(--fluent-color-warning-background) !important;
    color: var(--fluent-color-warning-foreground) !important;
}

.keuken-tabel-wrapper tr.table-secondary td {
    background: var(--fluent-color-neutral-background-4) !important;
    color: var(--fluent-color-neutral-foreground-1) !important;
    border-top: var(--fluent-stroke-width-thick) solid var(--fluent-color-neutral-stroke-2);
}

.keuken-tabel-wrapper tr.table-info td {
    background: var(--fluent-color-info-background) !important;
    color: var(--fluent-color-info-foreground) !important;
}

.keuken-tabel-wrapper tr.table-info td.text-muted {
    color: var(--fluent-color-neutral-foreground-2) !important;
}

.keuken-tabel-wrapper .keuken-bewoner-opties {
    color: var(--fluent-color-neutral-foreground-2) !important;
}

.keuken-totalen-box {
    background: var(--fluent-color-neutral-background-3) !important;
    color: var(--fluent-color-neutral-foreground-1) !important;
    border: var(--fluent-stroke-width-thin) solid var(--fluent-color-neutral-stroke-1);
    border-radius: var(--fluent-border-radius-medium);
}

.keuken-legend {
    color: var(--fluent-color-neutral-foreground-2) !important;
}

.keuken-legend .badge {
    color: #fff;
}

/* ========== Planning table ========== */
.table-striped {
    --bs-table-striped-bg: var(--fluent-color-neutral-background-3);
}

tr.bewoner-separator td {
    border-bottom: var(--fluent-stroke-width-thick) solid var(--fluent-color-neutral-stroke-2) !important;
}

.planning-dag-cel {
    vertical-align: middle;
}

.planning-dag-inner {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--fluent-spacing-vertical-s);
}

.planning-dag-inner .form-check {
    white-space: nowrap;
}

@media (max-width: 576px) {
    .table-responsive-stack td,
    .table-responsive-stack th {
        display: block;
        width: 100%;
    }
}

.hover-lift {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.hover-lift:hover {
    transform: translateY(-2px);
    box-shadow: var(--fluent-shadow-4) !important;
}

/* ========== Home page – Fluent 2 ========== */
.home-page {
    min-height: 60vh;
    padding-bottom: var(--fluent-spacing-horizontal-l);
}

.hero-section {
    max-width: 520px;
    margin-left: auto;
    margin-right: auto;
}

/* Hero card – Fluent 2 Card, geen glass */
.glass-card.glass-hero {
    background: var(--fluent-color-neutral-background-2);
    border: var(--fluent-stroke-width-thin) solid var(--fluent-color-neutral-stroke-1);
    border-radius: var(--fluent-border-radius-large);
    box-shadow: var(--fluent-shadow-2);
    backdrop-filter: none;
}

.glass-hero:hover {
    box-shadow: var(--fluent-shadow-4);
}

.hero-body {
    padding: var(--fluent-spacing-horizontal-m) !important;
    color: var(--fluent-color-neutral-foreground-1);
}

.hero-icon {
    display: block;
    font-size: 1.5rem;
    color: var(--fluent-color-brand-background);
    margin-bottom: var(--fluent-spacing-vertical-m);
}

.hero-title {
    font-size: var(--fluent-font-size-600);
    font-weight: var(--fluent-font-weight-bold);
    color: var(--fluent-color-neutral-foreground-1);
    margin-bottom: var(--fluent-spacing-vertical-s);
}

.hero-subtitle {
    font-size: var(--fluent-font-size-300);
    color: var(--fluent-color-neutral-foreground-2);
    margin-bottom: 0;
}

.hero-body .glass-pill {
    padding: var(--fluent-spacing-vertical-m) var(--fluent-spacing-horizontal-m);
    display: inline-flex;
    align-items: center;
    gap: var(--fluent-spacing-horizontal-s);
    border-radius: 999px;
    background: var(--fluent-color-neutral-background-3);
    border: var(--fluent-stroke-width-thin) solid var(--fluent-color-neutral-stroke-1);
    backdrop-filter: none;
}

.hero-pill-text {
    font-size: var(--fluent-font-size-200);
    color: var(--fluent-color-neutral-foreground-2);
}

.hero-img-wrap .hero-img {
    max-height: 80px;
    width: auto;
}

/* Nav cards – Fluent 2 Card */
.glass-card.glass-nav-card {
    background: var(--fluent-color-neutral-background-2);
    border: var(--fluent-stroke-width-thin) solid var(--fluent-color-neutral-stroke-1);
    border-radius: var(--fluent-border-radius-large);
    box-shadow: var(--fluent-shadow-2);
    backdrop-filter: none;
}

.glass-nav-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--fluent-shadow-4);
    border-color: var(--fluent-color-neutral-stroke-2);
}

.glass-nav-card .glass-card-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    color: var(--fluent-color-neutral-foreground-1);
}

.glass-nav-card h3 {
    color: var(--fluent-color-neutral-foreground-1) !important;
    font-size: var(--fluent-font-size-500);
    font-weight: var(--fluent-font-weight-semibold);
}

.glass-nav-card .text-muted {
    color: var(--fluent-color-neutral-foreground-2) !important;
}

.glass-icon-wrap {
    width: 48px;
    height: 48px;
    border-radius: var(--fluent-border-radius-large);
    background: var(--fluent-color-neutral-background-3);
    border: var(--fluent-stroke-width-thin) solid var(--fluent-color-neutral-stroke-1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.glass-icon-wrap i.text-primary { color: var(--fluent-color-brand-background) !important; }
.glass-icon-wrap .text-success { color: var(--fluent-color-success-foreground) !important; }
.glass-icon-wrap .text-info { color: var(--fluent-color-info-foreground) !important; }
.glass-icon-wrap .text-warning { color: var(--fluent-color-warning-foreground) !important; }
.glass-icon-wrap .text-danger { color: var(--fluent-color-danger-foreground) !important; }

/* Home page buttons – Fluent 2 primary/outline */
.btn-glass {
    background: var(--fluent-color-brand-background);
    border: var(--fluent-stroke-width-thick) solid var(--fluent-color-brand-background);
    color: var(--fluent-color-brand-foreground) !important;
    font-weight: var(--fluent-font-weight-semibold);
}

.btn-glass:hover {
    background: var(--fluent-color-brand-background-hover);
    border-color: var(--fluent-color-brand-background-hover);
    color: var(--fluent-color-brand-foreground) !important;
    transform: none;
}

/* Badges – Fluent 2 Tag/Pill */
.badge {
    font-family: var(--fluent-font-family);
    font-size: var(--fluent-font-size-200);
    font-weight: var(--fluent-font-weight-semibold);
    padding: 2px 8px;
    border-radius: var(--fluent-border-radius-medium);
}

.badge.bg-secondary { background: var(--fluent-color-neutral-background-4) !important; color: var(--fluent-color-neutral-foreground-1) !important; }
.badge.bg-success { background: var(--fluent-color-success-foreground) !important; color: #fff !important; }
.badge.bg-info { background: var(--fluent-color-info-foreground) !important; color: #fff !important; }
.badge.bg-warning { background: var(--fluent-color-warning-foreground) !important; color: #fff !important; }
.badge.bg-danger { background: var(--fluent-color-danger-foreground) !important; color: #fff !important; }
.badge.bg-light.text-dark { background: var(--fluent-color-neutral-background-3) !important; color: var(--fluent-color-neutral-foreground-1) !important; }

/* Footer – Fluent 2 */
footer {
    font-family: var(--fluent-font-family);
    font-size: var(--fluent-font-size-200);
    color: var(--fluent-color-neutral-foreground-2) !important;
    border-top: var(--fluent-stroke-width-thin) solid var(--fluent-color-neutral-stroke-1) !important;
    background: var(--fluent-color-neutral-background-2);
}
