:root {
    --primary-blue: #2563eb;
    --primary-blue-dark: #1d4ed8;
    --primary-blue-soft: #eff6ff;
    --accent-orange: #f97316;
    --surface: #ffffff;
    --light-bg: #f4f7fb;
    --dark-text: #1f2937;
    --muted-text: #6b7280;
    --border-soft: #e5e7eb;
    --shadow-soft: 0 14px 36px rgba(15, 23, 42, 0.08);
    --radius-xl: 1.25rem;
}

* {
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
}

body {
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: radial-gradient(circle at top left, #e0f2fe 0, #f4f7fb 34%, #f8fafc 100%);
    color: var(--dark-text);
    min-height: 100vh;
    font-size: 0.94rem;
}

.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #eff6ff 0%, #e0f2fe 52%, #ffffff 100%);
    padding: 1.5rem;
}

.login-card {
    width: 100%;
    max-width: 430px;
    border-radius: 1.5rem;
    box-shadow: var(--shadow-soft);
    background: rgba(255, 255, 255, 0.96);
    padding: 2.2rem;
    border: 1px solid rgba(37, 99, 235, 0.12);
}

.login-logo {
    text-align: center;
    margin-bottom: 1.5rem;
}

.login-logo h1 {
    color: var(--primary-blue-dark);
    font-weight: 800;
    font-size: 2rem;
    margin: 0;
}

[dir="rtl"] {
    text-align: right;
}

[dir="rtl"] .ms-auto {
    margin-right: auto !important;
    margin-left: 0 !important;
}

.sidebar {
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    color: var(--dark-text);
    border-right: 1px solid rgba(148, 163, 184, 0.22);
    box-shadow: 12px 0 30px rgba(15, 23, 42, 0.04);
    width: 252px;
}

[dir="rtl"] .sidebar {
    border-right: 0;
    border-left: 1px solid rgba(148, 163, 184, 0.22);
    box-shadow: -12px 0 30px rgba(15, 23, 42, 0.04);
}

.sidebar hr {
    border-color: rgba(148, 163, 184, 0.25);
}

.sidebar a.text-white,
.sidebar .text-white {
    color: var(--dark-text) !important;
}

.sidebar .dropdown-toggle strong {
    color: var(--dark-text);
}

.sidebar .fa-user-circle {
    color: var(--primary-blue);
}

.offcanvas.bg-primary,
.navbar.bg-primary {
    background: linear-gradient(135deg, var(--primary-blue) 0%, #38bdf8 100%) !important;
}

.nav-link {
    color: #4b5563;
    padding: 0.72rem 0.95rem;
    transition: all 0.2s ease;
    border-radius: 0.9rem;
    margin-bottom: 0.2rem;
    font-weight: 650;
    font-size: 0.92rem;
}

.sidebar-brand-logo {
    width: 92px !important;
    height: 92px !important;
}

.sidebar-brand-title {
    font-size: 1rem !important;
    line-height: 1.35;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-blue-dark) !important;
    background: var(--primary-blue-soft) !important;
    transform: translateX(3px);
}

[dir="rtl"] .nav-link:hover,
[dir="rtl"] .nav-link.active {
    transform: translateX(-3px);
}

.nav-link i {
    width: 25px;
    text-align: center;
    color: var(--primary-blue);
}

.navbar-light.bg-white {
    background: rgba(255, 255, 255, 0.9) !important;
    backdrop-filter: blur(18px);
}

.topbar-title {
    color: #0f172a;
    font-size: 1rem;
    letter-spacing: -0.01em;
}

.dashboard-hero {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
    background: linear-gradient(135deg, #ffffff 0%, #eff6ff 100%);
    border: 1px solid rgba(37, 99, 235, 0.12);
    border-radius: 1.5rem;
    padding: 1.25rem 1.35rem;
    box-shadow: var(--shadow-soft);
}

.hero-kicker,
.panel-eyebrow {
    color: var(--primary-blue);
    font-size: 0.76rem;
    text-transform: uppercase;
    font-weight: 800;
    letter-spacing: 0.06em;
    margin-bottom: 0.35rem;
}

.hero-title {
    color: #0f172a;
    font-weight: 800;
}

.hero-subtitle {
    color: var(--muted-text);
}

.hero-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.agency-filter {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    background: #ffffff;
    border: 1px solid var(--border-soft);
    border-radius: 999px;
    padding: 0.45rem 0.65rem;
    min-width: 260px;
}

.agency-filter .form-select {
    border: 0;
    box-shadow: none;
    background-color: transparent;
}

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

.quick-action-card {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    background: var(--surface);
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 1.2rem;
    padding: 0.95rem 1rem;
    color: var(--dark-text);
    text-decoration: none;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.04);
    transition: all 0.2s ease;
}

.quick-action-card:hover {
    color: var(--dark-text);
    transform: translateY(-3px);
    box-shadow: var(--shadow-soft);
    border-color: rgba(37, 99, 235, 0.25);
}

.quick-action-card strong,
.quick-action-card small {
    display: block;
}

.quick-action-card small {
    color: var(--muted-text);
    margin-top: 0.2rem;
}

.quick-action-icon,
.metric-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border-radius: 1rem;
    flex: 0 0 46px;
    font-size: 1.15rem;
}

.icon-blue {
    background: #dbeafe;
    color: #2563eb;
}

.icon-green {
    background: #dcfce7;
    color: #16a34a;
}

.icon-orange {
    background: #ffedd5;
    color: #ea580c;
}

.icon-purple {
    background: #ede9fe;
    color: #7c3aed;
}

.metric-card {
    min-height: 130px;
    border: 1px solid rgba(148, 163, 184, 0.15);
    border-radius: var(--radius-xl);
    padding: 1.15rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    box-shadow: var(--shadow-soft);
    background: #ffffff;
    position: relative;
    overflow: hidden;
}

.metric-card::after {
    content: "";
    position: absolute;
    width: 130px;
    height: 130px;
    right: -58px;
    bottom: -66px;
    border-radius: 999px;
    opacity: 0.3;
}

[dir="rtl"] .metric-card::after {
    right: auto;
    left: -58px;
}

.metric-content {
    position: relative;
    z-index: 1;
}

.metric-label {
    display: block;
    color: var(--muted-text);
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.35rem;
}

.metric-content strong {
    display: block;
    font-size: 1.72rem;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.15;
}

.metric-content small {
    display: block;
    color: var(--muted-text);
    margin-top: 0.35rem;
}

.metric-blue .metric-icon,
.metric-blue::after {
    background: #dbeafe;
    color: #2563eb;
}

.metric-red .metric-icon,
.metric-red::after {
    background: #fee2e2;
    color: #ef4444;
}

.metric-amber .metric-icon,
.metric-amber::after {
    background: #fef3c7;
    color: #f59e0b;
}

.metric-green .metric-icon,
.metric-green::after {
    background: #dcfce7;
    color: #16a34a;
}

.panel-card {
    background: rgba(255, 255, 255, 0.97);
    border: 1px solid rgba(148, 163, 184, 0.17);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-soft);
    overflow: hidden;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 1.05rem 1.15rem 0.7rem;
}

.panel-header h6 {
    margin: 0;
    font-weight: 800;
    color: #0f172a;
}

.panel-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 30px;
    padding: 0 0.75rem;
    border-radius: 999px;
    background: #f1f5f9;
    color: #334155;
    font-weight: 800;
    font-size: 0.78rem;
}

.panel-badge-blue {
    background: #dbeafe;
    color: #1d4ed8;
}

.panel-badge-amber {
    background: #fef3c7;
    color: #b45309;
}

.chart-box {
    height: 240px;
    padding: 0 1rem 0.5rem;
}

.fleet-summary {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.55rem;
    padding: 0 1.15rem 1.15rem;
    color: var(--muted-text);
    font-size: 0.8rem;
}

.clean-table tbody tr.empty-row {
    background: transparent;
    box-shadow: none;
}

.clean-table tbody tr.empty-row td {
    background: #f8fafc;
    border-radius: 1rem !important;
}

.clean-table-wrap {
    padding: 0 1.15rem 1.15rem;
    background: transparent;
    border-radius: 0;
}

.clean-table {
    border-collapse: separate;
    border-spacing: 0 0.55rem;
}

.clean-table thead th {
    border: 0;
    color: #64748b;
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: transparent;
    padding: 0.2rem 0.75rem;
}

.clean-table tbody tr {
    background: #f8fafc;
    box-shadow: inset 0 0 0 1px rgba(226, 232, 240, 0.9);
}

.clean-table tbody td {
    border: 0;
    padding: 0.78rem 0.75rem;
}

.clean-table tbody td:first-child {
    border-radius: 0.9rem 0 0 0.9rem;
}

.clean-table tbody td:last-child {
    border-radius: 0 0.9rem 0.9rem 0;
}

[dir="rtl"] .clean-table tbody td:first-child {
    border-radius: 0 0.9rem 0.9rem 0;
}

[dir="rtl"] .clean-table tbody td:last-child {
    border-radius: 0.9rem 0 0 0.9rem;
}

.empty-state {
    color: var(--muted-text);
    text-align: center;
    padding: 2rem 1rem !important;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.32rem 0.7rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 800;
}

.status-en_cours,
.status-louee,
.badge-louee {
    background: #fee2e2;
    color: #b91c1c;
}

.status-terminee,
.status-disponible,
.badge-disponible {
    background: #dcfce7;
    color: #15803d;
}

.status-annulee {
    background: #f1f5f9;
    color: #475569;
}

.status-en_retard {
    background: #ffedd5;
    color: #c2410c;
}

.status-reserve,
.badge-reserve {
    background: #dbeafe;
    color: #1d4ed8;
}

.status-maintenance,
.badge-maintenance {
    background: #fef3c7;
    color: #b45309;
}

.contract-link {
    color: var(--primary-blue-dark);
    font-weight: 800;
    text-decoration: none;
}

.contract-link:hover {
    text-decoration: underline;
}

.maintenance-list {
    padding: 0 1.15rem 1.15rem;
}

.maintenance-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.85rem;
    padding: 0.85rem 0.9rem;
    background: #f8fafc;
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 1rem;
    margin-bottom: 0.65rem;
}

.maintenance-item strong,
.maintenance-item small {
    display: block;
}

.maintenance-item small {
    color: var(--muted-text);
    margin-top: 0.2rem;
}

.maintenance-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    justify-content: flex-end;
    max-width: 58%;
}

.maintenance-tags span {
    display: inline-flex;
    align-items: center;
    gap: 0.32rem;
    background: #fff7ed;
    color: #c2410c;
    border: 1px solid #fed7aa;
    border-radius: 999px;
    padding: 0.25rem 0.55rem;
    font-size: 0.72rem;
    font-weight: 700;
}

.panel-footer {
    padding: 0 1.15rem 1.15rem;
}

.kpi-card {
    border: none;
    border-radius: 1rem;
    transition: transform 0.3s;
}

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

.table-responsive {
    background: white;
    border-radius: 0.85rem;
}

.badge-disponible,
.badge-louee,
.badge-maintenance,
.badge-reserve {
    border-radius: 999px;
    padding: 0.35rem 0.7rem;
    font-weight: 700;
}

.bg-primary,
.btn-primary {
    background-color: var(--primary-blue) !important;
    border-color: var(--primary-blue) !important;
}

.btn-primary:hover {
    background-color: var(--primary-blue-dark) !important;
    border-color: var(--primary-blue-dark) !important;
}

.btn-outline-primary {
    color: var(--primary-blue);
    border-color: rgba(37, 99, 235, 0.35);
}

.btn-outline-primary:hover {
    background-color: var(--primary-blue);
    border-color: var(--primary-blue);
}


@media (max-width: 1399.98px) {
    .sidebar {
        width: 230px;
    }

    .quick-action-card small {
        font-size: 0.78rem;
    }

    .maintenance-item {
        flex-direction: column;
    }

    .maintenance-tags {
        max-width: 100%;
        justify-content: flex-start;
    }
}

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

@media (max-width: 767.98px) {
    .card-body {
        padding: 1.25rem !important;
    }

    h4 {
        font-size: 1.25rem;
    }

    .btn-group-responsive {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
    }

    .btn-group-responsive .btn {
        width: 100%;
    }

    .dashboard-hero {
        flex-direction: column;
        align-items: stretch;
    }

    .hero-actions {
        justify-content: stretch;
    }

    .hero-actions .btn,
    .agency-filter {
        width: 100%;
    }

    .quick-actions-grid,
    .fleet-summary {
        grid-template-columns: 1fr;
    }

    .maintenance-item {
        flex-direction: column;
    }

    .maintenance-tags {
        justify-content: flex-start;
    }
}

.empty-return-card {
    margin: 0 1.15rem 1.15rem;
    min-height: 210px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 0.55rem;
    background: linear-gradient(135deg, #f8fafc 0%, #eef6ff 100%);
    border: 1px dashed rgba(37, 99, 235, 0.22);
    border-radius: 1.15rem;
    color: var(--muted-text);
}

.empty-return-card span {
    width: 48px;
    height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 1rem;
    background: #dbeafe;
    color: #2563eb;
    font-size: 1.25rem;
}

.empty-return-card strong {
    color: #0f172a;
    font-size: 0.95rem;
}

.empty-return-card small {
    max-width: 430px;
}

.status-today {
    background: #fef3c7;
    color: #b45309;
}

.status-prochain {
    background: #dbeafe;
    color: #1d4ed8;
}

.clickable-row {
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

.clickable-row:hover {
    transform: translateY(-1px);
    box-shadow: inset 0 0 0 1px rgba(37, 99, 235, 0.2), 0 10px 24px rgba(15, 23, 42, 0.06);
}

.clickable-row:focus-visible {
    outline: 3px solid rgba(37, 99, 235, 0.22);
    outline-offset: 3px;
}

.table-main-link {
    color: inherit;
    text-decoration: none;
}

.table-main-link:hover {
    color: var(--primary-blue-dark);
}

.return-status-cell {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.65rem;
}

.return-action-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 68px;
    padding: 0.28rem 0.62rem;
    border-radius: 999px;
    background: #eff6ff;
    color: var(--primary-blue-dark);
    border: 1px solid rgba(37, 99, 235, 0.18);
    text-decoration: none;
    font-size: 0.74rem;
    font-weight: 800;
}

.return-action-link:hover {
    background: var(--primary-blue);
    color: #ffffff;
}

@media (max-width: 767.98px) {
    .return-status-cell {
        align-items: flex-start;
        flex-direction: column;
    }
}

.list-hero {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
    background: linear-gradient(135deg, #ffffff 0%, #eff6ff 100%);
    border: 1px solid rgba(37, 99, 235, 0.12);
    border-radius: 1.5rem;
    padding: 1.25rem 1.35rem;
    box-shadow: var(--shadow-soft);
}

.btn-soft-secondary {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #334155;
    font-weight: 750;
}

.btn-soft-secondary:hover {
    background: #e2e8f0;
    color: #0f172a;
}

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

.list-stat-card {
    background: #ffffff;
    border: 1px solid rgba(148, 163, 184, 0.15);
    border-radius: 1.2rem;
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 0.85rem;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.04);
}

.list-stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex: 0 0 48px;
}

.list-stat-card small {
    display: block;
    color: var(--muted-text);
    font-size: 0.76rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 0.2rem;
}

.list-stat-card strong {
    display: block;
    color: #0f172a;
    font-size: 1.45rem;
    font-weight: 850;
    line-height: 1.12;
}

.filter-card {
    background: rgba(255, 255, 255, 0.97);
    border: 1px solid rgba(148, 163, 184, 0.17);
    border-radius: 1.2rem;
    padding: 1rem;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.04);
}

.filter-card .form-label {
    color: #475569;
    font-size: 0.78rem;
    font-weight: 800;
    margin-bottom: 0.4rem;
}

.filter-card .form-control,
.filter-card .form-select {
    border-radius: 0.9rem;
    border-color: #e2e8f0;
    min-height: 42px;
}

.filter-card .form-control:focus,
.filter-card .form-select:focus {
    border-color: rgba(37, 99, 235, 0.45);
    box-shadow: 0 0 0 0.2rem rgba(37, 99, 235, 0.08);
}

.table-card {
    background: rgba(255, 255, 255, 0.97);
    border: 1px solid rgba(148, 163, 184, 0.17);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-soft);
    overflow: hidden;
}

.table-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 1.05rem 1.15rem 0.75rem;
}

.table-card-header h6 {
    margin: 0;
    color: #0f172a;
    font-weight: 850;
}

.professional-table {
    border-collapse: separate;
    border-spacing: 0 0.55rem;
    margin-bottom: 0 !important;
}

.professional-table thead th {
    background: transparent;
    border: 0;
    color: #64748b;
    font-size: 0.72rem;
    font-weight: 850;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.35rem 0.75rem;
    white-space: nowrap;
}

.professional-table tbody tr {
    background: #f8fafc;
    box-shadow: inset 0 0 0 1px rgba(226, 232, 240, 0.9);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.professional-table tbody tr:hover {
    transform: translateY(-1px);
    box-shadow: inset 0 0 0 1px rgba(37, 99, 235, 0.18), 0 10px 22px rgba(15, 23, 42, 0.05);
}

.professional-table tbody td {
    border: 0;
    padding: 0.82rem 0.75rem;
    vertical-align: middle;
}

.professional-table tbody td:first-child {
    border-radius: 0.95rem 0 0 0.95rem;
}

.professional-table tbody td:last-child {
    border-radius: 0 0.95rem 0.95rem 0;
}

[dir="rtl"] .professional-table tbody td:first-child {
    border-radius: 0 0.95rem 0.95rem 0;
}

[dir="rtl"] .professional-table tbody td:last-child {
    border-radius: 0.95rem 0 0 0.95rem;
}

.entity-cell {
    display: flex;
    align-items: center;
    gap: 0.72rem;
    min-width: 190px;
}

.entity-cell.compact {
    min-width: 150px;
}

.entity-cell strong,
.entity-cell small {
    display: block;
}

.entity-cell strong {
    color: #0f172a;
    font-weight: 850;
}

.entity-cell small {
    color: var(--muted-text);
    margin-top: 0.15rem;
}

.entity-avatar {
    width: 44px;
    height: 44px;
    border-radius: 0.9rem;
    object-fit: cover;
    flex: 0 0 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.vehicle-avatar {
    width: 58px;
    height: 42px;
    flex-basis: 58px;
}

.entity-placeholder {
    background: #dbeafe;
    color: #2563eb;
}

.reference-pill,
.method-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    border-radius: 999px;
    padding: 0.35rem 0.68rem;
    font-size: 0.76rem;
    font-weight: 800;
    white-space: nowrap;
}

.reference-pill {
    background: #ffffff;
    color: #334155;
    border: 1px solid #e2e8f0;
}

.method-especes {
    background: #dcfce7;
    color: #15803d;
}

.method-carte {
    background: #ede9fe;
    color: #6d28d9;
}

.method-virement,
.method-cheque {
    background: #dbeafe;
    color: #1d4ed8;
}

.money-cell {
    color: #0f172a;
    font-weight: 850;
    white-space: nowrap;
}

.table-actions {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    flex-wrap: wrap;
}

.table-actions form {
    display: inline-flex;
    margin: 0;
}

.table-actions-wide {
    min-width: 220px;
}

.btn-action {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.85rem;
    border: 1px solid transparent;
    text-decoration: none;
    font-size: 0.78rem;
    transition: all 0.18s ease;
    background: #ffffff;
    cursor: pointer;
}

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

.btn-action-primary {
    color: #1d4ed8;
    border-color: #bfdbfe;
}

.btn-action-primary:hover {
    background: #2563eb;
    color: #ffffff;
}

.btn-action-info {
    color: #0369a1;
    border-color: #bae6fd;
}

.btn-action-info:hover {
    background: #0284c7;
    color: #ffffff;
}

.btn-action-success {
    color: #15803d;
    border-color: #bbf7d0;
}

.btn-action-success:hover {
    background: #16a34a;
    color: #ffffff;
}

.btn-action-warning {
    color: #b45309;
    border-color: #fde68a;
}

.btn-action-warning:hover {
    background: #f59e0b;
    color: #ffffff;
}

.btn-action-danger {
    color: #b91c1c;
    border-color: #fecaca;
}

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

.btn-action-secondary {
    color: #475569;
    border-color: #cbd5e1;
}

.btn-action-secondary:hover {
    background: #475569;
    color: #ffffff;
}

.btn-action-whatsapp {
    color: #15803d;
    border-color: #bbf7d0;
}

.btn-action-whatsapp:hover {
    background: #22c55e;
    color: #ffffff;
}

.date-stack {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    min-width: 145px;
}

.date-stack span {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: #475569;
    font-size: 0.8rem;
    font-weight: 700;
}

.status-actif {
    background: #dcfce7;
    color: #15803d;
}

.status-blackliste {
    background: #111827;
    color: #ffffff;
}

.status-en_cours {
    background: #dbeafe;
    color: #1d4ed8;
}

.dataTables_wrapper .dataTables_filter input,
.dataTables_wrapper .dataTables_length select {
    border-radius: 0.8rem;
    border: 1px solid #e2e8f0;
    padding: 0.35rem 0.6rem;
}

.dataTables_wrapper .dataTables_filter input:focus,
.dataTables_wrapper .dataTables_length select:focus {
    border-color: rgba(37, 99, 235, 0.45);
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(37, 99, 235, 0.08);
}

.dataTables_wrapper .page-link {
    border-radius: 0.7rem !important;
    margin: 0 0.12rem;
    color: var(--primary-blue-dark);
    border-color: #e2e8f0;
}

.dataTables_wrapper .page-item.active .page-link {
    background: var(--primary-blue);
    border-color: var(--primary-blue);
    color: #ffffff;
}

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

@media (max-width: 767.98px) {
    .list-hero {
        flex-direction: column;
        align-items: stretch;
    }

    .list-stats-grid {
        grid-template-columns: 1fr;
    }

    .table-actions-wide {
        min-width: auto;
    }
}

.list-hero {
    margin-bottom: 1rem !important;
}

.list-stats-grid {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(180px, 1fr)) !important;
    gap: 1rem !important;
    width: 100% !important;
}

.list-stat-card {
    min-height: 86px !important;
    background: #ffffff !important;
    border: 1px solid rgba(148, 163, 184, 0.18) !important;
    border-radius: 1.15rem !important;
    padding: 1rem 1.05rem !important;
    display: flex !important;
    align-items: center !important;
    gap: 0.85rem !important;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.04) !important;
}

.list-stat-icon {
    width: 48px !important;
    height: 48px !important;
    min-width: 48px !important;
    border-radius: 1rem !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.table-card {
    overflow: visible !important;
}

.table-card .dataTables_wrapper {
    padding: 0 0.85rem 0.95rem !important;
}

.table-card .dataTables_wrapper > .row:first-child {
    align-items: center !important;
    margin-bottom: 0.55rem !important;
}

.professional-table {
    width: 100% !important;
    border-collapse: separate !important;
    border-spacing: 0 0.45rem !important;
}

.professional-table thead th {
    background: #f8fafc !important;
    border: 0 !important;
    color: #64748b !important;
    font-size: 0.72rem !important;
    font-weight: 850 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.04em !important;
    padding: 0.65rem 0.75rem !important;
}

.professional-table tbody tr {
    background: #ffffff !important;
    box-shadow: 0 0 0 1px rgba(226, 232, 240, 0.95), 0 5px 14px rgba(15, 23, 42, 0.025) !important;
}

.professional-table tbody td {
    border-top: 0 !important;
    border-bottom: 0 !important;
    padding: 0.66rem 0.75rem !important;
    vertical-align: middle !important;
}

.professional-table tbody td:first-child {
    border-radius: 0.9rem 0 0 0.9rem !important;
}

.professional-table tbody td:last-child {
    border-radius: 0 0.9rem 0.9rem 0 !important;
}

.professional-table .entity-cell {
    display: flex !important;
    align-items: center !important;
    gap: 0.72rem !important;
    min-width: 220px !important;
}

.professional-table img.entity-avatar.vehicle-avatar,
.professional-table .entity-avatar.vehicle-avatar {
    width: 82px !important;
    height: 56px !important;
    min-width: 82px !important;
    max-width: 82px !important;
    object-fit: cover !important;
    border-radius: 0.9rem !important;
    background: #eef2ff !important;
}

.table-actions {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.35rem !important;
    flex-wrap: nowrap !important;
}

.table-actions form {
    display: inline-flex !important;
    margin: 0 !important;
}

.table-actions .btn-action {
    width: 34px !important;
    height: 34px !important;
    border-radius: 0.85rem !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.dataTables_wrapper .dataTables_length select {
    min-width: 72px !important;
    border-radius: 0.7rem !important;
}

.dataTables_wrapper .dataTables_filter input {
    border-radius: 0.7rem !important;
    border: 1px solid #e2e8f0 !important;
    min-height: 36px !important;
    padding: 0.35rem 0.75rem !important;
}

@media (max-width: 1199.98px) {
    .list-stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

@media (max-width: 767.98px) {
    .list-stats-grid {
        grid-template-columns: 1fr !important;
    }

    .professional-table .entity-cell {
        min-width: 170px !important;
    }
}

.form-hero {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
    background: linear-gradient(135deg, #ffffff 0%, #eff6ff 100%);
    border: 1px solid rgba(37, 99, 235, 0.12);
    border-radius: 1.5rem;
    padding: 1.25rem 1.35rem;
    box-shadow: var(--shadow-soft);
}

.form-card {
    background: rgba(255, 255, 255, 0.97);
    border: 1px solid rgba(148, 163, 184, 0.17);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-soft);
    padding: 1.15rem;
}

.form-section {
    background: #ffffff;
    border: 1px solid rgba(226, 232, 240, 0.95);
    border-radius: 1.15rem;
    padding: 1.15rem;
    margin-bottom: 1rem;
}

.form-section:last-of-type {
    margin-bottom: 0;
}

.form-section-title {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    margin-bottom: 1rem;
}

.form-section-title > span {
    width: 44px;
    height: 44px;
    min-width: 44px;
    border-radius: 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #dbeafe;
    color: #2563eb;
    font-size: 1rem;
}

.form-section-title strong,
.form-section-title small {
    display: block;
}

.form-section-title strong {
    color: #0f172a;
    font-weight: 850;
    font-size: 0.98rem;
}

.form-section-title small {
    color: var(--muted-text);
    margin-top: 0.18rem;
}

.form-card .form-label {
    color: #475569;
    font-size: 0.8rem;
    font-weight: 800;
    margin-bottom: 0.42rem;
}

.form-card .form-control,
.form-card .form-select {
    border-radius: 0.92rem;
    border-color: #e2e8f0;
    min-height: 43px;
}

.form-card .form-control:focus,
.form-card .form-select:focus {
    border-color: rgba(37, 99, 235, 0.45);
    box-shadow: 0 0 0 0.2rem rgba(37, 99, 235, 0.08);
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.65rem;
    flex-wrap: wrap;
    padding-top: 1rem;
}

.switch-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 0.95rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 1rem;
    cursor: pointer;
}

.switch-card.compact {
    padding: 0.62rem 0.75rem;
    min-height: 43px;
}

.switch-card input {
    flex: 0 0 auto;
}

.switch-card strong,
.switch-card small {
    display: block;
}

.switch-card strong {
    color: #0f172a;
    font-weight: 800;
}

.switch-card small {
    color: var(--muted-text);
    margin-top: 0.15rem;
}

.file-preview {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 1rem;
    padding: 0.65rem;
    min-height: 70px;
}

.file-preview img {
    width: 86px;
    height: 56px;
    border-radius: 0.85rem;
    object-fit: cover;
    background: #ffffff;
}

.file-preview strong,
.file-preview small {
    display: block;
}

.file-preview small {
    color: var(--muted-text);
    overflow-wrap: anywhere;
}

.payment-summary-card {
    background: #ffffff;
    border: 1px solid rgba(148, 163, 184, 0.17);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-soft);
    padding: 1.15rem;
}

.payment-summary-head {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e2e8f0;
    margin-bottom: 1rem;
}

.payment-summary-head > span {
    width: 46px;
    height: 46px;
    min-width: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 1rem;
    background: #dcfce7;
    color: #16a34a;
}

.payment-summary-head strong,
.payment-summary-head small {
    display: block;
}

.payment-summary-head strong {
    color: #0f172a;
    font-weight: 850;
}

.payment-summary-head small,
.payment-summary-muted {
    color: var(--muted-text);
}

.payment-summary-line,
.payment-summary-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 0.7rem 0;
}

.payment-summary-line span,
.payment-summary-total span {
    color: var(--muted-text);
}

.payment-summary-line strong {
    color: #0f172a;
}

.payment-summary-total {
    background: linear-gradient(135deg, #eff6ff 0%, #ffffff 100%);
    border: 1px solid rgba(37, 99, 235, 0.14);
    border-radius: 1rem;
    padding: 0.9rem;
    margin: 0.55rem 0 1rem;
}

.payment-summary-total strong {
    color: #1d4ed8;
    font-size: 1.18rem;
    font-weight: 900;
}

@media (max-width: 767.98px) {
    .form-hero {
        flex-direction: column;
        align-items: stretch;
    }

    .form-actions {
        justify-content: stretch;
    }

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

.document-preview-card {
    background: rgba(255, 255, 255, 0.97);
    border: 1px solid rgba(148, 163, 184, 0.17);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-soft);
    padding: 1.15rem;
}

.document-preview-header {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.8rem;
    margin-bottom: 1rem;
}

.document-preview-header > div {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 1rem;
    padding: 0.85rem;
}

.document-preview-header span,
.document-preview-header strong {
    display: block;
}

.document-preview-header span {
    color: var(--muted-text);
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 0.2rem;
}

.document-preview-header strong {
    color: #0f172a;
    font-weight: 850;
}

.timeline-documents {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.document-state-card {
    border: 1px solid #e2e8f0;
    border-radius: 1.2rem;
    padding: 1rem;
    background: #ffffff;
}

.document-state-head {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
    margin-bottom: 0.9rem;
}

.document-state-head > div:first-child {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.document-state-head > div:first-child > span {
    width: 46px;
    height: 46px;
    min-width: 46px;
    border-radius: 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

.document-blue .document-state-head > div:first-child > span {
    background: #dbeafe;
    color: #2563eb;
}

.document-green .document-state-head > div:first-child > span {
    background: #dcfce7;
    color: #16a34a;
}

.document-state-head small,
.document-state-head strong {
    display: block;
}

.document-state-head small {
    color: var(--muted-text);
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.document-state-head strong {
    color: #0f172a;
    font-weight: 850;
    font-size: 1.05rem;
}

.document-state-date {
    color: #475569;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    padding: 0.38rem 0.75rem;
    font-weight: 800;
    font-size: 0.78rem;
}

.document-state-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
    margin-bottom: 0.9rem;
}

.document-state-grid > div {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 1rem;
    padding: 0.75rem;
}

.document-state-grid small,
.document-state-grid strong {
    display: block;
}

.document-state-grid small {
    color: var(--muted-text);
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 0.2rem;
}

.document-state-grid strong {
    color: #0f172a;
    font-weight: 850;
}

.document-notes {
    background: #fff7ed;
    border: 1px solid #fed7aa;
    color: #7c2d12;
    border-radius: 1rem;
    padding: 0.85rem;
    margin-bottom: 0.9rem;
}

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

.document-photo-grid a {
    display: block;
    border-radius: 1rem;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
}

.document-photo-grid img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    display: block;
}

.document-no-photo {
    color: var(--muted-text);
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: 1rem;
    padding: 0.85rem;
    text-align: center;
}

@media (max-width: 1199.98px) {
    .document-preview-header {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

@media (max-width: 767.98px) {
    .document-preview-header,
    .document-state-grid,
    .document-photo-grid {
        grid-template-columns: 1fr;
    }

    .document-state-head {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media print {
    body {
        background: #ffffff !important;
    }

    .sidebar,
    .navbar,
    .footer,
    footer,
    .no-print-zone,
    .offcanvas {
        display: none !important;
    }

    .container-fluid,
    .row,
    .col,
    .p-4 {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    .document-preview-card {
        box-shadow: none !important;
        border: 0 !important;
        padding: 0 !important;
    }

    .document-state-card {
        break-inside: avoid;
        page-break-inside: avoid;
    }
}

.signature-box {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 1.15rem;
    padding: 0.85rem;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.05);
}

.signature-box-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.signature-box-head strong,
.signature-box-head small {
    display: block;
}

.signature-box-head strong {
    color: #0f172a;
    font-weight: 850;
}

.signature-box-head small {
    color: var(--muted-text);
    font-weight: 700;
    font-size: 0.8rem;
}

.signature-canvas {
    width: 100%;
    height: 180px;
    display: block;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    border: 1px dashed #cbd5e1;
    border-radius: 1rem;
    touch-action: none;
    cursor: crosshair;
}

.document-signature-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
    margin-top: 0.9rem;
}

.document-signature-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 1rem;
    padding: 0.8rem;
    min-height: 116px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.document-signature-card span {
    color: var(--muted-text);
    font-size: 0.72rem;
    font-weight: 850;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 0.45rem;
}

.document-signature-card img {
    width: 100%;
    max-height: 80px;
    object-fit: contain;
    display: block;
    background: #f8fafc;
    border-radius: 0.75rem;
}

.document-signature-card strong {
    color: #94a3b8;
    font-weight: 800;
    font-size: 0.88rem;
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: 0.75rem;
    padding: 1rem;
    text-align: center;
}

@media (max-width: 767.98px) {
    .document-signature-grid {
        grid-template-columns: 1fr;
    }

    .signature-canvas {
        height: 210px;
    }
}

.profile-summary-card {
    background: rgba(255, 255, 255, 0.97);
    border: 1px solid rgba(148, 163, 184, 0.17);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-soft);
    padding: 1.35rem;
    text-align: center;
    height: 100%;
}

.profile-avatar {
    width: 78px;
    height: 78px;
    border-radius: 1.35rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #dbeafe 0%, #eff6ff 100%);
    color: #1d4ed8;
    font-size: 2rem;
    font-weight: 900;
    margin-bottom: 1rem;
    box-shadow: inset 0 0 0 1px rgba(37, 99, 235, 0.12);
}

.profile-info-list {
    display: grid;
    gap: 0.65rem;
    text-align: left;
}

[dir="rtl"] .profile-info-list {
    text-align: right;
}

.profile-info-list > div {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 1rem;
    padding: 0.78rem 0.85rem;
}

.profile-info-list span,
.profile-info-list strong {
    display: block;
}

.profile-info-list span {
    color: var(--muted-text);
    font-size: 0.74rem;
    font-weight: 850;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 0.15rem;
}

.profile-info-list strong {
    color: #0f172a;
    font-weight: 850;
}

.status-inactif {
    background: #fee2e2;
    color: #b91c1c;
}

.role-admin {
    background: #fee2e2;
    color: #b91c1c;
}

.role-gestionnaire {
    background: #fef3c7;
    color: #b45309;
}

.role-caissier {
    background: #dbeafe;
    color: #1d4ed8;
}

.modal .form-control,
.modal .form-select {
    border-radius: 0.9rem;
    border-color: #e2e8f0;
    min-height: 43px;
}

.modal .form-control:focus,
.modal .form-select:focus {
    border-color: rgba(37, 99, 235, 0.45);
    box-shadow: 0 0 0 0.2rem rgba(37, 99, 235, 0.08);
}

.modal .form-label {
    color: #475569;
    font-size: 0.8rem;
}

@media (max-width: 991.98px) {
    .profile-summary-card {
        height: auto;
    }
}

.settings-hero {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(239, 246, 255, 0.96) 100%);
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-soft);
    padding: 1.35rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.settings-eyebrow {
    display: inline-flex;
    align-items: center;
    color: #2563eb;
    font-weight: 850;
    font-size: 0.78rem;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    margin-bottom: 0.55rem;
}

.settings-hero-actions {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    flex-wrap: wrap;
}

.settings-mini-stat {
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid rgba(148, 163, 184, 0.17);
    border-radius: 1.25rem;
    box-shadow: var(--shadow-soft);
    padding: 1rem;
    min-height: 112px;
    display: grid;
    align-content: center;
    gap: 0.25rem;
}

.settings-mini-stat i {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 1rem;
    background: #eff6ff;
    color: #2563eb;
    margin-bottom: 0.25rem;
}

.settings-mini-stat span {
    color: var(--muted-text);
    font-weight: 800;
    font-size: 0.78rem;
}

.settings-mini-stat strong {
    color: #0f172a;
    font-size: 1.15rem;
    font-weight: 900;
}

.settings-form-card,
.settings-side-card {
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid rgba(148, 163, 184, 0.17);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-soft);
    padding: 1.35rem;
}

.settings-section-title {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    margin-bottom: 1rem;
}

.settings-section-title > i,
.settings-side-title > i {
    width: 42px;
    height: 42px;
    border-radius: 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #eff6ff;
    color: #2563eb;
    flex: 0 0 auto;
}

.settings-section-title h5,
.settings-side-title span {
    margin: 0;
    color: #0f172a;
    font-weight: 900;
}

.settings-section-title p {
    margin: 0.25rem 0 0;
    color: var(--muted-text);
    font-size: 0.86rem;
}

.settings-form-card .form-control,
.settings-form-card .form-select {
    min-height: 46px;
    border-radius: 0.95rem;
    border-color: #e2e8f0;
}

.settings-form-card textarea.form-control {
    min-height: 92px;
}

.settings-form-card .form-control:focus,
.settings-form-card .form-select:focus {
    border-color: rgba(37, 99, 235, 0.45);
    box-shadow: 0 0 0 0.2rem rgba(37, 99, 235, 0.08);
}

.settings-form-card .form-label {
    color: #475569;
    font-size: 0.8rem;
}

.settings-switch-line {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 1rem;
    padding: 0.9rem 1rem 0.9rem 3.25rem;
}

[dir="rtl"] .settings-switch-line {
    padding: 0.9rem 3.25rem 0.9rem 1rem;
}

.settings-actions-bar {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 1.1rem;
    padding: 1rem;
    display: flex;
    justify-content: flex-end;
}

.settings-side-title {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    margin-bottom: 1rem;
}

.settings-logo-preview {
    min-height: 180px;
    border: 1px dashed #cbd5e1;
    border-radius: 1.25rem;
    background: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 1.25rem;
}

.settings-logo-preview img {
    max-width: 100%;
    max-height: 150px;
    object-fit: contain;
}

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

.settings-quick-grid a {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    text-decoration: none;
    color: #0f172a;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 1.05rem;
    padding: 0.95rem;
    font-weight: 850;
    transition: var(--transition);
}

.settings-quick-grid a:hover {
    transform: translateY(-2px);
    border-color: rgba(37, 99, 235, 0.25);
    background: #eff6ff;
}

.settings-quick-grid i {
    color: #2563eb;
    font-size: 1.1rem;
}

.settings-provider-list {
    display: grid;
    gap: 0.65rem;
}

.settings-provider-list > div {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 0.95rem;
    padding: 0.8rem 0.9rem;
}

.settings-provider-list strong,
.settings-provider-list span {
    display: block;
}

.settings-provider-list strong {
    color: #0f172a;
    font-weight: 850;
}

.settings-provider-list span {
    color: var(--muted-text);
    font-size: 0.82rem;
    margin-top: 0.15rem;
}

@media (max-width: 991.98px) {
    .settings-hero {
        flex-direction: column;
        align-items: stretch;
    }

    .settings-hero-actions {
        justify-content: flex-start;
    }
}

@media (max-width: 575.98px) {
    .settings-quick-grid {
        grid-template-columns: 1fr;
    }

    .settings-actions-bar {
        justify-content: stretch;
    }

    .settings-actions-bar .btn {
        width: 100%;
    }
}


.report-hero {
    background: linear-gradient(135deg, #ffffff 0%, #f8fbff 55%, #eef6ff 100%);
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-soft);
    padding: 1.35rem;
    margin-bottom: 1.25rem;
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
}

.report-hero h4,
.report-hero h5 {
    color: #0f172a;
    font-weight: 900;
    margin-bottom: 0.25rem;
}

.report-hero p {
    color: var(--muted-text);
    margin-bottom: 0;
}

.report-hero-icon {
    width: 54px;
    height: 54px;
    border-radius: 1.1rem;
    background: #eff6ff;
    color: #2563eb;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    flex: 0 0 auto;
}

.report-hero-main {
    display: flex;
    align-items: center;
    gap: 0.9rem;
}

.report-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.55rem;
    flex-wrap: wrap;
}

.report-filter-card,
.report-table-card,
.report-chart-card,
.report-cpc-card {
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-soft);
}

.report-filter-card {
    padding: 1.1rem;
    margin-bottom: 1.25rem;
}

.report-filter-card .form-control,
.report-filter-card .form-select {
    min-height: 44px;
    border-radius: 0.95rem;
    border-color: #e2e8f0;
}

.report-filter-card .form-label {
    color: #475569;
    font-size: 0.8rem;
    font-weight: 800;
}

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

.report-kpi-card {
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 1.25rem;
    box-shadow: var(--shadow-soft);
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 0.85rem;
    min-height: 112px;
}

.report-kpi-icon {
    width: 48px;
    height: 48px;
    border-radius: 1rem;
    background: #eff6ff;
    color: #2563eb;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex: 0 0 auto;
}

.report-kpi-icon.success {
    background: #ecfdf5;
    color: #059669;
}

.report-kpi-icon.warning {
    background: #fffbeb;
    color: #d97706;
}

.report-kpi-icon.danger {
    background: #fef2f2;
    color: #dc2626;
}

.report-kpi-icon.purple {
    background: #f5f3ff;
    color: #7c3aed;
}

.report-kpi-card span {
    display: block;
    color: var(--muted-text);
    font-size: 0.78rem;
    font-weight: 850;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.report-kpi-card strong {
    display: block;
    color: #0f172a;
    font-size: 1.18rem;
    font-weight: 900;
    line-height: 1.15;
}

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

.report-module-card {
    position: relative;
    overflow: hidden;
    text-decoration: none;
    color: #0f172a;
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-soft);
    padding: 1.2rem;
    min-height: 190px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: var(--transition);
}

.report-module-card:hover {
    color: #0f172a;
    transform: translateY(-4px);
    border-color: rgba(37, 99, 235, 0.25);
    box-shadow: 0 18px 38px rgba(15, 23, 42, 0.12);
}

.report-module-card::after {
    content: "";
    position: absolute;
    width: 130px;
    height: 130px;
    border-radius: 50%;
    background: rgba(37, 99, 235, 0.07);
    right: -45px;
    top: -55px;
}

[dir="rtl"] .report-module-card::after {
    right: auto;
    left: -45px;
}

.report-module-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    position: relative;
    z-index: 1;
}

.report-module-icon {
    width: 48px;
    height: 48px;
    border-radius: 1rem;
    background: #eff6ff;
    color: #2563eb;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.report-module-card h5 {
    margin: 0.85rem 0 0.4rem;
    font-weight: 900;
}

.report-module-card p {
    color: var(--muted-text);
    margin: 0;
    font-size: 0.88rem;
}

.report-module-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 1rem;
    color: #2563eb;
    font-weight: 850;
    position: relative;
    z-index: 1;
}

.report-table-card {
    padding: 1.1rem;
}

.report-table-card .table {
    margin-bottom: 0;
}

.report-table-card thead th,
.report-cpc-card thead th {
    color: #475569;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    border-bottom-color: #e2e8f0;
}

.report-table-card tbody td,
.report-cpc-card tbody td {
    vertical-align: middle;
}

.report-chart-card {
    padding: 1.2rem;
    min-height: 360px;
}

.report-chart-card h6,
.report-table-title {
    color: #0f172a;
    font-weight: 900;
    margin-bottom: 1rem;
}

.report-chart-wrap {
    position: relative;
    min-height: 280px;
}

.report-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    border-radius: 999px;
    padding: 0.38rem 0.72rem;
    font-size: 0.78rem;
    font-weight: 850;
    border: 1px solid transparent;
}

.report-status-pill.available {
    background: #ecfdf5;
    color: #047857;
    border-color: #bbf7d0;
}

.report-status-pill.rented {
    background: #eff6ff;
    color: #1d4ed8;
    border-color: #bfdbfe;
}

.report-status-pill.reserved {
    background: #fffbeb;
    color: #b45309;
    border-color: #fde68a;
}

.report-status-pill.maintenance {
    background: #fef2f2;
    color: #b91c1c;
    border-color: #fecaca;
}

.report-status-pill.neutral {
    background: #f8fafc;
    color: #475569;
    border-color: #e2e8f0;
}

.report-progress {
    height: 9px;
    background: #e2e8f0;
    border-radius: 999px;
    overflow: hidden;
}

.report-progress span {
    display: block;
    height: 100%;
    min-width: 2%;
    background: #2563eb;
    border-radius: 999px;
}

.report-empty-state {
    text-align: center;
    padding: 2.5rem 1rem;
    color: var(--muted-text);
}

.report-empty-state i {
    width: 62px;
    height: 62px;
    border-radius: 1.25rem;
    background: #f8fafc;
    color: #94a3b8;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    margin-bottom: 0.8rem;
}

.report-cpc-card {
    padding: 0;
    overflow: hidden;
}

.report-cpc-head {
    padding: 1.2rem;
    border-bottom: 1px solid #e2e8f0;
    background: #f8fafc;
}

.report-cpc-table {
    margin-bottom: 0;
}

.report-cpc-table .section-row td {
    background: #f8fafc;
    color: #0f172a;
    font-weight: 900;
}

.report-cpc-table .result-row td {
    background: #0f172a;
    color: #ffffff;
    font-weight: 900;
}

.report-cpc-table .net-row td {
    background: #eff6ff;
    color: #1d4ed8;
    font-weight: 900;
}

.report-print-note {
    color: var(--muted-text);
    font-size: 0.82rem;
}

@media print {
    .sidebar,
    .navbar,
    .report-actions,
    .report-filter-card,
    footer,
    .btn {
        display: none !important;
    }

    .col.p-0,
    .p-4 {
        padding: 0 !important;
        width: 100% !important;
    }

    .report-hero,
    .report-table-card,
    .report-chart-card,
    .report-cpc-card,
    .report-kpi-card {
        box-shadow: none !important;
        border-color: #d1d5db !important;
    }
}

@media (max-width: 1199.98px) {
    .report-card-grid,
    .report-kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 767.98px) {
    .report-hero {
        flex-direction: column;
        align-items: stretch;
    }

    .report-actions {
        justify-content: flex-start;
    }

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

    .report-kpi-card {
        min-height: auto;
    }
}

@media print {
    @page {
        size: A4 portrait;
        margin: 8mm;
    }

    html,
    body {
        width: auto !important;
        min-width: 0 !important;
        background: #ffffff !important;
        color: #0f172a !important;
        font-size: 10.5px !important;
        line-height: 1.25 !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    .container-fluid,
    .row,
    .col,
    .col-auto,
    .col-md-3,
    .col-xl-2,
    .col-lg-8,
    .col-lg-4,
    .p-4,
    .flex-grow-1,
    .min-vh-100 {
        min-height: 0 !important;
    }

    .col.p-0.d-flex.flex-column.min-vh-100,
    .p-4.flex-grow-1 {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    .report-hero,
    .report-table-card,
    .report-chart-card,
    .report-cpc-card,
    .report-kpi-card {
        background: #ffffff !important;
        box-shadow: none !important;
        border: 1px solid #dbe3ee !important;
        border-radius: 9px !important;
    }

    .report-hero {
        padding: 9px 11px !important;
        margin: 0 0 8px 0 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        gap: 8px !important;
        page-break-inside: avoid !important;
        break-inside: avoid !important;
    }

    .report-hero-main {
        display: flex !important;
        align-items: center !important;
        gap: 8px !important;
    }

    .report-hero-icon {
        width: 34px !important;
        height: 34px !important;
        border-radius: 8px !important;
        font-size: 12px !important;
        background: #eff6ff !important;
        color: #2563eb !important;
    }

    .report-hero h4,
    .report-hero h5 {
        font-size: 14px !important;
        margin: 0 0 2px 0 !important;
        line-height: 1.15 !important;
    }

    .report-hero p {
        font-size: 9.5px !important;
        margin: 0 !important;
        color: #475569 !important;
    }

    .report-kpi-grid {
        display: grid !important;
        grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
        gap: 7px !important;
        margin: 0 0 8px 0 !important;
        page-break-inside: avoid !important;
        break-inside: avoid !important;
    }

    .report-kpi-card {
        min-height: 54px !important;
        padding: 7px !important;
        gap: 6px !important;
        align-items: center !important;
    }

    .report-kpi-icon {
        width: 26px !important;
        height: 26px !important;
        border-radius: 7px !important;
        font-size: 10px !important;
    }

    .report-kpi-card span {
        font-size: 7.5px !important;
        letter-spacing: 0.02em !important;
        margin-bottom: 1px !important;
    }

    .report-kpi-card strong {
        font-size: 11.5px !important;
        line-height: 1.05 !important;
    }

    .report-kpi-grid + .row.g-4,
    .report-hero ~ .row.g-4 {
        display: grid !important;
        grid-template-columns: minmax(0, 1.65fr) minmax(0, 0.85fr) !important;
        gap: 8px !important;
        margin: 0 0 8px 0 !important;
    }

    .report-kpi-grid + .row.g-4 > [class*="col-"],
    .report-hero ~ .row.g-4 > [class*="col-"] {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        flex: none !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    .report-chart-card {
        min-height: 0 !important;
        padding: 8px !important;
        page-break-inside: avoid !important;
        break-inside: avoid !important;
    }

    .report-chart-card h6,
    .report-table-title {
        font-size: 11px !important;
        margin: 0 0 5px 0 !important;
        line-height: 1.15 !important;
    }

    .report-chart-wrap {
        height: 135px !important;
        min-height: 135px !important;
        max-height: 135px !important;
    }

    .report-chart-wrap canvas {
        height: 135px !important;
        max-height: 135px !important;
    }

    .report-table-card {
        padding: 8px !important;
        margin-top: 0 !important;
        page-break-inside: auto !important;
        break-inside: auto !important;
    }

    .report-table-card .table-responsive {
        overflow: visible !important;
    }

    .report-table-card .table,
    .report-cpc-table {
        width: 100% !important;
        margin-bottom: 0 !important;
        border-collapse: collapse !important;
    }

    .report-table-card thead th,
    .report-cpc-card thead th {
        font-size: 7.5px !important;
        padding: 4px 5px !important;
        color: #475569 !important;
        border-bottom: 1px solid #dbe3ee !important;
        white-space: nowrap !important;
    }

    .report-table-card tbody td,
    .report-cpc-card tbody td {
        font-size: 8.5px !important;
        padding: 4px 5px !important;
        border-bottom: 1px solid #eef2f7 !important;
        vertical-align: middle !important;
    }

    .report-table-card .badge,
    .report-status-pill {
        font-size: 7px !important;
        padding: 2px 5px !important;
        border-radius: 999px !important;
    }

    .report-empty-state {
        padding: 12px 6px !important;
        font-size: 9px !important;
    }

    .report-empty-state i {
        width: 34px !important;
        height: 34px !important;
        font-size: 12px !important;
        margin-bottom: 4px !important;
    }

    .report-card-grid {
        display: grid !important;
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
        gap: 7px !important;
    }

    .report-module-card {
        min-height: 120px !important;
        padding: 9px !important;
        box-shadow: none !important;
        border: 1px solid #dbe3ee !important;
        border-radius: 9px !important;
        page-break-inside: avoid !important;
        break-inside: avoid !important;
    }

    .report-module-icon {
        width: 30px !important;
        height: 30px !important;
        font-size: 11px !important;
        border-radius: 8px !important;
    }

    .report-module-card h5 {
        font-size: 11px !important;
        margin: 6px 0 3px 0 !important;
    }

    .report-module-card p,
    .report-module-footer,
    .report-print-note {
        font-size: 8.5px !important;
    }

    .report-cpc-head {
        padding: 8px !important;
    }

    .report-cpc-table td,
    .report-cpc-table th {
        font-size: 8.5px !important;
        padding: 4px 5px !important;
    }
}

.cpc-hero {
    background: linear-gradient(135deg, #ffffff 0%, #f8fbff 48%, #eef6ff 100%);
}

.cpc-kpi-grid .report-kpi-card {
    min-height: 104px;
}

.cpc-accounting-card {
    overflow: hidden;
}

.cpc-accounting-table {
    margin-bottom: 0;
}

.cpc-accounting-table thead th {
    background: #f8fafc;
    color: #334155;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    border-color: #e2e8f0;
}

.cpc-accounting-table tbody td {
    border-color: #e2e8f0;
    vertical-align: middle;
}

.cpc-accounting-table .cpc-code {
    color: #2563eb;
    font-weight: 900;
    white-space: nowrap;
}

.cpc-accounting-table .cpc-total td {
    background: #eff6ff;
    color: #0f172a;
    font-weight: 900;
}

.cpc-accounting-table .cpc-result td {
    background: #f8fafc;
    color: #0f172a;
    font-weight: 900;
}

.cpc-accounting-table .cpc-net td {
    background: #ecfdf5;
    color: #065f46;
    font-weight: 950;
    font-size: 1.02rem;
}

.cpc-code-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 70px;
    padding: 0.32rem 0.6rem;
    border-radius: 999px;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 0.76rem;
    font-weight: 900;
}

.cpc-details-card {
    padding: 1rem;
}

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

@media (max-width: 575.98px) {
    .cpc-kpi-grid {
        grid-template-columns: 1fr;
    }

    .cpc-accounting-table th,
    .cpc-accounting-table td {
        white-space: nowrap;
    }
}

@media print {
    .cpc-details-card {
        margin-top: 8px !important;
        padding: 7px !important;
        box-shadow: none !important;
        border: 1px solid #dbe3ee !important;
    }

    .cpc-accounting-card {
        box-shadow: none !important;
        border: 1px solid #dbe3ee !important;
        page-break-inside: avoid !important;
        break-inside: avoid !important;
    }

    .cpc-accounting-table th,
    .cpc-accounting-table td {
        font-size: 8px !important;
        padding: 3.8px 5px !important;
    }

    .cpc-accounting-table .cpc-net td {
        font-size: 9px !important;
    }

    .cpc-code-pill {
        font-size: 7px !important;
        padding: 2px 5px !important;
        min-width: 46px !important;
    }
}

.page-hero {
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(203, 213, 225, 0.75);
    border-radius: 22px;
    padding: 22px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.06);
}

.section-kicker {
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #2563eb;
    font-weight: 800;
    margin-bottom: 6px;
}

.btn-soft-primary {
    color: #1d4ed8;
    background: #eff6ff;
    border-color: #bfdbfe;
    font-weight: 700;
}

.btn-soft-primary:hover {
    color: #ffffff;
    background: #2563eb;
    border-color: #2563eb;
}

.alert-icon {
    width: 36px;
    height: 36px;
    border-radius: 14px;
    background: #dbeafe;
    color: #2563eb;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
}

.sticky-form-card {
    position: sticky;
    top: 18px;
    border-radius: 18px;
}

.plan-filter-bar {
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(203, 213, 225, 0.7);
    border-radius: 18px;
    padding: 10px;
    display: flex;
    gap: 8px;
    overflow-x: auto;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.04);
}

.plan-filter {
    border: 1px solid transparent;
    background: transparent;
    color: #475569;
    border-radius: 14px;
    padding: 9px 12px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    font-weight: 700;
    transition: 0.2s ease;
}

.plan-filter span {
    min-width: 24px;
    height: 24px;
    border-radius: 999px;
    background: #f1f5f9;
    color: #475569;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
}

.plan-filter:hover,
.plan-filter.active {
    background: #2563eb;
    color: #ffffff;
    box-shadow: 0 12px 24px rgba(37, 99, 235, 0.2);
}

.plan-filter:hover span,
.plan-filter.active span {
    background: rgba(255, 255, 255, 0.24);
    color: #ffffff;
}

.plan-family-stack {
    display: grid;
    gap: 18px;
}

.plan-family-card {
    border-radius: 20px;
    overflow: hidden;
}

.family-icon {
    width: 44px;
    height: 44px;
    border-radius: 16px;
    background: #eff6ff;
    color: #2563eb;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.plan-table thead th {
    background: #f8fafc;
    color: #475569;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border-bottom: 1px solid #e2e8f0;
}

.plan-table tbody td {
    border-color: #eef2f7;
    vertical-align: middle;
}

.account-code {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 64px;
    border-radius: 999px;
    padding: 5px 10px;
    background: #eff6ff;
    color: #1d4ed8;
    font-weight: 800;
    font-size: 0.8rem;
}

.action-buttons .btn {
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.empty-state-card {
    min-height: 260px;
    background: #ffffff;
    border: 1px dashed #cbd5e1;
    border-radius: 22px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #64748b;
    padding: 30px;
}

.empty-state-card i {
    font-size: 2.2rem;
    color: #2563eb;
    margin-bottom: 14px;
}

.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter,
.dataTables_wrapper .dataTables_info,
.dataTables_wrapper .dataTables_paginate {
    padding: 12px 16px;
}

.dataTables_wrapper .dataTables_filter input,
.dataTables_wrapper .dataTables_length select {
    border: 1px solid #dbe3ef;
    border-radius: 10px;
    padding: 6px 10px;
}

@media (max-width: 991.98px) {
    .page-hero {
        align-items: flex-start;
        flex-direction: column;
    }

    .sticky-form-card {
        position: static;
    }
}


@media (min-width: 768px) {
    body > .container-fluid > .row.g-0 {
        flex-wrap: nowrap !important;
    }

    body > .container-fluid > .row.g-0 > .sidebar {
        flex: 0 0 252px !important;
        width: 252px !important;
        max-width: 252px !important;
    }

    body > .container-fluid > .row.g-0 > .col.p-0 {
        flex: 1 1 auto !important;
        min-width: 0 !important;
        width: calc(100% - 252px) !important;
        max-width: calc(100% - 252px) !important;
    }
}

@media (min-width: 768px) and (max-width: 1399.98px) {
    body > .container-fluid > .row.g-0 > .sidebar {
        flex-basis: 230px !important;
        width: 230px !important;
        max-width: 230px !important;
    }

    body > .container-fluid > .row.g-0 > .col.p-0 {
        width: calc(100% - 230px) !important;
        max-width: calc(100% - 230px) !important;
    }
}

.plan-filter-bar,
.plan-family-stack,
.plan-family-card,
.plan-family-card .table-responsive,
.plan-table,
.dataTables_wrapper {
    max-width: 100%;
}

.plan-filter-bar {
    scrollbar-width: thin;
}

.plan-family-card .dataTables_wrapper .row {
    width: auto;
    margin-left: 0;
    margin-right: 0;
}

.plan-family-card .dataTables_wrapper .col-sm-12,
.plan-family-card .dataTables_wrapper .col-md-5,
.plan-family-card .dataTables_wrapper .col-md-6,
.plan-family-card .dataTables_wrapper .col-md-7 {
    min-width: 0;
}

.plan-family-card .table-responsive {
    overflow-x: auto;
}

.plan-table {
    min-width: 720px;
}

@media (max-width: 767.98px) {
    body > .container-fluid > .row.g-0 > .col.p-0 {
        width: 100% !important;
        max-width: 100% !important;
    }

    .plan-table {
        min-width: 680px;
    }
}

.professional-table thead th {
    background: #f8fafc;
    color: #475569;
    font-size: 0.78rem;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    border-bottom: 1px solid #e2e8f0;
}

.professional-table tbody td {
    border-color: #edf2f7;
    vertical-align: middle;
}

.professional-table tbody tr:hover {
    background: #f8fbff;
}

.hero-icon {
    width: 56px;
    height: 56px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #eaf1ff;
    color: #2563eb;
    font-size: 1.35rem;
}

.calendar-hero {
    background: linear-gradient(135deg, #ffffff 0%, #f0f7ff 100%);
    border: 1px solid #dbeafe;
    border-radius: 24px;
    padding: 22px 26px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    box-shadow: 0 18px 35px rgba(15, 23, 42, 0.06);
}

.calendar-control-card,
.calendar-section-card {
    background: #ffffff;
    border: 1px solid #e5edf8;
    border-radius: 24px;
    padding: 20px;
    box-shadow: 0 14px 32px rgba(15, 23, 42, 0.06);
}

.calendar-month-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.calendar-month-title {
    min-width: 220px;
    text-align: center;
    font-weight: 900;
    font-size: 1.3rem;
    color: #0f172a;
    letter-spacing: 0.01em;
}

.calendar-legend {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    color: #64748b;
    font-size: 0.82rem;
    font-weight: 700;
}

.calendar-legend span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    display: inline-block;
}

.status-en_cours-dot {
    background: #2563eb;
}

.status-en_retard-dot {
    background: #ef4444;
}

.status-terminee-dot {
    background: #16a34a;
}

.calendar-grid-wrapper {
    overflow-x: auto;
    padding: 0 4px 6px;
}

.calendar-month-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(170px, 1fr));
    gap: 12px;
    min-width: 1080px;
}

.calendar-day-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    padding: 12px;
    min-height: 155px;
    display: flex;
    flex-direction: column;
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.calendar-day-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
    border-color: #bfdbfe;
}

.calendar-day-card.is-today {
    background: #eff6ff;
    border-color: #2563eb;
}

.calendar-day-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.calendar-day-head strong {
    width: 34px;
    height: 34px;
    border-radius: 13px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    color: #0f172a;
    font-size: 0.95rem;
    box-shadow: inset 0 0 0 1px #e2e8f0;
}

.calendar-day-card.is-today .calendar-day-head strong {
    background: #2563eb;
    color: #ffffff;
    box-shadow: none;
}

.calendar-day-head small {
    color: #64748b;
    font-weight: 800;
    font-size: 0.72rem;
    text-transform: uppercase;
}

.calendar-day-events {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.calendar-empty {
    color: #94a3b8;
    font-size: 0.78rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px dashed #cbd5e1;
    border-radius: 12px;
    min-height: 52px;
}

.calendar-event {
    text-decoration: none;
    border-radius: 13px;
    padding: 8px 10px;
    color: #0f172a;
    display: flex;
    flex-direction: column;
    gap: 2px;
    border-left: 4px solid #2563eb;
    background: #ffffff;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.05);
}

.calendar-event span {
    font-weight: 900;
    font-size: 0.78rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.calendar-event small {
    color: #64748b;
    font-weight: 700;
    font-size: 0.72rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.calendar-event:hover {
    color: #0f172a;
    background: #f8fbff;
}

.calendar-event.event-en_cours {
    border-left-color: #2563eb;
}

.calendar-event.event-en_retard {
    border-left-color: #ef4444;
    background: #fff7f7;
}

.calendar-event.event-terminee {
    border-left-color: #16a34a;
    background: #f7fff9;
}

.calendar-more {
    color: #2563eb;
    font-weight: 900;
    font-size: 0.76rem;
    padding: 4px 2px;
}

.calendar-timeline-wrap {
    overflow-x: auto;
    padding: 0 4px 8px;
}

.calendar-timeline-table {
    width: 100%;
    min-width: 1120px;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 0.78rem;
}

.calendar-timeline-table th,
.calendar-timeline-table td {
    border-bottom: 1px solid #eef2f7;
    text-align: center;
    height: 38px;
}

.calendar-timeline-table thead th {
    background: #f8fafc;
    color: #64748b;
    font-weight: 900;
    font-size: 0.7rem;
    position: sticky;
    top: 0;
    z-index: 2;
}

.calendar-timeline-table thead th:first-child,
.vehicle-sticky-cell {
    position: sticky;
    left: 0;
    z-index: 3;
    background: #ffffff;
    text-align: left !important;
    min-width: 230px;
    width: 230px;
    padding: 10px 12px;
    box-shadow: 8px 0 20px rgba(15, 23, 42, 0.04);
}

.calendar-timeline-table thead th:first-child {
    background: #f8fafc;
}

.vehicle-sticky-cell strong,
.vehicle-sticky-cell small {
    display: block;
}

.vehicle-sticky-cell strong {
    color: #0f172a;
    font-weight: 900;
}

.vehicle-sticky-cell small {
    color: #64748b;
    font-weight: 700;
}

.timeline-day-cell {
    min-width: 32px;
    position: relative;
}

.timeline-day-cell.free::after,
.timeline-day-cell.occupied::after {
    content: "";
    width: 14px;
    height: 14px;
    border-radius: 999px;
    display: inline-block;
    vertical-align: middle;
}

.timeline-day-cell.free::after {
    background: #e2e8f0;
}

.timeline-day-cell.occupied.timeline-en_cours::after {
    background: #2563eb;
}

.timeline-day-cell.occupied.timeline-en_retard::after {
    background: #ef4444;
}

.timeline-day-cell.occupied.timeline-terminee::after {
    background: #16a34a;
}

.timeline-day-cell a {
    position: absolute;
    inset: 0;
    display: block;
}

@media (max-width: 991.98px) {
    .calendar-hero,
    .calendar-month-nav {
        flex-direction: column;
        align-items: stretch;
    }

    .calendar-month-title {
        min-width: auto;
    }

    .calendar-month-grid {
        grid-template-columns: repeat(7, minmax(150px, 1fr));
        min-width: 980px;
    }
}

.return-summary-card .card-body {
    padding: 1.15rem;
}

.return-info-line {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: .72rem 0;
    border-bottom: 1px dashed rgba(148, 163, 184, .35);
}

.return-info-line:last-child {
    border-bottom: 0;
}

.return-info-line span {
    color: #64748b;
    font-size: .82rem;
    font-weight: 700;
}

.return-info-line strong {
    color: #0f172a;
    text-align: right;
    font-size: .86rem;
}

.return-money-stack {
    display: grid;
    grid-template-columns: 1fr;
    gap: .75rem;
}

.return-money-card {
    background: #ffffff;
    border: 1px solid rgba(226, 232, 240, .95);
    border-radius: 18px;
    padding: 1rem;
    box-shadow: 0 12px 30px rgba(15, 23, 42, .06);
}

.return-money-card small,
.settlement-box small {
    display: block;
    color: #64748b;
    font-size: .75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .04em;
    margin-bottom: .25rem;
}

.return-money-card strong,
.settlement-box strong {
    display: block;
    color: #0f172a;
    font-size: 1.1rem;
    font-weight: 900;
}

.return-section {
    background: linear-gradient(135deg, rgba(37, 99, 235, .06), rgba(255, 255, 255, .9));
    border: 1px solid rgba(191, 219, 254, .8);
    border-radius: 22px;
    padding: 1rem;
}

.return-fees-container {
    display: grid;
    gap: .85rem;
}

.return-fee-row {
    display: grid;
    grid-template-columns: minmax(150px, 1fr) minmax(220px, 1.4fr) minmax(130px, .8fr) auto;
    gap: .75rem;
    align-items: end;
    background: #ffffff;
    border: 1px solid rgba(226, 232, 240, .95);
    border-radius: 18px;
    padding: .9rem;
}

.return-fee-row .form-label {
    font-size: .78rem;
    font-weight: 800;
    color: #64748b;
}

.remove-fee-row {
    width: 42px;
    height: 42px;
    border-radius: 14px;
}

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

.settlement-box {
    background: #ffffff;
    border: 1px solid rgba(226, 232, 240, .95);
    border-radius: 18px;
    padding: 1rem;
    box-shadow: 0 12px 30px rgba(15, 23, 42, .05);
}

.settlement-danger {
    background: linear-gradient(135deg, rgba(254, 242, 242, .95), #ffffff);
    border-color: rgba(252, 165, 165, .55);
}

.settlement-danger strong {
    color: #dc2626;
}

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

    .return-fee-row {
        grid-template-columns: 1fr;
    }

    .remove-fee-row {
        width: 100%;
    }
}

@media (max-width: 576px) {
    .return-settlement-grid {
        grid-template-columns: 1fr;
    }
}

.smart-alert-item {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr) auto;
    gap: 16px;
    align-items: center;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    padding: 16px;
    background: #fff;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
    margin-bottom: 12px;
    position: relative;
    overflow: hidden;
}

.smart-alert-item::before {
    content: "";
    position: absolute;
    inset-inline-start: 0;
    top: 0;
    bottom: 0;
    width: 5px;
}

.smart-alert-danger::before { background: #dc2626; }
.smart-alert-warning::before { background: #f59e0b; }
.smart-alert-info::before { background: #2563eb; }

.smart-alert-icon {
    width: 48px;
    height: 48px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8fafc;
    color: #0f172a;
    font-size: 20px;
}

.smart-alert-danger .smart-alert-icon { background: #fee2e2; color: #b91c1c; }
.smart-alert-warning .smart-alert-icon { background: #fef3c7; color: #b45309; }
.smart-alert-info .smart-alert-icon { background: #dbeafe; color: #1d4ed8; }

.smart-alert-body h6 {
    font-weight: 800;
    color: #0f172a;
}

.smart-alert-side {
    min-width: 150px;
    text-align: end;
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: flex-end;
}

.smart-alert-date {
    font-size: 12px;
    font-weight: 800;
    color: #475569;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 999px;
    padding: 6px 10px;
}

.alert-priority-danger {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.alert-priority-warning {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
}

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

.alert-mini-card {
    border-radius: 18px;
    padding: 16px 18px;
    background: #fff;
    border: 1px solid #e5e7eb;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.alert-mini-card span {
    color: #64748b;
    font-size: 13px;
    font-weight: 700;
}

.alert-mini-card strong {
    color: #0f172a;
    font-size: 24px;
    font-weight: 900;
}

.empty-state-card {
    padding: 42px 20px;
    text-align: center;
    color: #64748b;
    border: 1px dashed #cbd5e1;
    border-radius: 20px;
    background: #f8fafc;
}

.empty-state-card i {
    font-size: 42px;
    color: #16a34a;
    margin-bottom: 14px;
}

.empty-state-card h6 {
    font-weight: 800;
    color: #0f172a;
}

.metric-blue {
    background: linear-gradient(135deg, #eff6ff, #dbeafe);
    border-color: #bfdbfe;
}

.metric-blue .metric-icon {
    background: #2563eb;
    color: #fff;
}

@media (max-width: 768px) {
    .smart-alert-item {
        grid-template-columns: 42px 1fr;
    }

    .smart-alert-side {
        grid-column: 1 / -1;
        min-width: 0;
        width: 100%;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        text-align: start;
    }
}

.backup-card {
    background: #fff;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 24px;
    padding: 26px;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.07);
    position: relative;
    overflow: hidden;
}

.backup-card h5 {
    font-weight: 800;
    margin-bottom: 8px;
    color: #0f172a;
}

.backup-card p {
    color: #64748b;
    min-height: 54px;
    margin-bottom: 22px;
}

.backup-card-icon {
    width: 54px;
    height: 54px;
    border-radius: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    margin-bottom: 18px;
}

.backup-card-featured {
    border-color: rgba(245, 158, 11, 0.35);
    background: linear-gradient(135deg, #ffffff 0%, #fff7ed 100%);
}

.backup-tips {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.backup-tips div {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 12px 14px;
    background: #f8fafc;
    border: 1px solid rgba(15, 23, 42, 0.06);
    border-radius: 16px;
    color: #475569;
}

.backup-tips i {
    color: #16a34a;
    margin-top: 3px;
}

.datatable-compact th,
.datatable-compact td {
    white-space: nowrap;
}

.document-sequence-list {
    display: grid;
    gap: 12px;
}

.document-sequence-item {
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    background: #f8fafc;
    padding: 14px;
}

.document-sequence-item strong {
    display: block;
    color: #0f172a;
    font-size: 0.9rem;
}

.document-sequence-item small {
    display: block;
    color: #2563eb;
    font-weight: 800;
    margin-top: 2px;
}

.devis-summary-card {
    border: 0;
    border-radius: 22px;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
}

.devis-status-flow {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.devis-status-flow .badge {
    padding: 8px 12px;
    font-weight: 700;
}

.actions-nowrap {
    white-space: nowrap;
}

.actions-nowrap form {
    display: inline-flex;
}

.client-profile-page {
    max-width: 1520px;
    margin: 0 auto;
}

.client-profile-hero {
    background: linear-gradient(135deg, #ffffff 0%, #f8fbff 100%);
    border: 1px solid rgba(37, 99, 235, .10);
    border-radius: 28px;
    padding: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    box-shadow: 0 18px 45px rgba(15, 23, 42, .06);
}

.client-profile-main {
    display: flex;
    align-items: center;
    gap: 18px;
    min-width: 0;
}

.client-profile-avatar {
    width: 88px;
    height: 88px;
    border-radius: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #2563eb, #38bdf8);
    color: #fff;
    font-size: 30px;
    font-weight: 900;
    box-shadow: 0 18px 34px rgba(37, 99, 235, .25);
    flex: 0 0 auto;
}

.client-profile-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 10px;
}

.client-risk-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.client-risk {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 11px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    border: 1px solid transparent;
}

.risk-success {
    color: #047857;
    background: #dcfce7;
    border-color: #bbf7d0;
}

.risk-warning {
    color: #b45309;
    background: #fef3c7;
    border-color: #fde68a;
}

.risk-danger {
    color: #b91c1c;
    background: #fee2e2;
    border-color: #fecaca;
}

.risk-info {
    color: #1d4ed8;
    background: #dbeafe;
    border-color: #bfdbfe;
}

.client-kpi-card {
    background: #fff;
    border: 1px solid rgba(148, 163, 184, .18);
    border-radius: 24px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: 0 15px 36px rgba(15, 23, 42, .06);
    height: 100%;
    position: relative;
    overflow: hidden;
}

.client-kpi-card:after {
    content: "";
    position: absolute;
    right: -45px;
    bottom: -45px;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    opacity: .09;
    background: currentColor;
}

.client-kpi-card > span {
    width: 54px;
    height: 54px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex: 0 0 auto;
}

.client-kpi-card small {
    display: block;
    color: #64748b;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .045em;
    font-size: 11px;
}

.client-kpi-card strong {
    display: block;
    color: #0f172a;
    font-size: 22px;
    font-weight: 900;
    line-height: 1.15;
    margin-top: 4px;
}

.client-kpi-card em {
    display: block;
    color: #64748b;
    font-style: normal;
    font-size: 12px;
    margin-top: 4px;
}

.kpi-blue {
    color: #2563eb;
}

.kpi-blue > span {
    background: #dbeafe;
    color: #2563eb;
}

.kpi-green {
    color: #16a34a;
}

.kpi-green > span {
    background: #dcfce7;
    color: #16a34a;
}

.kpi-orange {
    color: #ea580c;
}

.kpi-orange > span {
    background: #ffedd5;
    color: #ea580c;
}

.kpi-purple {
    color: #7c3aed;
}

.kpi-purple > span {
    background: #ede9fe;
    color: #7c3aed;
}

.client-panel {
    background: #fff;
    border: 1px solid rgba(148, 163, 184, .18);
    border-radius: 26px;
    padding: 20px;
    box-shadow: 0 18px 42px rgba(15, 23, 42, .06);
}

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

.client-panel-header h6 {
    margin: 0;
    color: #0f172a;
    font-size: 16px;
    font-weight: 900;
}

.client-count-pill {
    background: #eff6ff;
    color: #2563eb;
    border-radius: 999px;
    padding: 6px 11px;
    font-size: 12px;
    font-weight: 900;
}

.client-info-list {
    display: grid;
    gap: 10px;
}

.client-info-list > div,
.client-address-box,
.client-note-box {
    background: #f8fafc;
    border: 1px solid rgba(148, 163, 184, .16);
    border-radius: 18px;
    padding: 13px 14px;
}

.client-info-list > div {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.client-info-list span,
.client-address-box span,
.client-note-box span {
    color: #64748b;
    font-size: 12px;
    font-weight: 800;
}

.client-info-list strong,
.client-address-box strong {
    color: #0f172a;
    font-size: 13px;
    font-weight: 800;
    text-align: right;
}

.client-note-box p {
    margin: 6px 0 0;
    color: #334155;
    font-size: 13px;
    line-height: 1.6;
}

.client-progress-item {
    margin-bottom: 16px;
}

.client-progress-item:last-child {
    margin-bottom: 0;
}

.client-progress-item > div:first-child {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
    color: #475569;
    font-size: 13px;
    font-weight: 800;
}

.client-progress-item .progress {
    height: 9px;
    border-radius: 999px;
    background: #e5e7eb;
    overflow: hidden;
}

.client-progress-item .progress-bar {
    border-radius: 999px;
}

.client-mini-list {
    display: grid;
    gap: 10px;
}

.client-mini-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 12px;
    border-radius: 18px;
    background: #f8fafc;
    border: 1px solid rgba(148, 163, 184, .14);
}

.client-mini-row strong {
    display: block;
    color: #0f172a;
    font-size: 13px;
    font-weight: 900;
}

.client-mini-row span {
    display: block;
    color: #64748b;
    font-size: 12px;
    margin-top: 3px;
}

.client-mini-row a {
    display: inline-flex;
    margin-top: 4px;
    color: #2563eb;
    font-weight: 800;
    text-decoration: none;
    font-size: 12px;
}

.client-empty {
    border: 1px dashed rgba(148, 163, 184, .55);
    background: #f8fafc;
    border-radius: 18px;
    padding: 24px;
    color: #64748b;
    text-align: center;
    font-weight: 700;
}

.status-danger {
    background: #fee2e2;
    color: #b91c1c;
}

.status-success {
    background: #dcfce7;
    color: #047857;
}

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

.status-info {
    background: #dbeafe;
    color: #1d4ed8;
}

.status-draft {
    background: #f1f5f9;
    color: #475569;
}

.status-neutral {
    background: #f1f5f9;
    color: #334155;
}

@media (max-width: 991.98px) {
    .client-profile-hero,
    .client-profile-main {
        flex-direction: column;
        align-items: flex-start;
    }

    .client-profile-actions {
        justify-content: flex-start;
        width: 100%;
    }

    .client-profile-actions .btn {
        flex: 1 1 auto;
    }
}
.info-mini {
    border: 1px solid rgba(226, 232, 240, .95);
    background: #f8fafc;
    border-radius: 16px;
    padding: 14px 16px;
    min-height: 76px;
}

.info-mini small {
    display: block;
    color: #64748b;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    font-size: .72rem;
    margin-bottom: 6px;
}

.info-mini strong {
    color: #0f172a;
    font-size: .95rem;
}

.summary-card {
    background: #fff;
    border: 1px solid rgba(226, 232, 240, .95);
    border-radius: 22px;
    box-shadow: 0 18px 40px rgba(15, 23, 42, .08);
    padding: 18px;
}

.summary-line {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 0;
    border-bottom: 1px solid #eef2f7;
}

.summary-line:last-child {
    border-bottom: 0;
}

.summary-line span {
    color: #64748b;
    font-weight: 700;
}

.summary-line strong {
    color: #0f172a;
    font-weight: 900;
}

.summary-line.total {
    background: #eff6ff;
    border-radius: 16px;
    border-bottom: 0;
    padding: 14px;
    margin-top: 8px;
}

.summary-line.total span,
.summary-line.total strong {
    color: #1d4ed8;
}

.vehicle-profile-hero {
    background: linear-gradient(135deg, rgba(13,110,253,.08), rgba(25,135,84,.08));
    border: 1px solid rgba(15,23,42,.08);
    border-radius: 28px;
    padding: 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    box-shadow: 0 18px 55px rgba(15,23,42,.08);
}

.vehicle-profile-cover {
    display: flex;
    align-items: center;
    gap: 20px;
    min-width: 0;
}

.vehicle-profile-photo-wrap {
    flex: 0 0 auto;
}

.vehicle-profile-photo {
    width: 142px;
    height: 104px;
    border-radius: 22px;
    object-fit: cover;
    background: #fff;
    border: 4px solid #fff;
    box-shadow: 0 12px 35px rgba(15,23,42,.12);
}

.vehicle-profile-photo-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    font-size: 42px;
}

.vehicle-profile-main {
    min-width: 0;
}

.vehicle-profile-actions {
    flex-wrap: wrap;
    justify-content: flex-end;
}

.vehicle-meta-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    border: 1px solid rgba(15,23,42,.08);
    background: rgba(255,255,255,.78);
    color: #334155;
    padding: 7px 11px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

.vehicle-stats-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.vehicle-panel {
    background: #fff;
    border: 1px solid rgba(15,23,42,.08);
    border-radius: 24px;
    padding: 20px;
    box-shadow: 0 16px 45px rgba(15,23,42,.06);
}

.vehicle-panel-title {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #0f172a;
    font-weight: 800;
    margin-bottom: 16px;
}

.vehicle-panel-title i {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    color: #0d6efd;
    background: rgba(13,110,253,.1);
}

.vehicle-info-list,
.vehicle-alert-list,
.vehicle-kpi-split {
    display: grid;
    gap: 10px;
}

.vehicle-info-list div,
.vehicle-alert-list div,
.vehicle-kpi-split div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px dashed rgba(15,23,42,.08);
}

.vehicle-info-list div:last-child,
.vehicle-alert-list div:last-child,
.vehicle-kpi-split div:last-child {
    border-bottom: 0;
}

.vehicle-info-list span,
.vehicle-alert-list span,
.vehicle-kpi-split span {
    color: #64748b;
    font-size: 12px;
    font-weight: 700;
}

.vehicle-info-list strong,
.vehicle-alert-list strong,
.vehicle-kpi-split strong {
    color: #0f172a;
    font-size: 13px;
    text-align: right;
}

.vehicle-alert-list div {
    align-items: flex-start;
    flex-wrap: wrap;
}

.vehicle-alert-list em {
    font-style: normal;
}

.vehicle-progress .progress {
    height: 9px;
    border-radius: 999px;
    background: #e2e8f0;
}

.vehicle-progress .progress-bar {
    background: linear-gradient(90deg, #0d6efd, #20c997);
    border-radius: 999px;
}

.vehicle-current-card {
    border: 1px solid rgba(13,110,253,.12);
    background: rgba(13,110,253,.06);
    border-radius: 18px;
    padding: 14px;
    display: grid;
    gap: 4px;
}

.vehicle-current-card small {
    color: #64748b;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.vehicle-current-card strong {
    color: #0f172a;
}

.vehicle-current-card span {
    color: #475569;
    font-size: 13px;
}

.vehicle-tabs-card {
    background: #fff;
    border: 1px solid rgba(15,23,42,.08);
    border-radius: 24px;
    box-shadow: 0 16px 45px rgba(15,23,42,.06);
    overflow: hidden;
}

.vehicle-tabs {
    padding: 14px 14px 0;
    gap: 8px;
    border-bottom: 1px solid rgba(15,23,42,.08);
}

.vehicle-tabs .nav-link {
    border-radius: 999px;
    color: #475569;
    font-weight: 800;
    padding: 9px 16px;
}

.vehicle-tabs .nav-link.active {
    background: #0d6efd;
    color: #fff;
}

@media (max-width: 991px) {
    .vehicle-profile-hero,
    .vehicle-profile-cover {
        align-items: flex-start;
        flex-direction: column;
    }

    .vehicle-profile-actions {
        justify-content: flex-start;
        width: 100%;
    }

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

@media (max-width: 575px) {
    .vehicle-profile-photo {
        width: 100%;
        height: 180px;
    }

    .vehicle-profile-photo-wrap,
    .vehicle-profile-main {
        width: 100%;
    }

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

@media print {
    .vehicle-profile-actions,
    .sidebar,
    .navbar,
    .offcanvas,
    .dataTables_length,
    .dataTables_filter,
    .dataTables_info,
    .dataTables_paginate {
        display: none !important;
    }

    .vehicle-profile-hero,
    .vehicle-panel,
    .vehicle-tabs-card,
    .list-stat-card {
        box-shadow: none !important;
        border-color: #d8dee9 !important;
    }

    .vehicle-tabs {
        display: none;
    }

    .tab-pane {
        display: block !important;
        opacity: 1 !important;
    }
}

@media (min-width: 768px) {
    body > .container-fluid > .row.g-0 > .sidebar {
        flex: 0 0 252px !important;
        width: 252px !important;
        max-width: 252px !important;
        min-width: 252px !important;
        overflow: hidden !important;
    }

    body > .container-fluid > .row.g-0 > .col.p-0 {
        flex: 1 1 auto !important;
        min-width: 0 !important;
        width: calc(100% - 252px) !important;
        max-width: calc(100% - 252px) !important;
    }
}

.sidebar {
    display: flex !important;
    flex-direction: column !important;
    flex-wrap: nowrap !important;
}

.sidebar-brand {
    color: var(--dark-text) !important;
    flex: 0 0 auto;
}

.sidebar-brand-logo {
    width: 64px !important;
    height: 64px !important;
    object-fit: cover;
    border: 2px solid rgba(37, 99, 235, 0.12) !important;
}

.sidebar-brand-title {
    font-size: 0.92rem !important;
    line-height: 1.25;
}

.sidebar-menu-wrapper {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 0.15rem;
}

[dir="rtl"] .sidebar-menu-wrapper {
    padding-right: 0;
    padding-left: 0.15rem;
}

.sidebar-nav,
.sidebar-subnav {
    display: flex !important;
    flex-direction: column !important;
    flex-wrap: nowrap !important;
    gap: 0.18rem;
    width: 100%;
    margin: 0;
    padding: 0;
}

.sidebar-nav > li,
.sidebar-subnav > li,
.offcanvas .sidebar-nav > li,
.offcanvas .sidebar-subnav > li {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    flex: 0 0 auto !important;
    break-inside: avoid;
    page-break-inside: avoid;
}

.sidebar-group-item {
    margin-bottom: 0.2rem;
}

.sidebar-section-toggle {
    width: 100%;
    border: 0;
    background: transparent;
    color: #64748b;
    padding: 0.46rem 0.55rem;
    border-radius: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.76rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.035em;
}

.sidebar-section-toggle:hover {
    background: #f1f5f9;
    color: var(--primary-blue-dark);
}

.sidebar-section-toggle span {
    display: flex;
    align-items: center;
    min-width: 0;
}

.sidebar-section-toggle span i {
    width: 22px;
    text-align: center;
    color: var(--primary-blue);
}

.sidebar-chevron {
    font-size: 0.68rem;
    transition: transform 0.18s ease;
    color: #94a3b8;
}

.sidebar-section-toggle:not(.collapsed) .sidebar-chevron {
    transform: rotate(180deg);
}

.sidebar-subnav {
    padding: 0.16rem 0 0.25rem 0.38rem;
}

[dir="rtl"] .sidebar-subnav {
    padding: 0.16rem 0.38rem 0.25rem 0;
}

.sidebar .nav-link,
.offcanvas .nav-link {
    display: flex !important;
    align-items: center;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 0.56rem 0.65rem;
    margin-bottom: 0.08rem;
    font-size: 0.86rem;
    border-radius: 0.82rem;
}

.sidebar .nav-link span,
.offcanvas .nav-link span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar .nav-link i,
.offcanvas .nav-link i {
    flex: 0 0 24px;
    width: 24px;
}

.sidebar-single-item .nav-link {
    font-weight: 800;
}

.sidebar-user-card {
    flex: 0 0 auto;
    border-top: 1px solid rgba(148, 163, 184, 0.22);
    padding-top: 0.85rem;
}

.sidebar-user-card a {
    color: var(--dark-text) !important;
}

.sidebar-user-card strong {
    display: block;
    max-width: 158px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.86rem;
}

.offcanvas .sidebar-menu-wrapper {
    max-height: calc(100vh - 170px);
}

.offcanvas .sidebar-section-toggle {
    color: rgba(255, 255, 255, 0.88);
}

.offcanvas .sidebar-section-toggle:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
}

.offcanvas .sidebar-section-toggle span i,
.offcanvas .sidebar-chevron {
    color: rgba(255, 255, 255, 0.9);
}

.offcanvas .nav-link {
    color: rgba(255, 255, 255, 0.9) !important;
}

.offcanvas .nav-link i {
    color: #ffffff !important;
}

.offcanvas .nav-link:hover,
.offcanvas .nav-link.active {
    color: #ffffff !important;
    background: rgba(255, 255, 255, 0.16) !important;
}

@media (min-width: 768px) and (max-width: 1399.98px) {
    body > .container-fluid > .row.g-0 > .sidebar {
        flex-basis: 236px !important;
        width: 236px !important;
        max-width: 236px !important;
        min-width: 236px !important;
    }

    body > .container-fluid > .row.g-0 > .col.p-0 {
        width: calc(100% - 236px) !important;
        max-width: calc(100% - 236px) !important;
    }

    .sidebar-brand-logo {
        width: 58px !important;
        height: 58px !important;
    }

    .sidebar .nav-link {
        font-size: 0.83rem;
        padding: 0.52rem 0.58rem;
    }

    .sidebar-section-toggle {
        font-size: 0.72rem;
        padding: 0.42rem 0.5rem;
    }
}

.kpi-red {
    color: #dc2626;
}

.kpi-red > span {
    background: #fee2e2;
    color: #dc2626;
}

.client-doc-upload-card {
    position: sticky;
    top: 24px;
}

.client-doc-grid {
    display: grid;
    gap: 14px;
}

.client-doc-card {
    display: flex;
    align-items: center;
    gap: 14px;
    background: #f8fafc;
    border: 1px solid rgba(148, 163, 184, .18);
    border-radius: 20px;
    padding: 14px;
    transition: .18s ease;
}

.client-doc-card:hover {
    transform: translateY(-2px);
    background: #ffffff;
    box-shadow: 0 14px 32px rgba(15, 23, 42, .07);
}

.client-doc-icon {
    width: 48px;
    height: 48px;
    border-radius: 16px;
    background: #dbeafe;
    color: #2563eb;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex: 0 0 auto;
}

.client-doc-content {
    flex: 1 1 auto;
    min-width: 0;
    display: grid;
    gap: 3px;
}

.client-doc-content strong {
    color: #0f172a;
    font-weight: 900;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.client-doc-content span,
.client-doc-content small,
.client-doc-content em {
    font-size: 12px;
    color: #64748b;
    font-style: normal;
}

.client-doc-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
}

.client-doc-actions form {
    margin: 0;
}

.vehicle-doc-grid .client-doc-icon {
    background: #ecfeff;
    color: #0891b2;
}

@media (max-width: 767.98px) {
    .client-doc-upload-card {
        position: static;
    }

    .client-doc-card {
        align-items: flex-start;
    }

    .client-doc-actions {
        flex-direction: column;
    }
}

.role-superadmin {
    background: #ede9fe;
    color: #5b21b6;
}

.superadmin-note {
    border-radius: 1rem;
    border: 1px solid #ddd6fe;
    background: #f5f3ff;
    color: #4c1d95;
}


.permission-info-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: #fff;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 1.25rem;
    padding: 1rem;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.05);
}

.permission-info-icon {
    width: 48px;
    height: 48px;
    min-width: 48px;
    border-radius: 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
}

.permission-matrix-card {
    background: #fff;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 1.25rem;
    box-shadow: 0 12px 36px rgba(15, 23, 42, 0.06);
    overflow: hidden;
}

.permission-matrix-table thead th {
    background: #f8fafc;
    color: #334155;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
    padding: 1rem;
}

.permission-matrix-table tbody td {
    padding: 1rem;
    border-color: rgba(15, 23, 42, 0.06);
}

.permission-module-col {
    min-width: 260px;
}

.permission-module-icon {
    width: 42px;
    height: 42px;
    min-width: 42px;
    border-radius: 0.9rem;
    background: #eef2ff;
    color: #2563eb;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.permission-toggle {
    width: 2.8rem;
    height: 1.45rem;
    cursor: pointer;
}
