/* Reset simple */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: #f3f4f6;
    color: #111827;
}

/* Page de connexion */
.auth-body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-container {
    width: 100%;
    max-width: 420px;
    padding: 1rem;
}

.auth-card {
    background: #ffffff;
    border-radius: 0.75rem;
    padding: 1.5rem 1.75rem;
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.10);
}

.app-title {
    font-size: 1.5rem;
    text-align: center;
    margin-bottom: 0.25rem;
}

.app-subtitle {
    font-size: 0.9rem;
    text-align: center;
    color: #6b7280;
    margin-bottom: 1.25rem;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
	margin-bottom: 0.75rem;
}

.form-group label {
    font-size: 0.9rem;
    font-weight: 500;
    color: #374151;
}

.form-group input,
.form-group select {
    padding: 0.55rem 0.7rem;
    border-radius: 0.5rem;
    border: 1px solid #d1d5db;
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-group input:focus,
.form-group select:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.25);
}

.btn-primary,
button.btn-primary {
    display: inline-block;
    padding: 0.45rem 0.9rem;
    border-radius: 999px;
    border: none;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: #ffffff;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #1d4ed8, #1e40af);
}

.btn-primary:active {
    transform: translateY(1px);
}

.auth-footer {
    margin-top: 1rem;
    font-size: 0.8rem;
    color: #6b7280;
    text-align: center;
}

/* Responsive petits écrans */
@media (max-width: 480px) {
    .auth-card {
        padding: 1.25rem 1.2rem;
    }

    .app-title {
        font-size: 1.3rem;
    }
}


/* Layout général de l'application (après connexion) */
body.app-body {
    margin: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: radial-gradient(circle at top, #eff6ff 0, #e5e7eb 45%, #f9fafb 100%);
    color: #111827;
}


/* Topbar */
.topbar {
    height: 56px;
    padding: 0 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #1f2937;
    color: #f9fafb;
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.4);
    position: sticky;
    top: 0;
    z-index: 20;
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo-circle {
    width: 32px;
    height: 32px;
    border-radius: 999px;
    background: linear-gradient(135deg, #2563eb, #22c55e);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    margin-right: 0.5rem;
    color: #f9fafb;
}

.topbar-title {
    font-weight: 600;
    letter-spacing: 0.02em;
}

.topbar-right .user-name {
    margin-right: 1rem;
    font-size: 0.85rem;
    opacity: 0.9;
}

.link-logout {
    color: #fecaca;
    font-size: 0.8rem;
    text-decoration: none;
    padding: 0.3rem 0.7rem;
    border-radius: 999px;
    border: 1px solid rgba(248, 113, 113, 0.5);
}

.link-logout:hover {
    background: rgba(248, 113, 113, 0.15);
}

/* ==========================================================================
   ADMIN SAAS PREMIUM - LAYOUT & SIDEBAR & TOPBAR
   ========================================================================== */
.admin-body {
    background-color: #f8fafc;
    color: #0f172a;
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* TOPBAR ADMIN */
.admin-topbar {
    height: 64px;
    background: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 30;
}

.admin-brand-link {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: inherit;
}

.admin-brand-badge {
    font-size: 10px;
    font-weight: 700;
    color: #4f46e5;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    background: #eef2ff;
    padding: 2px 7px;
    border-radius: 6px;
    display: inline-block;
    width: fit-content;
}

.admin-topbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.admin-top-alert-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.admin-top-alert-btn:hover {
    transform: translateY(-1px);
}
.alert-danger-pill {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
    box-shadow: 0 2px 6px rgba(220, 38, 38, 0.08);
}
.alert-danger-pill:hover {
    background: #fee2e2;
    box-shadow: 0 4px 10px rgba(220, 38, 38, 0.15);
}

.alert-birthday-pill {
    background: #fff1f2;
    color: #e11d48;
    border: 1px solid #fecdd3;
    box-shadow: 0 2px 6px rgba(225, 29, 72, 0.08);
}
.alert-birthday-pill:hover {
    background: #ffe4e6;
    box-shadow: 0 4px 10px rgba(225, 29, 72, 0.15);
}

.alert-warning-pill {
    background: #fffbeb;
    color: #b45309;
    border: 1px solid #fde68a;
    box-shadow: 0 2px 6px rgba(217, 119, 6, 0.08);
}
.alert-warning-pill:hover {
    background: #fef3c7;
    box-shadow: 0 4px 10px rgba(217, 119, 6, 0.15);
}

/* User Profile Chip */
.admin-user-profile {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 4px 10px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
}

.admin-avatar-ring {
    position: relative;
    width: 34px;
    height: 34px;
}
.admin-avatar-initials {
    width: 100%;
    height: 100%;
    border-radius: 10px;
    background: linear-gradient(135deg, #4f46e5, #3b82f6);
    color: #ffffff;
    font-weight: 700;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(79, 70, 229, 0.25);
}
.admin-online-dot {
    position: absolute;
    bottom: -1px;
    right: -1px;
    width: 9px;
    height: 9px;
    background: #22c55e;
    border: 2px solid #ffffff;
    border-radius: 50%;
}

.admin-user-meta {
    display: flex;
    flex-direction: column;
}
.admin-user-name {
    font-size: 13px;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.2;
}
.admin-user-role {
    font-size: 11px;
    color: #64748b;
    font-weight: 500;
}

.admin-btn-logout {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 12px;
    border-radius: 10px;
    font-size: 12.5px;
    font-weight: 600;
    color: #64748b;
    text-decoration: none;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    transition: all 0.15s ease;
}
.admin-btn-logout:hover {
    color: #ef4444;
    background: #fef2f2;
    border-color: #fecaca;
}

/* SIDEBAR ADMIN */
.admin-app-layout {
    display: grid;
    grid-template-columns: 285px minmax(0, 1fr);
    min-height: calc(100vh - 64px);
}

.admin-sidebar {
    background: #0f172a;
    border-right: 1px solid rgba(255, 255, 255, 0.06);
    padding: 1.25rem 0.95rem;
    overflow-y: auto;
}

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

.admin-nav-group {
    display: flex;
    flex-direction: column;
    border-radius: 12px;
    background: transparent;
    transition: background 0.2s ease;
}

.admin-nav-group.has-active {
    background: rgba(255, 255, 255, 0.02);
}

.admin-nav-group-header {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 11px 14px;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 10px;
    color: #e2e8f0;
    font-size: 15.5px;
    font-weight: 700;
    cursor: pointer;
    text-align: left;
    transition: all 0.18s ease;
    user-select: none;
    outline: none;
}

.admin-nav-group-header:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.07);
}

.admin-nav-group.is-open .admin-nav-group-header {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.04);
}

.admin-nav-group.has-active .admin-nav-group-header {
    color: #ffffff;
}

.group-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.group-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    transition: color 0.18s ease;
}

.admin-nav-group-header:hover .group-icon,
.admin-nav-group.is-open .group-icon {
    color: #818cf8;
}

.admin-nav-group.has-active .group-icon {
    color: #818cf8;
}

.group-title {
    letter-spacing: -0.15px;
    font-size: 15.5px;
    font-weight: 700;
}

.group-header-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.group-badge-alert {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 2px 8px;
    background: #ef4444;
    color: #ffffff;
    font-size: 12px;
    font-weight: 700;
    border-radius: 9999px;
    line-height: 1.3;
    box-shadow: 0 0 8px rgba(239, 68, 68, 0.5);
}

.group-chevron {
    color: #94a3b8;
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), color 0.18s ease;
}

.admin-nav-group-header:hover .group-chevron {
    color: #ffffff;
}

.admin-nav-group.is-open .group-chevron {
    transform: rotate(180deg);
    color: #a5b4fc;
}

/* SOUS-MENU ACCORDÉON (ANIMATION FLUIDE SANS SAUT) */
.admin-nav-group-items {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.admin-nav-group.is-open .admin-nav-group-items {
    grid-template-rows: 1fr;
}

.group-items-wrapper {
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 6px 0 8px 12px;
    border-left: 2px solid rgba(255, 255, 255, 0.1);
    margin-left: 22px;
    margin-top: 3px;
}

.admin-nav-sublink {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 9px 12px;
    border-radius: 9px;
    color: #cbd5e1;
    text-decoration: none;
    font-size: 14.5px;
    font-weight: 500;
    transition: all 0.15s ease;
    position: relative;
}

.admin-nav-sublink .subnav-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    transition: color 0.15s ease;
    flex-shrink: 0;
}

.admin-nav-sublink:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.08);
}

.admin-nav-sublink:hover .subnav-icon {
    color: #a5b4fc;
}

.admin-nav-sublink.active {
    color: #ffffff;
    background: #4f46e5;
    font-weight: 700;
    box-shadow: 0 4px 14px rgba(79, 70, 229, 0.4);
}

.admin-nav-sublink.active .subnav-icon {
    color: #ffffff;
}

.admin-nav-sublink .nav-badge-count {
    margin-left: auto;
}

.nav-badge-count {
    margin-left: auto;
    font-size: 11px;
    font-weight: 800;
    padding: 2px 7px;
    border-radius: 999px;
    line-height: 1;
}

.nav-badge-count.badge-danger {
    background: #ef4444;
    color: #ffffff;
    box-shadow: 0 2px 6px rgba(239, 68, 68, 0.4);
}

.admin-main-content {
    background: #f8fafc;
    padding: 2rem 2.25rem;
    max-width: 1600px;
    width: 100%;
}

/* Espacement vertical entre les sections du contenu principal */
.main-content > section {
    margin-bottom: 1rem;
}


.page-title {
    font-size: 1.3rem;
    margin-bottom: 0.3rem;
}

.page-intro {
    font-size: 0.9rem;
    color: #6b7280;
    margin-bottom: 1.25rem;
}

/* Grille */
.grid-2 {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.1fr);
    gap: 1rem;
    margin-bottom: 1.25rem;
}

/* Cartes */
.card {
    background: #ffffff;
    border-radius: 0.9rem;
    padding: 1rem;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06);
    border: 1px solid rgba(148, 163, 184, 0.3);
}

.card + .card {
    margin-top: 0.75rem;
}

.card-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.4rem;
    color: #111827;
}

.card-text {
    font-size: 0.85rem;
    color: #4b5563;
}

/* Boutons secondaires */
.btn-secondary,
button.btn-secondary {
    display: inline-block;
    padding: 0.4rem 0.9rem;
    border-radius: 999px;
    border: 1px solid #cbd5f5;
    background: #f9fafb;
    color: #374151;
    font-size: 0.8rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
}

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

.btn-full {
    width: 100%;
}

.button-row {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.button-row {
    margin-top: 0.6rem;
    display: flex;
    gap: 0.5rem;
}

form .btn-primary,
form .btn-secondary,
form .btn-danger {
    margin-top: 0.6rem;
}

/* Résumé */
.summary-list {
    list-style: none;
    font-size: 0.9rem;
}

.summary-list li {
    display: flex;
    justify-content: space-between;
    padding: 0.25rem 0;
}

.summary-label {
    color: #6b7280;
}

.summary-value {
    font-weight: 500;
}

.summary-badge {
    display: inline-block;
    padding: 0.1rem 0.4rem;
    border-radius: 999px;
    background: #e5e7eb;
    color: #374151;
    font-size: 0.75rem;
}
.summary-badge.warning {
    background: #fef3c7;
    color: #92400e;
}


/* Tableau déjà défini plus haut, on ajoute un petit texte de note */
.card-table {
    margin-top: 1rem;
}

.table-hint {
    margin-top: 0.5rem;
    font-size: 0.8rem;
    color: #6b7280;
}

.table-wrapper {
    width: 100%;
    overflow-x: auto;
}

.presence-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.presence-table th,
.presence-table td {
    padding: 0.5rem 0.6rem;
    border-bottom: 1px solid #e5e7eb;
    text-align: left;
}

.presence-table thead th {
    background: #f3f4f6;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #6b7280;
}

.presence-table tbody tr:hover {
    background: #f9fafb;
}


/* Barre de filtre */
.filter-bar {
    display: flex;
    align-items: flex-end;
    gap: 0.75rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.form-group-inline {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

/* Responsive layout avec sidebar */
@media (max-width: 900px) {
    .app-layout {
        grid-template-columns: 1fr;
    }

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

    .sidebar-nav {
        flex-direction: row;
    }
}

@media (max-width: 640px) {
    .main-content {
        padding: 1rem;
    }

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

    .topbar-title {
        display: none; /* pour alléger sur petit écran */
    }
}

/* Grille 3 colonnes pour le dashboard admin */
.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.stat-card {
    text-align: left;
}

.stat-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #6b7280;
    margin-bottom: 0.2rem;
}

.stat-value {
    font-size: 1.4rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 0.2rem;
}

.stat-note {
    font-size: 0.8rem;
    color: #6b7280;
}

/* Alignement titre + bouton dans les cartes admin */
.card-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

/* Responsive pour la grille 3 */
@media (max-width: 900px) {
    .grid-3 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

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

.alert-error {
    margin-bottom: 0.8rem;
    padding: 0.6rem 0.8rem;
    border-radius: 0.5rem;
    background: #fef2f2;
    color: #b91c1c;
    font-size: 0.85rem;
    border: 1px solid #fecaca;
}
.alert-success {
    margin-bottom: 0.8rem;
    padding: 0.6rem 0.8rem;
    border-radius: 0.5rem;
    background: #ecfdf3;
    color: #166534;
    font-size: 0.85rem;
    border: 1px solid #bbf7d0;
}

.notif-block {
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    padding: 0.75rem;
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
    background: #f9fafb;
}

.notif-block p {
    margin-bottom: 0.25rem;
}

.notif-label {
    display: block;
    font-size: 0.8rem;
    color: #6b7280;
    margin-bottom: 0.25rem;
    margin-top: 0.4rem;
}

.notif-textarea {
    width: 100%;
    border-radius: 0.5rem;
    border: 1px solid #d1d5db;
    padding: 0.4rem 0.6rem;
    font-size: 0.85rem;
    resize: vertical;
}
.btn-whatsapp {
    display: inline-block;
    padding: 0.35rem 0.8rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 500;
    text-decoration: none;
    background: #22c55e;
    color: #ffffff;
    border: 1px solid #16a34a;
    transition: transform 0.1s ease, box-shadow 0.1s ease, background 0.1s ease;
}

.btn-whatsapp:hover {
    background: #16a34a;
    box-shadow: 0 4px 10px rgba(22, 163, 74, 0.35);
    transform: translateY(-1px);
}

.btn-danger,
button.btn-danger {
    display: inline-block;
    padding: 0.4rem 0.9rem;
    border-radius: 999px;
    border: none;
    background: #dc2626;
    color: #ffffff;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
}


.btn-danger:hover {
    background: #b91c1c;
}

.btn-danger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.45rem 0.9rem;
    border-radius: 999px;
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    color: #ffffff;
    font-size: 0.85rem;
    font-weight: 500;
    border: none;
    box-shadow: 0 6px 16px rgba(220, 38, 38, 0.35);
    cursor: pointer;
    transition: transform 0.08s ease, box-shadow 0.08s ease;
}

.btn-danger:hover {
    box-shadow: 0 8px 20px rgba(220, 38, 38, 0.45);
    transform: translateY(-1px);
}

a.btn-edit,
a.btn-edit:visited {
    display: inline-block;
    padding: 0.35rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: #ffffff;
    background-color: #2563eb; /* bleu */
    border: none;
    border-radius: 999px;
    cursor: pointer;
    text-decoration: none;
    transition: background-color 0.2s ease, transform 0.08s ease, box-shadow 0.08s ease;
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.35);
}

a.btn-edit:hover {
    background-color: #1d4ed8;
    transform: translateY(-1px);
    box-shadow: 0 6px 14px rgba(37, 99, 235, 0.5);
}



.badge-status {
    display: inline-block;
    padding: 0.25rem 0.6rem;
    border-radius: 0.6rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: #ffffff;
}

.status-present {
    background: #16a34a; /* vert */
}

.status-absent {
    background: #dc2626; /* rouge */
}

.status-pending {
    background: #6b7280; /* gris */
}

.status-late {
    background: #f97316; /* orange pour "En retard" */
}

.status-done {
    background: #2563eb; /* bleu pour "Journée terminée" */
}


.row-arrival {
    background-color: #ecfdf5; /* léger vert */
}

.row-departure {
    background-color: #fef2f2; /* léger rouge */
}

/* Optionnel : survol un peu plus marqué */
.row-arrival:hover {
    background-color: #dcfce7;
}

.row-departure:hover {
    background-color: #fee2e2;
}

/* === Timeline du jour (agent) === */

.day-timeline {
    margin-top: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
    font-size: 0.75rem;
}

.tl-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 60px;
}

.tl-dot {
    width: 14px;
    height: 14px;
    border-radius: 999px;
    border: 2px solid #d1d5db;
    background: #f9fafb;
    box-sizing: border-box;
}

.tl-label {
    margin-top: 0.25rem;
    color: #6b7280;
}

.tl-line {
    flex: 1;
    height: 2px;
    background: #e5e7eb;
    position: relative;
}

/* États */

.tl-step.tl-done .tl-dot {
    border-color: #16a34a;
    background: #bbf7d0;
}

.tl-step.tl-done .tl-label {
    color: #166534;
    font-weight: 600;
}

.tl-step.tl-pending .tl-dot {
    border-color: #d1d5db;
    background: #f9fafb;
}

.tl-step.tl-pending .tl-label {
    color: #9ca3af;
}

/* Ligne remplie */

.tl-line-empty {
    background: #e5e7eb;
}

.tl-line-half {
    background: linear-gradient(to right, #16a34a 0%, #bbf7d0 40%, #e5e7eb 40%, #e5e7eb 100%);
}

.tl-line-done {
    background: linear-gradient(to right, #16a34a, #22c55e);
}

.info-panel {
    margin-bottom: 0.8rem;
    padding: 0.6rem 0.75rem;
    border-radius: 0.75rem;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    font-size: 0.8rem;
}

.info-title {
    font-size: 0.83rem;
    font-weight: 600;
    color: #1d4ed8;
    margin-bottom: 0.35rem;
}

.info-line {
    display: flex;
    gap: 0.4rem;
    margin-bottom: 0.2rem;
}

.info-label {
    color: #6b7280;
    min-width: 80px;
}

.info-value {
    color: #111827;
}

.info-text {
    margin: 0 0 0.4rem;
    color: #4b5563;
}

.info-list {
    margin: 0;
    padding-left: 1rem;
    color: #111827;
}

.info-list li {
    margin-bottom: 0.15rem;
}


.grid-4 {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
}

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

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

/* Style moderne pour les champs date et month */
input[type="date"],
input[type="month"] {
    padding: 0.55rem 0.8rem;
    border: 1px solid #cbd5e1;
    border-radius: 0.6rem;
    background: #ffffff;
    font-size: 0.9rem;
    color: #1e293b;
    width: 100%;
    box-sizing: border-box;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    position: relative;
}

/* Ajout de l'icône calendrier */
input[type="date"]::-webkit-calendar-picker-indicator,
input[type="month"]::-webkit-calendar-picker-indicator {
    color: transparent;
    opacity: 1;
    background: url("data:image/svg+xml,%3Csvg width='20' height='20' fill='%231e293b' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M6 2v2H4c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2h-2V2H12v2H8V2H6zm10 6H4v8h12V8z'/%3E%3C/svg%3E") no-repeat center;
    cursor: pointer;
}

/* Enlever le style natif Firefox */
input[type="date"]::-moz-calendar-picker-indicator,
input[type="month"]::-moz-calendar-picker-indicator {
    filter: invert(25%);
    cursor: pointer;
}

/* Focus moderne */
input[type="date"]:focus,
input[type="month"]:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 2px #2563eb40;
}


/* Style moderne pour tous les <select> */
select {
    width: 100%;
    padding: 0.55rem 0.9rem;
    font-size: 0.9rem;
    color: #1e293b;
    border: 1px solid #cbd5e1;
    border-radius: 0.6rem;
    background-color: #ffffff;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    box-sizing: border-box;
    background-image:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%231e293b' viewBox='0 0 20 20'%3E%3Cpath d='M5.23 7.21a1 1 0 011.41 0L10 10.58l3.36-3.37a1 1 0 111.41 1.41l-4.06 4.06a1 1 0 01-1.41 0L5.23 8.62a1 1 0 010-1.41z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.8rem center;
    background-size: 1rem;
    padding-right: 2.2rem;
}

/* Survol */
select:hover {
    border-color: #94a3b8;
}

/* Focus moderne */
select:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 2px #2563eb40;
}


/* Styles spécifiques à la page de connexion (Thème Premium & Ambre / Obsidienne) */
body.login-body {
    font-family: 'Plus Jakarta Sans', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background-color: #080c14;
    background-image: 
        radial-gradient(circle at 50% -10%, rgba(245, 158, 11, 0.22) 0%, rgba(245, 158, 11, 0.05) 45%, transparent 75%),
        radial-gradient(circle at 90% 90%, rgba(30, 41, 59, 0.6) 0%, transparent 60%),
        radial-gradient(circle at 10% 80%, rgba(15, 23, 42, 0.8) 0%, transparent 50%);
    background-attachment: fixed;
    background-repeat: no-repeat;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #0f172a;
    position: relative;
    overflow-x: hidden;
}

body.login-body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 50% 30%, rgba(251, 191, 36, 0.04) 0%, transparent 60%);
    pointer-events: none;
}

.login-page {
    width: 100%;
    padding: 24px 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 2;
}

.login-card {
    width: 100%;
    max-width: 440px;
    background: #ffffff;
    border-radius: 24px;
    padding: 36px 30px 28px;
    box-shadow:
        0 30px 65px -12px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(255, 255, 255, 0.1),
        0 1px 3px rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
    gap: 20px;
    position: relative;
    animation: loginCardFadeIn 0.45s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes loginCardFadeIn {
    from {
        opacity: 0;
        transform: translateY(16px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.login-header {
    text-align: center;
}

.login-header-logo-box {
    width: 76px;
    height: 76px;
    margin: 0 auto 16px;
    background: #090d16;
    border-radius: 22px;
    border: 2px solid rgba(245, 158, 11, 0.38);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 
        0 14px 28px -6px rgba(0, 0, 0, 0.45),
        0 0 22px rgba(245, 158, 11, 0.22);
    padding: 14px;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease;
}

.login-header-logo-box:hover {
    transform: translateY(-2px) scale(1.03);
    box-shadow: 
        0 18px 34px -6px rgba(0, 0, 0, 0.5),
        0 0 28px rgba(245, 158, 11, 0.35);
}

.login-header-logo-img {
    width: 48px;
    height: 48px;
    object-fit: contain;
    filter: drop-shadow(0 2px 6px rgba(245, 158, 11, 0.3));
}

.login-header h1 {
    font-size: 1.55rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 4px;
    letter-spacing: -0.025em;
}

.login-header p {
    font-size: 0.88rem;
    color: #64748b;
    font-weight: 500;
}

.login-alert {
    border-radius: 12px;
    padding: 12px 14px;
    font-size: 0.86rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
    line-height: 1.45;
}

.login-alert-error {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.login-alert-success {
    background: #f0fdf4;
    color: #16a34a;
    border: 1px solid #bbf7d0;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #1e293b;
    letter-spacing: -0.01em;
}

.form-group input {
    padding: 12px 14px;
    border-radius: 12px;
    border: 1.5px solid #e2e8f0;
    font-size: 0.92rem;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s, background-color 0.2s;
    background-color: #f8fafc;
    color: #0f172a;
    font-family: inherit;
}

.form-group input:focus {
    border-color: #f59e0b;
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.16);
    background-color: #ffffff;
}

.password-wrapper {
    display: flex;
    align-items: center;
    gap: 6px;
    background: #f8fafc;
    border-radius: 12px;
    border: 1.5px solid #e2e8f0;
    padding-right: 6px;
    transition: border-color 0.2s, box-shadow 0.2s, background-color 0.2s;
}

.password-wrapper:focus-within {
    border-color: #f59e0b;
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.16);
    background-color: #ffffff;
}

.password-wrapper input {
    border: none !important;
    background: transparent !important;
    flex: 1;
    padding: 12px 14px;
    box-shadow: none !important;
}

.password-wrapper input:focus {
    outline: none;
}

.toggle-password {
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 1rem;
    padding: 8px 10px;
    color: #64748b;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.15s, background-color 0.15s;
}

.toggle-password:hover {
    color: #0f172a;
    background-color: #e2e8f0;
}

/* Bouton Principal - Thème Or / Ambre Premium */
.login-card .btn-primary,
.login-body .btn-primary {
    width: 100%;
    border: none;
    border-radius: 14px;
    padding: 13px 20px;
    font-size: 0.96rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    cursor: pointer;
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 50%, #d97706 100%);
    color: #090d16;
    box-shadow: 
        0 10px 25px -4px rgba(245, 158, 11, 0.45),
        0 4px 10px rgba(217, 119, 6, 0.25);
    transition: transform 0.15s ease-out, box-shadow 0.15s ease-out, filter 0.15s ease-out;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.login-card .btn-primary:hover,
.login-body .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 16px 32px -4px rgba(245, 158, 11, 0.58),
        0 6px 14px rgba(217, 119, 6, 0.35);
    filter: brightness(1.03);
}

.login-card .btn-primary:active,
.login-body .btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
}

.forgot-link {
    font-size: 0.82rem;
    color: #d97706;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.15s ease, transform 0.15s ease;
    display: inline-block;
}

.forgot-link:hover {
    color: #b45309;
    text-decoration: underline;
    transform: translateY(-1px);
}

.form-footer {
    margin-top: 6px;
}

.login-footer {
    margin-top: 6px;
    text-align: center;
    font-size: 0.82rem;
    color: #94a3b8;
}

/* Responsive petits écrans */
@media (max-width: 480px) {
    .login-card {
        padding: 22px 18px 18px;
        border-radius: 16px;
    }

    .login-header h1 {
        font-size: 1.2rem;
    }
}


/*ajouter pour la page de connexion - NewVersion*/
.form-group select {
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid #cbd5e1;
    font-size: 0.9rem;
    background-color: #f8fafc;
    cursor: pointer;
    transition: border-color 0.15s, box-shadow 0.15s, background-color 0.15s;
}

.form-group select:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.35);
    outline: none;
    background-color: #fff;
}

.role-switch {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: #e2e8f0;
    border-radius: 999px;
    padding: 3px;
    gap: 4px;
}

.role-option {
    border: none;
    background: transparent;
    padding: 7px 14px;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 500;
    color: #475569;
    cursor: pointer;
    transition: background-color 0.15s, color 0.15s, box-shadow 0.15s, transform 0.08s;
    min-width: 95px;
}

.role-option.active {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: #e5f0ff;
    box-shadow: 0 8px 18px rgba(37, 99, 235, 0.45);
}

.role-option:active {
    transform: scale(0.97);
}


/* === User chip (avatar + nom) === */
.user-chip{
    display:flex;
    align-items:center;
    gap:.6rem;
}

.user-avatar{
    width:34px;
    height:34px;
    border-radius:999px;
    object-fit:cover;
    border:1px solid rgba(255,255,255,.25);
}

.user-avatar-fallback{
    display:flex;
    align-items:center;
    justify-content:center;
    font-weight:700;
    font-size:.8rem;
    color:#0f172a;
    background:#e5e7eb;
}

.avatar-lg { width: 72px; height: 72px; flex-basis: 72px; }

/* === FIX PROFIL: empêcher toute image "géante" === */
.user-avatar{
  width:34px !important;
  height:34px !important;
  max-width:34px !important;
  max-height:34px !important;
  border-radius:999px !important;
  object-fit:cover !important;
  display:block !important;
  flex:0 0 34px !important;
}

.user-avatar.avatar-lg{
  width:72px !important;
  height:72px !important;
  max-width:72px !important;
  max-height:72px !important;
  flex-basis:72px !important;
}

/* Alignement topbar (évite empilement) */
.topbar-right{
  display:flex !important;
  align-items:center !important;
  justify-content:flex-end !important;
  gap:.75rem !important;
}

/* Mise en page profil */
.profile-photo-row{
  display:flex;
  align-items:center;
  gap:1rem;
  margin-top:.5rem;
  flex-wrap:wrap;
}

.profile-form{
  flex:1;
  min-width:260px;
}
/* =========================
   MODAL (confirmation mot de passe)
   ========================= */

/* Cachée par défaut */
.modal-overlay {
    position: fixed;
    inset: 0;                 /* top:0 right:0 bottom:0 left:0 */
    display: none;            /* IMPORTANT: ne pas afficher par défaut */
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(15, 23, 42, 0.55);
    z-index: 9999;
}

/* Visible quand on ajoute .is-visible */
.modal-overlay.is-visible {
    display: flex;
}

.modal {
    width: 100%;
    max-width: 520px;
    background: #ffffff;
    border-radius: 0.9rem;
    padding: 1rem 1.1rem;
    border: 1px solid rgba(148, 163, 184, 0.35);
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.35);
}

.modal-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: #111827;
}

.modal-text {
    font-size: 0.9rem;
    color: #374151;
    margin-bottom: 0.9rem;
    line-height: 1.35;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
}

/* ==========================================================================
   NOUVEAUX STYLES : Administration, Paramètres, GPS & Preuve Selfie
   ========================================================================== */

/* Navigation latérale perfectionnée */
.sidebar-section-divider {
    margin: 16px 0 10px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}
.sidebar-section-title {
    padding: 0 16px 6px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #94a3b8;
}
.sidebar-link .nav-icon {
    margin-right: 8px;
    font-size: 1.1rem;
    vertical-align: middle;
}

/* Onglets des paramètres */
.settings-tabs-nav {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    overflow-x: auto;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 2px;
}
.settings-tab-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    font-size: 0.92rem;
    font-weight: 600;
    color: #64748b;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    text-decoration: none;
    border-radius: 8px 8px 0 0;
    transition: all 0.2s ease;
    white-space: nowrap;
}
.settings-tab-btn:hover {
    color: #1e293b;
    background: #f1f5f9;
}
.settings-tab-btn.active {
    color: #2563eb;
    border-bottom-color: #2563eb;
    background: #eff6ff;
}

/* Card & Formulaires de configuration */
.settings-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.04);
    border: 1px solid #e2e8f0;
}
.settings-section-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 6px 0;
}
.settings-section-desc {
    color: #64748b;
    font-size: 0.88rem;
    margin: 0 0 20px 0;
}
.form-row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}
.form-row-3 {
    display: flex;
    gap: 15px;
    align-items: flex-start;
}
@media (max-width: 768px) {
    .form-row-2, .form-row-3 {
        grid-template-columns: 1fr;
        flex-direction: column;
    }
}
.form-control {
    width: 100%;
    padding: 9px 12px;
    font-size: 0.95rem;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #f8fafc;
    color: #1e293b;
    transition: border-color 0.2s;
    box-sizing: border-box;
}
.form-control:focus {
    border-color: #2563eb;
    background: #ffffff;
    outline: none;
    box-shadow: 0 0 0 3px rgba(37,99,235,0.15);
}
.form-help {
    display: block;
    margin-top: 4px;
    font-size: 0.8rem;
    color: #64748b;
}
.form-actions-bar {
    margin-top: 25px;
    padding-top: 15px;
    border-top: 1px solid #e2e8f0;
    display: flex;
    justify-content: flex-end;
}
.checkbox-group-inline {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 6px;
}
.checkbox-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    color: #334155;
}

/* Feature Box Highlight (Switch Selfie) */
.feature-box-highlight {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border: 1px solid #bae6fd;
    border-radius: 12px;
    padding: 18px 22px;
    gap: 20px;
}
.feature-box-content {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}
.feature-icon {
    font-size: 2.2rem;
    line-height: 1;
}
.feature-title {
    margin: 0 0 4px 0;
    font-size: 1.05rem;
    font-weight: 700;
    color: #0369a1;
}
.feature-description {
    margin: 0;
    font-size: 0.88rem;
    color: #0c4a6e;
    line-height: 1.4;
}
.feature-switch-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    min-width: 90px;
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 54px;
    height: 30px;
}
.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}
.slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: #cbd5e1;
    transition: .3s;
    border-radius: 34px;
}
.slider:before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .3s;
    border-radius: 50%;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}
input:checked + .slider {
    background-color: #22c55e;
}
input:checked + .slider:before {
    transform: translateX(24px);
}
.switch-status-label {
    font-size: 0.78rem;
    letter-spacing: 0.5px;
}

/* Badges de précision GPS */
.badge-gps-good {
    background: #dcfce7;
    color: #15803d;
    border: 1px solid #86efac;
    padding: 3px 8px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.8rem;
}
.badge-gps-med {
    background: #fef9c3;
    color: #854d0e;
    border: 1px solid #fde047;
    padding: 3px 8px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.8rem;
}
.badge-gps-bad {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
    padding: 3px 8px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.8rem;
}

/* Vignette Selfie */
.selfie-thumbnail {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #3b82f6;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
    cursor: pointer;
    transition: transform 0.2s;
}
.selfie-thumbnail:hover {
    transform: scale(1.15);
}

/* Jauge GPS côté Agent */
.gps-status-card {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 12px 16px;
    margin-bottom: 18px;
    transition: all 0.3s ease;
}
.gps-status-card.gps-ready {
    background: #f0fdf4;
    border-color: #86efac;
}
.gps-status-card.gps-warning {
    background: #fefce8;
    border-color: #fde047;
}
.gps-status-card.gps-error {
    background: #fef2f2;
    border-color: #fecaca;
}
.gps-indicator-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background-color: #94a3b8;
    box-shadow: 0 0 0 4px rgba(148, 163, 184, 0.2);
    flex-shrink: 0;
    animation: pulse 1.8s infinite;
}
@keyframes pulse {
    0% { transform: scale(0.95); opacity: 0.8; }
    50% { transform: scale(1.15); opacity: 1; }
    100% { transform: scale(0.95); opacity: 0.8; }
}
.gps-indicator-dot.dot-ready {
    background-color: #22c55e;
    box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.25);
}
.gps-indicator-dot.dot-warning {
    background-color: #eab308;
    box-shadow: 0 0 0 4px rgba(234, 179, 8, 0.25);
}
.gps-indicator-dot.dot-error {
    background-color: #ef4444;
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.25);
}
.gps-status-title {
    font-size: 0.92rem;
    font-weight: 700;
    color: #1e293b;
}
.gps-status-desc {
    font-size: 0.8rem;
    color: #64748b;
    margin-top: 2px;
}

/* Modale et flux caméra pour le Selfie */
.selfie-modal-box {
    max-width: 440px;
    text-align: center;
}
.camera-viewport-wrapper {
    position: relative;
    width: 100%;
    max-width: 360px;
    height: 280px;
    margin: 12px auto;
    border-radius: 16px;
    overflow: hidden;
    background: #0f172a;
    box-shadow: 0 10px 25px rgba(0,0,0,0.3);
    border: 3px solid #3b82f6;
}
#camera-stream, #camera-preview {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transform: scaleX(-1); /* Effet miroir naturel */
}

/* ==========================================================================
   DESIGN MOBILE-FIRST PREMIUM & NOUVEAU MENU BURGER AVATAR (V4.0)
   ========================================================================== */

:root {
    --font-main: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
    --color-primary: #4f46e5;
    --color-primary-dark: #3730a3;
    --color-primary-light: #eef2ff;
    --color-success: #10b981;
    --color-success-dark: #059669;
    --color-success-light: #ecfdf5;
    --color-danger: #f43f5e;
    --color-danger-dark: #e11d48;
    --color-danger-light: #fff1f2;
    --color-warning: #f59e0b;
    --color-bg: #f8fafc;
    --color-surface: #ffffff;
    --color-border: #e2e8f0;
    --color-text-main: #0f172a;
    --color-text-muted: #64748b;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;
    --shadow-subtle: 0 4px 20px -2px rgba(0, 0, 0, 0.05), 0 2px 6px -1px rgba(0, 0, 0, 0.02);
    --shadow-glow: 0 10px 25px -5px rgba(79, 70, 229, 0.25);
    --shadow-success-glow: 0 10px 25px -5px rgba(16, 185, 129, 0.35);
    --shadow-danger-glow: 0 10px 25px -5px rgba(244, 63, 94, 0.35);
}

body.agent-mobile-body {
    font-family: var(--font-main);
    background-color: var(--color-bg);
    color: var(--color-text-main);
    -webkit-font-smoothing: antialiased;
}

/* Helper Icônes SVG */
.svg-icon {
    display: inline-block;
    vertical-align: middle;
    flex-shrink: 0;
    stroke-width: 2;
}

/* Header Agent Mobile-First */
.agent-topbar {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 16px;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--color-border);
}

.brand-link {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: inherit;
}

.brand-badge {
    display: flex;
    align-items: center;
    justify-content: center;
}

.brand-badge .logo-circle {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    color: #fff;
    font-weight: 800;
    font-size: 14px;
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

.brand-text {
    display: flex;
    flex-direction: column;
}

.brand-title {
    font-weight: 700;
    font-size: 15px;
    color: var(--color-text-main);
    line-height: 1.2;
}

.brand-sub {
    font-size: 11px;
    color: var(--color-primary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Bouton Déclencheur Burger / Avatar */
.profile-pill-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f1f5f9;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-full);
    padding: 4px 10px 4px 4px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.profile-pill-btn:hover, .profile-pill-btn:focus-visible {
    background: #e2e8f0;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.avatar-ring {
    position: relative;
    width: 36px;
    height: 36px;
    border-radius: 50%;
}

.user-avatar-img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #fff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.user-avatar-initials {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: linear-gradient(135deg, #6366f1, #4f46e5);
    color: #ffffff;
    font-weight: 700;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #ffffff;
    box-shadow: 0 2px 6px rgba(79, 70, 229, 0.25);
}

.online-indicator {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 11px;
    height: 11px;
    background-color: #22c55e;
    border: 2px solid #ffffff;
    border-radius: 50%;
}

.profile-burger-icon {
    color: var(--color-text-main);
    display: flex;
    align-items: center;
}

/* ==========================================================================
   DRAWER / MENU FLOTTANT PROFIL
   ========================================================================== */
body.drawer-locked {
    overflow: hidden;
}

.profile-drawer-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 99999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    display: flex;
    justify-content: flex-end;
}

.profile-drawer-overlay.is-open {
    opacity: 1;
    visibility: visible;
}

.profile-drawer {
    width: 100%;
    max-width: 360px;
    height: 100%;
    background: #ffffff;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    overflow-y: auto;
}

.profile-drawer-overlay.is-open .profile-drawer {
    transform: translateX(0);
}

/* Header Drawer */
.drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 24px 20px 20px;
    background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
    border-bottom: 1px solid var(--color-border);
    position: relative;
}

.drawer-user-info {
    display: flex;
    align-items: center;
    gap: 14px;
}

.drawer-avatar-wrap {
    position: relative;
    width: 58px;
    height: 58px;
    flex-shrink: 0;
}

.drawer-avatar {
    width: 100%;
    height: 100%;
    border-radius: 18px;
    object-fit: cover;
    border: 3px solid #ffffff;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
}

.drawer-avatar-fallback {
    width: 100%;
    height: 100%;
    border-radius: 18px;
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    color: #ffffff;
    font-weight: 800;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 16px rgba(79, 70, 229, 0.35);
}

.drawer-badge-online {
    position: absolute;
    bottom: -4px;
    right: -4px;
    font-size: 10px;
    background: #10b981;
    color: #fff;
    padding: 1px 6px;
    border-radius: 999px;
    font-weight: 700;
    border: 2px solid #fff;
}

.drawer-meta {
    overflow: hidden;
}

.drawer-name {
    font-size: 17px;
    font-weight: 700;
    color: var(--color-text-main);
    margin: 0 0 2px;
    line-height: 1.3;
}

.drawer-email {
    font-size: 12px;
    color: var(--color-text-muted);
    margin: 0 0 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.drawer-matricule {
    display: inline-block;
    background: #e2e8f0;
    color: #334155;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 6px;
}

.btn-close-drawer {
    background: #f1f5f9;
    border: none;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-close-drawer:hover {
    background: #e2e8f0;
    color: #0f172a;
    transform: rotate(90deg);
}

/* Nav Drawer */
.drawer-nav {
    padding: 20px 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.drawer-section-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #94a3b8;
    margin: 4px 10px 10px;
}

.drawer-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 14px;
    border-radius: 14px;
    text-decoration: none;
    color: var(--color-text-main);
    font-weight: 600;
    font-size: 15px;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    background: transparent;
}

.drawer-item:hover {
    background: #f8fafc;
    transform: translateX(4px);
    color: var(--color-primary);
}

.drawer-item.active {
    background: #eef2ff;
    color: var(--color-primary);
}

.drawer-icon-box {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: #f1f5f9;
    color: #475569;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.drawer-item:hover .drawer-icon-box, .drawer-item.active .drawer-icon-box {
    background: #e0e7ff;
    color: var(--color-primary);
}

.drawer-item-arrow {
    margin-left: auto;
    color: #cbd5e1;
    transition: transform 0.2s ease, color 0.2s ease;
}

.drawer-item:hover .drawer-item-arrow {
    color: var(--color-primary);
    transform: translateX(3px);
}

.drawer-divider {
    height: 1px;
    background: var(--color-border);
    margin: 12px 0;
}

.drawer-item-logout {
    color: #e11d48;
}

.drawer-item-logout .logout-icon-box {
    background: #ffe4e6;
    color: #e11d48;
}

.drawer-item-logout:hover {
    background: #fff1f2;
    color: #be123c;
}

.drawer-footer {
    padding: 16px 20px;
    border-top: 1px solid var(--color-border);
    background: #f8fafc;
}

.drawer-security-note {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: #64748b;
    font-weight: 500;
}

/* ==========================================================================
   AGENT DASHBOARD MOBILE-FIRST COMPONENTS
   ========================================================================== */
.agent-mobile-container {
    width: 100%;
    max-width: 680px;
    margin: 0 auto;
    padding: 14px 14px 40px;
}

.agent-dashboard-wrapper {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* 1. Carte Horloge en direct */
.live-clock-card {
    background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 100%);
    border-radius: var(--radius-xl);
    padding: 20px 22px;
    color: #ffffff;
    box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.3);
    position: relative;
    overflow: hidden;
}

.live-clock-card::after {
    content: "";
    position: absolute;
    top: -40px;
    right: -40px;
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.25) 0%, rgba(99, 102, 241, 0) 70%);
    pointer-events: none;
}

.live-clock-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.live-clock-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.12);
    padding: 3px 10px;
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.pulse-live-dot {
    width: 7px;
    height: 7px;
    background-color: #ef4444;
    border-radius: 50%;
    animation: pulseRed 1.5s infinite;
}

@keyframes pulseRed {
    0% { transform: scale(0.9); opacity: 0.7; }
    50% { transform: scale(1.3); opacity: 1; }
    100% { transform: scale(0.9); opacity: 0.7; }
}

.live-date-text {
    font-size: 13px;
    color: #94a3b8;
    font-weight: 500;
    text-transform: capitalize;
}

.live-digital-time {
    font-size: 38px;
    font-weight: 800;
    letter-spacing: 1px;
    color: #ffffff;
    font-variant-numeric: tabular-nums;
    margin: 4px 0 14px;
    line-height: 1;
}

.status-ribbon {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 600;
}

.ribbon-waiting {
    background: rgba(234, 179, 8, 0.18);
    color: #fef08a;
    border: 1px solid rgba(234, 179, 8, 0.35);
}

.ribbon-active {
    background: rgba(34, 197, 94, 0.2);
    color: #86efac;
    border: 1px solid rgba(34, 197, 94, 0.4);
}

.ribbon-completed {
    background: rgba(56, 189, 248, 0.2);
    color: #bae6fd;
    border: 1px solid rgba(56, 189, 248, 0.4);
}

.ribbon-locked {
    background: rgba(239, 68, 68, 0.2);
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, 0.4);
}

.pulse-dot-green {
    width: 8px;
    height: 8px;
    background-color: #22c55e;
    border-radius: 50%;
    animation: pulseGreen 1.5s infinite;
}

@keyframes pulseGreen {
    0% { transform: scale(0.9); opacity: 0.7; }
    50% { transform: scale(1.3); opacity: 1; }
    100% { transform: scale(0.9); opacity: 0.7; }
}

/* 2. Hero Punch Card */
.punch-hero-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    padding: 20px;
    box-shadow: var(--shadow-subtle);
    position: relative;
}

.punch-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.punch-card-title-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
}

.punch-icon-header {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: #eef2ff;
    color: var(--color-primary);
    display: flex;
    align-items: center;
    justify-content: center;
}

.punch-card-title {
    font-size: 17px;
    font-weight: 700;
    color: var(--color-text-main);
    margin: 0;
}

.badge-assignment-active {
    background: #ecfdf5;
    color: #059669;
    border: 1px solid #a7f3d0;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: var(--radius-full);
}

/* Jauge GPS Radar Moderne */
.modern-gps-card {
    display: flex;
    align-items: center;
    gap: 14px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-lg);
    padding: 14px 16px;
    margin-bottom: 18px;
    transition: all 0.3s ease;
}

.gps-radar-animation {
    position: relative;
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gps-radar-core {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #cbd5e1;
    color: #475569;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    transition: all 0.3s ease;
}

.gps-radar-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: rgba(148, 163, 184, 0.2);
    animation: radarPulse 2s infinite cubic-bezier(0.25, 1, 0.5, 1);
    z-index: 1;
}

@keyframes radarPulse {
    0% { transform: scale(0.8); opacity: 0.8; }
    100% { transform: scale(1.5); opacity: 0; }
}

/* Statuts GPS */
.modern-gps-card.gps-ready {
    background: #f0fdf4;
    border-color: #86efac;
}

.modern-gps-card.gps-ready .gps-radar-core {
    background: #22c55e;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.35);
}

.modern-gps-card.gps-ready .gps-radar-ring {
    background: rgba(34, 197, 94, 0.25);
}

.modern-gps-card.gps-warning {
    background: #fefce8;
    border-color: #fde047;
}

.modern-gps-card.gps-warning .gps-radar-core {
    background: #eab308;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(234, 179, 8, 0.35);
}

.modern-gps-card.gps-error {
    background: #fef2f2;
    border-color: #fecaca;
}

.modern-gps-card.gps-error .gps-radar-core {
    background: #ef4444;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.35);
}

.gps-content {
    flex: 1;
}

.gps-title-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3px;
}

.gps-status-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--color-text-main);
}

.gps-accuracy-chip {
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    background: #e2e8f0;
    color: #475569;
}

.gps-status-desc {
    font-size: 12px;
    color: var(--color-text-muted);
    margin: 0;
    line-height: 1.35;
}

/* Carte de Déblocage du Mode Secours (Hors GPS) */
.fallback-gps-card {
    background: #fffbeb;
    border: 1.5px solid #fde68a;
    border-radius: var(--radius-lg);
    padding: 16px 18px;
    margin-bottom: 20px;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.08);
    animation: fadeInSlide 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes fadeInSlide {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}

.fallback-gps-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #fef3c7;
    color: #b45309;
    font-size: 11.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    padding: 3px 10px;
    border-radius: var(--radius-full);
    border: 1px solid #fcd34d;
    margin-bottom: 8px;
}

.fallback-gps-title {
    font-size: 14.5px;
    font-weight: 800;
    color: #92400e;
    margin: 0 0 4px 0;
}

.fallback-gps-desc {
    font-size: 12.5px;
    color: #78350f;
    line-height: 1.5;
    margin: 0 0 14px 0;
}

.btn-fallback-punch {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    padding: 13px 18px;
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: #ffffff;
    border: none;
    border-radius: 12px;
    font-family: inherit;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(217, 119, 6, 0.35);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-fallback-punch:hover {
    background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(217, 119, 6, 0.45);
}

.btn-fallback-punch:active {
    transform: scale(0.98);
}

.fallback-btn-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.25);
    flex-shrink: 0;
}

.fallback-btn-text {
    display: flex;
    flex-direction: column;
    text-align: left;
}

.fallback-btn-text strong {
    font-size: 13.5px;
    font-weight: 800;
    line-height: 1.25;
}

.fallback-btn-text small {
    font-size: 11.5px;
    font-weight: 500;
    opacity: 0.92;
}

/* Alerte Luminosité / Qualité du Selfie */
.selfie-quality-warning {
    margin: 12px 18px 0 18px;
    padding: 10px 14px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    color: #b91c1c;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.45;
    text-align: center;
    animation: fadeInSlide 0.25s ease;
}

/* Badge discret dans le bilan */
.badge-fallback-bilan {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
}

/* Sélecteur de Site Personnalisé */
.site-picker-group {
    margin-bottom: 20px;
}

.picker-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #334155;
    margin-bottom: 6px;
}

.custom-select-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.select-pin-icon {
    position: absolute;
    left: 14px;
    color: var(--color-primary);
    pointer-events: none;
}

.select-chevron-icon {
    position: absolute;
    right: 14px;
    color: #94a3b8;
    pointer-events: none;
}

.custom-select-wrapper select {
    width: 100%;
    padding: 13px 40px 13px 42px;
    border-radius: var(--radius-md);
    border: 1.5px solid var(--color-border);
    background: #ffffff;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    color: var(--color-text-main);
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.custom-select-wrapper select:focus {
    border-color: var(--color-primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
}

/* Boutons Tactiles XXL de Pointage */
.punch-action-area {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.btn-punch-action {
    width: 100%;
    min-height: 64px;
    padding: 12px 18px;
    border-radius: 18px;
    border: none;
    display: flex;
    align-items: center;
    gap: 14px;
    cursor: pointer;
    text-align: left;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
}

.btn-punch-action:hover {
    transform: translateY(-2px);
}

.btn-punch-action:active {
    transform: scale(0.98);
}

.btn-punch-arrival {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #ffffff;
    box-shadow: var(--shadow-success-glow);
}

.btn-punch-arrival:hover {
    box-shadow: 0 14px 28px -4px rgba(16, 185, 129, 0.45);
}

.btn-punch-departure {
    background: linear-gradient(135deg, #f43f5e 0%, #e11d48 100%);
    color: #ffffff;
    box-shadow: var(--shadow-danger-glow);
}

.btn-punch-departure:hover {
    box-shadow: 0 14px 28px -4px rgba(244, 63, 94, 0.45);
}

.btn-punch-icon-circle {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    backdrop-filter: blur(4px);
}

.btn-punch-text-wrap {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.btn-punch-title {
    font-size: 16px;
    font-weight: 800;
    letter-spacing: -0.2px;
}

.btn-punch-sub {
    font-size: 12px;
    opacity: 0.9;
    font-weight: 500;
}

.badge-selfie-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(0, 0, 0, 0.2);
    padding: 4px 8px;
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: 700;
    backdrop-filter: blur(4px);
}

.day-completed-box {
    display: flex;
    align-items: center;
    gap: 14px;
    background: #ecfdf5;
    border: 1.5px solid #a7f3d0;
    border-radius: var(--radius-lg);
    padding: 16px 18px;
}

.completed-check-icon {
    color: #10b981;
}

.completed-text strong {
    display: block;
    color: #065f46;
    font-size: 15px;
}

.completed-text span {
    font-size: 12px;
    color: #047857;
}

/* 3. Timeline de Progression */
.summary-timeline-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    padding: 20px;
    box-shadow: var(--shadow-subtle);
}

.section-card-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--color-text-main);
    margin: 0 0 16px;
}

.mobile-steps-timeline {
    display: flex;
    flex-direction: column;
    gap: 0;
    position: relative;
}

.timeline-step {
    display: flex;
    align-items: center;
    gap: 14px;
    position: relative;
    z-index: 2;
}

.step-indicator {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #f1f5f9;
    border: 2px solid #cbd5e1;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.step-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #94a3b8;
}

.step-completed .step-indicator {
    background: #10b981;
    border-color: #10b981;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.35);
}

.step-completed .step-dot {
    display: none;
}

.step-content {
    display: flex;
    flex-direction: column;
}

.step-label {
    font-size: 12px;
    color: var(--color-text-muted);
}

.step-value {
    font-size: 16px;
    font-weight: 700;
    color: var(--color-text-main);
}

.timeline-connector {
    width: 3px;
    height: 28px;
    background: #e2e8f0;
    margin-left: 14.5px;
    z-index: 1;
    transition: all 0.3s ease;
}

.connector-half {
    background: linear-gradient(180deg, #10b981 0%, #e2e8f0 100%);
}

.connector-full {
    background: #10b981;
}

/* 4. Historique Mouvements Mobile */
.movements-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    padding: 20px;
    box-shadow: var(--shadow-subtle);
}

.movements-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}

.date-tag {
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
    background: #f1f5f9;
    padding: 2px 8px;
    border-radius: 6px;
}

.empty-movements {
    text-align: center;
    padding: 30px 10px;
    color: #94a3b8;
}

.empty-movements p {
    margin: 8px 0 0;
    font-size: 13px;
}

.movements-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.movement-item-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: var(--radius-md);
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}

.movement-badge-type {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: 700;
    flex-shrink: 0;
}

.badge-arrival-custom {
    background: #dcfce7;
    color: #15803d;
}

.badge-departure-custom {
    background: #ffe4e6;
    color: #be123c;
}

.movement-main {
    flex: 1;
    overflow: hidden;
}

.movement-time {
    font-size: 15px;
    font-weight: 800;
    color: var(--color-text-main);
}

.movement-site {
    font-size: 12px;
    color: var(--color-text-muted);
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.movement-extras {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.gps-mini-badge {
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    gap: 3px;
}

.gps-good { background: #dcfce7; color: #166534; }
.gps-med  { background: #fef9c3; color: #854d0e; }
.gps-bad  { background: #fee2e2; color: #991b1b; }

.selfie-thumb-wrap {
    display: block;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid var(--color-primary);
    box-shadow: 0 2px 8px rgba(79, 70, 229, 0.25);
    transition: transform 0.2s;
}

.selfie-thumb-wrap:hover {
    transform: scale(1.15);
}

.selfie-thumb-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Modale Selfie Plein Écran Mobile-First */
.selfie-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.selfie-modal-card {
    width: 100%;
    max-width: 440px;
    background: #ffffff;
    border-radius: var(--radius-xl);
    padding: 24px 20px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    text-align: center;
}

.selfie-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.modal-title-row {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--color-text-main);
}

.modal-title-row h3 {
    margin: 0;
    font-size: 17px;
    font-weight: 800;
}

.btn-close-modal {
    background: #f1f5f9;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    cursor: pointer;
}

.selfie-modal-instruction {
    font-size: 13px;
    color: var(--color-text-muted);
    margin: 0 0 16px;
    line-height: 1.4;
}

.camera-viewport-container {
    position: relative;
    width: 100%;
    max-width: 320px;
    height: 280px;
    margin: 0 auto 20px;
    border-radius: 24px;
    overflow: hidden;
    background: #0f172a;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
    border: 3px solid var(--color-primary);
}

.camera-face-guide {
    position: absolute;
    inset: 20px;
    border: 2px dashed rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    pointer-events: none;
}

.guide-crosshair {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 10px;
    height: 10px;
    transform: translate(-50%, -50%);
    border-top: 2px solid rgba(255, 255, 255, 0.8);
    border-left: 2px solid rgba(255, 255, 255, 0.8);
}

.selfie-modal-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
}

.btn-capture-round {
    background: linear-gradient(135deg, #4f46e5 0%, #3730a3 100%);
    color: #ffffff;
    border: none;
    border-radius: var(--radius-full);
    padding: 14px 28px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: var(--shadow-glow);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.btn-confirm-punch {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #ffffff;
    border: none;
    border-radius: var(--radius-full);
    padding: 14px 28px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: var(--shadow-success-glow);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-retake {
    background: #f1f5f9;
    color: #334155;
    border: none;
    border-radius: var(--radius-full);
    padding: 8px 18px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.btn-cancel-flat {
    background: transparent;
    border: none;
    color: #94a3b8;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 4px;
}

/* Alertes modernes */
.modern-alert {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    font-size: 13px;
    font-weight: 500;
}

.alert-success-custom {
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    color: #065f46;
}

.alert-error-custom {
    background: #fff1f2;
    border: 1px solid #fecdd3;
    color: #9f1239;
}

/* ==========================================================================
   PAGE PROFIL AGENT MOBILE-FIRST
   ========================================================================== */
.agent-profil-wrapper {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding-bottom: 24px;
}

/* 1. Header Profil Hero */
.profil-hero-header {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    padding: 20px;
    box-shadow: var(--shadow-subtle);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.profil-title-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #eef2ff;
    color: var(--color-primary);
    font-size: 11px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: var(--radius-full);
    width: fit-content;
}

.profil-main-title {
    font-size: 22px;
    font-weight: 800;
    color: var(--color-text-main);
    letter-spacing: -0.3px;
    margin: 2px 0;
}

.profil-subtitle {
    font-size: 13px;
    color: var(--color-text-muted);
    line-height: 1.4;
    margin: 0;
}

/* 2. Carte d'Identité Agent */
.profile-summary-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    padding: 22px 20px;
    box-shadow: var(--shadow-subtle);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 14px;
}

@media (min-width: 480px) {
    .profile-summary-card {
        flex-direction: row;
        text-align: left;
        align-items: center;
    }
}

.profile-avatar-master-wrap {
    width: 82px;
    height: 82px;
    border-radius: 26px;
    position: relative;
    flex-shrink: 0;
    box-shadow: 0 8px 20px rgba(79, 70, 229, 0.22);
    border: 3px solid #ffffff;
    background: #e0e7ff;
}

.profile-avatar-img {
    width: 100%;
    height: 100%;
    border-radius: 23px;
    object-fit: cover;
    display: block;
}

.profile-avatar-fallback {
    width: 100%;
    height: 100%;
    border-radius: 23px;
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    color: #ffffff;
    font-size: 28px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
}

.profile-online-dot {
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: #10b981;
    border: 2.5px solid #ffffff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.15);
}

.profile-id-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.profile-agent-name {
    font-size: 18px;
    font-weight: 800;
    color: var(--color-text-main);
    letter-spacing: -0.2px;
    margin: 0;
}

.profile-tags-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 2px;
}

@media (min-width: 480px) {
    .profile-tags-row {
        justify-content: flex-start;
    }
}

.profile-badge-role {
    background: #eef2ff;
    color: var(--color-primary);
    font-size: 11px;
    font-weight: 700;
    padding: 3px 9px;
    border-radius: var(--radius-full);
}

.profile-badge-matricule {
    background: #f1f5f9;
    color: #475569;
    font-size: 11px;
    padding: 3px 9px;
    border-radius: var(--radius-full);
}

.profile-agent-email {
    font-size: 12.5px;
    color: var(--color-text-muted);
    margin: 2px 0 0;
}

/* 3. Carte Formulaire de Profil */
.profile-form-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    padding: 20px;
    box-shadow: var(--shadow-subtle);
    box-sizing: border-box;
}

.profile-edit-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-section-block {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.section-title-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 2px;
}

.section-icon-box {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: #eef2ff;
    color: var(--color-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.section-icon-box.security-box {
    background: #fdf2f8;
    color: #db2777;
}

.section-heading {
    font-size: 15px;
    font-weight: 800;
    color: var(--color-text-main);
    margin: 0;
}

.section-desc {
    font-size: 12px;
    color: var(--color-text-muted);
    margin: 1px 0 0;
}

.form-field-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.field-label {
    font-size: 13px;
    font-weight: 700;
    color: var(--color-text-main);
}

.input-with-icon {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.input-leading-icon {
    position: absolute;
    left: 14px;
    color: #94a3b8;
    pointer-events: none;
    display: flex;
    align-items: center;
}

.styled-form-input {
    width: 100%;
    min-height: 48px;
    padding: 10px 14px 10px 42px;
    border-radius: var(--radius-md);
    border: 1.5px solid var(--color-border);
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    color: var(--color-text-main);
    background: #ffffff;
    box-sizing: border-box;
    transition: all 0.2s ease;
}

.styled-form-input:focus {
    border-color: var(--color-primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
}

.styled-form-input.password-field {
    padding-right: 44px;
}

.btn-toggle-password {
    position: absolute;
    right: 12px;
    background: transparent;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    padding: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
}

.btn-toggle-password:hover {
    color: var(--color-primary);
}

.field-hint {
    font-size: 11.5px;
    color: var(--color-text-muted);
    line-height: 1.35;
}

/* Custom Upload Dropzone Photo Profil */
.custom-upload-zone {
    display: flex;
    align-items: center;
    gap: 14px;
    background: #f8fafc;
    border: 1.5px dashed #cbd5e1;
    border-radius: var(--radius-lg);
    padding: 14px 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.custom-upload-zone:hover, .custom-upload-zone:focus {
    background: #f1f5f9;
    border-color: var(--color-primary);
    outline: none;
}

.upload-icon-bubble {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: #eef2ff;
    color: var(--color-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.upload-copy {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    min-width: 0;
}

.upload-primary-text {
    font-size: 13px;
    font-weight: 700;
    color: var(--color-text-main);
}

.upload-sub-text {
    font-size: 11px;
    color: var(--color-text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.upload-selected-file {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    color: #059669;
    font-weight: 700;
    margin-top: 3px;
}

.btn-browse-pill {
    font-size: 12px;
    font-weight: 700;
    color: var(--color-primary);
    background: #ffffff;
    border: 1px solid #c7d2fe;
    padding: 5px 12px;
    border-radius: var(--radius-full);
    flex-shrink: 0;
}

.hidden-file-input {
    display: none !important;
}

.form-separator {
    height: 1px;
    background: var(--color-border);
    margin: 4px 0;
}

/* Bouton Enregistrer Tactile XXL */
.profile-submit-area {
    margin-top: 6px;
}

.btn-save-profile {
    width: 100%;
    min-height: 54px;
    padding: 12px 20px;
    border-radius: var(--radius-lg);
    border: none;
    background: linear-gradient(135deg, #4f46e5 0%, #3730a3 100%);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-family: inherit;
    font-size: 14.5px;
    font-weight: 800;
    letter-spacing: -0.2px;
    cursor: pointer;
    box-shadow: 0 10px 25px -4px rgba(79, 70, 229, 0.45);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-save-profile:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 28px -4px rgba(79, 70, 229, 0.6);
}

.btn-save-profile:active {
    transform: scale(0.98);
}

.btn-save-icon-circle {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ==========================================================================
   REFONTE MODERNE DU BILAN AGENT (MOBILE-FIRST)
   ========================================================================== */

.agent-bilan-wrapper {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding-bottom: 24px;
}

/* 1. Header Bilan Hero */
.bilan-hero-header {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    padding: 20px;
    box-shadow: var(--shadow-subtle);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.bilan-title-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #eef2ff;
    color: var(--color-primary);
    font-size: 11px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: var(--radius-full);
    width: fit-content;
}

.bilan-main-title {
    font-size: 22px;
    font-weight: 800;
    color: var(--color-text-main);
    letter-spacing: -0.3px;
    margin: 4px 0 2px;
}

.bilan-subtitle {
    font-size: 13px;
    color: var(--color-text-muted);
    line-height: 1.4;
    margin: 0;
}

/* 2. Filtre de Mois & Groupe d'Actions */
.bilan-controls-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    padding: 16px 14px;
    box-shadow: var(--shadow-subtle);
    box-sizing: border-box;
    width: 100%;
    overflow: hidden;
}

@media (min-width: 480px) {
    .bilan-controls-card {
        padding: 18px 20px;
    }
}

.bilan-filter-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
    width: 100%;
    box-sizing: border-box;
}

.bilan-month-picker-wrap {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

.month-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 700;
    color: var(--color-text-main);
}

.icon-month {
    color: var(--color-primary);
}

.month-input-box {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

.month-input-box input[type="month"] {
    flex: 1 1 0%;
    min-width: 0;
    width: 100%;
    min-height: 44px;
    padding: 8px 10px;
    border-radius: var(--radius-md);
    border: 1.5px solid var(--color-border);
    font-family: inherit;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--color-text-main);
    background: #ffffff;
    box-sizing: border-box;
    transition: all 0.2s ease;
}

.month-input-box input[type="month"]:focus {
    border-color: var(--color-primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
}

.btn-refresh-month {
    flex-shrink: 0;
    min-height: 44px;
    padding: 0 14px;
    border-radius: var(--radius-md);
    border: 1.5px solid var(--color-border);
    background: #f8fafc;
    color: var(--color-text-main);
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    cursor: pointer;
    white-space: nowrap;
    box-sizing: border-box;
    transition: all 0.2s ease;
}

.btn-refresh-month:hover {
    background: #e2e8f0;
    border-color: #cbd5e1;
}

@media (max-width: 370px) {
    .btn-refresh-month {
        padding: 0 10px;
    }
    .btn-refresh-text {
        display: none;
    }
}

/* Cluster de boutons d'action (PDF & Excel) */
.bilan-exports-cluster {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

@media (min-width: 640px) {
    .bilan-exports-cluster {
        flex-direction: row;
    }
}

.btn-bilan-action {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: var(--radius-lg);
    text-decoration: none;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
    flex: 1;
}

.btn-bilan-action:hover {
    transform: translateY(-2px);
}

.btn-bilan-action:active {
    transform: scale(0.98);
}

/* Bouton Télécharger PDF (Design Accent Indigo / Violet) */
.btn-bilan-pdf {
    background: linear-gradient(135deg, #4f46e5 0%, #3730a3 100%);
    color: #ffffff;
    box-shadow: 0 8px 20px -4px rgba(79, 70, 229, 0.45);
}

.btn-bilan-pdf:hover {
    box-shadow: 0 12px 24px -4px rgba(79, 70, 229, 0.6);
}

/* Bouton Exporter Excel (Design Émeraude) */
.btn-bilan-excel {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    color: #ffffff;
    box-shadow: 0 8px 20px -4px rgba(5, 150, 105, 0.45);
}

.btn-bilan-excel:hover {
    box-shadow: 0 12px 24px -4px rgba(5, 150, 105, 0.6);
}

.btn-action-icon-circle {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    backdrop-filter: blur(4px);
}

.btn-action-label-wrap {
    display: flex;
    flex-direction: column;
    flex: 1;
    text-align: left;
}

.btn-action-title {
    font-size: 14px;
    font-weight: 800;
    letter-spacing: -0.2px;
}

.btn-action-sub {
    font-size: 11px;
    opacity: 0.88;
    font-weight: 500;
}

.icon-download-arrow {
    opacity: 0.85;
}

/* 3. Grille des KPIs Statistiques */
.bilan-kpi-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

@media (min-width: 768px) {
    .bilan-kpi-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.kpi-card {
    border-radius: var(--radius-lg);
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    position: relative;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.kpi-card:hover {
    transform: translateY(-2px);
}

.kpi-icon-wrap {
    margin-bottom: 2px;
}

.kpi-present {
    background: #ecfdf5;
    border: 1.5px solid #a7f3d0;
    color: #065f46;
}
.kpi-present .kpi-icon-wrap { color: #10b981; }

.kpi-absent {
    background: #fef2f2;
    border: 1.5px solid #fecaca;
    color: #991b1b;
}
.kpi-absent .kpi-icon-wrap { color: #ef4444; }

.kpi-late {
    background: #fefce8;
    border: 1.5px solid #fde047;
    color: #854d0e;
}
.kpi-late .kpi-icon-wrap { color: #eab308; }

.kpi-rate {
    background: #eef2ff;
    border: 1.5px solid #c7d2fe;
    color: #3730a3;
}
.kpi-rate .kpi-icon-wrap { color: #4f46e5; }

.kpi-value {
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -0.3px;
    display: block;
}

.kpi-title {
    font-size: 12px;
    font-weight: 700;
    display: block;
}

.kpi-tag-sub {
    font-size: 11px;
    opacity: 0.75;
    font-weight: 500;
}

/* 4. Tableau Détaillé Journalier */
.bilan-sheet-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-subtle);
    overflow: hidden;
}

.sheet-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #f1f5f9;
}

.sheet-title-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--color-primary);
}

.sheet-title {
    font-size: 15px;
    font-weight: 800;
    color: var(--color-text-main);
    margin: 0;
}

.sheet-badge-days {
    background: #f1f5f9;
    color: #475569;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: var(--radius-full);
}

/* Responsive Modes: Mobile Card List on Mobile (< 768px), Table on Desktop (>= 768px) */
.mobile-day-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 12px;
    background: #f8fafc;
}

.sheet-table-scroll {
    display: none; /* Masqué sur smartphone pour éviter tout débordement */
}

@media (min-width: 768px) {
    .mobile-day-list {
        display: none; /* Masqué sur grand écran */
    }
    .sheet-table-scroll {
        display: block; /* Tableau affiché sur tablette / desktop */
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        width: 100%;
    }
}

/* Carte Journalière Mobile */
.mobile-day-item {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #ffffff;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 10px 14px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    transition: all 0.2s ease;
}

.mobile-day-item:hover {
    border-color: #cbd5e1;
}

.mobile-day-item.item-weekend {
    background: #f8fafc;
    border-color: #f1f5f9;
    opacity: 0.85;
}

.mobile-day-item.item-férié {
    background: #fefce8;
    border-color: #fef08a;
}

/* Bloc Date Numérique */
.day-date-box {
    width: 44px;
    height: 48px;
    background: #f1f5f9;
    border-radius: var(--radius-md);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border: 1px solid #e2e8f0;
}

.mobile-day-item.item-présent .day-date-box {
    background: #ecfdf5;
    border-color: #a7f3d0;
}

.day-date-num {
    font-size: 16px;
    font-weight: 800;
    line-height: 1;
    color: var(--color-text-main);
}

.mobile-day-item.item-présent .day-date-num {
    color: #065f46;
}

.day-date-day {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    color: #64748b;
    margin-top: 2px;
}

.mobile-day-item.item-présent .day-date-day {
    color: #059669;
}

/* Bloc Info Central */
.day-center-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
    min-width: 0; /* Empêche tout débordement flex */
}

.day-top-row {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.day-bottom-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.day-time-flow {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-weight: 700;
    color: var(--color-text-main);
    font-size: 12px;
}

.flow-arrow {
    color: #94a3b8;
    font-weight: normal;
}

.day-sub-label {
    color: var(--color-text-muted);
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.day-sub-label.label-danger {
    color: #dc2626;
    font-weight: 500;
}

.day-sub-label.label-warning {
    color: #b45309;
    font-weight: 500;
}

/* Bloc Preuve Selfie */
.day-proof-wrap {
    flex-shrink: 0;
}

.modern-bilan-table {
    width: 100%;
    min-width: 600px;
    border-collapse: collapse;
    font-size: 13px;
    text-align: left;
}

.modern-bilan-table thead th {
    background: #f8fafc;
    color: #64748b;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 12px 14px;
    border-bottom: 1.5px solid #e2e8f0;
}

.modern-bilan-table tbody tr {
    border-bottom: 1px solid #f1f5f9;
    transition: background 0.15s ease;
}

.modern-bilan-table tbody tr:hover {
    background: #f8fafc;
}

.modern-bilan-table tbody tr.row-weekend {
    background: #fafafa;
    opacity: 0.85;
}

.modern-bilan-table tbody tr.row-férié {
    background: #fefce8;
}

.modern-bilan-table tbody td {
    padding: 12px 14px;
    vertical-align: middle;
}

.cell-date strong {
    color: var(--color-text-main);
    font-size: 13px;
}

.cell-year {
    display: block;
    font-size: 10px;
    color: #94a3b8;
}

.cell-day {
    color: #475569;
    font-weight: 600;
    font-size: 12px;
}

/* Pilules de statut */
.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: 700;
}

.pill-present {
    background: #dcfce7;
    color: #15803d;
}

.pill-absent {
    background: #fee2e2;
    color: #b91c1c;
}

.pill-holiday {
    background: #fef9c3;
    color: #a16207;
}

.pill-weekend {
    background: #f1f5f9;
    color: #64748b;
}

.pill-repos {
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #cbd5e1;
}

/* Badges d'heures */
.time-badge {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 13px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: var(--radius-sm);
    display: inline-block;
}

.arrival-badge {
    background: #ecfdf5;
    color: #065f46;
}

.departure-badge {
    background: #f1f5f9;
    color: #1e293b;
}

.empty-dash {
    color: #94a3b8;
    font-size: 13px;
}

/* Badge Retard */
.late-badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: var(--radius-full);
}

.late-none {
    background: #f1f5f9;
    color: #64748b;
}

.late-warning {
    background: #fef3c7;
    color: #b45309;
}

/* Preuve Selfie miniature */
.proof-thumb-link {
    display: inline-block;
    border-radius: 50%;
    overflow: hidden;
    width: 32px;
    height: 32px;
    border: 2px solid #e2e8f0;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.proof-thumb-link:hover {
    transform: scale(1.15);
    border-color: var(--color-primary);
}

.proof-img-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ==========================================================================
   CHARGEMENT PROGRESSIF (BOUTON VOIR PLUS)
   ========================================================================== */
.mobile-day-item.is-hidden,
.modern-bilan-table tbody tr.is-hidden {
    display: none !important;
}

.mobile-day-item:not(.is-hidden) {
    animation: fadeInDay 0.25s ease-out;
}

@keyframes fadeInDay {
    from {
        opacity: 0;
        transform: translateY(6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.load-more-container {
    padding: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    background: #ffffff;
    border-top: 1px solid #f1f5f9;
}

.load-more-meta {
    font-size: 12px;
    color: var(--color-text-muted);
    font-weight: 600;
}

.btn-load-more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 22px;
    border-radius: var(--radius-full);
    background: #f8fafc;
    border: 1.5px solid #cbd5e1;
    color: var(--color-primary);
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

.btn-load-more:hover {
    background: #eef2ff;
    border-color: var(--color-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.15);
}

.btn-load-more:active {
    transform: scale(0.98);
}

.btn-load-less {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 18px;
    border-radius: var(--radius-full);
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    color: #64748b;
    font-family: inherit;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-load-less:hover {
    background: #f1f5f9;
    color: var(--color-text-main);
    border-color: #cbd5e1;
}

.icon-chevron-less {
    transform: rotate(180deg);
}

.all-shown-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #059669;
    font-weight: 700;
    background: #ecfdf5;
    padding: 4px 10px;
    border-radius: 9999px;
}

/* ==========================================================================
   MESSAGES URGENTS / PUSH PLEIN ÉCRAN & ACCUSÉ DE RÉCEPTION
   ========================================================================== */

/* 1. Verrouillage d'écran pour l'Agent */
html.urgent-locked,
body.urgent-locked {
    overflow: hidden !important;
    height: 100vh !important;
    touch-action: none;
}

.fullscreen-urgent-overlay {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    z-index: 9999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(15, 23, 42, 0.88);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    animation: fadeInModal 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes fadeInModal {
    from { opacity: 0; transform: scale(0.97); }
    to { opacity: 1; transform: scale(1); }
}

.fullscreen-urgent-modal {
    position: relative;
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    background: #ffffff;
    border-radius: 24px;
    box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
    padding: 28px;
    border-top: 6px solid #ef4444;
}

.fullscreen-urgent-modal.priority-critique {
    border-top-color: #dc2626;
    box-shadow: 0 25px 60px -15px rgba(220, 38, 38, 0.35), 0 0 0 2px #fecaca;
}

.fullscreen-urgent-modal.priority-urgent {
    border-top-color: #f97316;
    box-shadow: 0 25px 60px -15px rgba(249, 115, 22, 0.35), 0 0 0 2px #fed7aa;
}

.fullscreen-urgent-modal.priority-info {
    border-top-color: #3b82f6;
    box-shadow: 0 25px 60px -15px rgba(59, 130, 246, 0.35), 0 0 0 2px #bfdbfe;
}

/* En-tête de la modal */
.urgent-modal-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}

.urgent-beacon-wrap {
    position: relative;
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #fee2e2;
    flex-shrink: 0;
}

.priority-urgent .urgent-beacon-wrap { background: #ffedd5; }
.priority-info .urgent-beacon-wrap { background: #dbeafe; }

.urgent-beacon-icon {
    font-size: 26px;
    z-index: 2;
    animation: urgentShake 1.5s infinite ease-in-out;
}

@keyframes urgentShake {
    0%, 100% { transform: rotate(0deg); }
    15% { transform: rotate(-12deg); }
    30% { transform: rotate(12deg); }
    45% { transform: rotate(-8deg); }
    60% { transform: rotate(8deg); }
    75% { transform: rotate(0deg); }
}

.urgent-beacon-ping {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: rgba(239, 68, 68, 0.4);
    animation: beaconPulse 2s infinite cubic-bezier(0, 0, 0.2, 1);
}

.priority-urgent .urgent-beacon-ping { background: rgba(249, 115, 22, 0.4); }
.priority-info .urgent-beacon-ping { background: rgba(59, 130, 246, 0.4); }

@keyframes beaconPulse {
    0% { transform: scale(1); opacity: 0.9; }
    70% { transform: scale(1.6); opacity: 0; }
    100% { transform: scale(1.6); opacity: 0; }
}

.urgent-modal-badges {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.badge-urgent-tag {
    align-self: flex-start;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    padding: 3px 10px;
    border-radius: 9999px;
}

.urgent-modal-date {
    font-size: 12px;
    color: #64748b;
    font-weight: 500;
}

/* Corps du message modal */
.urgent-modal-title {
    font-size: 22px;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.3;
    margin: 0 0 16px 0;
}

.urgent-modal-text-box {
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: 16px;
    padding: 18px 20px;
    font-size: 15px;
    line-height: 1.65;
    color: #1e293b;
    margin-bottom: 20px;
    max-height: 38vh;
    overflow-y: auto;
}

.urgent-modal-instruction {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 14px;
    padding: 12px 16px;
    font-size: 13px;
    color: #991b1b;
    margin-bottom: 24px;
}

.priority-urgent .urgent-modal-instruction {
    background: #fff7ed;
    border-color: #ffedd5;
    color: #9a3412;
}

.priority-info .urgent-modal-instruction {
    background: #eff6ff;
    border-color: #dbeafe;
    color: #1e40af;
}

.instruction-icon {
    font-size: 18px;
    line-height: 1;
}

/* Bouton d'accusé de réception */
.urgent-modal-footer {
    display: flex;
    flex-direction: column;
    margin: 0;
}

.btn-acknowledge-receipt {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    padding: 16px 24px;
    font-family: inherit;
    font-size: 17px;
    font-weight: 800;
    color: #ffffff;
    background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
    border: none;
    border-radius: 16px;
    cursor: pointer;
    box-shadow: 0 10px 25px -5px rgba(22, 163, 74, 0.4);
    transition: all 0.2s ease;
}

.btn-acknowledge-receipt:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 30px -5px rgba(22, 163, 74, 0.55);
    background: linear-gradient(135deg, #15803d 0%, #166534 100%);
}

.btn-acknowledge-receipt:active {
    transform: scale(0.98);
}

.btn-ack-icon {
    font-size: 20px;
}

/* 2. Bandeau persistant sur le Dashboard Agent */
.urgent-dashboard-banner {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 16px 20px;
    border-radius: 20px;
    margin-bottom: 20px;
    background: #ffffff;
    border-left: 5px solid #ef4444;
    box-shadow: 0 10px 25px -5px rgba(239, 68, 68, 0.15), 0 1px 3px rgba(0,0,0,0.05);
    animation: slideDownFade 0.4s ease forwards;
}

@keyframes slideDownFade {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.urgent-dashboard-banner.priority-critique {
    background: linear-gradient(135deg, #fff1f2 0%, #ffffff 100%);
    border-left-color: #dc2626;
}

.urgent-dashboard-banner.priority-urgent {
    background: linear-gradient(135deg, #fff7ed 0%, #ffffff 100%);
    border-left-color: #f97316;
}

.urgent-dashboard-banner.priority-info {
    background: linear-gradient(135deg, #eff6ff 0%, #ffffff 100%);
    border-left-color: #3b82f6;
}

.urgent-banner-icon-badge {
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(239, 68, 68, 0.1);
    flex-shrink: 0;
}

.urgent-banner-content {
    flex: 1;
    min-width: 0;
}

.urgent-banner-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
    flex-wrap: wrap;
}

.urgent-tag-sm {
    font-size: 10px;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 6px;
    background: #ef4444;
    color: white;
}

.urgent-date-sm {
    font-size: 11px;
    color: #64748b;
    font-weight: 500;
}

.urgent-ack-pill {
    font-size: 11px;
    color: #15803d;
    font-weight: 700;
    background: #dcfce7;
    padding: 2px 8px;
    border-radius: 9999px;
}

.urgent-banner-heading {
    font-size: 16px;
    font-weight: 800;
    color: #0f172a;
    margin: 2px 0 6px 0;
}

.urgent-banner-body-text {
    font-size: 13.5px;
    line-height: 1.5;
    color: #334155;
}

.urgent-banner-action {
    align-self: center;
}

.btn-banner-ack {
    padding: 8px 16px;
    background: #16a34a;
    color: white;
    border: none;
    border-radius: 12px;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.btn-banner-ack:hover {
    background: #15803d;
    transform: translateY(-1px);
}

/* 3. Styles Admin pour la gestion des diffusions */
.header-icon-badge.badge-urgent {
    background: #fee2e2;
    color: #dc2626;
}

.badge-priority {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

.badge-priority-critique {
    background: #fee2e2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

.badge-priority-urgent {
    background: #ffedd5;
    color: #c2410c;
    border: 1px solid #fed7aa;
}

.badge-priority-info {
    background: #dbeafe;
    color: #1d4ed8;
    border: 1px solid #bfdbfe;
}

/* Sélecteur de priorité */
.priority-selector-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
}

.priority-option {
    cursor: pointer;
    position: relative;
}

.priority-option input[type="radio"] {
    position: absolute;
    opacity: 0;
}

.priority-card {
    border: 2px solid #e2e8f0;
    border-radius: 16px;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    transition: all 0.2s ease;
    background: #ffffff;
}

.priority-card .p-icon { font-size: 22px; }
.priority-card .p-title { font-size: 14px; font-weight: 800; color: #0f172a; }
.priority-card .p-desc { font-size: 11.5px; color: #64748b; line-height: 1.35; }

.priority-option input[type="radio"]:checked + .priority-card {
    border-color: var(--color-primary);
    background: #f8faff;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.12);
}

.option-critique input[type="radio"]:checked + .priority-card {
    border-color: #ef4444;
    background: #fef2f2;
}

.option-urgent input[type="radio"]:checked + .priority-card {
    border-color: #f97316;
    background: #fff7ed;
}

/* Sélecteur de type de cible */
.target-type-selector {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.radio-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: #f1f5f9;
    border-radius: 9999px;
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.radio-pill:has(input:checked) {
    background: #e0e7ff;
    color: #4338ca;
}

/* Grille multi-sélection des agents */
.specific-agents-container {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 16px;
}

.agents-box-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.btn-text-sm {
    background: none;
    border: none;
    color: var(--color-primary);
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    padding: 0;
}

.btn-text-sm:hover { text-decoration: underline; }

.agents-scroll-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 10px;
    max-height: 260px;
    overflow-y: auto;
    padding-right: 4px;
}

.agent-check-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.agent-check-card:hover {
    border-color: #cbd5e1;
    background: #f8fafc;
}

.agent-check-card:has(input:checked) {
    border-color: #4f46e5;
    background: #eef2ff;
}

.agent-check-info {
    flex: 1;
    min-width: 0;
}

.agent-check-name {
    font-size: 13px;
    font-weight: 700;
    color: #0f172a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.agent-check-meta {
    font-size: 11px;
    color: #64748b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Notice plein écran info */
.banner-notice-fullscreen {
    display: flex;
    gap: 12px;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 12px;
    padding: 12px 16px;
    font-size: 13px;
    color: #1e40af;
}

.btn-danger-gradient {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: #ffffff;
    border: none;
    font-weight: 800;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
}

.btn-danger-gradient:hover {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.4);
}

/* Barre de progression des accusés */
.ack-progress-box {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 140px;
}

.ack-progress-labels {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
}

.progress-bar-track {
    height: 7px;
    background: #e2e8f0;
    border-radius: 9999px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    border-radius: 9999px;
    transition: width 0.4s ease;
}

/* Page Détails & Émargement */
.urgent-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
}

.urgent-detail-title {
    font-size: 22px;
    font-weight: 800;
    color: #0f172a;
    margin: 4px 0 0 0;
}

.message-quote-box {
    background: #f8fafc;
    border-left: 4px solid var(--color-primary);
    border-radius: 0 16px 16px 0;
    padding: 16px 20px;
    font-size: 15px;
    line-height: 1.6;
    color: #1e293b;
}

.badge-status-ack {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #dcfce7;
    color: #15803d;
    padding: 4px 12px;
    border-radius: 9999px;
    font-size: 12px;
    font-weight: 700;
}

.badge-status-pending {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #fef3c7;
    color: #b45309;
    padding: 4px 12px;
    border-radius: 9999px;
    font-size: 12px;
    font-weight: 700;
}

.row-acknowledged td {
    background-color: #fcfdfd;
}

.row-pending td {
    background-color: #fffbf7;
}

/* ==========================================================================
   PWA & LOGO OFFICIEL STYLES
   ========================================================================== */
.brand-logo-img {
    width: 26px;
    height: 26px;
    object-fit: contain;
    display: block;
}

.brand-badge.logo-badge-custom {
    width: 38px;
    height: 38px;
    min-width: 38px;
    background: #0f172a !important;
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 3px 10px rgba(15, 23, 42, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px;
    border-radius: 12px;
}

/* Fallback universel pour toute ancienne balise logo-circle */
.logo-circle,
.brand-badge .logo-circle {
    width: 38px !important;
    height: 38px !important;
    border-radius: 12px !important;
    background: #0f172a url('../images/logo.png') center center / 24px 24px no-repeat !important;
    color: transparent !important;
    font-size: 0 !important;
    text-indent: -9999px !important;
    overflow: hidden !important;
    box-shadow: 0 3px 10px rgba(15, 23, 42, 0.2) !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
}

.login-header-logo-box {
    width: 72px;
    height: 72px;
    margin: 0 auto 16px;
    background: #0f172a;
    border-radius: 20px;
    border: 1.5px solid rgba(255, 255, 255, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.35);
    padding: 12px;
}

.login-header-logo-img {
    width: 48px;
    height: 48px;
    object-fit: contain;
}

/* Bannière PWA Flottante Mobile */
.pwa-bottom-banner {
    position: fixed;
    bottom: -160px;
    left: 0;
    right: 0;
    z-index: 99999;
    padding: 12px 16px;
    transition: bottom 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: none;
    display: flex;
    justify-content: center;
}

.pwa-bottom-banner.is-visible {
    bottom: 12px;
    pointer-events: auto;
}

.pwa-banner-content {
    max-width: 520px;
    width: 100%;
    background: #0f172a;
    color: #ffffff;
    border-radius: 20px;
    padding: 14px 18px;
    display: flex;
    align-items: center;
    gap: 14px;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.1);
}

.pwa-banner-logo {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    padding: 5px;
}

.pwa-banner-logo img {
    width: 36px;
    height: 36px;
    object-fit: contain;
}

.pwa-banner-text {
    flex: 1;
    min-width: 0;
}

.pwa-banner-tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 10.5px;
    font-weight: 700;
    color: #fbbf24;
    margin-bottom: 2px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.pwa-tag-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #fbbf24;
}

.pwa-banner-title {
    display: block;
    font-size: 14.5px;
    font-weight: 800;
    color: #ffffff;
    line-height: 1.25;
}

.pwa-banner-desc {
    font-size: 12px;
    color: #94a3b8;
    line-height: 1.35;
    margin: 2px 0 0 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pwa-banner-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.btn-pwa-install {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: #ffffff;
    border: none;
    border-radius: 12px;
    padding: 10px 14px;
    font-size: 13px;
    font-weight: 800;
    font-family: inherit;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.35);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    white-space: nowrap;
}

.btn-pwa-install:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(245, 158, 11, 0.45);
}

.btn-pwa-install:active {
    transform: scale(0.97);
}

.btn-pwa-dismiss {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #94a3b8;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

.btn-pwa-dismiss:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
}

/* Modal iOS Safari */
.pwa-ios-modal {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(8px);
    z-index: 100000;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
    padding: 16px;
}

.pwa-ios-modal.is-open {
    opacity: 1;
    pointer-events: auto;
}

.pwa-ios-modal-card {
    background: #ffffff;
    border-radius: 24px;
    max-width: 440px;
    width: 100%;
    padding: 24px;
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.3);
    animation: slideUpModal 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    color: #0f172a;
}

@keyframes slideUpModal {
    from { transform: translateY(40px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.pwa-ios-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    position: relative;
}

.pwa-ios-icon-box {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.pwa-ios-icon-box img {
    width: 36px;
    height: 36px;
    object-fit: contain;
}

.pwa-ios-title {
    margin: 0;
    font-size: 16px;
    font-weight: 800;
    color: #0f172a;
}

.pwa-ios-sub {
    margin: 0;
    font-size: 12.5px;
    color: #64748b;
}

.btn-close-ios {
    position: absolute;
    right: 0;
    top: 0;
    background: #f1f5f9;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    cursor: pointer;
}

.pwa-ios-steps {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 22px;
}

.ios-step-item {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.step-num {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #eef2ff;
    color: #4f46e5;
    font-size: 12px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.step-content p {
    margin: 0 0 6px 0;
    font-size: 13.5px;
    color: #334155;
    line-height: 1.45;
}

.ios-share-badge, .ios-add-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 6px 12px;
    border-radius: 10px;
    font-size: 12.5px;
    color: #1e293b;
}

.btn-ios-confirm {
    width: 100%;
    padding: 13px;
    background: #0f172a;
    color: #ffffff;
    border: none;
    border-radius: 14px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
}

/* Bouton du tiroir */
.drawer-item-install {
    background: #fffbeb !important;
    color: #b45309 !important;
    border: 1px solid #fde68a !important;
    width: 100%;
    cursor: pointer;
    text-align: left;
    font-family: inherit;
}

.drawer-item-install:hover {
    background: #fef3c7 !important;
}

.install-icon-box {
    background: #fef3c7 !important;
    color: #d97706 !important;
}

@media (max-width: 600px) {
    .pwa-banner-desc {
        display: none;
    }
    .pwa-banner-content {
        padding: 12px 14px;
    }
}

/* ==========================================================================
   ADMIN SAAS PREMIUM - DASHBOARD OPÉRATIONNEL STYLES
   ========================================================================== */

/* 1. En-tête de page */
.admin-page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.admin-main-title {
    font-size: 1.65rem;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.6px;
    margin: 0 0 4px 0;
    line-height: 1.2;
}

.admin-main-subtitle {
    font-size: 0.9rem;
    color: #64748b;
    margin: 0;
    line-height: 1.4;
}

.admin-header-live-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    padding: 6px 14px;
    border-radius: 999px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.live-pulsating-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
    animation: livePulse 2s infinite;
}

@keyframes livePulse {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
    }
    70% {
        transform: scale(1);
        box-shadow: 0 0 0 6px rgba(34, 197, 94, 0);
    }
    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0);
    }
}

.live-date-text {
    font-size: 12.5px;
    font-weight: 600;
    color: #334155;
}

.live-tag {
    font-size: 10.5px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    background: #ecfdf5;
    color: #059669;
    padding: 2px 6px;
    border-radius: 6px;
}

/* 2. Barre d'action et filtre */
.admin-filter-container {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 14px 18px;
    margin-bottom: 1.75rem;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.03);
}

.admin-filter-bar {
    display: flex;
    align-items: flex-end;
    gap: 16px;
    flex-wrap: wrap;
}

.filter-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
    min-width: 200px;
}

.filter-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12.5px;
    font-weight: 700;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.filter-label .filter-icon {
    color: #64748b;
}

.filter-input-date,
.filter-select-site {
    height: 42px;
    padding: 0 14px;
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    font-size: 13.5px;
    font-weight: 600;
    color: #1e293b;
    font-family: inherit;
    transition: all 0.15s ease;
    width: 100%;
}

.filter-input-date:focus,
.filter-select-site:focus {
    outline: none;
    border-color: #4f46e5;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.12);
}

.filter-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-admin-primary {
    height: 42px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #4f46e5;
    color: #ffffff;
    border: none;
    border-radius: 10px;
    padding: 0 18px;
    font-size: 13.5px;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    box-shadow: 0 3px 10px rgba(79, 70, 229, 0.25);
    transition: all 0.15s ease;
    white-space: nowrap;
}

.btn-admin-primary:hover {
    background: #4338ca;
    transform: translateY(-1px);
    box-shadow: 0 5px 14px rgba(79, 70, 229, 0.35);
}

.btn-admin-reset {
    height: 42px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #f1f5f9;
    color: #64748b;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 0 14px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.15s ease;
    white-space: nowrap;
}

.btn-admin-reset:hover {
    background: #e2e8f0;
    color: #0f172a;
}

/* 3. Grille de KPIs */
.admin-kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 16px;
    margin-bottom: 1.75rem;
}

.admin-kpi-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    padding: 18px 20px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.03);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
}

.admin-kpi-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.06);
}

.kpi-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.kpi-title {
    font-size: 13px;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.kpi-icon-wrap {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.icon-indigo { background: #eef2ff; color: #4f46e5; }
.icon-emerald { background: #ecfdf5; color: #059669; }
.icon-blue { background: #eff6ff; color: #2563eb; }
.icon-rose { background: #fff1f2; color: #e11d48; }
.icon-amber { background: #fffbeb; color: #d97706; }

.kpi-body {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 6px;
}

.kpi-value {
    font-size: 2rem;
    font-weight: 800;
    color: #0f172a;
    line-height: 1;
    letter-spacing: -0.5px;
}

.value-emerald { color: #059669; }
.value-blue { color: #2563eb; }
.value-rose { color: #e11d48; }
.value-amber { color: #d97706; }

.kpi-badge {
    font-size: 11px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 999px;
    line-height: 1.1;
    white-space: nowrap;
}

.badge-neutral { background: #f1f5f9; color: #475569; }
.badge-emerald { background: #ecfdf5; color: #059669; }
.badge-blue { background: #eff6ff; color: #2563eb; }
.badge-rose { background: #fff1f2; color: #e11d48; }
.badge-amber { background: #fffbeb; color: #d97706; }

.kpi-footer {
    font-size: 11.5px;
    color: #94a3b8;
    margin-top: auto;
}

/* 4. Ligne des Alertes (Incidents & Anniversaires) */
.admin-alerts-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
    gap: 16px;
    margin-bottom: 1.75rem;
}

.admin-alert-card {
    background: #ffffff;
    border-radius: 18px;
    padding: 20px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.03);
    border: 1px solid #e2e8f0;
}

.card-alert-danger {
    border-color: #fecaca;
    background: linear-gradient(180deg, #fffafa 0%, #ffffff 100%);
    border-left: 5px solid #ef4444;
}

.card-alert-birthday {
    border-color: #fecdd3;
    background: linear-gradient(180deg, #fffdfd 0%, #ffffff 100%);
    border-left: 5px solid #f43f5e;
}

.alert-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 14px;
    gap: 10px;
}

.alert-title-wrap {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.alert-badge-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.icon-danger { background: #fee2e2; color: #dc2626; }
.icon-rose { background: #ffe4e6; color: #e11d48; }

.alert-card-heading {
    margin: 0 0 2px 0;
    font-size: 15px;
    font-weight: 800;
    color: #0f172a;
}

.alert-card-sub {
    margin: 0;
    font-size: 12px;
    color: #64748b;
}

.btn-alert-action {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.15s ease;
}

.btn-danger-action {
    background: #dc2626;
    color: #ffffff;
}
.btn-danger-action:hover {
    background: #b91c1c;
}

.badge-celebration-pill {
    background: #fff1f2;
    color: #e11d48;
    border: 1px solid #fecdd3;
    font-size: 11.5px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.alert-card-items {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.alert-item-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8fafc;
    border: 1px solid #f1f5f9;
    padding: 10px 14px;
    border-radius: 10px;
    text-decoration: none;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.alert-item-link:hover {
    background: #ffffff;
    border-color: #cbd5e1;
}

.alert-item-title {
    display: block;
    font-size: 13.5px;
    font-weight: 700;
    color: #1e293b;
}

.alert-item-meta {
    font-size: 11.5px;
    color: #64748b;
}

.alert-severity-badge {
    font-size: 11px;
    font-weight: 700;
    padding: 3px 9px;
    border-radius: 999px;
}

.birthday-agent-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #ffffff;
    border: 1px solid #ffe4e6;
    padding: 10px 14px;
    border-radius: 12px;
}

.birthday-agent-profile {
    display: flex;
    align-items: center;
    gap: 10px;
}

.birthday-avatar-icon {
    font-size: 1.3rem;
}

.birthday-name {
    display: block;
    font-size: 13.5px;
    color: #0f172a;
}

.birthday-role {
    font-size: 12px;
    color: #64748b;
}

.btn-whatsapp-wish {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #22c55e;
    color: #ffffff;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 12.5px;
    font-weight: 700;
    text-decoration: none;
    transition: background 0.15s ease, transform 0.15s ease;
}

.btn-whatsapp-wish:hover {
    background: #16a34a;
    transform: translateY(-1px);
}

/* 5. Accordéon Prochains Anniversaires */
.admin-upcoming-accordion {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 12px 18px;
    margin-bottom: 1.75rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.upcoming-summary {
    cursor: pointer;
    font-size: 13.5px;
    font-weight: 700;
    color: #475569;
    display: flex;
    justify-content: space-between;
    align-items: center;
    user-select: none;
}

.upcoming-summary-left {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.upcoming-toggle-text {
    font-size: 12px;
    color: #4f46e5;
    font-weight: 600;
}

.upcoming-grid {
    margin-top: 14px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 10px;
}

.upcoming-agent-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 10px 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}

.upcoming-agent-name {
    display: block;
    font-size: 13px;
    color: #1e293b;
}

.upcoming-agent-meta {
    font-size: 11.5px;
    color: #64748b;
}

.upcoming-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.upcoming-days-badge {
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 999px;
}

.days-soon { background: #fee2e2; color: #b91c1c; }
.days-normal { background: #f0fdf4; color: #166534; }

.upcoming-wa-link {
    color: #22c55e;
    text-decoration: none;
    display: flex;
    align-items: center;
    padding: 4px;
    border-radius: 6px;
    background: #dcfce7;
}

/* 6. Tableau Moderne des Pointages */
.admin-table-container {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    overflow: hidden;
    margin-bottom: 2rem;
}

.table-header-toolbar {
    padding: 18px 24px;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.table-title-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
}

.table-card-heading {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.3px;
}

.table-counter-badge {
    background: #eef2ff;
    color: #4f46e5;
    font-size: 12px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 999px;
}

.table-search-box {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.search-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.search-input-wrap .search-icon {
    position: absolute;
    left: 12px;
    color: #94a3b8;
    pointer-events: none;
}

.search-field {
    height: 38px;
    padding: 0 14px 0 36px;
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    font-size: 13px;
    font-family: inherit;
    color: #1e293b;
    width: 250px;
    transition: all 0.15s ease;
}

.search-field:focus {
    outline: none;
    border-color: #4f46e5;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.12);
    width: 280px;
}

.table-filter-pills {
    display: inline-flex;
    background: #f1f5f9;
    padding: 3px;
    border-radius: 10px;
    gap: 2px;
}

.type-pill-filter {
    border: none;
    background: transparent;
    color: #64748b;
    font-size: 12px;
    font-weight: 700;
    padding: 5px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s ease;
    font-family: inherit;
}

.type-pill-filter.active {
    background: #ffffff;
    color: #0f172a;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

/* ==========================================================================
   ADMIN CARDS & TABLE CONTAINERS (ANTI-OVERFLOW)
   ========================================================================== */
.admin-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.02);
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    margin-bottom: 24px;
    padding: 26px 28px;
}

.admin-table-card {
    padding: 0 !important;
    overflow: hidden;
}

.admin-table-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 24px;
    border-bottom: 1px solid #e2e8f0;
    background: #ffffff;
    gap: 16px;
    flex-wrap: wrap;
}

.admin-table-header .table-title {
    font-size: 16px;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
    letter-spacing: -0.2px;
}

.table-responsive,
.table-responsive-wrapper {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

.admin-data-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.admin-data-table thead th {
    background: #f8fafc;
    color: #475569;
    font-size: 11.5px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 12px 18px;
    border-bottom: 1px solid #e2e8f0;
    white-space: nowrap;
}

.admin-data-table tbody td {
    padding: 14px 18px;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
    font-size: 13.5px;
}

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

.admin-data-table tbody tr:hover {
    background: #f8fafc;
}

/* Cellules */
.time-tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #1e293b;
    font-size: 13.5px;
}

.time-tag .time-icon {
    color: #64748b;
}

.agent-chip-table {
    display: flex;
    align-items: center;
    gap: 10px;
}

.agent-mini-avatar {
    width: 32px;
    height: 32px;
    border-radius: 9px;
    background: #eef2ff;
    color: #4f46e5;
    font-size: 12px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.agent-info-table {
    display: flex;
    flex-direction: column;
}

.agent-name-text {
    color: #0f172a;
    font-size: 13.5px;
    font-weight: 700;
}

.agent-mat-text {
    font-size: 11px;
    color: #64748b;
}

.type-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

.pill-arrival {
    background: #ecfdf5;
    color: #059669;
}

.pill-departure {
    background: #eff6ff;
    color: #2563eb;
}

.site-tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #334155;
    font-weight: 500;
}

.site-tag .site-icon {
    color: #64748b;
}

.gps-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 11.5px;
    font-weight: 700;
}

.gps-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

.gps-high { background: #ecfdf5; color: #059669; }
.gps-high .gps-dot { background: #059669; }

.gps-medium { background: #fffbeb; color: #d97706; }
.gps-medium .gps-dot { background: #d97706; }

.gps-low { background: #fef2f2; color: #dc2626; }
.gps-low .gps-dot { background: #dc2626; }

.gps-unknown { background: #f1f5f9; color: #64748b; }
.gps-unknown .gps-dot { background: #94a3b8; }

.selfie-thumbnail-wrap {
    position: relative;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.selfie-mini-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.2s ease;
}

.selfie-thumbnail-wrap:hover .selfie-mini-img {
    transform: scale(1.15);
}

.selfie-zoom-badge {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.5);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.selfie-thumbnail-wrap:hover .selfie-zoom-badge {
    opacity: 1;
}

.no-photo-badge {
    font-size: 11px;
    color: #94a3b8;
    background: #f1f5f9;
    padding: 3px 8px;
    border-radius: 6px;
}

.btn-table-action {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #e2e8f0;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 12.5px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.15s ease;
}

.btn-table-action:hover {
    background: #4f46e5;
    color: #ffffff;
    border-color: #4f46e5;
}

/* Empty State */
.table-empty-state {
    padding: 48px 24px;
    text-align: center;
}

.empty-icon-wrap {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #f1f5f9;
    color: #94a3b8;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
}

.table-empty-state h4 {
    margin: 0 0 6px 0;
    font-size: 15px;
    font-weight: 700;
    color: #1e293b;
}

.table-empty-state p {
    margin: 0;
    font-size: 13px;
    color: #64748b;
}

/* Lightbox Modal */
.admin-lightbox {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.lightbox-overlay {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(6px);
}

.lightbox-dialog {
    position: relative;
    background: #ffffff;
    border-radius: 20px;
    max-width: 480px;
    width: 100%;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    animation: zoomLightbox 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes zoomLightbox {
    from { transform: scale(0.92); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.lightbox-header {
    padding: 14px 18px;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.lightbox-title {
    margin: 0;
    font-size: 14.5px;
    font-weight: 700;
    color: #0f172a;
}

.lightbox-close {
    background: transparent;
    border: none;
    font-size: 24px;
    line-height: 1;
    color: #94a3b8;
    cursor: pointer;
}

.lightbox-close:hover {
    color: #0f172a;
}

.lightbox-body {
    padding: 16px;
    text-align: center;
    background: #0f172a;
}

.lightbox-body img {
    max-width: 100%;
    max-height: 65vh;
    border-radius: 12px;
    object-fit: contain;
}

/* ==========================================================================
   MODULE SAAS - GESTION DES AGENTS & RESSOURCES HUMAINES + AUDIO
   ========================================================================== */

/* Contrôle Audio Topbar */
.admin-top-sound-btn {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #94a3b8;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s ease;
}
.admin-top-sound-btn:hover {
    background: rgba(255, 255, 255, 0.16);
    color: #ffffff;
    transform: translateY(-1px);
}
.admin-top-sound-btn[aria-pressed="false"] {
    opacity: 0.6;
    color: #64748b;
}

/* Barre d'outils et de recherche SaaS */
.admin-toolbar-card,
.admin-toolbar {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 24px;
    margin-bottom: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    flex-wrap: wrap;
}

.toolbar-search-box,
.toolbar-search-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    padding: 0 14px;
    min-width: 320px;
    height: 44px;
    flex: 1;
    max-width: 520px;
    transition: all 0.2s ease;
}
.toolbar-search-box:focus-within,
.toolbar-search-wrapper:focus-within {
    border-color: #6366f1;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.toolbar-search-icon {
    color: #94a3b8;
    margin-right: 10px;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
}

.toolbar-search-box input,
.toolbar-search-wrapper input,
.toolbar-search-input {
    border: none !important;
    background: transparent !important;
    width: 100% !important;
    font-size: 14px !important;
    color: #0f172a !important;
    outline: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    height: 100% !important;
    line-height: normal !important;
}
.toolbar-search-box input::placeholder,
.toolbar-search-wrapper input::placeholder,
.toolbar-search-input::placeholder {
    color: #94a3b8;
    opacity: 1;
}

.search-clear-btn,
.btn-clear-search {
    background: transparent;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
    border-radius: 50%;
    transition: all 0.15s ease;
}
.search-clear-btn:hover,
.btn-clear-search:hover {
    color: #0f172a;
    background: #e2e8f0;
}

.toolbar-filter-group {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.toolbar-select-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.filter-select-icon {
    position: absolute;
    left: 12px;
    color: #64748b;
    pointer-events: none;
}

.toolbar-select {
    height: 42px;
    border-radius: 10px;
    border: 1px solid #cbd5e1;
    background: #f8fafc;
    padding: 0 14px 0 36px;
    font-size: 13.5px;
    color: #1e293b;
    font-weight: 500;
    outline: none;
    cursor: pointer;
    transition: all 0.15s ease;
}
.toolbar-select:focus {
    border-color: #6366f1;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.toolbar-pills-group {
    display: flex;
    gap: 4px;
    background: #f1f5f9;
    padding: 3px;
    border-radius: 10px;
}

.toolbar-pill {
    border: none;
    background: transparent;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    transition: all 0.15s ease;
}
.toolbar-pill:hover {
    color: #0f172a;
}
.toolbar-pill.active {
    background: #ffffff;
    color: #4f46e5;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

.pill-badge {
    margin-left: 6px;
    font-size: 11px;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 999px;
    background: #e2e8f0;
    color: #475569;
}
.toolbar-pill.active .pill-badge {
    background: #e0e7ff;
    color: #4338ca;
}
.pill-badge-success {
    background: #dcfce7 !important;
    color: #15803d !important;
}
.pill-badge-neutral {
    background: #f1f5f9 !important;
    color: #64748b !important;
}

/* Tableau SaaS Agents */
.saas-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}
.saas-table thead th {
    background: #f8fafc;
    padding: 12px 18px;
    text-align: left;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: #64748b;
    border-bottom: 1px solid #e2e8f0;
}
.saas-table tbody tr {
    border-bottom: 1px solid #f1f5f9;
    transition: background 0.12s ease;
}
.saas-table tbody tr:hover {
    background: #f8fafc;
}
.saas-table tbody td {
    padding: 14px 18px;
    vertical-align: middle;
}

/* Cellules spécifiques */
.agent-identity-cell {
    display: flex;
    align-items: center;
    gap: 14px;
}

.agent-avatar-btn {
    background: transparent;
    border: none;
    padding: 0;
    cursor: pointer;
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    outline: none;
    border-radius: 50%;
    flex-shrink: 0;
}

.agent-avatar-img {
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.agent-avatar-btn:hover .agent-avatar-img,
.agent-avatar-btn:hover .agent-avatar-circle {
    transform: scale(1.08);
    box-shadow: 0 4px 14px rgba(79, 70, 229, 0.35);
}

.agent-avatar-circle {
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 14.5px;
    font-weight: 700;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    border: 2px solid #ffffff;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.avatar-zoom-badge {
    position: absolute;
    bottom: -1px;
    right: -1px;
    width: 17px;
    height: 17px;
    background: #4f46e5;
    color: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #ffffff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.agent-info-text {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.agent-name-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.agent-name-link {
    background: transparent;
    border: none;
    padding: 0;
    font-family: inherit;
    font-size: 15px;
    font-weight: 700;
    color: #0f172a;
    text-align: left;
    cursor: pointer;
    transition: color 0.15s ease;
}
.agent-name-link:hover {
    color: #4f46e5;
    text-decoration: underline;
}

.agent-meta-tags-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 3px 0 2px;
    flex-wrap: wrap;
}

.agent-job-tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    font-weight: 600;
    color: #475569;
    background: #f1f5f9;
    padding: 2px 8px;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
}
.icon-meta-job {
    color: #64748b;
}

.bday-badge-mini {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: linear-gradient(135deg, #fbcfe8, #f472b6);
    color: #831843;
    animation: pulseBday 2s infinite ease-in-out;
}

.agent-email-sub {
    font-size: 12.5px;
    color: #64748b;
}

.agent-job-cell {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
}

.agent-job-title {
    font-size: 13.5px;
    font-weight: 600;
    color: #1e293b;
}

.contract-pill {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 6px;
    letter-spacing: 0.3px;
}
.contract-pill-cdi {
    background: #e0e7ff;
    color: #4338ca;
}
.contract-pill-cdd {
    background: #fef3c7;
    color: #b45309;
}
.contract-pill-stagiaire {
    background: #e0f2fe;
    color: #0369a1;
}
.contract-pill-prestataire {
    background: #f3e8ff;
    color: #7e22ce;
}
.contract-pill-autre {
    background: #f1f5f9;
    color: #475569;
}

.contact-phone-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.contact-phone-text {
    font-weight: 600;
    color: #334155;
    font-size: 13.5px;
}

.btn-whatsapp-mini {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #25d366;
    color: #ffffff;
    text-decoration: none;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn-whatsapp-mini:hover {
    transform: scale(1.15);
    box-shadow: 0 2px 8px rgba(37, 211, 102, 0.45);
}

.matricule-tag {
    display: inline-block;
    padding: 3px 8px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-family: ui-monospace, monospace;
    font-size: 12.5px;
    font-weight: 600;
    color: #475569;
}

.bday-date-text {
    font-size: 13.5px;
    color: #475569;
}

.bday-badge-today {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 10px;
    background: linear-gradient(135deg, #fbcfe8, #f472b6);
    color: #831843;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    animation: pulseBday 2s infinite ease-in-out;
}
@keyframes pulseBday {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 12.5px;
    font-weight: 600;
}
.status-pill-active {
    background: #dcfce7;
    color: #15803d;
}
.status-pill-inactive {
    background: #f1f5f9;
    color: #64748b;
}
.status-dot-active {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #22c55e;
}
.status-dot-inactive {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #94a3b8;
}

.table-actions-cell {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

/* ==========================================================================
   BOUTONS D'ACTIONS DE TABLEAU HARMONISÉS
========================================================================== */
.table-actions-group,
.table-actions-cluster {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-table-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 34px;
    min-width: 34px;
    padding: 0 10px;
    border-radius: 8px;
    border: 1px solid transparent;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    box-sizing: border-box;
    line-height: 1;
}
.btn-table-action:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}
.btn-table-action:active {
    transform: translateY(0);
}

.btn-action-edit {
    background: #f8fafc;
    color: #334155;
    border-color: #cbd5e1;
}
.btn-action-edit:hover {
    background: #e2e8f0;
    color: #0f172a;
    border-color: #94a3b8;
}

.btn-action-download,
.btn-action-view {
    background: #eff6ff;
    color: #2563eb;
    border-color: #bfdbfe;
    width: 34px;
    height: 34px;
    padding: 0;
}
.btn-action-download:hover,
.btn-action-view:hover {
    background: #dbeafe;
    color: #1d4ed8;
    border-color: #93c5fd;
}

.btn-action-delete {
    background: #fef2f2;
    color: #ef4444;
    border-color: #fecdd3;
    width: 34px;
    height: 34px;
    padding: 0;
}
.btn-action-delete:hover {
    background: #fee2e2;
    color: #dc2626;
    border-color: #fca5a5;
}

/* Modale Moderne */
.admin-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(8px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    animation: fadeInBackdrop 0.18s ease-out;
}
@keyframes fadeInBackdrop {
    from { opacity: 0; }
    to { opacity: 1; }
}

.admin-modal-dialog {
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    overflow: hidden;
    width: 100%;
    max-height: 92vh;
    display: flex;
    flex-direction: column;
    animation: zoomModal 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes zoomModal {
    from { transform: scale(0.94); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.admin-modal-lg {
    max-width: 860px;
}
.admin-modal-sm {
    max-width: 480px;
}

.admin-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.75rem;
    border-bottom: 1px solid #f1f5f9;
}
.modal-header-danger {
    background: #fff1f2;
    border-bottom-color: #fee2e2;
}

.modal-header-titles,
.admin-modal-title-group {
    display: flex;
    align-items: center;
    gap: 14px;
}

.modal-icon-badge,
.admin-modal-icon-badge {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: #e0e7ff;
    color: #4f46e5;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.badge-danger-icon,
.kpi-icon-red {
    background: #fee2e2 !important;
    color: #ef4444 !important;
    border: 1px solid #fecdd3 !important;
}

.modal-main-title,
.admin-modal-title {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 700;
    color: #0f172a;
}
.modal-main-subtitle,
.admin-modal-subtitle {
    margin: 2px 0 0;
    font-size: 13px;
    color: #64748b;
}

.modal-close-icon-btn,
.admin-modal-close {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: none;
    background: transparent;
    color: #94a3b8;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
}
.modal-close-icon-btn:hover,
.admin-modal-close:hover {
    background: #f1f5f9;
    color: #0f172a;
}

.admin-modal-form {
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.modal-form-body,
.admin-modal-body {
    padding: 1.5rem 1.75rem;
    overflow-y: auto;
}

/* Boîte d'alerte de suppression élégante */
.delete-warning-box {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: #fff1f2;
    border: 1px solid #fecdd3;
    border-radius: 12px;
    padding: 14px 16px;
    margin-bottom: 14px;
}
.warning-icon-box {
    color: #e11d48;
    flex-shrink: 0;
    margin-top: 2px;
    display: flex;
    align-items: center;
}
.warning-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.warning-target-text {
    font-size: 13.5px;
    color: #881337;
    line-height: 1.45;
    margin: 0;
}
.warning-target-text strong {
    color: #4c0519;
    font-weight: 700;
}
.warning-sub-text {
    font-size: 12.5px;
    color: #9f1239;
    margin: 0;
    line-height: 1.4;
}
.confirmation-prompt-text {
    font-size: 13px;
    font-weight: 600;
    color: #475569;
    margin: 0;
    text-align: center;
    padding-top: 4px;
}

.admin-modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    padding: 1.15rem 1.75rem;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
}

.btn-admin-secondary,
.btn-modal-secondary {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 40px;
    padding: 0 16px;
    border-radius: 10px;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    color: #334155;
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
}
.btn-admin-secondary:hover,
.btn-modal-secondary:hover {
    background: #f1f5f9;
    color: #0f172a;
    border-color: #94a3b8;
}

.btn-admin-danger,
.btn-modal-danger {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 40px;
    padding: 0 18px;
    border-radius: 10px;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    border: 1px solid #dc2626;
    color: #ffffff;
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(220, 38, 38, 0.25);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.btn-admin-danger:hover,
.btn-modal-danger:hover {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.35);
    transform: translateY(-1px);
}
.btn-admin-danger:active,
.btn-modal-danger:active {
    transform: translateY(0);
}

.modal-columns-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.modal-column-panel {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.panel-section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13.5px;
    font-weight: 700;
    color: #334155;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding-bottom: 8px;
    border-bottom: 2px solid #f1f5f9;
    margin-bottom: 4px;
}
.panel-section-title .icon-panel-title {
    color: #6366f1;
}

/* ==========================================================================
   CHAMPS & LABELS DE FORMULAIRES PREMIUM (STYLE STRIPE & LINEAR)
========================================================================== */

.form-field-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 1.25rem;
    position: relative;
}

/* Typographie des Labels Haut de Gamme */
.form-field-group label,
.form-field-group .admin-label {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    font-weight: 600;
    color: #334155;
    letter-spacing: -0.01em;
    line-height: 1.3;
    transition: color 0.18s cubic-bezier(0.16, 1, 0.3, 1);
    user-select: none;
}

/* Micro-interaction signature Stripe/Linear : Le label s'éclaire en Indigo quand le champ est actif */
.form-field-group:focus-within > label,
.form-field-group:focus-within > .admin-label {
    color: #4f46e5 !important;
}

/* Astérisque de champ obligatoire stylisée */
.form-label-required::after {
    content: "*";
    color: #ef4444;
    font-size: 13.5px;
    font-weight: 700;
    margin-left: 3px;
    line-height: 1;
    display: inline-block;
    transition: color 0.18s cubic-bezier(0.16, 1, 0.3, 1), transform 0.18s ease;
}

.form-field-group:focus-within > .form-label-required::after {
    color: #6366f1;
    transform: scale(1.1);
}

/* Mention / Badge pour champs optionnels */
.label-optional {
    font-size: 11.5px;
    font-weight: 500;
    color: #94a3b8;
    margin-left: 4px;
}

/* Inputs & Selects Finition Premium */
.admin-input-text, .admin-input, .admin-select {
    height: 44px;
    border-radius: 10px;
    border: 1.5px solid #cbd5e1;
    background: #ffffff;
    padding: 0 16px;
    font-size: 14px;
    font-weight: 500;
    color: #0f172a;
    outline: none;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
    width: 100%;
    box-sizing: border-box;
}

.admin-select {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 40px !important;
    cursor: pointer;
}

.admin-input-text:hover, .admin-input:hover, .admin-select:hover {
    border-color: #94a3b8;
}

.admin-input-text:focus, .admin-input:focus, .admin-select:focus {
    border-color: #4f46e5;
    background-color: #ffffff;
    box-shadow: 0 0 0 3.5px rgba(79, 70, 229, 0.14), 0 1px 2px rgba(0, 0, 0, 0.04);
}

/* Placeholder soigné */
.admin-input-text::placeholder, .admin-input::placeholder {
    color: #94a3b8;
    font-weight: 400;
}

.input-with-icon {
    position: relative;
    display: flex;
    align-items: center;
}
.input-with-icon .field-input-icon {
    position: absolute;
    left: 12px;
    color: #94a3b8;
    pointer-events: none;
}
.input-with-icon input {
    padding-left: 36px;
}

.input-with-action {
    position: relative;
    display: flex;
    align-items: center;
}
.btn-input-eye {
    position: absolute;
    right: 8px;
    border: none;
    background: transparent;
    color: #94a3b8;
    cursor: pointer;
    padding: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.btn-input-eye:hover {
    color: #0f172a;
}

.form-row-dates {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.field-hint {
    font-size: 12px;
    color: #64748b;
    line-height: 1.35;
}

.admin-modal-footer {
    padding: 1.25rem 1.75rem;
    background: #f8fafc;
    border-top: 1px solid #f1f5f9;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.delete-warning-text {
    font-size: 15px;
    color: #334155;
    line-height: 1.5;
    margin: 0 0 8px;
}
.delete-sub-text {
    font-size: 13px;
    color: #64748b;
    margin: 0;
}

/* Page Edition Agent */
.edit-agent-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 28px;
    align-items: start;
}
@media (max-width: 980px) {
    .edit-agent-grid {
        grid-template-columns: 1fr;
    }
}

.edit-main-card {
    padding: 30px 32px;
}
.edit-sidebar-card {
    padding: 26px 26px;
}

@media (max-width: 768px) {
    .admin-card,
    .edit-main-card,
    .edit-sidebar-card {
        padding: 20px 16px !important;
    }
}

.card-section-header {
    margin-bottom: 1.75rem;
    padding-bottom: 1.15rem;
    border-bottom: 1px solid #f1f5f9;
}
.section-header-title {
    display: flex;
    align-items: center;
    gap: 10px;
}
.section-header-title h2 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 700;
    color: #0f172a;
}
.section-header-title .icon-section {
    color: #6366f1;
}
.section-header-desc {
    margin: 5px 0 0;
    font-size: 13.5px;
    color: #64748b;
}

.form-columns-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    margin-bottom: 1.75rem;
}
@media (max-width: 768px) {
    .form-columns-2 {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

.form-submit-row {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 1.75rem;
    padding-top: 1.25rem;
    border-top: 1px solid #f1f5f9;
}

.btn-block-action {
    width: 100% !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.security-reset-box {
    display: flex;
    gap: 14px;
    padding: 14px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
}
.reset-icon-box {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: #fee2e2;
    color: #ef4444;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.reset-title {
    margin: 0 0 4px;
    font-size: 14px;
    font-weight: 700;
    color: #0f172a;
}
.reset-desc {
    margin: 0;
    font-size: 12.5px;
    color: #64748b;
    line-height: 1.4;
}

/* Modale Fiche Détaillée de l'Agent */
.admin-modal-md {
    max-width: 620px;
}

.profile-banner {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 1.75rem 2rem;
    background: linear-gradient(135deg, #f8fafc 0%, #eef2ff 100%);
    border-bottom: 1px solid #e2e8f0;
}

.profile-avatar-wrapper {
    flex-shrink: 0;
}

.profile-avatar-large {
    width: 84px;
    height: 84px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #ffffff;
    box-shadow: 0 8px 24px rgba(79, 70, 229, 0.22);
    display: flex;
    align-items: center;
    justify-content: center;
}

.profile-avatar-gradient {
    color: #ffffff;
    font-size: 28px;
    font-weight: 800;
}

.profile-banner-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.profile-title-name {
    margin: 0;
    font-size: 1.35rem;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.25;
}

.profile-badges-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.profile-grid-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px 24px;
    padding: 1.75rem 2rem;
    background: #ffffff;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.info-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    color: #64748b;
    letter-spacing: 0.5px;
}

.info-value {
    font-size: 14px;
    font-weight: 600;
    color: #0f172a;
}

.info-link {
    color: #4f46e5;
    text-decoration: none;
    transition: color 0.15s ease;
}

.info-link:hover {
    color: #3730a3;
    text-decoration: underline;
}

/* ==========================================================================
   BOUTONS ADMIN HARMONISÉS & ÉLÉGANTS (MODALES, FORMULAIRES & ACTIONS)
========================================================================== */
.admin-modal-footer {
    padding: 1.25rem 1.75rem;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
}

.btn-admin-primary,
.btn-admin-secondary,
.btn-admin-danger {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    padding: 0 20px !important;
    height: 42px !important;
    min-height: 42px !important;
    border-radius: 10px !important;
    font-family: inherit !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    line-height: 1 !important;
    cursor: pointer !important;
    text-decoration: none !important;
    border: 1px solid transparent !important;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
    box-sizing: border-box !important;
    white-space: nowrap !important;
    outline: none !important;
    user-select: none !important;
}

.btn-admin-primary *,
.btn-admin-secondary *,
.btn-admin-danger * {
    text-decoration: none !important;
}

.btn-admin-primary:hover,
.btn-admin-secondary:hover,
.btn-admin-danger:hover,
.btn-admin-primary:focus,
.btn-admin-secondary:focus,
.btn-admin-danger:focus {
    text-decoration: none !important;
}

/* 1. Bouton Primaire (Indigo / Violet Moderne) */
.btn-admin-primary {
    background: linear-gradient(135deg, #4f46e5 0%, #4338ca 100%) !important;
    color: #ffffff !important;
    border-color: #4338ca !important;
    box-shadow: 0 2px 6px rgba(79, 70, 229, 0.25) !important;
}

.btn-admin-primary:hover {
    background: linear-gradient(135deg, #4338ca 0%, #3730a3 100%) !important;
    box-shadow: 0 4px 14px rgba(79, 70, 229, 0.35) !important;
    transform: translateY(-1px) !important;
    color: #ffffff !important;
}

.btn-admin-primary:active {
    transform: translateY(0) !important;
    box-shadow: 0 1px 3px rgba(79, 70, 229, 0.2) !important;
}

/* 2. Bouton Secondaire / Fermer (Blanc & Gris neutre soigné) */
.btn-admin-secondary {
    background: #ffffff !important;
    color: #475569 !important;
    border: 1px solid #cbd5e1 !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05) !important;
}

.btn-admin-secondary:hover {
    background: #f8fafc !important;
    color: #0f172a !important;
    border-color: #94a3b8 !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.08) !important;
}

.btn-admin-secondary:active {
    background: #f1f5f9 !important;
    transform: translateY(0) !important;
}

/* 3. Bouton Danger (Supprimer) */
.btn-admin-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%) !important;
    color: #ffffff !important;
    border-color: #dc2626 !important;
    box-shadow: 0 2px 6px rgba(239, 68, 68, 0.25) !important;
}

.btn-admin-danger:hover {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%) !important;
    box-shadow: 0 4px 14px rgba(239, 68, 68, 0.35) !important;
    transform: translateY(-1px) !important;
    color: #ffffff !important;
}

.btn-admin-danger:active {
    transform: translateY(0) !important;
}

/* ==========================================================================
   MODULE AFFECTATIONS DES AGENTS SUR SITES
========================================================================== */

/* Cartes Statistiques Compactes */
.admin-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 1.5rem;
}

.admin-stat-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.admin-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.06);
}

.stat-card-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.stat-icon-primary {
    background: #e0e7ff;
    color: #4f46e5;
}

.stat-icon-success {
    background: #dcfce7;
    color: #16a34a;
}

.stat-icon-warning {
    background: #fef3c7;
    color: #d97706;
}

.stat-icon-neutral {
    background: #f1f5f9;
    color: #64748b;
}

.stat-card-data {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.stat-card-number {
    font-size: 1.6rem;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.2;
}

.stat-card-label {
    font-size: 12.5px;
    font-weight: 600;
    color: #64748b;
}

/* Cellule Agent */
.agent-avatar-mini-box {
    position: relative;
    flex-shrink: 0;
}

.agent-name-bold {
    font-size: 14.5px;
    font-weight: 700;
    color: #0f172a;
}

.matricule-tag-mini {
    display: inline-block;
    padding: 2px 6px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    font-family: ui-monospace, monospace;
    font-size: 11px;
    font-weight: 600;
    color: #64748b;
    margin-top: 2px;
}

/* Cellule Site */
.site-cell-box {
    display: flex;
    align-items: center;
    gap: 12px;
}

.site-icon-badge {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: #eef2ff;
    color: #6366f1;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.site-cell-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.site-name-title {
    font-size: 13.5px;
    font-weight: 700;
    color: #1e293b;
}

.site-desc-sub {
    font-size: 12px;
    color: #94a3b8;
}

/* Cellule Type & Durée */
.type-cell-box {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.assign-type-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 11.5px;
    font-weight: 700;
    width: fit-content;
}

.pill-day {
    background: #e0f2fe;
    color: #0284c7;
}

.pill-month {
    background: #f3e8ff;
    color: #9333ea;
}

.duration-hint {
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
}

/* Cellule Période & Durée Ultra-Harmonisée */
.period-cell-box {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
    width: max-content;
    max-width: 100%;
}

.period-dates-row {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-wrap: nowrap;
}

.date-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3.5px 8px;
    border-radius: 7px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: -0.01em;
    white-space: nowrap;
    transition: all 0.15s ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

/* Date de début (Permission / Affectation) : Pastille Émeraude / Vert Pro */
.date-chip-start {
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    color: #065f46;
}

.chip-label-start {
    background: #10b981;
    color: #ffffff;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 9.5px;
    font-weight: 800;
    text-transform: uppercase;
    padding: 1.5px 4.5px;
    border-radius: 4px;
    letter-spacing: 0.04em;
    line-height: 1;
}

/* Date de fin (Permission / Affectation) : Pastille Ambre / Orange Doux Pro */
.date-chip-end {
    background: #fff7ed;
    border: 1px solid #fed7aa;
    color: #9a3412;
}

.chip-label-end {
    background: #f97316;
    color: #ffffff;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 9.5px;
    font-weight: 800;
    text-transform: uppercase;
    padding: 1.5px 4.5px;
    border-radius: 4px;
    letter-spacing: 0.04em;
    line-height: 1;
}

.period-arrow {
    color: #94a3b8;
    font-size: 13px;
    font-weight: 700;
    user-select: none;
}

/* Badge Durée Aéré & Garanti Sans Retour Ligne */
.period-duration-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 2.5px 8px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 11.5px;
    font-weight: 700;
    color: #475569;
    white-space: nowrap !important;
    line-height: 1.3;
}

.period-duration-badge .icon-duration {
    color: #6366f1;
    flex-shrink: 0;
}

/* Statuts d'affectation */
.status-pill-upcoming {
    background: #fef3c7;
    color: #b45309;
}

.status-dot-upcoming {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #f59e0b;
}

/* ==========================================================================
   MODULE ABSENCES & CONGÉS RH
========================================================================== */

/* Badges Type d'Absence */
.absence-type-pill {
    display: inline-flex;
    align-items: center;
    padding: 3px 9px;
    border-radius: 6px;
    font-size: 11.5px;
    font-weight: 700;
    width: fit-content;
}

.pill-absence-conge {
    background: #e0f2fe;
    color: #0369a1;
}

.pill-absence-maladie {
    background: #ffe4e6;
    color: #be123c;
}

.pill-absence-autorisation {
    background: #f3e8ff;
    color: #7e22ce;
}

.pill-absence-autre {
    background: #f1f5f9;
    color: #475569;
}

/* Cellule Motif & Réponse RH */
.absence-comment-box {
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-width: 320px;
}

.absence-agent-comment {
    font-size: 13.5px;
    color: #1e293b;
    font-weight: 500;
    line-height: 1.35;
}

.absence-admin-reply {
    font-size: 12px;
    color: #6366f1;
    background: #eef2ff;
    padding: 3px 8px;
    border-radius: 6px;
    width: fit-content;
    line-height: 1.3;
}

.reply-tag {
    font-weight: 700;
    margin-right: 4px;
}

/* Bouton Pièce Justificative */
.btn-justif-attachment {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    color: #334155;
    text-decoration: none;
    transition: all 0.15s ease;
}

.btn-justif-attachment:hover {
    background: #e2e8f0;
    color: #0f172a;
    border-color: #94a3b8;
    text-decoration: none;
}

/* Statuts d'alerte et danger pour les pastilles */
.status-pill-warning {
    background: #fef3c7;
    color: #b45309;
}

.status-dot-warning {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #f59e0b;
}

.status-pill-danger {
    background: #fee2e2;
    color: #b91c1c;
}

.status-dot-danger {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #ef4444;
}

/* Actions d'approbation rapide */
.btn-action-approve {
    background: #dcfce7;
    color: #15803d;
    border-color: #bbf7d0;
}

.btn-action-approve:hover {
    background: #bbf7d0;
    color: #166534;
}

.btn-action-reject {
    background: #fee2e2;
    color: #b91c1c;
    border-color: #fecaca;
}

.btn-action-reject:hover {
    background: #fecaca;
    color: #991b1b;
}

/* --- TIROIR LATÉRAL SAAS (SLIDE-OVER DRAWER) DES ABSENCES --- */
.btn-trigger-absence-drawer {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 12px;
    color: #334155;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
    max-width: 100%;
}

.btn-trigger-absence-drawer:hover {
    background: #eff6ff;
    border-color: #93c5fd;
    color: #1d4ed8;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(37, 99, 235, 0.08);
}

.btn-drawer-icon {
    color: #64748b;
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.btn-trigger-absence-drawer:hover .btn-drawer-icon {
    color: #2563eb;
}

.btn-drawer-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 500;
}

.drawer-reply-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #4f46e5;
    flex-shrink: 0;
    box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.2);
}

.absence-drawer-backdrop {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(4px);
    display: flex;
    justify-content: flex-end;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

.absence-drawer-backdrop.active {
    opacity: 1;
    pointer-events: auto;
}

.absence-drawer-panel {
    width: 500px;
    max-width: 95vw;
    height: 100vh;
    background: #ffffff;
    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.18);
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    overflow: hidden;
}

.absence-drawer-backdrop.active .absence-drawer-panel {
    transform: translateX(0);
}

.absence-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid #e2e8f0;
    background: #f8fafc;
}

.drawer-header-agent {
    display: flex;
    align-items: center;
    gap: 12px;
}

.drawer-agent-avatar {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    object-fit: cover;
    border: 2px solid #ffffff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.drawer-agent-meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.drawer-agent-title-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.drawer-agent-name {
    font-size: 15px;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
}

.drawer-matricule-tag {
    background: #e2e8f0;
    color: #475569;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 6px;
}

.drawer-submitted-time {
    font-size: 12px;
    color: #64748b;
}

.drawer-close-btn {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s ease;
}

.drawer-close-btn:hover {
    background: #fee2e2;
    color: #dc2626;
    border-color: #fecaca;
}

.absence-drawer-body {
    flex: 1;
    overflow-y: auto;
    padding: 22px 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    background: #f8fafc;
}

.drawer-badges-strip {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.drawer-section-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
}

.drawer-section-title {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #64748b;
    margin-bottom: 10px;
}

.drawer-period-display {
    font-size: 14.5px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 4px;
}

.drawer-duration-note {
    font-size: 12.5px;
    color: #6366f1;
    font-weight: 600;
}

.drawer-comment-quote {
    background: #f1f5f9;
    border-left: 3px solid #3b82f6;
    padding: 10px 14px;
    border-radius: 0 10px 10px 0;
    font-size: 13.5px;
    line-height: 1.5;
    color: #1e293b;
    white-space: pre-wrap;
}

.drawer-justif-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 14px;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 10px;
    color: #15803d;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.15s ease;
}

.drawer-justif-btn:hover {
    background: #dcfce7;
    color: #166534;
    text-decoration: none;
}

.drawer-decision-card {
    border-color: #cbd5e1;
    background: #ffffff;
}

.drawer-label {
    display: block;
    font-size: 12.5px;
    font-weight: 600;
    color: #334155;
    margin-bottom: 6px;
}

.drawer-textarea {
    width: 100%;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 13px;
    color: #0f172a;
    resize: vertical;
    box-sizing: border-box;
    transition: border-color 0.15s ease;
}

.drawer-textarea:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.drawer-actions-row {
    display: flex;
    gap: 10px;
    margin-top: 14px;
}

.btn-drawer-action {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 16px;
    border-radius: 10px;
    font-size: 13.5px;
    font-weight: 700;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-drawer-approve {
    background: #10b981;
    color: #ffffff;
    box-shadow: 0 2px 6px rgba(16, 185, 129, 0.25);
}

.btn-drawer-approve:hover {
    background: #059669;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.35);
    transform: translateY(-1px);
}

.btn-drawer-reject {
    background: #f43f5e;
    color: #ffffff;
    box-shadow: 0 2px 6px rgba(244, 63, 94, 0.25);
}

.btn-drawer-reject:hover {
    background: #e11d48;
    box-shadow: 0 4px 12px rgba(244, 63, 94, 0.35);
    transform: translateY(-1px);
}

.btn-drawer-re-approve {
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.btn-drawer-re-approve:hover {
    background: #d1fae5;
}

.btn-drawer-re-reject {
    background: #fff1f2;
    color: #9f1239;
    border: 1px solid #fecdd3;
}

.btn-drawer-re-reject:hover {
    background: #ffe4e6;
}

.drawer-already-note {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: #f1f5f9;
    border-radius: 8px;
    font-size: 12px;
    color: #475569;
    margin-top: 10px;
}

/* ==========================================================================
   ALERTES DE RETOUR SYSTÈME (STATIQUES & TOASTS SAAS FLOTTANTS)
========================================================================== */

/* 1. Alertes Statiques en Bannière */
.admin-alert {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 14px 18px;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
    transition: all 0.25s ease;
}

.admin-alert-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.admin-alert-content {
    flex: 1;
    min-width: 0;
}

.admin-alert-title {
    display: block;
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 2px;
}

.admin-alert-content p {
    margin: 0;
    font-size: 13px;
    line-height: 1.45;
}

/* Alerte Succès */
.admin-alert-success {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #166534;
}

.admin-alert-success .admin-alert-icon {
    background: #dcfce7;
    color: #15803d;
}

.admin-alert-success .admin-alert-title {
    color: #14532d;
}

.admin-alert-success .admin-alert-content p {
    color: #166534;
}

/* Alerte Erreur / Danger */
.admin-alert-danger {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

.admin-alert-danger .admin-alert-icon {
    background: #fee2e2;
    color: #dc2626;
}

.admin-alert-danger .admin-alert-title {
    color: #7f1d1d;
}

.admin-alert-danger .admin-alert-content p {
    color: #991b1b;
}

/* 2. Système Toast SaaS Flottant (Infobulle Moderne) */
.saas-toast-container {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 999999;
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 420px;
    width: calc(100% - 48px);
    pointer-events: none;
}

.saas-toast {
    position: relative;
    pointer-events: auto;
    background: #ffffff;
    border-radius: 14px;
    padding: 14px 16px 16px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    box-shadow: 0 12px 30px -4px rgba(15, 23, 42, 0.14), 0 4px 10px -2px rgba(15, 23, 42, 0.06), 0 0 0 1px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    animation: toastSlideIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.saas-toast.is-hiding {
    animation: toastSlideOut 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes toastSlideIn {
    from {
        transform: translateX(110%) scale(0.95);
        opacity: 0;
    }
    to {
        transform: translateX(0) scale(1);
        opacity: 1;
    }
}

@keyframes toastSlideOut {
    from {
        transform: translateX(0) scale(1);
        opacity: 1;
    }
    to {
        transform: translateX(110%) scale(0.95);
        opacity: 0;
    }
}

/* Variantes Toasts */
.saas-toast-success {
    border-left: 4px solid #10b981;
}

.saas-toast-error {
    border-left: 4px solid #ef4444;
}

.saas-toast-warning {
    border-left: 4px solid #f59e0b;
}

.saas-toast-info {
    border-left: 4px solid #3b82f6;
}

/* Pastille Icône Toast */
.saas-toast-icon-wrap {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.saas-toast-success .saas-toast-icon-wrap {
    background: #dcfce7;
    color: #15803d;
}

.saas-toast-error .saas-toast-icon-wrap {
    background: #fee2e2;
    color: #dc2626;
}

.saas-toast-warning .saas-toast-icon-wrap {
    background: #fef3c7;
    color: #d97706;
}

.saas-toast-info .saas-toast-icon-wrap {
    background: #e0f2fe;
    color: #0284c7;
}

/* Corps Toast */
.saas-toast-body {
    flex: 1;
    min-width: 0;
    padding-top: 1px;
}

.saas-toast-title {
    font-size: 13.5px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 2px;
}

.saas-toast-message {
    font-size: 13px;
    color: #475569;
    line-height: 1.42;
    word-break: break-word;
}

/* Bouton Fermer */
.saas-toast-close {
    background: transparent;
    border: none;
    cursor: pointer;
    color: #94a3b8;
    padding: 4px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
    flex-shrink: 0;
}

.saas-toast-close:hover {
    color: #0f172a;
    background: #f1f5f9;
}

/* Barre de progression décrémentale */
.saas-toast-progress-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: rgba(0, 0, 0, 0.04);
}

.saas-toast-progress-fill {
    width: 100%;
    height: 100%;
    transform-origin: left;
}

.saas-progress-success {
    background: #10b981;
}

.saas-progress-error {
    background: #ef4444;
}

.saas-progress-warning {
    background: #f59e0b;
}

.saas-progress-info {
    background: #3b82f6;
}

/* ==========================================================================
   MODULE POSTES & PROFILS MÉTIERS RH
========================================================================== */

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

.job-icon-box {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: #eef2ff;
    color: #4f46e5;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: transform 0.15s ease, background 0.15s ease;
}

.job-row:hover .job-icon-box {
    background: #e0e7ff;
    transform: scale(1.05);
}

.job-info-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.job-title-bold {
    font-size: 14px;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.3;
}

.job-desc-sub {
    font-size: 12.5px;
    color: #64748b;
    line-height: 1.35;
}

.badge-agents-count {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 9px;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    color: #334155;
    white-space: nowrap;
}

.badge-agents-count .icon-count-mini {
    color: #6366f1;
}

.badge-docs-count {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 9px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
    white-space: nowrap;
}

.badge-docs-active {
    background: #e0f2fe;
    border-color: #bae6fd;
    color: #0369a1;
}

.badge-docs-active .icon-count-mini {
    color: #0284c7;
}

/* ==========================================================================
   MODULE EMPLOIS DU TEMPS & PLANNINGS RH
========================================================================== */

.badge-contract-mini {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 5px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    background: #eef2ff;
    color: #4f46e5;
    width: fit-content;
}

.slot-day-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 3.5px 8px;
    line-height: 1.3;
}

.slot-day-badge {
    font-weight: 800;
    color: #0f172a;
    min-width: 28px;
}

.slot-day-times {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.slot-time-pill {
    font-family: ui-monospace, monospace;
    font-weight: 700;
    color: #1e293b;
    font-size: 11.5px;
}

.slot-site-hint {
    font-size: 10.5px;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    padding: 1px 5px;
    color: #475569;
    font-weight: 600;
}

/* ==========================================================================
   MODULE DOCUMENTS RH & ATTESTATIONS
========================================================================== */

.badge-doc-type {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 9999px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.3;
    white-space: nowrap;
}

.badge-doc-attestation {
    background: #ecfdf5;
    color: #047857;
    border: 1px solid #a7f3d0;
}

.badge-doc-contrat {
    background: #eff6ff;
    color: #1d4ed8;
    border: 1px solid #bfdbfe;
}

.badge-doc-bulletin {
    background: #f5f3ff;
    color: #6d28d9;
    border: 1px solid #ddd6fe;
}

.badge-doc-justificatif {
    background: #fffbeb;
    color: #b45309;
    border: 1px solid #fde68a;
}

.badge-doc-autre {
    background: #f8fafc;
    color: #475569;
    border: 1px solid #e2e8f0;
}

.doc-file-info {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.badge-file-ext {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 3px 7px;
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-family: ui-monospace, monospace;
    font-size: 11px;
    font-weight: 700;
    color: #334155;
    text-transform: uppercase;
}

.doc-file-size {
    font-size: 12px;
    color: #64748b;
    font-weight: 500;
}

.doc-upload-dropzone {
    border: 2px dashed #cbd5e1;
    border-radius: 12px;
    padding: 24px;
    text-align: center;
    background: #f8fafc;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.doc-upload-dropzone:hover,
.doc-upload-dropzone:focus-within {
    border-color: #6366f1;
    background: #eef2ff;
}

.doc-upload-dropzone input[type="file"] {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.doc-dropzone-icon {
    color: #6366f1;
    margin-bottom: 8px;
    display: flex;
    justify-content: center;
}

.doc-dropzone-title {
    font-size: 13.5px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 4px;
}

.doc-dropzone-hint {
    font-size: 12px;
    color: #64748b;
}

.doc-selected-filename {
    margin-top: 10px;
    font-size: 12.5px;
    font-weight: 600;
    color: #4338ca;
    display: none;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

/* ==========================================================================
   CARTES KPI COLORÉES & BARRE D'OUTILS AÉRÉE
========================================================================== */

.admin-toolbar {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 24px;
    margin-bottom: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    flex-wrap: wrap;
}

.admin-kpi-card {
    position: relative;
    overflow: hidden;
}

.kpi-card-indigo {
    border-top: 4px solid #6366f1 !important;
    background: linear-gradient(180deg, #f5f3ff 0%, #ffffff 42%) !important;
    border-color: #ddd6fe !important;
}

.kpi-card-emerald {
    border-top: 4px solid #10b981 !important;
    background: linear-gradient(180deg, #ecfdf5 0%, #ffffff 42%) !important;
    border-color: #a7f3d0 !important;
}

.kpi-card-blue {
    border-top: 4px solid #3b82f6 !important;
    background: linear-gradient(180deg, #eff6ff 0%, #ffffff 42%) !important;
    border-color: #bfdbfe !important;
}

.kpi-card-amber {
    border-top: 4px solid #f59e0b !important;
    background: linear-gradient(180deg, #fffbeb 0%, #ffffff 42%) !important;
    border-color: #fde68a !important;
}

.kpi-card-purple {
    border-top: 4px solid #8b5cf6 !important;
    background: linear-gradient(180deg, #faf5ff 0%, #ffffff 42%) !important;
    border-color: #e9d5ff !important;
}

.kpi-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}

.kpi-card-body {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.kpi-icon-box {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.admin-kpi-card:hover .kpi-icon-box {
    transform: scale(1.08);
}

.kpi-icon-indigo {
    background: #eef2ff !important;
    color: #4f46e5 !important;
    border: 1px solid #c7d2fe !important;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.2) !important;
}

.kpi-icon-emerald {
    background: #ecfdf5 !important;
    color: #059669 !important;
    border: 1px solid #a7f3d0 !important;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.2) !important;
}

.kpi-icon-blue {
    background: #eff6ff !important;
    color: #2563eb !important;
    border: 1px solid #bfdbfe !important;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.2) !important;
}

.kpi-icon-amber {
    background: #fffbeb !important;
    color: #d97706 !important;
    border: 1px solid #fde68a !important;
    box-shadow: 0 2px 8px rgba(217, 119, 6, 0.2) !important;
}

.kpi-icon-purple {
    background: #faf5ff !important;
    color: #8b5cf6 !important;
    border: 1px solid #e9d5ff !important;
    box-shadow: 0 2px 8px rgba(139, 92, 246, 0.2) !important;
}

.kpi-chip {
    font-size: 11.5px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 9999px;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

.kpi-chip-indigo {
    background: #e0e7ff !important;
    color: #3730a3 !important;
    border: 1px solid #c7d2fe !important;
}

.kpi-chip-emerald {
    background: #dcfce7 !important;
    color: #166534 !important;
    border: 1px solid #bbf7d0 !important;
}

.kpi-chip-blue {
    background: #dbeafe !important;
    color: #1e40af !important;
    border: 1px solid #bfdbfe !important;
}

.kpi-chip-amber {
    background: #fef3c7 !important;
    color: #92400e !important;
    border: 1px solid #fde68a !important;
}

.kpi-chip-purple {
    background: #f3e8ff !important;
    color: #6b21a8 !important;
    border: 1px solid #e9d5ff !important;
}

.kpi-card-rose,
.kpi-card-red {
    border-top: 4px solid #f43f5e !important;
    background: linear-gradient(180deg, #fff1f2 0%, #ffffff 42%) !important;
    border-color: #fecdd3 !important;
}

.kpi-icon-rose {
    background: #fff1f2 !important;
    color: #e11d48 !important;
    border: 1px solid #fecdd3 !important;
    box-shadow: 0 2px 8px rgba(244, 63, 94, 0.2) !important;
}

.kpi-chip-rose,
.kpi-chip-red {
    background: #ffe4e6 !important;
    color: #9f1239 !important;
    border: 1px solid #fecdd3 !important;
}

/* ==========================================================================
   MODULE DE NOTIFICATIONS WHATSAPP SAAS
========================================================================== */

.whatsapp-alerts-container {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.whatsapp-section-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    overflow: hidden;
}

.whatsapp-section-header {
    padding: 1.25rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #f1f5f9;
}
.header-type-danger {
    background: linear-gradient(180deg, #fff5f5 0%, #ffffff 100%);
    border-bottom-color: #fee2e2;
}
.header-type-warning {
    background: linear-gradient(180deg, #fffbeb 0%, #ffffff 100%);
    border-bottom-color: #fef3c7;
}

.whatsapp-section-title-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
}

.section-icon-badge {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.section-icon-danger {
    background: #fee2e2;
    color: #ef4444;
}
.section-icon-warning {
    background: #fef3c7;
    color: #d97706;
}

.whatsapp-section-title {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
    color: #0f172a;
}
.whatsapp-section-desc {
    margin: 2px 0 0;
    font-size: 12.5px;
    color: #64748b;
}

.whatsapp-section-body {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.whatsapp-alert-item {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 14px;
    transition: all 0.2s ease;
}
.whatsapp-alert-item:hover {
    background: #ffffff;
    border-color: #cbd5e1;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.alert-item-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.alert-agent-profile {
    display: flex;
    align-items: center;
    gap: 12px;
}
.alert-agent-avatar {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    object-fit: cover;
    background: #e2e8f0;
    border: 2px solid #ffffff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}
.alert-agent-name {
    font-size: 14.5px;
    font-weight: 700;
    color: #0f172a;
}
.alert-agent-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12.5px;
    color: #64748b;
    margin-top: 2px;
}

.alert-meta-badges {
    display: flex;
    align-items: center;
    gap: 8px;
}

.whatsapp-bubble-box {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 12px;
    padding: 12px 16px;
    position: relative;
}
.whatsapp-bubble-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #166534;
    margin-bottom: 6px;
}

.whatsapp-message-textarea {
    width: 100%;
    background: #ffffff;
    border: 1px solid #86efac;
    border-radius: 8px;
    padding: 10px 12px;
    font-family: inherit;
    font-size: 13.5px;
    line-height: 1.5;
    color: #14532d;
    outline: none;
    resize: vertical;
    box-sizing: border-box;
    transition: all 0.15s ease;
}
.whatsapp-message-textarea:focus {
    border-color: #22c55e;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.15);
}

.whatsapp-actions-row {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 4px;
}

.btn-whatsapp-send {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 40px;
    padding: 0 18px;
    border-radius: 10px;
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    color: #ffffff !important;
    font-size: 13.5px;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(37, 211, 102, 0.3);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    border: none;
    cursor: pointer;
}
.btn-whatsapp-send:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(37, 211, 102, 0.45);
    background: linear-gradient(135deg, #22c35e 0%, #0e7065 100%);
    color: #ffffff !important;
}
.btn-whatsapp-send:active {
    transform: translateY(0);
}

.alert-missing-phone {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecdd3;
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
}

.whatsapp-empty-state {
    padding: 36px 20px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.empty-state-icon-wrap {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: #ecfdf5;
    color: #059669;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
}
.whatsapp-empty-state h4 {
    margin: 0 0 4px;
    font-size: 15px;
    font-weight: 700;
    color: #0f172a;
}
.whatsapp-empty-state p {
    margin: 0;
    font-size: 13px;
    color: #64748b;
}

/* Variables dynamiques pour modèles WhatsApp */
.var-chips-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin-bottom: 8px;
    padding: 8px 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
}
.var-chips-label {
    font-size: 11.5px;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    margin-right: 4px;
}
.var-chip-btn {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    color: #4338ca;
    font-family: ui-monospace, monospace;
    font-size: 12px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s ease;
}
.var-chip-btn:hover {
    background: #e0e7ff;
    border-color: #a5b4fc;
    color: #3730a3;
    transform: translateY(-1px);
}

/* Grille SaaS pour Modification de Règle WhatsApp */
.edit-rule-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
    gap: 24px;
    align-items: start;
    margin-bottom: 32px;
}

@media (max-width: 1024px) {
    .edit-rule-grid {
        grid-template-columns: 1fr;
    }
}

/* Carte Simulateur WhatsApp Phone */
.whatsapp-preview-card {
    background: #ffffff;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 16px -2px rgba(15, 23, 42, 0.05);
    overflow: hidden;
}

.whatsapp-mockup-screen {
    background: #e5ddd5;
    background-image: radial-gradient(#d4c9be 1px, transparent 1px);
    background-size: 16px 16px;
    border-radius: 12px;
    margin: 16px;
    overflow: hidden;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08);
}

.wa-mockup-header {
    background: #075e54;
    color: #ffffff;
    padding: 10px 14px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.wa-mockup-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #128c7e;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
}

.wa-mockup-info {
    display: flex;
    flex-direction: column;
}

.wa-mockup-name {
    font-size: 13.5px;
    font-weight: 700;
    line-height: 1.2;
}

.wa-mockup-status {
    font-size: 11px;
    color: #d1fae5;
    opacity: 0.9;
}

.wa-mockup-chat-body {
    padding: 16px 12px;
    min-height: 140px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.wa-mockup-bubble {
    align-self: flex-start;
    max-width: 90%;
    background: #ffffff;
    border-radius: 0 12px 12px 12px;
    padding: 10px 12px 6px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
    position: relative;
}

.wa-mockup-text {
    font-size: 13.5px;
    line-height: 1.5;
    color: #111827;
    word-break: break-word;
    white-space: pre-wrap;
}

.wa-mockup-text strong {
    font-weight: 700;
}

.wa-mockup-meta {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
    margin-top: 4px;
    font-size: 10.5px;
    color: #6b7280;
}

.wa-double-check {
    color: #3b82f6;
    display: inline-flex;
}

/* Tableau des Variables Disponibles */
.wa-vars-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12.5px;
}

.wa-vars-table th {
    background: #f8fafc;
    color: #475569;
    font-weight: 700;
    text-align: left;
    padding: 8px 12px;
    border-bottom: 1px solid #e2e8f0;
}

.wa-vars-table td {
    padding: 8px 12px;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
}

.wa-vars-table tr:hover td {
    background: #f8fafc;
}

.wa-var-code {
    background: #ede9fe;
    color: #6366f1;
    font-family: ui-monospace, monospace;
    font-weight: 600;
    font-size: 12px;
    padding: 2px 6px;
    border-radius: 4px;
    cursor: pointer;
    display: inline-block;
    transition: all 0.15s ease;
}

.wa-var-code:hover {
    background: #e0e7ff;
    color: #4338ca;
    transform: scale(1.04);
}

/* ==========================================================================
   MODULE MESSAGES URGENTS & DIFFUSIONS PUSH PLEIN ÉCRAN
========================================================================== */

/* Badges de Priorité */
.badge-priority {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 11.5px;
    font-weight: 700;
    padding: 3px 9px;
    border-radius: 9999px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    line-height: 1;
}

.badge-priority-critique {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecdd3;
}

.badge-priority-urgent {
    background: #fffbeb;
    color: #b45309;
    border: 1px solid #fde68a;
}

.badge-priority-info {
    background: #eff6ff;
    color: #1d4ed8;
    border: 1px solid #bfdbfe;
}

/* Grille de sélection de priorité dans la modale */
.priority-selector-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

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

.priority-option {
    cursor: pointer;
    position: relative;
    margin: 0;
}

.priority-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.priority-card {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 12px 14px;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    background: #ffffff;
    transition: all 0.2s ease;
}

.priority-card:hover {
    border-color: #cbd5e1;
    background: #f8fafc;
}

.priority-card .p-header {
    display: flex;
    align-items: center;
    gap: 7px;
    font-weight: 700;
    font-size: 13.5px;
}

.priority-card .p-desc {
    font-size: 11.5px;
    color: #64748b;
    line-height: 1.35;
}

/* État coché des cartes de priorité */
.priority-option input[type="radio"]:checked + .priority-card {
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
}

.option-critique input[type="radio"]:checked + .priority-card {
    border-color: #ef4444;
    background: #fef2f2;
}
.option-critique input[type="radio"]:checked + .priority-card .p-header {
    color: #b91c1c;
}

.option-urgent input[type="radio"]:checked + .priority-card {
    border-color: #f59e0b;
    background: #fffbeb;
}
.option-urgent input[type="radio"]:checked + .priority-card .p-header {
    color: #b45309;
}

.option-info input[type="radio"]:checked + .priority-card {
    border-color: #3b82f6;
    background: #eff6ff;
}
.option-info input[type="radio"]:checked + .priority-card .p-header {
    color: #1d4ed8;
}

/* Sélecteur de ciblage destinataires */
.target-type-selector {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
}

.radio-pill-card {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    background: #ffffff;
    font-size: 13px;
    font-weight: 600;
    color: #334155;
    cursor: pointer;
    transition: all 0.15s ease;
}

.radio-pill-card:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
}

.radio-pill-card input[type="radio"] {
    accent-color: #4f46e5;
}

.radio-pill-card:has(input[type="radio"]:checked) {
    border-color: #4f46e5;
    background: #f5f3ff;
    color: #4338ca;
}

/* Boîte de sélection d'agents spécifiques */
.specific-agents-box {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 12px;
    margin-top: 10px;
}

.agents-box-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e2e8f0;
}

.agents-quick-search {
    flex: 1;
    max-width: 260px;
    position: relative;
}

.agents-quick-search input {
    width: 100%;
    font-size: 12.5px;
    padding: 6px 10px 6px 28px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    background: #ffffff;
    outline: none;
}

.agents-quick-search .search-icon {
    position: absolute;
    left: 8px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    pointer-events: none;
}

.agents-scroll-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 8px;
    max-height: 220px;
    overflow-y: auto;
    padding-right: 4px;
}

.agent-check-card {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s ease;
    font-size: 12.5px;
}

.agent-check-card:hover {
    border-color: #cbd5e1;
    background: #f1f5f9;
}

.agent-check-card:has(input[type="checkbox"]:checked) {
    border-color: #a5b4fc;
    background: #eef2ff;
}

.agent-check-info {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.agent-check-name {
    font-weight: 600;
    color: #0f172a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.agent-check-meta {
    font-size: 11px;
    color: #64748b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Jauge de progression d'accusé de réception */
.ack-progress-cell {
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-width: 130px;
}

.ack-progress-labels {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12px;
}

.ack-progress-track {
    width: 100%;
    height: 6px;
    background: #e2e8f0;
    border-radius: 9999px;
    overflow: hidden;
}

.ack-progress-bar {
    height: 100%;
    border-radius: 9999px;
    transition: width 0.4s ease;
}

/* Actions du tableau messages urgents */
.btn-action-emargement {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    height: 34px !important;
    min-width: unset !important;
    width: auto !important;
    padding: 0 12px !important;
    border-radius: 8px !important;
    border: 1px solid #bfdbfe !important;
    background: #eff6ff !important;
    color: #2563eb !important;
    font-size: 12.5px !important;
    font-weight: 700 !important;
    text-decoration: none !important;
    white-space: nowrap !important;
    box-sizing: border-box !important;
    cursor: pointer !important;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.btn-action-emargement:hover {
    background: #dbeafe !important;
    color: #1d4ed8 !important;
    border-color: #93c5fd !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 2px 6px rgba(37, 99, 235, 0.15) !important;
}

.btn-action-suspend {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 34px !important;
    height: 34px !important;
    min-width: 34px !important;
    padding: 0 !important;
    border-radius: 8px !important;
    border: 1px solid #fde68a !important;
    background: #fffbeb !important;
    color: #d97706 !important;
    cursor: pointer !important;
    box-sizing: border-box !important;
    transition: all 0.2s ease !important;
}

.btn-action-suspend:hover {
    background: #fef3c7 !important;
    color: #b45309 !important;
    border-color: #fcd34d !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 2px 6px rgba(217, 119, 6, 0.15) !important;
}

.btn-action-resume {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 34px !important;
    height: 34px !important;
    min-width: 34px !important;
    padding: 0 !important;
    border-radius: 8px !important;
    border: 1px solid #a7f3d0 !important;
    background: #ecfdf5 !important;
    color: #059669 !important;
    cursor: pointer !important;
    box-sizing: border-box !important;
    transition: all 0.2s ease !important;
}

.btn-action-resume:hover {
    background: #d1fae5 !important;
    color: #047857 !important;
    border-color: #6ee7b7 !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 2px 6px rgba(16, 185, 129, 0.15) !important;
}

/* Encadré citation de message dans la vue détails */
.message-quote-box {
    background: #f8fafc;
    border-left: 4px solid #4f46e5;
    border-radius: 0 10px 10px 0;
    padding: 16px 20px;
    font-size: 14px;
    line-height: 1.6;
    color: #1e293b;
    white-space: pre-wrap;
}

/* ==========================================================================
   MODULE SITES & SÉLECTEUR DE COORDONNÉES GÉOGRAPHIQUES (LEAFLET / OSM)
========================================================================== */

/* Conteneur de carte interactive Leaflet */
.site-map-container {
    width: 100%;
    height: 340px;
    border-radius: 12px;
    border: 1.5px solid #cbd5e1;
    overflow: hidden;
    position: relative;
    background: #f1f5f9;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.04);
}

.site-map-container-lg {
    height: 480px;
}

/* Barre d'outils au-dessus de la carte */
.map-header-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.map-search-wrap {
    flex: 1;
    min-width: 240px;
    position: relative;
    display: flex;
    align-items: center;
}

.map-search-input {
    width: 100%;
    padding: 7px 32px 7px 32px;
    border: 1.5px solid #cbd5e1;
    border-radius: 8px;
    font-size: 12.5px;
    background: #ffffff;
    outline: none;
    transition: all 0.15s ease;
}

.map-search-input:focus {
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
}

.map-search-icon {
    position: absolute;
    left: 10px;
    color: #94a3b8;
    pointer-events: none;
}

.btn-map-action {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 33px;
    padding: 0 12px;
    border-radius: 8px;
    border: 1.5px solid #cbd5e1;
    background: #ffffff;
    color: #334155;
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
}

.btn-map-action:hover {
    background: #f8fafc;
    border-color: #94a3b8;
    color: #0f172a;
}

.btn-map-gps {
    background: #ecfdf5;
    border-color: #a7f3d0;
    color: #059669;
}

.btn-map-gps:hover {
    background: #d1fae5;
    border-color: #6ee7b7;
    color: #047857;
}

/* Boutons rapides de sélection de rayon */
.radius-quick-chips {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 6px;
}

.radius-chip-btn {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    color: #475569;
    font-size: 11.5px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.radius-chip-btn:hover {
    background: #f1f5f9;
    border-color: #94a3b8;
}

.radius-chip-btn.active {
    background: #eef2ff;
    border-color: #818cf8;
    color: #4338ca;
    font-weight: 700;
}

/* Badges GPS dans le tableau */
.gps-badge-box {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 4px 10px;
    border-radius: 8px;
    font-family: ui-monospace, monospace;
    font-size: 12px;
    color: #334155;
}

.gps-badge-box:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

.gps-none-box {
    color: #94a3b8;
    font-style: italic;
    font-size: 12px;
}

/* Rayon badge */
.radius-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #eff6ff;
    color: #1d4ed8;
    border: 1px solid #bfdbfe;
    padding: 3px 8px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 12px;
}

/* Modal XL pour création de site avec carte */
.admin-modal-xl {
    max-width: 960px;
    width: 95%;
}

.modal-site-grid {
    display: grid;
    grid-template-columns: 340px 1fr;
    gap: 20px;
}

@media (max-width: 860px) {
    .modal-site-grid {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   MODULE PARAMÈTRES SYSTÈME SAAS MODERNE
   ========================================================================== */

/* En-tête avec indicateur de statut */
.settings-live-indicator {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #166534;
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 12.5px;
    font-weight: 600;
}

.settings-live-indicator .pulse-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
    animation: pulseDot 2s infinite;
}

@keyframes pulseDot {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
    }
    70% {
        transform: scale(1);
        box-shadow: 0 0 0 6px rgba(34, 197, 94, 0);
    }
    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0);
    }
}

/* Onglets SaaS */
.settings-tabs-wrapper {
    margin-bottom: 24px;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 0;
}

.settings-tabs-nav {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    scrollbar-width: none;
}
.settings-tabs-nav::-webkit-scrollbar {
    display: none;
}

.settings-tab-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 600;
    color: #64748b;
    text-decoration: none;
    border-bottom: 3px solid transparent;
    transition: all 0.2s ease;
    border-radius: 10px 10px 0 0;
    white-space: nowrap;
}

.settings-tab-link:hover {
    color: #1e293b;
    background: #f8fafc;
}

.settings-tab-link.active {
    color: #2563eb;
    border-bottom-color: #2563eb;
    background: #eff6ff;
}

.settings-tab-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Carte globale de configuration */
.saas-settings-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    box-shadow: 0 4px 20px -4px rgba(15, 23, 42, 0.05);
    overflow: hidden;
}

.saas-settings-body {
    padding: 28px 32px;
}

.settings-group-section {
    margin-bottom: 28px;
    padding-bottom: 28px;
    border-bottom: 1px solid #f1f5f9;
}

.settings-group-section:last-of-type {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.settings-section-header {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 20px;
}

.settings-section-icon-badge {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.settings-section-info h3 {
    font-size: 16px;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 3px 0;
}

.settings-section-info p {
    font-size: 13px;
    color: #64748b;
    margin: 0;
}

/* Grille de champs ergonomique */
.settings-fields-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

@media (max-width: 768px) {
    .settings-fields-grid-2 {
        grid-template-columns: 1fr;
    }
    .saas-settings-body {
        padding: 20px 16px;
    }
}

/* Conteneurs avec addon (ex: min, m, etc.) */
.input-with-addon {
    display: flex;
    align-items: stretch;
    position: relative;
}

.input-with-addon .form-control {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    flex: 1;
}

.input-addon {
    display: inline-flex;
    align-items: center;
    padding: 0 14px;
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    border-left: none;
    border-top-right-radius: 8px;
    border-bottom-right-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    color: #475569;
    white-space: nowrap;
}

/* Entrée avec icône à gauche */
.input-with-icon {
    position: relative;
    display: flex;
    align-items: center;
}

.input-left-icon {
    position: absolute;
    left: 14px;
    display: flex;
    align-items: center;
    color: #94a3b8;
    pointer-events: none;
}

.input-with-icon .form-control {
    padding-left: 42px;
}

/* Boutons de presets rapides (chips) */
.settings-preset-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.settings-chip-btn {
    padding: 4px 10px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    color: #475569;
    cursor: pointer;
    transition: all 0.15s ease;
}

.settings-chip-btn:hover {
    background: #eff6ff;
    border-color: #93c5fd;
    color: #1d4ed8;
}

/* Sélecteur de jours ouvrés stylisé */
.working-days-picker {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 8px;
}

.day-picker-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #f8fafc;
    color: #64748b;
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    user-select: none;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.day-picker-btn:hover {
    border-color: #cbd5e1;
    background: #f1f5f9;
    color: #1e293b;
}

.day-picker-btn.is-selected {
    background: #eff6ff;
    border-color: #93c5fd;
    color: #1d4ed8;
    box-shadow: 0 2px 6px rgba(37, 99, 235, 0.1);
}

.day-picker-check {
    width: 18px;
    height: 18px;
    border-radius: 5px;
    border: 1.5px solid #cbd5e1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    transition: all 0.2s ease;
}

.day-picker-btn.is-selected .day-picker-check {
    background: #2563eb;
    border-color: #2563eb;
    color: #ffffff;
}

/* Grille côte à côte pour les bandeaux de fonctionnalités (Selfie & Mode GPS Strict) */
.settings-feature-cards-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    align-items: stretch;
}

@media (max-width: 1024px) {
    .settings-feature-cards-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
}

.settings-feature-cards-grid .saas-feature-card {
    height: 100%;
    margin-bottom: 0 !important;
}

/* Cartes Fonctionnalités SaaS (Switch Selfie, Mode GPS Strict, WhatsApp) */
.saas-feature-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 20px 24px;
    border-radius: 14px;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
    transition: all 0.2s ease;
}

.saas-feature-card:hover {
    border-color: #cbd5e1;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}

.saas-feature-card.feature-card-blue {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border-color: #bae6fd;
}

.saas-feature-card.feature-card-purple {
    background: linear-gradient(135deg, #faf5ff 0%, #f3e8ff 100%);
    border-color: #e9d5ff;
}

.saas-feature-card.feature-card-emerald {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border-color: #bbf7d0;
}

.feature-card-left {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    flex: 1;
}

.feature-card-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.feature-card-text h4 {
    margin: 0 0 4px 0;
    font-size: 15px;
    font-weight: 700;
    color: #0f172a;
}

.feature-card-text p {
    margin: 0;
    font-size: 13px;
    color: #475569;
    line-height: 1.45;
}

.feature-card-switch-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
    min-width: 80px;
}

.saas-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 28px;
    cursor: pointer;
}

.saas-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.saas-switch-slider {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: #cbd5e1;
    border-radius: 30px;
    transition: 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.saas-switch-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
    transition: 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.saas-switch input:checked + .saas-switch-slider {
    background-color: #2563eb;
}

.saas-switch.switch-emerald input:checked + .saas-switch-slider {
    background-color: #10b981;
}

.saas-switch input:checked + .saas-switch-slider:before {
    transform: translateX(22px);
}

.saas-switch-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #64748b;
}

/* Variables cliquables & prévisualisation WhatsApp */
.template-var-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.template-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    padding: 4px 9px;
    border-radius: 6px;
    font-size: 12px;
    font-family: monospace;
    color: #334155;
    cursor: pointer;
    transition: all 0.15s ease;
}

.template-chip:hover {
    background: #e2e8f0;
    border-color: #cbd5e1;
    color: #0f172a;
    transform: translateY(-1px);
}

.settings-preview-box {
    margin-top: 14px;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 12px;
    padding: 14px 18px;
}

.settings-preview-header {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12.5px;
    font-weight: 700;
    color: #166534;
    margin-bottom: 8px;
}

.settings-preview-bubble {
    background: #ffffff;
    border-radius: 8px 8px 8px 2px;
    padding: 12px 16px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
    font-size: 13.5px;
    color: #111827;
    line-height: 1.5;
    position: relative;
    border-left: 4px solid #22c55e;
}

/* Barre d'action footer propre et équilibrée */
.settings-actions-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 20px 32px;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
}

@media (max-width: 768px) {
    .settings-actions-footer {
        flex-direction: column;
        align-items: stretch;
        padding: 18px 20px;
    }
}

.settings-footer-hint {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #64748b;
    font-size: 13px;
}

.footer-hint-icon {
    color: #10b981;
    display: flex;
    align-items: center;
}

.settings-footer-buttons {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.settings-footer-buttons .btn-admin-primary {
    width: auto !important;
    padding: 10px 22px !important;
    font-size: 14px !important;
    border-radius: 10px !important;
}

.settings-footer-buttons .btn-admin-secondary {
    padding: 10px 18px !important;
    font-size: 13.5px !important;
    border-radius: 10px !important;
}

/* Upload & Preview du Logo d'Établissement */
.settings-logo-wrap {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 16px 20px;
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: 12px;
    transition: all 0.2s ease;
}

.settings-logo-wrap:hover {
    border-color: #93c5fd;
    background: #f0f7ff;
}

.settings-logo-preview {
    width: 76px;
    height: 76px;
    border-radius: 12px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

.settings-logo-preview img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.settings-logo-preview .logo-placeholder {
    color: #94a3b8;
    display: flex;
    align-items: center;
    justify-content: center;
}

.settings-logo-actions {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
}

.settings-logo-actions-title {
    font-size: 13.5px;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
}

.settings-logo-actions-desc {
    font-size: 12px;
    color: #64748b;
    margin: 0;
}

.settings-logo-btns {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 4px;
    flex-wrap: wrap;
}

.btn-logo-upload {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border-radius: 8px;
    font-size: 12.5px;
    font-weight: 600;
    background: #2563eb;
    color: #ffffff;
    cursor: pointer;
    border: none;
    transition: background 0.15s ease;
}

.btn-logo-upload:hover {
    background: #1d4ed8;
}

.btn-logo-remove {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border-radius: 8px;
    font-size: 12.5px;
    font-weight: 600;
    background: #fef2f2;
    color: #dc2626;
    cursor: pointer;
    border: 1px solid #fecaca;
    transition: all 0.15s ease;
}

.btn-logo-remove:hover {
    background: #fee2e2;
}

/* Grille de deux cartes séparées (Général & Organisation) */
.settings-two-cards-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    align-items: stretch;
}

@media (max-width: 1024px) {
    .settings-two-cards-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

.settings-half-card {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.settings-half-card .saas-settings-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 26px 28px;
}

.settings-half-card .settings-section-header {
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid #f1f5f9;
}

/* ==============================================================
   STYLES DU JOURNAL D'AUDIT & SÉCURITÉ SAAS
============================================================== */
.log-action-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.3;
    border: 1px solid transparent;
}

.log-ip-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 8px;
    border-radius: 6px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 11.5px;
    background: #f8fafc;
    color: #475569;
    border: 1px solid #e2e8f0;
}

.log-ip-badge.ip-local {
    background: #ecfdf5;
    color: #047857;
    border-color: #a7f3d0;
}

.log-ip-tag {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    background: rgba(0, 0, 0, 0.05);
    padding: 1px 4px;
    border-radius: 4px;
}

.log-time-wrap {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.log-date {
    font-size: 13px;
    font-weight: 700;
    color: #0f172a;
}

.log-time {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 11.5px;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 6px;
}

.log-time-relative {
    font-size: 10.5px;
    color: #94a3b8;
}

.log-admin-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
}

.admin-avatar-chip {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    color: #ffffff;
    flex-shrink: 0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.08);
}

.log-details-wrap {
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-width: 480px;
}

.log-details-title {
    font-size: 13px;
    font-weight: 600;
    color: #1e293b;
    line-height: 1.4;
}

.log-details-sub {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: #64748b;
}

.badge-tab-pill {
    display: inline-flex;
    padding: 1px 6px;
    border-radius: 5px;
    background: #eff6ff;
    color: #1d4ed8;
    font-weight: 700;
    font-size: 11px;
}

.btn-log-inspect {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    color: #334155;
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-log-inspect:hover {
    background: #f1f5f9;
    border-color: #94a3b8;
    color: #0f172a;
}

/* Pagination SaaS Propre et compacte */
.admin-pagination-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 24px;
    border-top: 1px solid #e2e8f0;
    background: #f8fafc;
    border-radius: 0 0 16px 16px;
}

@media (max-width: 768px) {
    .admin-pagination-wrap {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
}

.admin-pagination-info {
    font-size: 13px;
    color: #64748b;
}

.admin-pagination-pages {
    display: flex;
    align-items: center;
    gap: 6px;
}

.admin-pagination-btn {
    min-width: 34px;
    height: 34px;
    padding: 0 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    color: #475569;
    text-decoration: none;
    transition: all 0.15s ease;
}

.admin-pagination-btn:hover:not(.active):not(.disabled) {
    background: #f1f5f9;
    border-color: #cbd5e1;
    color: #0f172a;
}

.admin-pagination-btn.active {
    background: #2563eb;
    border-color: #2563eb;
    color: #ffffff;
    pointer-events: none;
    box-shadow: 0 2px 6px rgba(37, 99, 235, 0.25);
}

.admin-pagination-btn.disabled {
    opacity: 0.45;
    pointer-events: none;
    cursor: not-allowed;
}

/* Modal Inspection Log */
.modal-log-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 20px;
    padding: 16px;
    background: #f8fafc;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.modal-log-item {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.modal-log-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    color: #64748b;
    letter-spacing: 0.4px;
}

.modal-log-value {
    font-size: 13.5px;
    font-weight: 600;
    color: #0f172a;
}

.modal-log-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    margin-top: 12px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
}

.modal-log-table th {
    background: #f1f5f9;
    color: #475569;
    font-size: 11.5px;
    font-weight: 700;
    text-transform: uppercase;
    padding: 10px 14px;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
}

.modal-log-table td {
    padding: 10px 14px;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: top;
}

.modal-log-table tr:last-child td {
    border-bottom: none;
}

.modal-log-table tr:hover td {
    background: #f8fafc;
}

/* ==========================================================================
   MODULE BILAN MENSUEL AGENT & FEUILLE D'ÉMARGEMENT SAAS
   ========================================================================== */

.bilan-banner-grid {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 20px;
    margin-bottom: 24px;
}

@media (max-width: 992px) {
    .bilan-banner-grid {
        grid-template-columns: 1fr;
    }
}

.bilan-agent-card,
.bilan-status-card {
    background: #ffffff;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    padding: 22px;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.03);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
}

.bilan-agent-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #3b82f6, #6366f1);
}

.bilan-status-card.is-locked::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #10b981, #059669);
}

.bilan-status-card.is-open::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #f59e0b, #d97706);
}

.bilan-agent-header {
    display: flex;
    gap: 16px;
    align-items: center;
    margin-bottom: 16px;
}

.bilan-agent-avatar {
    width: 62px;
    height: 62px;
    border-radius: 16px;
    object-fit: cover;
    box-shadow: 0 4px 10px rgba(0,0,0,0.08);
    border: 2px solid #ffffff;
    flex-shrink: 0;
}

.bilan-agent-avatar-placeholder {
    width: 62px;
    height: 62px;
    border-radius: 16px;
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 10px rgba(99, 102, 241, 0.25);
    flex-shrink: 0;
}

.bilan-agent-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.bilan-agent-name {
    font-size: 1.15rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
    line-height: 1.3;
}

.bilan-chips-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 4px;
}

.bilan-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 9px;
    border-radius: 999px;
    font-size: 11.5px;
    font-weight: 600;
    line-height: 1;
}

.bilan-chip-matricule {
    background: #eff6ff;
    color: #1d4ed8;
    border: 1px solid #dbeafe;
}

.bilan-chip-job {
    background: #f1f5f9;
    color: #334155;
    border: 1px solid #e2e8f0;
}

.bilan-agent-meta-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 10px;
    padding-top: 14px;
    border-top: 1px solid #f1f5f9;
}

.bilan-meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12.5px;
    color: #64748b;
}

.bilan-meta-item svg {
    color: #94a3b8;
    flex-shrink: 0;
}

.bilan-meta-item strong {
    color: #1e293b;
}

/* Carte Statut & Clôture */
.bilan-status-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 14px;
}

.bilan-status-title-wrap h3 {
    font-size: 1.05rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 4px 0;
}

.bilan-status-title-wrap p {
    font-size: 12.5px;
    color: #64748b;
    margin: 0;
}

.bilan-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.2px;
}

.bilan-status-badge.badge-validated {
    background: #dcfce7;
    color: #15803d;
    border: 1px solid #bbf7d0;
}

.bilan-status-badge.badge-pending {
    background: #fef3c7;
    color: #b45309;
    border: 1px solid #fde68a;
}

.bilan-status-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 16px;
}

.bilan-lock-info-box {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 10px 14px;
    font-size: 12.5px;
    color: #334155;
    line-height: 1.5;
}

.bilan-lock-info-box strong {
    color: #0f172a;
}

.bilan-note-callout {
    background: #eff6ff;
    border-left: 3px solid #3b82f6;
    border-radius: 0 8px 8px 0;
    padding: 8px 12px;
    font-size: 12.5px;
    color: #1e40af;
    font-style: italic;
}

.bilan-lock-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: flex-end;
    margin-top: auto;
}

/* Toolbar & Filtres Bilan sur une seule ligne parfaitement alignée */
.admin-bilan-toolbar {
    background: #ffffff !important;
    padding: 14px 20px !important;
    border-radius: 14px !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02) !important;
    margin-bottom: 24px !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

.admin-bilan-form {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 16px !important;
    margin: 0 !important;
    padding: 0 !important;
    flex-wrap: nowrap !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

.admin-bilan-group {
    display: inline-flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 10px !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
}

.admin-bilan-label {
    font-size: 12.5px !important;
    font-weight: 700 !important;
    color: #475569 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.4px !important;
    display: inline-flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 6px !important;
    margin: 0 !important;
    white-space: nowrap !important;
    cursor: pointer !important;
    line-height: 1 !important;
    flex-shrink: 0 !important;
}

.admin-bilan-label svg {
    color: #64748b !important;
    flex-shrink: 0 !important;
}

.admin-bilan-select {
    height: 42px !important;
    border-radius: 10px !important;
    border: 1px solid #cbd5e1 !important;
    padding: 0 14px !important;
    font-size: 13.5px !important;
    font-weight: 600 !important;
    color: #0f172a !important;
    background: #ffffff !important;
    min-width: 280px !important;
    cursor: pointer !important;
    box-sizing: border-box !important;
    outline: none !important;
    transition: border-color 0.2s, box-shadow 0.2s !important;
    line-height: normal !important;
    flex-shrink: 0 !important;
}

.admin-bilan-select:focus {
    border-color: #3b82f6 !important;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15) !important;
}

.admin-bilan-divider {
    width: 1px !important;
    height: 28px !important;
    background: #e2e8f0 !important;
    flex-shrink: 0 !important;
    margin: 0 4px !important;
}

.admin-bilan-month-nav {
    display: inline-flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 4px !important;
    background: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 10px !important;
    padding: 0 6px !important;
    height: 42px !important;
    box-sizing: border-box !important;
    transition: border-color 0.2s, box-shadow 0.2s !important;
    flex-shrink: 0 !important;
}

.admin-bilan-month-nav:focus-within {
    border-color: #3b82f6 !important;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15) !important;
}

.admin-bilan-btn-nav {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 28px !important;
    height: 28px !important;
    border-radius: 6px !important;
    color: #64748b !important;
    background: transparent !important;
    border: none !important;
    text-decoration: none !important;
    transition: all 0.15s ease !important;
    flex-shrink: 0 !important;
    padding: 0 !important;
    cursor: pointer !important;
}

.admin-bilan-btn-nav:hover {
    background: #f1f5f9 !important;
    color: #0f172a !important;
}

.admin-bilan-month-input {
    border: none !important;
    font-size: 13.5px !important;
    font-weight: 600 !important;
    color: #0f172a !important;
    background: transparent !important;
    outline: none !important;
    padding: 0 6px !important;
    cursor: pointer !important;
    height: 100% !important;
    line-height: normal !important;
}

.admin-bilan-btn-currmonth {
    height: 42px !important;
    padding: 0 14px !important;
    font-size: 12.5px !important;
    display: inline-flex !important;
    align-items: center !important;
    white-space: nowrap !important;
    box-sizing: border-box !important;
    border-radius: 10px !important;
    flex-shrink: 0 !important;
}

.admin-bilan-submit {
    height: 42px !important;
    padding: 0 22px !important;
    font-size: 13.5px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    white-space: nowrap !important;
    box-sizing: border-box !important;
    border-radius: 10px !important;
    flex-shrink: 0 !important;
}

@media (max-width: 1024px) {
    .admin-bilan-form {
        flex-wrap: wrap !important;
    }
    .admin-bilan-divider {
        display: none !important;
    }
}

/* Table Quotidienne */
.bilan-table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    padding: 16px 20px;
    border-bottom: 1px solid #f1f5f9;
}

.bilan-legend {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 11.5px;
    color: #64748b;
}

.bilan-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.bilan-legend-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.bilan-legend-dot.dot-present { background: #10b981; }
.bilan-legend-dot.dot-absent { background: #ef4444; }
.bilan-legend-dot.dot-repos { background: #64748b; }
.bilan-legend-dot.dot-ferie { background: #f59e0b; }
.bilan-legend-dot.dot-weekend { background: #94a3b8; }

.bilan-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.bilan-table th {
    background: #f8fafc;
    color: #475569;
    font-size: 11.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 12px 16px;
    border-bottom: 1px solid #e2e8f0;
    text-align: left;
    white-space: nowrap;
}

.bilan-table td {
    padding: 11px 16px;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
    color: #334155;
}

.bilan-table tr:hover td {
    background: #f8fafc;
}

.bilan-row-weekend {
    background: #fbfcfe;
}

.bilan-row-weekend td {
    color: #64748b;
}

.bilan-row-repos {
    background: #f8fafc;
}

.bilan-row-repos td {
    color: #64748b;
}

.bilan-row-ferie {
    background: #fffdf5;
}

.bilan-row-today {
    box-shadow: inset 3px 0 0 #3b82f6;
    background: #f0f7ff;
}

.bilan-date-cell {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.bilan-day-name {
    font-weight: 700;
    color: #0f172a;
    font-size: 13px;
}

.bilan-date-sub {
    font-size: 11px;
    color: #94a3b8;
}

.bilan-row-today .bilan-day-name {
    color: #2563eb;
}

.bilan-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 9px;
    border-radius: 999px;
    font-size: 11.5px;
    font-weight: 600;
    white-space: nowrap;
}

.bilan-badge-present {
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.bilan-badge-absent {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.bilan-badge-repos {
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #cbd5e1;
}

.bilan-badge-ferie {
    background: #fffbeb;
    color: #92400e;
    border: 1px solid #fde68a;
}

.bilan-badge-weekend {
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #e2e8f0;
}

.bilan-planning-cell {
    display: inline-flex;
    flex-direction: column;
    gap: 2px;
}

.bilan-planning-times {
    font-size: 12px;
    font-weight: 600;
    color: #1e293b;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.bilan-planning-duration {
    font-size: 11px;
    color: #64748b;
}

.bilan-time-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 12.5px;
    font-weight: 600;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.bilan-time-chip.in {
    background: #ecfdf5;
    color: #047857;
    border: 1px solid #d1fae5;
}

.bilan-time-chip.out {
    background: #eff6ff;
    color: #1d4ed8;
    border: 1px solid #dbeafe;
}

.bilan-time-empty {
    color: #cbd5e1;
    font-weight: 500;
}

.bilan-amplitude-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 7px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    color: #334155;
}

.bilan-late-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
}

.bilan-late-pill.on-time {
    background: #f0fdf4;
    color: #15803d;
    border: 1px solid #bbf7d0;
}

.bilan-late-pill.is-late {
    background: #fff1f2;
    color: #be123c;
    border: 1px solid #fecdd3;
}

.bilan-selfie-thumb {
    width: 38px;
    height: 38px;
    border-radius: 8px;
    object-fit: cover;
    border: 1px solid #cbd5e1;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s;
}

.bilan-selfie-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 6px 14px rgba(0,0,0,0.18);
    z-index: 10;
    position: relative;
}

.bilan-table-footer {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    padding: 16px 20px;
    background: #f8fafc;
    border-top: 2px solid #e2e8f0;
    border-radius: 0 0 16px 16px;
}

.bilan-footer-stat {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.bilan-footer-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    color: #64748b;
    letter-spacing: 0.4px;
}

.bilan-footer-val {
    font-size: 14px;
    font-weight: 700;
    color: #0f172a;
}

/* Lightbox Modal Selfie */
.selfie-lightbox-modal {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(4px);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.selfie-lightbox-modal.is-visible {
    display: flex;
}

.selfie-lightbox-box {
    background: #ffffff;
    border-radius: 16px;
    max-width: 480px;
    width: 100%;
    overflow: hidden;
    box-shadow: 0 25px 60px rgba(0,0,0,0.3);
    animation: zoomModal 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes zoomModal {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

.selfie-lightbox-img {
    width: 100%;
    height: 380px;
    object-fit: cover;
    background: #0f172a;
}

.selfie-lightbox-info {
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #ffffff;
}

/* Printable layout */
.print-signatures-section {
    display: none;
}

@media print {
    @page {
        size: A4 portrait;
        margin: 10mm;
    }
    body {
        background: #ffffff !important;
        color: #000000 !important;
    }
    .sidebar,
    .top-bar,
    .admin-page-header .admin-header-actions,
    .admin-toolbar,
    .btn-bilan-lock,
    .btn-bilan-unlock,
    .bilan-status-card .bilan-lock-actions,
    .admin-modal-backdrop,
    .selfie-lightbox-modal {
        display: none !important;
    }
    .admin-content,
    .main-wrapper {
        margin: 0 !important;
        padding: 0 !important;
        width: 100% !important;
    }
    .bilan-banner-grid {
        grid-template-columns: 1.2fr 0.8fr !important;
        margin-bottom: 16px !important;
    }
    .bilan-agent-card,
    .bilan-status-card {
        box-shadow: none !important;
        border: 1px solid #cbd5e1 !important;
        padding: 12px !important;
    }
    .admin-kpi-grid {
        display: grid !important;
        grid-template-columns: repeat(4, 1fr) !important;
        gap: 8px !important;
        margin-bottom: 14px !important;
    }
    .admin-kpi-card {
        box-shadow: none !important;
        border: 1px solid #cbd5e1 !important;
        padding: 8px !important;
    }
    .bilan-table-header {
        padding: 10px !important;
    }
    .bilan-table th,
    .bilan-table td {
        padding: 6px 8px !important;
        font-size: 11px !important;
    }
    .bilan-selfie-thumb {
        display: none !important;
    }
    .print-signatures-section {
        display: grid !important;
        grid-template-columns: 1fr 1fr;
        gap: 40px;
        margin-top: 30px;
        page-break-inside: avoid;
    }
    .print-sig-box {
        border: 1px dashed #64748b;
        border-radius: 8px;
        padding: 16px;
        min-height: 110px;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
    }
    .print-sig-title {
        font-size: 12px;
        font-weight: 700;
        text-transform: uppercase;
        color: #334155;
    }
    .print-sig-hint {
        font-size: 10px;
        color: #94a3b8;
    }
}












