:root {
    --cream: #fdf6ec;
    --cream-soft: #f8efe2;
    --white: #fffdf9;
    --olive: #a39d7b;
    --brown: #8c6f48;
    --green: #324e3e;
    --green-dark: #243a2e;
    --beige: #e0cea1;
    --text: #2f2a24;
    --muted: #6f665a;
    --border: #e5d8c6;
    --danger: #a83f37;
    --danger-soft: #fbe9e7;
    --success: #3f6b4f;
    --success-soft: #e8f2eb;
    --warning: #8a5a1f;
    --warning-soft: #fbf0dc;
    --info: #3c5a70;
    --info-soft: #e9f1f6;
    --shadow: 0 18px 50px rgba(50, 78, 62, 0.12);
    --radius: 18px;
    --radius-sm: 10px;
    --font: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: var(--font);
    color: var(--text);
    background: var(--cream);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

img {
    max-width: 100%;
    display: block;
}

a {
    color: var(--green);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

button,
input,
select,
textarea {
    font: inherit;
}

:focus-visible {
    outline: 3px solid rgba(140, 111, 72, 0.45);
    outline-offset: 2px;
}

/* Authentification */

.auth-page {
    background:
        radial-gradient(circle at 10% 10%, rgba(224, 206, 161, 0.55), transparent 32%),
        radial-gradient(circle at 90% 90%, rgba(163, 157, 123, 0.35), transparent 35%),
        var(--cream);
}

.auth-layout {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: stretch;
    gap: 0;
    padding: 0;
}

.auth-brand {
    background: var(--green);
    color: var(--cream);
    border-radius: 0;
    padding: clamp(24px, 4vw, 56px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    position: relative;
    overflow: hidden;
}

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

.auth-brand::after {
    content: "";
    position: absolute;
    z-index: 0;
    width: 420px;
    height: 420px;
    right: -140px;
    bottom: -160px;
    border-radius: 50%;
    background: rgba(224, 206, 161, 0.14);
}

.auth-logo {
    width: clamp(330px, 42vw, 510px);
    max-width: 100%;
    height: auto;
    border-radius: 26px;
    margin-bottom: 28px;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.18);
}

.auth-brand p {
    margin: 0;
    max-width: 34ch;
    color: rgba(253, 246, 236, 0.82);
    font-size: 1.1rem;
}

.auth-card {
    background: var(--white);
    border: 0;
    border-radius: 0;
    padding: clamp(32px, 5vw, 64px);
    box-shadow: none;
    align-self: stretch;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.auth-card > * {
    width: 100%;
    max-width: 420px;
    margin-left: auto;
    margin-right: auto;
}

.auth-card h2 {
    margin: 0 0 8px;
    font-size: 1.9rem;
    color: var(--green);
    letter-spacing: -0.01em;
}

.auth-intro {
    margin: 0 0 24px;
    color: var(--muted);
}

.auth-help {
    margin: 22px 0 0;
    text-align: center;
    color: var(--muted);
}

.auth-help a {
    font-weight: 600;
}

/* Formulaires */

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 7px;
    font-weight: 600;
    color: var(--green);
}

.form-input {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: #fff;
    color: var(--text);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-input:hover {
    border-color: var(--olive);
}

.form-input:focus {
    border-color: var(--green);
    box-shadow: 0 0 0 3px rgba(50, 78, 62, 0.14);
    outline: none;
}

.field-error {
    margin: 7px 0 0;
    color: var(--danger);
    font-size: 0.92rem;
    font-weight: 600;
}

.help-text {
    margin-top: 7px;
    color: var(--muted);
    font-size: 0.9rem;
}

.help-text ul {
    margin: 6px 0 0;
    padding-left: 18px;
}

.form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 8px;
}

.form-card {
    max-width: 720px;
}

/* Boutons */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 11px 20px;
    border: 1px solid transparent;
    border-radius: 999px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.12s ease, background 0.15s ease, border-color 0.15s ease;
}

.btn:hover {
    text-decoration: none;
    transform: translateY(-1px);
}

.btn-primary {
    background: var(--green);
    color: var(--cream);
}

.btn-primary:hover {
    background: var(--green-dark);
}

.btn-secondary {
    background: var(--beige);
    color: var(--green-dark);
    border-color: rgba(140, 111, 72, 0.25);
}

.btn-secondary:hover {
    background: #d6c18f;
}

.btn-ghost {
    background: transparent;
    color: var(--green);
    border-color: var(--border);
}

.btn-ghost:hover {
    background: var(--cream-soft);
}

.btn-block {
    width: 100%;
}

/* Alertes */

.messages {
    margin-bottom: 18px;
}

.alert {
    border-radius: var(--radius-sm);
    padding: 12px 14px;
    margin-bottom: 12px;
    border: 1px solid transparent;
    font-weight: 600;
}

.alert p {
    margin: 0 0 4px;
}

.alert p:last-child {
    margin-bottom: 0;
}

.alert-success {
    background: var(--success-soft);
    color: var(--success);
    border-color: rgba(63, 107, 79, 0.25);
}

.alert-error {
    background: var(--danger-soft);
    color: var(--danger);
    border-color: rgba(168, 63, 55, 0.25);
}

.alert-warning {
    background: var(--warning-soft);
    color: var(--warning);
    border-color: rgba(138, 90, 31, 0.25);
}

.alert-info {
    background: var(--info-soft);
    color: var(--info);
    border-color: rgba(60, 90, 112, 0.22);
}

/* Application */

.app-shell {
    background: var(--cream);
}

.app-layout {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.topbar {
    background: var(--green);
    color: var(--cream);
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 12px 24px;
    position: sticky;
    top: 0;
    z-index: 20;
    box-shadow: 0 8px 24px rgba(36, 58, 46, 0.18);
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 18px;
    min-width: 0;
}

.account-menu {
    position: relative;
}

.account-menu summary {
    list-style: none;
}

.account-menu summary::-webkit-details-marker {
    display: none;
}

.account-button {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid rgba(253, 246, 236, 0.35);
    background: rgba(253, 246, 236, 0.12);
    color: var(--cream);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.15s ease;
}

.account-button:hover {
    background: rgba(253, 246, 236, 0.22);
}

.account-button svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
}

.account-panel {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    width: 280px;
    background: var(--white);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: var(--shadow);
    padding: 10px;
    z-index: 30;
}

.account-panel-header {
    padding: 10px 12px 12px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 6px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    overflow-wrap: anywhere;
}

.account-panel-header span {
    color: var(--muted);
    font-size: 0.9rem;
}

.account-panel a,
.account-panel button {
    display: block;
    width: 100%;
    text-align: left;
    padding: 10px 12px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: var(--text);
    font-weight: 600;
    cursor: pointer;
}

.account-panel a:hover,
.account-panel button:hover {
    background: var(--cream-soft);
    text-decoration: none;
}

.account-panel form {
    margin: 0;
}

.account-panel form button {
    color: var(--danger);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: var(--cream);
    font-weight: 800;
    font-size: 1.2rem;
    letter-spacing: -0.01em;
}

.brand:hover {
    text-decoration: none;
}

.brand-logo {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    object-fit: cover;
    background: var(--cream);
}

.topbar-user {
    min-width: 0;
}

.user-name {
    display: inline-block;
    max-width: 34ch;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: rgba(253, 246, 236, 0.9);
    font-weight: 600;
}

.app-body {
    display: flex;
    flex: 1;
    min-height: 0;
}

.sidebar {
    width: 240px;
    flex: 0 0 240px;
    background: var(--white);
    border-right: 1px solid var(--border);
    padding: 24px 16px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.sidebar nav {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.nav-link {
    display: block;
    padding: 11px 14px;
    border-radius: 10px;
    color: var(--muted);
    font-weight: 700;
}

.nav-link:hover {
    background: var(--cream-soft);
    color: var(--green);
    text-decoration: none;
}

.nav-link.active {
    background: var(--beige);
    color: var(--green-dark);
}

.sidebar-note {
    margin: auto 0 0;
    padding: 14px;
    border-radius: 12px;
    background: var(--cream-soft);
    color: var(--muted);
    font-size: 0.86rem;
}

.main-content {
    flex: 1;
    min-width: 0;
    padding: clamp(22px, 4vw, 42px);
}

.page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 26px;
}

.page-header h1 {
    margin: 0;
    color: var(--green);
    font-size: clamp(1.7rem, 3vw, 2.5rem);
    letter-spacing: -0.02em;
    line-height: 1.15;
}

.eyebrow {
    margin: 0 0 6px;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-size: 0.74rem;
    font-weight: 800;
    color: var(--brown);
}

.page-subtitle {
    margin: 8px 0 0;
    color: var(--muted);
    max-width: 65ch;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 0.86rem;
    font-weight: 800;
    white-space: nowrap;
}

.status-online {
    background: var(--success-soft);
    color: var(--success);
}

.status-online::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--success);
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.card-grid > .card {
    margin-bottom: 0;
}

.card-grid-three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: clamp(20px, 3vw, 28px);
    box-shadow: 0 10px 30px rgba(50, 78, 62, 0.06);
    margin-bottom: 20px;
}

.card:target {
    scroll-margin-top: 88px;
}

.card:last-child {
    margin-bottom: 0;
}

.card h2 {
    margin: 0 0 14px;
    color: var(--green);
    font-size: 1.2rem;
    letter-spacing: -0.01em;
}

.card p:last-child {
    margin-bottom: 0;
}

.info-list {
    margin: 0 0 20px;
    display: grid;
    gap: 12px;
}

.info-list div {
    display: grid;
    grid-template-columns: 140px minmax(0, 1fr);
    gap: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

.info-list div:last-child {
    padding-bottom: 0;
    border-bottom: 0;
}

.info-list dt {
    color: var(--muted);
    font-weight: 700;
}

.info-list dd {
    margin: 0;
    overflow-wrap: anywhere;
}

.check-list {
    list-style: none;
    padding: 0;
    margin: 0 0 20px;
    display: grid;
    gap: 10px;
}

.check-list li {
    position: relative;
    padding-left: 30px;
}

.check-list li::before {
    content: "✓";
    position: absolute;
    left: 0;
    top: 0;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--success-soft);
    color: var(--success);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 900;
}

/* Véhicules */

.page-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.vehicle-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.vehicle-card {
    margin-bottom: 0;
    display: flex;
    flex-direction: column;
}

.vehicle-card .info-list {
    flex: 1;
}

.vehicle-card-header,
.card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

.vehicle-card-header h2,
.card-header h2 {
    margin: 0;
    overflow-wrap: anywhere;
}

.badge {
    display: inline-flex;
    align-items: center;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 800;
    white-space: nowrap;
}

.badge-active {
    background: var(--success-soft);
    color: var(--success);
}

.badge-inactive {
    background: var(--cream-soft);
    color: var(--muted);
}

.badge-warning {
    background: var(--warning-soft);
    color: var(--warning);
}

.table-wrap {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    min-width: 620px;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: 12px 14px;
    border-bottom: 1px solid var(--border);
    text-align: left;
    vertical-align: top;
}

.data-table th {
    color: var(--green);
    font-size: 0.86rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.data-table tbody tr:last-child td {
    border-bottom: 0;
}

.table-link {
    font-weight: 700;
}

.empty-state {
    text-align: center;
}

.empty-state .btn {
    margin-top: 8px;
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 18px;
}

.stat {
    padding: 14px;
    border-radius: 12px;
    background: var(--cream-soft);
}

.stat span {
    display: block;
    color: var(--muted);
    font-size: 0.86rem;
    font-weight: 700;
}

.stat strong {
    display: block;
    margin-top: 2px;
    color: var(--green);
    font-size: 1.6rem;
    line-height: 1.1;
}

.stat-grid-compact {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.stat-grid-five {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
}

.stat-grid-compact .stat,
.stat-grid-five .stat {
    padding: 10px 12px;
}

.stat-grid-compact .stat span,
.stat-grid-five .stat span {
    font-size: 0.78rem;
    line-height: 1.2;
}

.stat-grid-compact .stat strong,
.stat-grid-five .stat strong {
    font-size: 1.25rem;
}

.balance-strip {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 4px;
}

.balance-item {
    display: block;
    flex: 0 0 auto;
    min-width: 170px;
    padding: 12px 14px;
    border: 2px solid transparent;
    border-radius: 12px;
    background: var(--cream-soft);
    color: var(--text);
}

.balance-item:hover {
    border-color: var(--beige);
    text-decoration: none;
}

.balance-item.active {
    border-color: var(--green);
    background: var(--white);
}

.balance-item span {
    display: block;
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 700;
}

.balance-item strong {
    display: block;
    margin-top: 2px;
    color: var(--green);
    font-size: 1.35rem;
    line-height: 1.15;
}

.balance-item small {
    display: block;
    margin-top: 4px;
    color: var(--muted);
    font-size: 0.76rem;
    line-height: 1.3;
}

.balance-item .badge {
    margin-top: 6px;
}

#operations {
    scroll-margin-top: 88px;
}

/* Enfants */

.btn-danger {
    background: var(--danger);
    color: var(--cream);
}

.btn-danger:hover {
    background: #8f342d;
}

.list-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 18px;
}

.tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.parameter-tabs {
    margin-bottom: 18px;
}

.child-tabs {
    margin-bottom: 18px;
}

.tab {
    padding: 8px 14px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--white);
    color: var(--green);
    font-weight: 700;
}

.tab:hover {
    background: var(--cream-soft);
    text-decoration: none;
}

.tab.active {
    background: var(--green);
    border-color: var(--green);
    color: var(--cream);
}

.search-form {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.search-form .form-input {
    width: min(260px, 100%);
}

.child-cell {
    display: flex;
    align-items: center;
    gap: 12px;
}

.child-cell strong {
    display: block;
}

.child-meta {
    display: block;
    color: var(--muted);
    font-size: 0.85rem;
}

.child-thumb {
    width: 48px;
    height: 48px;
    flex: none;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--border);
    background: var(--cream-soft);
}

.child-thumb-placeholder {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--green);
    font-weight: 800;
}

.table-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.table-link-danger {
    color: var(--danger);
}

.child-photo {
    width: 100%;
    max-width: 240px;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 16px;
    border: 1px solid var(--border);
    background: var(--cream-soft);
    margin-bottom: 12px;
}

/* Responsive */

@media (max-width: 1100px) {
    .card-grid-three {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 900px) {
    .auth-layout {
        grid-template-columns: 1fr;
        padding: 0;
        gap: 0;
    }

    .auth-brand {
        padding: 32px;
        border-radius: 0;
    }

    .auth-logo {
        width: min(72vw, 300px);
        margin-bottom: 18px;
    }

    .auth-card {
        border-radius: 0;
        padding: 32px;
    }

    .app-body {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        flex: none;
        border-right: 0;
        border-bottom: 1px solid var(--border);
        padding: 12px 16px;
        gap: 10px;
    }

    .sidebar nav {
        flex-direction: row;
        overflow-x: auto;
    }

    .sidebar-note {
        display: none;
    }

    .card-grid {
        grid-template-columns: 1fr;
    }

    .vehicle-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .topbar {
        padding: 10px 14px;
        gap: 12px;
    }

    .topbar-left {
        gap: 10px;
    }

    .brand span {
        font-size: 1rem;
    }

    .brand-logo {
        width: 36px;
        height: 36px;
    }

    .topbar-user {
        display: none;
    }

    .main-content {
        padding: 20px 14px 30px;
    }

    .page-header {
        flex-direction: column;
        gap: 12px;
    }

    .info-list div {
        grid-template-columns: 1fr;
        gap: 2px;
    }

    .form-actions .btn {
        width: 100%;
    }

    .page-actions {
        width: 100%;
    }

    .page-actions .btn {
        width: 100%;
    }

    .stat-grid {
        grid-template-columns: 1fr;
    }

    .list-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .search-form {
        width: 100%;
    }

    .search-form .form-input {
        flex: 1;
        width: auto;
    }

    .account-panel {
        width: min(280px, calc(100vw - 28px));
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        transition: none !important;
        scroll-behavior: auto !important;
    }
}

/* Tableau de bord */

.dashboard-tiles {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 26px;
}

.dashboard-tile {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-height: 156px;
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: var(--white);
    color: var(--text);
    box-shadow: 0 10px 30px rgba(50, 78, 62, 0.06);
    transition: transform 0.12s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.dashboard-tile:hover {
    transform: translateY(-2px);
    border-color: var(--olive);
    box-shadow: 0 14px 34px rgba(50, 78, 62, 0.1);
    text-decoration: none;
}

.dashboard-tile.active {
    border-color: var(--green);
    box-shadow: 0 0 0 3px rgba(50, 78, 62, 0.12);
}

.dashboard-tile-label {
    color: var(--brown);
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.dashboard-tile-value {
    color: var(--green);
    font-size: clamp(1.8rem, 3vw, 2.5rem);
    line-height: 1.05;
    letter-spacing: -0.03em;
}

.dashboard-tile-text {
    color: var(--green);
    font-size: 1.45rem;
    line-height: 1.15;
}

.dashboard-tile-caption {
    color: var(--muted);
    font-size: 0.86rem;
}

.dashboard-tile-link {
    margin-top: auto;
    color: var(--brown);
    font-size: 0.8rem;
    font-weight: 800;
}

.dashboard-detail {
    margin-bottom: 0;
}

.dashboard-chart-title {
    margin: 24px 0 10px;
    color: var(--green);
    font-size: 1rem;
}

.btn-sm {
    min-height: 36px;
    padding: 7px 13px;
    font-size: 0.86rem;
}

.dashboard-tabs {
    margin-bottom: 16px;
}

.period-nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin: 0 0 18px;
    padding: 10px 12px;
    border-radius: 12px;
    background: var(--cream-soft);
}

.period-nav strong {
    color: var(--green);
}

.dashboard-pdf-action {
    margin: 18px 0;
}

.pdf-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.chart {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    min-height: 190px;
    padding: 14px 12px 10px;
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: linear-gradient(to top, var(--cream-soft), var(--white));
}

.chart-column {
    display: flex;
    flex: 1 0 38px;
    min-width: 38px;
    height: 160px;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
}

.chart-bars {
    display: flex;
    width: 100%;
    height: 128px;
    align-items: flex-end;
    justify-content: center;
    gap: 3px;
}

.chart-bar {
    display: block;
    width: 14px;
    min-height: 3px;
    border-radius: 5px 5px 0 0;
}

.chart-bar-current {
    background: var(--green);
}

.chart-bar-previous {
    background: var(--beige);
}

.chart-label {
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
}

.chart-number {
    color: var(--green);
    font-size: 0.75rem;
    font-weight: 800;
}

.chart-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin: 8px 0 20px;
    color: var(--muted);
    font-size: 0.82rem;
}

.chart-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    margin-right: 6px;
    border-radius: 3px;
    vertical-align: middle;
}

.chart-dot-current {
    background: var(--green);
}

.chart-dot-previous {
    background: var(--beige);
}

.chart-annual .chart-column {
    flex-basis: 48px;
}

.dashboard-presence-table {
    min-width: 920px;
}

.dashboard-presence-table th,
.dashboard-presence-table td {
    text-align: center;
}

.dashboard-presence-table th:first-child,
.dashboard-presence-table td:first-child {
    position: sticky;
    left: 0;
    text-align: left;
    background: var(--white);
}

.dashboard-presence-table tfoot th {
    background: var(--cream-soft);
    color: var(--green);
}

@media (max-width: 1200px) {
    .dashboard-tiles {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    .dashboard-tiles {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .dashboard-tiles {
        grid-template-columns: 1fr;
    }

    .dashboard-tile {
        min-height: 128px;
    }

    .chart {
        min-height: 170px;
    }
}

.document-export {
    margin: 24px 0;
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--cream-soft);
}

.document-export h3 {
    margin: 0 0 4px;
    color: var(--green);
}

.document-model-form {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 10px;
    margin: 14px 0;
}

.document-model-form label {
    width: 100%;
    color: var(--green);
    font-size: 0.86rem;
    font-weight: 700;
}

.document-model-form select {
    min-width: min(100%, 360px);
    padding: 9px 12px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--white);
    color: var(--text);
}

.document-warnings {
    display: grid;
    gap: 8px;
    margin: 14px 0;
}

.document-warnings .alert {
    margin: 0;
}

.document-actions {
    margin: 14px 0 8px;
}

@media (max-width: 640px) {
    .document-export {
        padding: 14px;
    }

    .document-model-form {
        align-items: stretch;
    }

    .document-model-form select,
    .document-model-form .btn {
        width: 100%;
    }
}
