/* --- SHL Rent Car - Main Styles --- */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root, body.dark-mode {
    --primary: #facc15; /* SHL Yellow */
    --primary-dark: #eab308;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --purple: #8b5cf6;
    --info: #06b6d4;
    --bg-primary: #0f172a; /* Slate 900 */
    --bg-secondary: #1e293b; /* Slate 800 */
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --border-color: rgba(255, 255, 255, 0.05);
    --card-bg: rgba(30, 41, 59, 0.5); /* Glass effect */
    --sidebar-bg: #0f172a;
    --header-bg: rgba(15, 23, 42, 0.8);
    --shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
    --shadow-md: 0 10px 30px -3px rgba(0, 0, 0, 0.7);
    --radius-xl: 1rem;
    --radius-full: 9999px;
    --btn-secondary-bg: rgba(255, 255, 255, 0.05);
    --btn-secondary-text: #f8fafc;
    --btn-hover-brightness: 1.1;
    --bg-alpha-05: rgba(255, 255, 255, 0.05);
    --bg-alpha-08: rgba(255, 255, 255, 0.08);
    --bg-alpha-10: rgba(255, 255, 255, 0.1);
    --bg-alpha-15: rgba(255, 255, 255, 0.15);
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    transition: background-color 0.3s, color 0.3s;
    touch-action: manipulation;
}

/* --- Global Input/Select Dark Styles --- */
input, select, textarea {
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 8px;
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(250, 204, 21, 0.15);
}

/* --- Global Scrollbar --- */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.12); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: rgba(250, 204, 21, 0.3); }

.scroll-to-top {
    position: fixed;
    bottom: 70px;
    right: 20px;
    width: 45px;
    height: 45px;
    background: var(--primary);
    color: #0f172a;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(250, 204, 21, 0.3);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
    z-index: 999;
    border: none;
    font-size: 1.2rem;
}

.scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.scroll-to-top:hover {
    transform: scale(1.1);
    background: var(--primary-dark);
}

.datetime-footer {
    position: fixed;
    bottom: 10px;
    right: 10px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    padding: 0.3rem 0.8rem;
    font-size: 0.7rem;
    color: var(--text-secondary);
    z-index: 1000;
    box-shadow: var(--shadow);
    font-family: monospace;
}

.header {
    background: var(--header-bg);
    padding: 0.6rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.8rem;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    position: sticky;
    top: 0;
    z-index: 100;
    min-height: 60px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

@media (max-width: 600px) {
    .header-user-name { display: none !important; }
    .header-divider { display: none !important; }
    .header { padding: 0.5rem 1rem !important; }
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-area i {
    font-size: 1.6rem;
    color: var(--primary);
}

.logo-area h1 {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-primary);
}

.logo-area span {
    font-size: 0.65rem;
    background: var(--primary);
    color: #0f172a;
    font-weight: 900;
    padding: 0.2rem 0.5rem;
    border-radius: var(--radius-full);
    margin-left: 8px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: rgba(255,255,255,0.05);
    padding: 0.4rem 1rem;
    border-radius: var(--radius-full);
    border: 1px solid rgba(255,255,255,0.08);
    backdrop-filter: blur(10px);
}

.user-info button {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-secondary);
}

.theme-toggle-btn {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    padding: 0.4rem 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-primary);
    transition: all 0.2s;
}

.theme-toggle-btn:hover {
    background: var(--primary);
    color: white;
}

.sidebar-toggle {
    position: fixed;
    left: 20px;
    top: 80px;
    z-index: 1001;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    width: 40px;
    height: 40px;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
}

.sidebar-toggle:hover {
    background: var(--primary);
    color: white;
}

/* Mobile sidebar hidden state */
.sidebar.mobile-hidden {
    display: none !important;
}

.app-container {
    display: flex;
    min-height: calc(100vh - 73px);
}

.sidebar {
    width: 260px;
    background: rgba(15, 23, 42, 0.95);
    border-right: 1px solid rgba(255,255,255,0.05);
    padding: 1.5rem 1rem;
    flex-shrink: 0;
    transition: width 0.3s;
    position: sticky;
    top: 73px;
    height: calc(100vh - 73px);
    overflow-y: auto;
}

.sidebar.collapsed {
    width: 80px;
}

.sidebar.collapsed .nav-item span {
    display: none;
}

.sidebar.collapsed .nav-item {
    justify-content: center;
    padding: 0.8rem;
}

.nav-item {
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-secondary);
    font-weight: 500;
    cursor: pointer;
    border-radius: 12px;
    margin-bottom: 0.25rem;
    transition: all 0.2s;
    border: 1px solid transparent;
}

.nav-item:hover {
    background: rgba(250, 204, 21, 0.08);
    color: var(--primary);
    border-color: rgba(250, 204, 21, 0.15);
}

.nav-item i {
    width: 22px;
}

.nav-item.active {
    background: rgba(250, 204, 21, 0.12);
    color: var(--primary);
    border-color: rgba(250, 204, 21, 0.25);
    font-weight: 700;
}

.nav-item.nav-archives {
    color: #f59e0b;
}

.nav-item.nav-archives:hover {
    background: rgba(245, 158, 11, 0.1);
}

.nav-item.nav-archives.active {
    background: rgba(245, 158, 11, 0.2);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.main-content {
    flex: 1;
    padding: 1.5rem;
    overflow-y: auto;
    max-width: calc(100% - 260px);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

/* --- Command Center Ops Tiles --- */
.ops-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.2rem;
    margin-bottom: 2rem;
}

.ops-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 1.2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.ops-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary);
}

.ops-icon {
    width: 50px;
    height: 50px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    flex-shrink: 0;
}

.ops-info {
    display: flex;
    flex-direction: column;
}

.ops-info h4 {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin: 0;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ops-info .ops-value {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.2;
}

.ops-trend {
    position: absolute;
    bottom: 10px;
    right: 12px;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 6px;
}

.ops-todo-list {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.todo-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.8rem 0;
    border-bottom: 1px solid var(--border-color);
}

.todo-item:last-child {
    border-bottom: none;
}

.todo-label {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.9rem;
    font-weight: 500;
}

.todo-badge {
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
}

.stat-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 1rem;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--purple));
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary);
}

.stat-card h3 {
    font-size: 0.7rem;
    color: var(--text-secondary);
    margin-bottom: 0.3rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-number {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-primary);
}

.stat-icon {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 2rem;
    opacity: 0.15;
}

.lld-payments-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 0.5rem;
    margin-top: 1rem;
    max-height: 200px;
    overflow-y: auto;
    background: var(--bg-primary);
    padding: 10px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.lld-month-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s;
}

.lld-month-item:hover {
    border-color: var(--primary);
}

.lld-month-item input {
    margin: 0;
    scale: 1.1;
    cursor: pointer;
}

.lld-month-item.paid {
    border-color: var(--success);
    background: rgba(16, 185, 129, 0.08);
    color: var(--success);
    font-weight: 600;
}

.lld-month-item.unpaid {
    opacity: 0.7;
}

.dashboard-charts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.chart-container {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 1.5rem;
    position: relative;
    height: 300px;
    display: flex;
    flex-direction: column;
    backdrop-filter: blur(10px);
}

.chart-container h3 {
    font-size: 1rem;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.chart-container canvas {
    flex: 1;
    min-height: 0;
}

.notifications-group {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    margin-bottom: 1.5rem;
    overflow: hidden;
}

.notifications-header {
    padding: 1rem;
    background: linear-gradient(135deg, var(--primary), var(--purple));
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}

.notifications-header h3 {
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.notifications-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.notifications-content.open {
    max-height: 600px;
    overflow-y: auto;
}

.notification-category {
    border-bottom: 1px solid var(--border-color);
}

.notification-category:last-child {
    border-bottom: none;
}

.category-header {
    padding: 0.8rem 1rem;
    background: var(--bg-primary);
    font-weight: 600;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.category-list {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.category-list.open {
    max-height: 300px;
    overflow-y: auto;
}

.notification-item {
    padding: 0.8rem 1rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.notification-item:last-child {
    border-bottom: none;
}

.notification-critical {
    border-left: 3px solid var(--danger);
    background: rgba(239, 68, 68, 0.03);
}

.notification-warning {
    border-left: 3px solid var(--warning);
    background: rgba(245, 158, 11, 0.03);
}

.notification-info {
    border-left: 3px solid var(--info);
    background: rgba(6, 182, 212, 0.03);
}

.notification-payment {
    border-left: 3px solid var(--success);
    background: rgba(16, 185, 129, 0.03);
}

.notification-content {
    flex: 1;
}

.notification-title {
    font-weight: 600;
    font-size: 0.85rem;
}

.notification-details {
    font-size: 0.7rem;
    color: var(--text-secondary);
    margin-top: 0.2rem;
}

.notification-actions {
    display: flex;
    gap: 0.5rem;
}

.btn {
    padding: 0.7rem 1.4rem;
    border-radius: 14px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border: none;
    font-size: 0.9rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    color: white;
    text-decoration: none;
}

.btn:active {
    transform: scale(0.95);
    box-shadow: none;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    filter: brightness(1.1);
}

.btn-primary { background: var(--primary); color: #0f172a; text-shadow: none; font-weight: 800; }
.btn-secondary { background: var(--btn-secondary-bg); color: var(--btn-secondary-text); border: 1px solid var(--border-color); backdrop-filter: blur(4px); }
.btn-secondary:hover { background: var(--bg-alpha-10); border-color: var(--primary); }
.btn-success { background: linear-gradient(135deg, var(--success), #059669); }
.btn-warning { background: linear-gradient(135deg, var(--warning), #d97706); color: #0f172a; }
.btn-danger { background: linear-gradient(135deg, var(--danger), #dc2626); }
.btn-reserve { background: linear-gradient(135deg, var(--purple), #7c3aed); }
.btn-info { background: linear-gradient(135deg, var(--info), #0891b2); }
.btn-lg { padding: 1rem 2rem; font-size: 1.1rem; width: 100%; border-radius: 16px; text-transform: uppercase; letter-spacing: 1px; }
.btn-sm { padding: 0.4rem 0.8rem; font-size: 0.75rem; border-radius: 10px; }

.close-modal-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-secondary);
    transition: all 0.2s;
    z-index: 10;
}

.close-modal-btn:hover {
    background: var(--danger);
    color: white;
    border-color: var(--danger);
    transform: rotate(90deg);
}

.upload-area {
    border: 2px dashed var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    margin-bottom: 1rem;
    cursor: pointer;
    transition: all 0.2s;
    background: var(--bg-primary);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.upload-area:hover {
    border-color: var(--primary);
    background: rgba(37, 99, 235, 0.05);
}

.upload-area i {
    font-size: 2rem;
    color: var(--primary);
}

.upload-preview {
    max-width: 100%;
    max-height: 200px;
    border-radius: 12px;
    margin-top: 10px;
    box-shadow: var(--shadow);
}

.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--text-primary);
    color: var(--bg-primary);
    padding: 8px 16px;
    border-radius: var(--radius-full);
    z-index: 1100;
    animation: fadeOut 3s ease;
    font-size: 0.8rem;
}

.toast-error { background: var(--danger); color: white; }
.toast-success { background: var(--success); color: white; }
.toast-warning { background: var(--warning); color: white; }

@keyframes fadeOut {
    0% { opacity: 1; }
    70% { opacity: 1; }
    100% { opacity: 0; visibility: hidden; }
}

body.modal-open {
    overflow: hidden !important;
    padding-right: 0px; /* Optionnel: compenser la barre de défilement si nécessaire */
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(4px);
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

#devisModal, #vehicleHistoryModal, #clientModal { z-index: 2000; }
#documentUploadModal, #documentViewerModal { z-index: 20000; }

.modal-content {
    background: var(--card-bg);
    border-radius: 1.5rem;
    width: 90%;
    max-width: 600px;
    max-height: 85vh;
    overflow-y: auto;
    padding: 2rem;
    border: 1px solid var(--border-color);
    position: relative;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 10px 10px -5px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.modal-content input,
.modal-content select,
.modal-content textarea {
    width: 100%;
    padding: 0.6rem;
    margin-bottom: 1rem;
    background: rgba(0,0,0,0.2);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    font-family: inherit;
    color: var(--text-primary);
}
.modal-content input:focus,
.modal-content select:focus,
.modal-content textarea:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 2px rgba(250, 204, 21, 0.2);
}

.modal-buttons {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 1rem;
}

.table-wrapper {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    overflow-x: auto;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.75rem;
}

th, td {
    padding: 0.6rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

th {
    background: rgba(0,0,0,0.2);
    font-weight: 600;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.vehicles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1rem;
}

.vehicle-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    overflow: hidden;
    transition: all 0.2s;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.vehicle-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary);
}

.vehicle-photo {
    height: 130px;
    background-size: cover;
    background-position: center;
    position: relative;
    background-color: var(--bg-primary);
}

.vehicle-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    padding: 0.15rem 0.5rem;
    border-radius: 30px;
    font-size: 0.6rem;
    font-weight: 600;
    color: white;
}

.vehicle-info {
    padding: 0.6rem;
}

.vehicle-title {
    font-weight: 700;
    font-size: 0.8rem;
}

.vehicle-plate {
    font-size: 0.65rem;
    color: var(--text-secondary);
    margin-bottom: 0.3rem;
}

.vehicle-details {
    margin: 0.3rem 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
}

.vehicle-details span {
    background: var(--bg-primary);
    padding: 0.15rem 0.4rem;
    border-radius: 20px;
    font-size: 0.65rem;
}

.vehicle-actions {
    display: flex;
    gap: 0.3rem;
    margin-top: 0.5rem;
}

.filters-bar {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    padding: 0.8rem;
    margin-bottom: 1rem;
}

.filters-bar select {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    padding: 0.3rem;
    margin-left: 0.5rem;
    color: var(--text-primary);
}

.search-bar {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 0.8rem 1rem;
    margin-bottom: 1rem;
}

.search-input-wrapper {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    padding: 0.85rem 1.25rem;
}

.search-input-wrapper i {
    font-size: 1.1rem;
    color: var(--text-secondary);
}

.search-input-wrapper input {
    flex: 1;
    border: none;
    background: none;
    outline: none;
    color: var(--text-primary);
    font-size: 1.05rem;
}

.calendar-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.view-selector {
    display: flex;
    gap: 0.5rem;
    background: var(--bg-primary);
    padding: 0.3rem;
    border-radius: 30px;
    border: 1px solid var(--border-color);
}

.view-selector button {
    padding: 0.4rem 1rem;
    border-radius: 30px;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.2s;
}

.view-selector button.active {
    background: var(--primary);
    color: white;
}

.payment-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
}

.payment-summary {
    background: var(--bg-primary);
    padding: 0.5rem;
    border-radius: 8px;
    margin-top: 0.5rem;
    font-size: 0.75rem;
}

.documents-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1rem;
    margin-top: 1rem;
}

.document-slot {
    background: var(--bg-primary);
    border: 2px dashed var(--border-color);
    border-radius: 12px;
    padding: 1rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    min-height: 100px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.document-slot:hover {
    border-color: var(--primary);
    background: rgba(37, 99, 235, 0.05);
}

.document-slot.filled {
    border-style: solid;
    border-color: var(--success);
    background: rgba(16, 185, 129, 0.05);
}

.document-slot i {
    font-size: 1.1rem;
    margin-bottom: 0.3rem;
}

.document-slot .slot-label {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.document-slot .slot-status {
    font-size: 0.6rem;
    margin-top: 0.2rem;
}

.document-slot .slot-actions {
    display: flex;
    gap: 0.3rem;
    margin-top: 0.3rem;
}

.devis-container {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 1.5rem;
    margin-top: 1rem;
}

.devis-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.devis-header h2 {
    color: var(--primary);
}

.devis-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.devis-total {
    text-align: right;
    font-size: 1.2rem;
    font-weight: 700;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 2px solid var(--border-color);
}

.conflict-warning {
    background: var(--danger);
    color: white;
    padding: 0.5rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.conflict-warning i {
    font-size: 1rem;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .app-container {
        flex-direction: column;
    }

    .sidebar {
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        height: 85px;
        display: flex;
        flex-direction: row;
        overflow-x: auto;
        overflow-y: hidden;
        padding: 0 10px 15px 10px;
        background: rgba(15, 23, 42, 0.85);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.4);
        z-index: 9999;
        scroll-behavior: smooth;
        -webkit-overflow-scrolling: touch;
    }

    .sidebar::-webkit-scrollbar {
        display: none;
    }

    .sidebar.collapsed {
        width: 100%;
    }

    .sidebar.collapsed .nav-item span {
        display: block;
    }

    .nav-item {
        flex: 0 0 auto;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 6px;
        padding: 0.4rem 0.8rem;
        min-width: 70px;
        border-radius: 16px;
        background: transparent;
        transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
        margin: 8px 3px 0 3px;
    }

    .nav-item i {
        width: auto;
        font-size: 1.3rem;
        margin: 0;
        color: var(--text-secondary);
        transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    }

    .nav-item span {
        font-size: 0.65rem;
        font-weight: 700;
        opacity: 0.6;
        margin: 0;
        white-space: nowrap;
        color: var(--text-secondary);
        transition: all 0.4s ease;
    }

    .nav-item:active {
        transform: scale(0.85);
        opacity: 0.8;
    }

    .nav-item.active {
        background: rgba(255, 255, 255, 0.05);
    }

    .nav-item.active i {
        transform: translateY(-4px) scale(1.15);
        color: var(--primary);
        filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.5));
    }

    .nav-item.active span {
        opacity: 1;
        color: var(--primary);
        transform: translateY(-2px);
    }

    .main-content {
        max-width: 100%;
        padding: 1rem;
        padding-bottom: 100px;
    }

    .sidebar-toggle {
        display: none !important;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

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

    .datetime-footer {
        font-size: 0.6rem;
        bottom: 5px;
        right: 5px;
    }

    .calendar-controls {
        flex-direction: column;
    }

    .payment-fields {
        grid-template-columns: 1fr;
    }

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

    .devis-details {
        grid-template-columns: 1fr;
    }

    .modal-buttons {
        flex-direction: column;
        gap: 0.5rem;
    }

    .modal-buttons .btn {
        width: 100%;
        justify-content: center;
    }

    .modal-content {
        padding: 1.5rem;
        width: 95%;
        max-height: 90vh;
    }
    
    /* Mobile Navigation Improvements */
    .sidebar {
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
    }
    
    .sidebar::-webkit-scrollbar {
        height: 4px;
    }
    
    .sidebar::-webkit-scrollbar-thumb {
        background: var(--border-color);
        border-radius: 2px;
    }
    
    .nav-item {
        min-width: 70px;
        font-size: 0.75rem;
    }
    
    .nav-item i {
        font-size: 1.2rem;
    }
    
    /* Mobile-friendly tables */
    .data-table {
        font-size: 0.75rem;
    }
    
    .data-table th,
    .data-table td {
        padding: 0.5rem 0.25rem;
    }
    
    /* Better touch targets on mobile */
    .btn {
        min-height: 44px;
        padding: 0.75rem 1rem;
    }
    
    .vehicle-card {
        padding: 1rem;
    }
    
    /* Mobile modal improvements */
    .modal {
        padding: 0.5rem;
    }
    
    .modal-content {
        width: 98%;
        margin: 0.5rem auto;
        border-radius: 12px;
    }
    
    /* Fix for horizontal scroll on tables */
    .table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    /* Mobile header improvements */
    .main-header {
        padding: 0.75rem;
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .header-actions {
        width: 100%;
        justify-content: space-between;
    }
}

/* Extra small devices */
@media (max-width: 480px) {
    .nav-item {
        min-width: 60px;
        padding: 0.4rem;
        font-size: 0.65rem;
    }
    
    .nav-item i {
        font-size: 1rem;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }
    
    .stat-card {
        padding: 0.75rem;
    }
    
    .stat-number {
        font-size: 1.5rem;
    }
    
    .stat-card h3 {
        font-size: 0.7rem;
    }
}

/* Table wrapper for horizontal scroll */
.table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}

.table-wrapper::-webkit-scrollbar {
    height: 6px;
    width: 6px;
}

.table-wrapper::-webkit-scrollbar-track {
    background: var(--bg-secondary);
    border-radius: 3px;
}

.table-wrapper::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

/* Sticky header for tables */
.table-container {
    position: relative;
}

.table-container thead th {
    position: sticky;
    top: 0;
    z-index: 10;
    background: #0f172a;
}

/* iOS Install Prompt */
.ios-install-prompt-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.ios-install-prompt-overlay.visible {
    opacity: 1;
    visibility: visible;
}

.ios-install-prompt {
    position: fixed;
    bottom: -120%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--card-bg);
    width: 95%;
    max-width: 400px;
    padding: 1.5rem;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    z-index: 9999;
    transition: bottom 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    flex-direction: column;
    gap: 1rem;
    border: 1px solid var(--border-color);
    text-align: center;
}

.ios-install-prompt.visible {
    bottom: 20px;
}

.ios-install-prompt img {
    width: 60px;
    height: 60px;
    margin: 0 auto;
    border-radius: 12px;
}

/* Login Premium Glassmorphism */
@keyframes blob-bounce {
    0% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(20px, -20px) scale(1.1); }
    100% { transform: translate(0, 0) scale(1); }
}

.login-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #0f172a;
    overflow: hidden;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-blob-1 {
    position: absolute;
    width: 45vw;
    height: 45vw;
    max-width: 600px;
    max-height: 600px;
    background: rgba(250, 204, 21, 0.15);
    border-radius: 50%;
    top: -10%;
    left: -10%;
    filter: blur(80px);
    animation: blob-bounce 10s infinite alternate;
}

.login-blob-2 {
    position: absolute;
    width: 35vw;
    height: 35vw;
    max-width: 500px;
    max-height: 500px;
    background: rgba(139, 92, 246, 0.2);
    border-radius: 50%;
    bottom: -10%;
    right: -10%;
    filter: blur(80px);
    animation: blob-bounce 12s infinite alternate-reverse;
}

.login-card {
    background: rgba(30, 41, 59, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 3.5rem 2.5rem;
    border-radius: 28px;
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.5);
    width: 90%;
    max-width: 420px;
    text-align: center;
    z-index: 10001;
}

.login-input-wrapper {
    position: relative;
    margin-bottom: 1.5rem;
    text-align: left;
}

.login-input-wrapper i {
    position: absolute;
    left: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
    color: #64748b;
    font-size: 1.2rem;
    transition: color 0.3s;
    z-index: 2;
}

.login-input-wrapper input {
    width: 100%;
    padding: 1.2rem 1.2rem 1.2rem 3.5rem;
    background: rgba(255,255,255,0.08);
    border: 2px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    color: #f8fafc;
    font-size: 1.05rem;
    outline: none;
    transition: all 0.3s;
    position: relative;
    z-index: 1;
}

.login-input-wrapper input::placeholder {
    color: #64748b;
    font-weight: 500;
}

.login-input-wrapper input:focus {
    border-color: #facc15;
    background: rgba(255,255,255,0.12);
    box-shadow: 0 0 0 4px rgba(250, 204, 21, 0.15);
}

.login-input-wrapper input:focus + i,
.login-input-wrapper input:not(:placeholder-shown) + i {
    color: #3b82f6;
}

.login-btn {
    width: 100%;
    padding: 1.2rem;
    background: #facc15;
    color: #0f172a;
    border: none;
    border-radius: 16px;
    font-size: 1.1rem;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 10px 25px -5px rgba(250, 204, 21, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.login-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px -5px rgba(250, 204, 21, 0.5);
}

.login-btn:active {
    transform: translateY(0);
}

/* FullCalendar Custom Theme */
.fc {
    font-family: 'Inter', sans-serif;
    --fc-border-color: var(--border-color);
    --fc-page-bg-color: var(--card-bg);
    --fc-neutral-bg-color: var(--bg-primary);
}

.fc-theme-standard .fc-scrollgrid {
    border: none !important;
}

.fc-theme-standard td,
.fc-theme-standard th {
    border-color: var(--border-color);
}

.fc-col-header-cell {
    padding: 0.8rem 0 !important;
    background: var(--bg-primary);
    border-bottom: 2px solid var(--border-color) !important;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
}

.fc-daygrid-day {
    transition: background 0.2s;
}

.fc-daygrid-day:hover {
    background: rgba(37, 99, 235, 0.03);
}

.fc-daygrid-day.fc-day-today {
    background: rgba(37, 99, 235, 0.08) !important;
    font-weight: bold;
}

.fc-event {
    border: none !important;
    border-radius: 8px !important;
    padding: 4px 6px !important;
    margin: 2px !important;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.fc-event:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2) !important;
    z-index: 5 !important;
    filter: brightness(1.1);
}

.fc-h-event {
    background: transparent;
}

.calendar-event-modern {
    display: flex;
    flex-direction: column;
    gap: 2px;
    color: white;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
    font-family: 'Inter', sans-serif;
}

.calendar-event-modern .event-title {
    font-weight: 700;
    font-size: 0.75rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: flex;
    align-items: center;
    gap: 5px;
}

.calendar-event-modern .event-client {
    font-size: 0.65rem;
    opacity: 0.95;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.fc-toolbar-title {
    font-size: 1.4rem !important;
    font-weight: 700 !important;
    color: var(--text-primary);
}

.fc-button-primary {
    background: var(--bg-primary) !important;
    color: var(--text-primary) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 8px !important;
    box-shadow: none !important;
    text-transform: capitalize !important;
    padding: 0.5rem 1rem !important;
    transition: all 0.2s !important;
    outline: none !important;
    font-weight: 500 !important;
}

.fc-button-primary:hover {
    background: var(--border-color) !important;
}

.fc-button-active {
    background: var(--primary) !important;
    color: #0f172a !important;
    border-color: var(--primary) !important;
    font-weight: 800 !important;
}

.fc-list-event-title,
.fc-list-event-time {
    color: var(--text-primary);
}

.fc-list-day-cushion {
    background: var(--bg-primary) !important;
    color: var(--text-primary) !important;
    font-weight: bold;
}

/* Force uppercase for inputs */
input:not([type="password"]),
textarea {
    text-transform: uppercase;
}

#loginOverlay input {
    text-transform: none !important;
}

/* Vehicle Dropdown */
.vehicle-dropdown {
    max-height: 220px;
    overflow-y: auto;
}

.vehicle-dropdown-item {
    padding: 0.6rem 1rem;
    cursor: pointer;
    border-bottom: 1px solid var(--border-color);
    transition: background 0.2s;
}

.vehicle-dropdown-item:hover {
    background: var(--bg-primary);
}

.vehicle-dropdown-item:last-child {
    border-bottom: none;
}

/* --- Settings Page Improvements --- */
.settings-header {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.settings-header h2 {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.settings-header p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-top: 0.25rem;
}

.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.settings-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 1.25rem;
    padding: 1.5rem;
    display: flex;
    gap: 1.25rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.settings-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 20px -5px rgba(250, 204, 21, 0.1);
    border-color: var(--primary);
}

.card-icon {
    width: 48px;
    height: 48px;
    background: rgba(250, 204, 21, 0.1);
    color: var(--primary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    flex-shrink: 0;
}

.card-body {
    flex: 1;
}

.card-body h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.4rem;
}

.card-body p {
    font-size: 0.82rem;
    color: var(--text-secondary);
    line-height: 1.4;
    margin-bottom: 1.25rem;
}

.setting-item {
    margin-top: 1rem;
}

.setting-item label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.theme-switch-group {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    background: var(--bg-primary);
    padding: 4px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    margin-top: 0.5rem;
}

.theme-btn {
    background: transparent;
    border: none;
    padding: 0.5rem;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.theme-btn.active {
    background: var(--card-bg);
    color: var(--primary);
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.app-icon-preview {
    width: 64px;
    height: 64px;
    background: var(--bg-primary);
    border-radius: 14px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-color);
}

.app-icon-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mini-list {
    margin-top: 0.75rem;
    font-size: 0.78rem;
    color: var(--text-secondary);
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.mini-list div {
    background: var(--bg-primary);
    padding: 3px 8px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
}

.system-info {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.info-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    padding: 4px 0;
    border-bottom: 1px dashed var(--border-color);
}

.info-row span { color: var(--text-secondary); }
.info-row strong { color: var(--primary); }

/* Permissions Panel */
.permissions-panel {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 1.5rem;
    padding: 2rem;
    margin-top: 1rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.permissions-panel .panel-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 2rem;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.permissions-panel h3 {
    font-size: 1.4rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--primary);
}

.permissions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.perm-group {
    background: var(--bg-primary);
    padding: 1.25rem;
    border-radius: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.group-title {
    font-size: 0.75rem;
    text-transform: uppercase;
    font-weight: 800;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
    display: block;
}

.perm-item {
    display: flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
}

.perm-item input {
    display: none;
}

.perm-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 1rem;
    border-radius: 10px;
    width: 100%;
    transition: all 0.2s;
    font-size: 0.88rem;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
}

.perm-item input:checked + .perm-content {
    background: rgba(250, 204, 21, 0.08);
    border-color: var(--primary);
    color: var(--primary);
    font-weight: 600;
}

.perm-content i {
    width: 18px;
    text-align: center;
    opacity: 0.7;
}

.btn-block {
    width: 100%;
}

/* --- Signature History Timeline --- */
.timeline-item { position: relative; padding-left: 2rem; margin-bottom: 1.5rem; }
.timeline-item::before { content: ''; position: absolute; left: 0; top: 0; bottom: -1.5rem; width: 2px; background: var(--border-color); }
.timeline-item:last-child::before { display: none; }
.timeline-item::after { content: ''; position: absolute; left: -4px; top: 4px; width: 10px; height: 10px; border-radius: 50%; background: var(--primary); border: 2px solid #0f172a; box-shadow: 0 0 0 4px rgba(250, 204, 21, 0.15); }
.timeline-date { font-size: 0.75rem; color: var(--text-secondary); font-weight: 700; display: block; margin-bottom: 4px; }
.timeline-content { background: rgba(30, 41, 59, 0.7); padding: 0.8rem; border-radius: 12px; font-size: 0.85rem; border: 1px solid rgba(255,255,255,0.06); box-shadow: var(--shadow); backdrop-filter: blur(8px); }
.timeline-user { font-weight: 700; color: var(--primary); }
 .timeline-content div:last-child { color: var(--text-secondary); margin-top: 4px; font-style: italic; }

/* --- New UI Utilities --- */
.btn-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.9rem;
    color: white;
}

.btn-icon:hover {
    transform: scale(1.1);
    filter: brightness(1.1);
}

.btn-icon.btn-primary { background: var(--primary); }
.btn-icon.btn-danger { background: var(--danger); }
.btn-icon.btn-success { background: var(--success); }
.btn-icon.btn-warning { background: var(--warning); }
.btn-icon.btn-info { background: var(--info); }

.badge {
    padding: 0.4rem 0.8rem;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    display: inline-block;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.badge-info { background: rgba(6, 182, 212, 0.1); color: var(--info); border: 1px solid rgba(6, 182, 212, 0.2); }
.badge-success { background: rgba(16, 185, 129, 0.1); color: var(--success); border: 1px solid rgba(16, 185, 129, 0.2); }
.badge-warning { background: rgba(245, 158, 11, 0.1); color: var(--warning); border: 1px solid rgba(245, 158, 11, 0.2); }
.badge-danger { background: rgba(239, 68, 68, 0.1); color: var(--danger); border: 1px solid rgba(239, 68, 68, 0.2); }

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.section-header h2 {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 0;
}

.section-header p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-top: 0.25rem;
}

/* Modal Content Animations */
@keyframes modalSlideUp {
    from { transform: translateY(30px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.modal-content {
    animation: modalSlideUp 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Custom Input Focus Effects */
.login-input-wrapper input:focus {
    border-color: var(--primary);
    background: rgba(255,255,255,0.1) !important;
    box-shadow: 0 0 0 4px rgba(250, 204, 21, 0.15);
}

.login-input-wrapper input:focus + i {
    color: var(--primary) !important;
}

/* Nice Table Row Hovers */
table tbody tr {
    transition: background 0.2s;
}

table tbody tr:hover {
    background: rgba(250, 204, 21, 0.04);
}
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

@media print {
    .no-print { display: none !important; }
}

/* --- Animations --- */
@keyframes pulse-red {
    0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(239, 68, 68, 0); }
    100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

.pulse-red {
    animation: pulse-red 2s infinite;
}



/* Restauration de l'ancien menu mobile en supprimant le bloc max-width: 900px */

/* Modal background blocking */
body.modal-open {
    overflow: hidden !important;
    height: 100vh;
    touch-action: none;
    position: fixed;
    width: 100%;
}
