/* =============================================
   MACASE - Islamic Logistics App - Main Styles
   ============================================= */

:root {
    --primary: #1a6b3c;
    --primary-dark: #0f4425;
    --primary-light: #2d9e5f;
    --secondary: #c9a84c;
    --secondary-dark: #a07a20;
    --secondary-light: #f0cb6e;
    --accent: #1d4e89;
    --dark: #0d1b0f;
    --light-bg: #f4f8f5;
    --card-bg: #ffffff;
    --text-dark: #1a2a1d;
    --text-muted: #6c8f74;
    --border: #d4e8db;
    --success: #198754;
    --warning: #d4a017;
    --danger: #c0392b;
    --info: #1d6fa5;
    --sidebar-width: 270px;
    --topbar-height: 65px;
}

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

body {
    font-family: 'Segoe UI', 'Noto Sans Arabic', Tahoma, sans-serif;
    background: var(--light-bg);
    color: var(--text-dark);
    min-height: 100vh;
}

/* ======= ISLAMIC PATTERN BACKGROUND ======= */
.islamic-bg {
    background-color: var(--primary-dark);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80' viewBox='0 0 80 80'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Cpath d='M40 0 L50 20 L40 40 L30 20 Z'/%3E%3Cpath d='M40 40 L60 50 L40 60 L20 50 Z'/%3E%3Cpath d='M0 40 L20 30 L40 40 L20 50 Z'/%3E%3Cpath d='M40 40 L60 30 L80 40 L60 50 Z'/%3E%3C/g%3E%3C/svg%3E");
}

/* ======= SCROLLBAR ======= */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: #e8f4ed; }
::-webkit-scrollbar-thumb { background: var(--primary-light); border-radius: 10px; }

/* ======= LOGIN PAGE ======= */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-dark) 0%, #1a4a2e 40%, #0d3320 100%);
    position: relative;
    overflow: hidden;
}

.login-page::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-image: repeating-linear-gradient(
        0deg, transparent, transparent 50px,
        rgba(255,255,255,0.015) 50px, rgba(255,255,255,0.015) 51px
    ), repeating-linear-gradient(
        90deg, transparent, transparent 50px,
        rgba(255,255,255,0.015) 50px, rgba(255,255,255,0.015) 51px
    );
}

.login-card {
    background: white;
    border-radius: 20px;
    padding: 50px 45px;
    width: 100%;
    max-width: 460px;
    box-shadow: 0 30px 80px rgba(0,0,0,0.4);
    position: relative;
    z-index: 2;
    border-top: 5px solid var(--secondary);
}

.login-logo {
    text-align: center;
    margin-bottom: 30px;
}

.login-logo .crescent {
    font-size: 3.5rem;
    color: var(--primary);
    display: block;
    line-height: 1;
}

.login-logo h1 {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--primary-dark);
    letter-spacing: 2px;
    margin-top: 8px;
}

.login-logo p {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-top: 5px;
}

.basmala {
    text-align: center;
    font-size: 1.1rem;
    color: var(--secondary-dark);
    font-style: italic;
    margin-bottom: 25px;
    padding: 10px;
    background: linear-gradient(135deg, #fef9ee, #fdf3d4);
    border-radius: 10px;
    border: 1px solid #f0cb6e;
}

/* ======= SIDEBAR ======= */
.sidebar {
    width: var(--sidebar-width);
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    background: linear-gradient(180deg, var(--primary-dark) 0%, #0f3320 60%, #081a10 100%);
    z-index: 1050;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease;
    overflow: hidden;
}

.sidebar-brand {
    padding: 20px 20px 15px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(0,0,0,0.2);
}

.sidebar-brand .brand-icon {
    width: 46px;
    height: 46px;
    background: linear-gradient(135deg, var(--secondary), var(--secondary-dark));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    flex-shrink: 0;
    box-shadow: 0 4px 15px rgba(201,168,76,0.4);
}

.sidebar-brand .brand-text h6 {
    color: white;
    font-weight: 700;
    font-size: 1rem;
    margin: 0;
    letter-spacing: 1px;
}

.sidebar-brand .brand-text small {
    color: rgba(255,255,255,0.45);
    font-size: 0.65rem;
    display: block;
}

.sidebar-user {
    padding: 14px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.07);
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-user .user-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-light), var(--primary));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.sidebar-user .user-info .name {
    color: white;
    font-size: 0.82rem;
    font-weight: 600;
    margin: 0;
}

.sidebar-user .user-info .role-badge {
    font-size: 0.65rem;
    padding: 1px 7px;
    border-radius: 20px;
    background: rgba(201,168,76,0.25);
    color: var(--secondary-light);
    border: 1px solid rgba(201,168,76,0.3);
}

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 12px 0;
}

.sidebar-nav .nav-section {
    padding: 8px 20px 4px;
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: rgba(255,255,255,0.3);
    font-weight: 600;
}

.sidebar-nav .nav-item a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 20px;
    color: rgba(255,255,255,0.65);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.25s ease;
    border-left: 3px solid transparent;
    position: relative;
}

.sidebar-nav .nav-item a:hover,
.sidebar-nav .nav-item a.active,
.sidebar-nav .nav-item.active a {
    color: white;
    background: rgba(255,255,255,0.07);
    border-left-color: var(--secondary);
}

.sidebar-nav .nav-item a .nav-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    background: rgba(255,255,255,0.06);
    transition: all 0.25s ease;
    flex-shrink: 0;
}

.sidebar-nav .nav-item a:hover .nav-icon,
.sidebar-nav .nav-item a.active .nav-icon,
.sidebar-nav .nav-item.active a .nav-icon {
    background: rgba(201,168,76,0.2);
    color: var(--secondary-light);
}

.sidebar-nav .nav-item a .badge-count {
    margin-left: auto;
    background: var(--secondary);
    color: var(--dark);
    font-size: 0.65rem;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 20px;
    min-width: 20px;
    text-align: center;
    position: static;
    flex-shrink: 0;
}

/* ======= MAIN CONTENT ======= */
.main-wrapper {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ======= TOPBAR ======= */
.topbar {
    height: var(--topbar-height);
    background: white;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    padding: 0 25px;
    gap: 15px;
    position: sticky;
    top: 0;
    z-index: 999;
    box-shadow: 0 2px 10px rgba(0,0,0,0.06);
}

.topbar .page-title {
    flex: 1;
}

.topbar .page-title h5 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--primary-dark);
    margin: 0;
}

.topbar .page-title small {
    color: var(--text-muted);
    font-size: 0.75rem;
}

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

.notif-btn {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--light-bg);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    cursor: pointer;
    position: relative;
    transition: all 0.2s;
}

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

.notif-btn .dot {
    position: absolute;
    top: 8px; right: 8px;
    width: 8px; height: 8px;
    background: var(--danger);
    border-radius: 50%;
    border: 2px solid white;
}

.time-display {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    color: white;
    padding: 6px 14px;
    border-radius: 10px;
    font-size: 0.78rem;
    font-weight: 600;
}

/* ======= CONTENT AREA ======= */
.content-area {
    padding: 25px;
    flex: 1;
}

/* ======= STAT CARDS ======= */
.stat-card {
    background: white;
    border-radius: 16px;
    padding: 22px;
    border: 1px solid var(--border);
    box-shadow: 0 2px 12px rgba(0,0,0,0.05);
    transition: transform 0.2s, box-shadow 0.2s;
    position: relative;
    overflow: hidden;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    border-radius: 16px 16px 0 0;
}

.stat-card.green::before { background: linear-gradient(90deg, var(--primary), var(--primary-light)); }
.stat-card.gold::before { background: linear-gradient(90deg, var(--secondary-dark), var(--secondary-light)); }
.stat-card.blue::before { background: linear-gradient(90deg, var(--accent), #3a7bd5); }
.stat-card.red::before { background: linear-gradient(90deg, var(--danger), #e74c3c); }

.stat-card .stat-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    margin-bottom: 15px;
}

.stat-card.green .stat-icon { background: linear-gradient(135deg, #e8f5ee, #c8e6d4); color: var(--primary); }
.stat-card.gold .stat-icon { background: linear-gradient(135deg, #fef9ee, #fde8a0); color: var(--secondary-dark); }
.stat-card.blue .stat-icon { background: linear-gradient(135deg, #e8f0fc, #c5d8f8); color: var(--accent); }
.stat-card.red .stat-icon { background: linear-gradient(135deg, #fdecea, #f8c4bf); color: var(--danger); }

.stat-card .stat-value {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-dark);
    line-height: 1;
    margin-bottom: 5px;
}

.stat-card .stat-label {
    color: var(--text-muted);
    font-size: 0.8rem;
    font-weight: 500;
}

.stat-card .stat-footer {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
    font-size: 0.75rem;
    color: var(--text-muted);
}

.stat-card .stat-footer .trend {
    font-weight: 600;
}

.stat-card .stat-footer .trend.up { color: var(--success); }
.stat-card .stat-footer .trend.down { color: var(--danger); }

/* ======= CARDS ======= */
.app-card {
    background: white;
    border-radius: 16px;
    border: 1px solid var(--border);
    box-shadow: 0 2px 12px rgba(0,0,0,0.04);
    overflow: hidden;
    margin-bottom: 20px;
}

.app-card .card-header-custom {
    padding: 18px 22px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, #f8fcf9, #f0f8f3);
}

.app-card .card-header-custom h6 {
    font-weight: 700;
    color: var(--primary-dark);
    margin: 0;
    font-size: 0.92rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.app-card .card-header-custom h6 .header-icon {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
}

.app-card .card-body-custom {
    padding: 22px;
}

/* ======= TABLES ======= */
.table-islamic {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 0.84rem;
}

.table-islamic thead th {
    background: linear-gradient(135deg, var(--primary-dark), #1a4a2e);
    color: white;
    padding: 12px 16px;
    font-weight: 600;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    border: none;
}

.table-islamic thead th:first-child { border-radius: 10px 0 0 0; }
.table-islamic thead th:last-child { border-radius: 0 10px 0 0; }

.table-islamic tbody tr {
    transition: background 0.15s;
}

.table-islamic tbody tr:hover td {
    background: #f0f8f3;
}

.table-islamic tbody td {
    padding: 12px 16px;
    border-bottom: 1px solid #edf4ef;
    color: var(--text-dark);
    vertical-align: middle;
}

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

/* ======= BADGES ======= */
.badge-status {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.badge-status::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

.badge-status.en_attente { background: #fff3cd; color: #856404; }
.badge-status.en_attente::before { background: #ffc107; }
.badge-status.arrive { background: #d1e7dd; color: #0f5132; }
.badge-status.arrive::before { background: #198754; }
.badge-status.en_transit { background: #cfe2ff; color: #084298; }
.badge-status.en_transit::before { background: #0d6efd; }
.badge-status.au_mehidane { background: #d4edda; color: #155724; }
.badge-status.au_mehidane::before { background: #28a745; }
.badge-status.parti { background: #f8d7da; color: #721c24; }
.badge-status.parti::before { background: #dc3545; }
.badge-status.programme { background: #e2e3e5; color: #383d41; }
.badge-status.programme::before { background: #6c757d; }
.badge-status.en_route { background: #cfe2ff; color: #084298; }
.badge-status.en_route::before { background: #0d6efd; }
.badge-status.atterri { background: #d1e7dd; color: #0f5132; }
.badge-status.atterri::before { background: #198754; }
.badge-status.annule { background: #f8d7da; color: #721c24; }
.badge-status.annule::before { background: #dc3545; }

/* ======= FORMS ======= */
.form-label-islamic {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--primary-dark);
    margin-bottom: 6px;
    display: block;
}

.form-control-islamic {
    border: 1.5px solid var(--border);
    border-radius: 10px;
    padding: 9px 14px;
    font-size: 0.85rem;
    color: var(--text-dark);
    transition: all 0.2s;
    width: 100%;
}

.form-control-islamic:focus {
    outline: none;
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(45,158,95,0.12);
}

/* ======= BUTTONS ======= */
.btn-islamic {
    padding: 9px 20px;
    border-radius: 10px;
    font-size: 0.84rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}

.btn-islamic-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    box-shadow: 0 4px 15px rgba(26,107,60,0.3);
}

.btn-islamic-primary:hover {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(26,107,60,0.4);
    color: white;
}

.btn-islamic-gold {
    background: linear-gradient(135deg, var(--secondary-dark), var(--secondary));
    color: white;
    box-shadow: 0 4px 15px rgba(160,122,32,0.3);
}

.btn-islamic-gold:hover {
    background: linear-gradient(135deg, #7a5c10, var(--secondary-dark));
    transform: translateY(-1px);
    color: white;
}

.btn-islamic-outline {
    background: transparent;
    border: 1.5px solid var(--primary);
    color: var(--primary);
}

.btn-islamic-outline:hover {
    background: var(--primary);
    color: white;
}

.btn-sm-action {
    width: 30px;
    height: 30px;
    border-radius: 7px;
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-sm-action.view { background: #e8f0fc; color: var(--accent); }
.btn-sm-action.edit { background: #fef9ee; color: var(--secondary-dark); }
.btn-sm-action.delete { background: #fdecea; color: var(--danger); }
.btn-sm-action:hover { filter: brightness(0.9); transform: scale(1.1); }

/* ======= MODAL ======= */
.modal-islamic .modal-content {
    border-radius: 18px;
    border: none;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
}

.modal-islamic .modal-header {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    color: white;
    border-radius: 18px 18px 0 0;
    padding: 18px 25px;
    border-bottom: none;
}

.modal-islamic .modal-header .modal-title {
    font-size: 1rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-islamic .modal-header .btn-close {
    filter: invert(1);
    opacity: 0.7;
}

.modal-islamic .modal-body {
    padding: 25px;
}

.modal-islamic .modal-footer {
    padding: 15px 25px;
    border-top: 1px solid var(--border);
    border-radius: 0 0 18px 18px;
}

/* ======= AUTOCOMPLETE =======*/
.autocomplete-wrapper { position: relative; }
.autocomplete-results {
    display: none;
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    z-index: 1200;
    background: white;
    border: 1.5px solid var(--border);
    border-radius: 10px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.12);
    max-height: 260px;
    overflow-y: auto;
}
.autocomplete-item {
    padding: 10px 14px;
    cursor: pointer;
    font-size: 0.85rem;
    border-bottom: 1px solid #f0f8f0;
    transition: background 0.15s;
}
.autocomplete-item:hover { background: #f0f8f0; }
.autocomplete-item:last-child { border-bottom: none; }

/* ======= BULK ACTION BAR ======= */
#bulkBar {
    display: none;
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #0f4425, #1a6b3c);
    color: white;
    padding: 12px 22px;
    border-radius: 50px;
    z-index: 1000;
    box-shadow: 0 6px 25px rgba(0,0,0,0.25);
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.85rem;
    min-width: 360px;
}

/* ======= BTN XS ======= */
.btn-xs {
    padding: 2px 8px !important;
    font-size: 0.75rem !important;
    border-radius: 6px !important;
}

/* ======= LIVE BADGE COUNT ======= */
.badge-count {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #e74c3c;
    color: white;
    border-radius: 50%;
    font-size: 0.6rem;
    font-weight: 700;
    min-width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 3px;
}

/* ======= POINT FOCAL CARDS ======= */
.pf-card { transition: transform 0.2s, box-shadow 0.2s; }
.pf-card:hover { transform: translateY(-3px); box-shadow: 0 8px 30px rgba(45,106,79,0.15) !important; }

/* ======= NOTIF TABS ======= */
.notif-tab { transition: all 0.2s; }
.notif-tab:hover { background: #f0f8f0; }

/* ======= SUIVI TEMPS RÉEL - PULSE ======= */
.live-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(46,204,113,0.15);
    border: 1.5px solid rgba(46,204,113,0.4);
    color: #27ae60;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}
.live-dot {
    width: 8px; height: 8px;
    background: #27ae60;
    border-radius: 50%;
    animation: livePulse 1.4s ease-in-out infinite;
}
@keyframes livePulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.5); opacity: 0.6; }
}

/* ======= STATUT BADGES ======= */
.statut-badge { font-size: 0.72rem; padding: 3px 9px; border-radius: 20px; font-weight: 600; }
[data-statut="en_attente"]  { background: #fff3cd !important; color: #856404 !important; }
[data-statut="arrive"]      { background: #d1e7dd !important; color: #0f5132 !important; }
[data-statut="en_transit"]  { background: #cfe2ff !important; color: #084298 !important; }
[data-statut="au_mehidane"] { background: #e2d9f3 !important; color: #41166e !important; }
[data-statut="parti"]       { background: #f8d7da !important; color: #842029 !important; }

/* ======= PROGRESS TAUX ======= */
.progress-islamic .progress-bar {
    background: linear-gradient(90deg, #1a6b3c, #40916c);
    border-radius: 4px;
    transition: width 0.8s ease;
}

/* ======= TIMELINE ACTIVITY ======= */
.timeline-item {
    position: relative;
    padding-left: 32px;
    padding-bottom: 18px;
    border-left: 2px solid #d4e8db;
    margin-left: 10px;
}
.timeline-item::before {
    content: '';
    position: absolute;
    left: -7px; top: 6px;
    width: 12px; height: 12px;
    border-radius: 50%;
    background: var(--primary);
    border: 2px solid white;
    box-shadow: 0 0 0 3px var(--border);
}
.timeline-item:last-child { border-left-color: transparent; }

/* ======= MODAL ISLAMIC OVERRIDES ======= */
.modal-islamic .modal-content {
    border: none;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
}
.modal-islamic .modal-header {
    background: linear-gradient(135deg, #0f4425, #1a6b3c);
    color: white;
    border-bottom: none;
    padding: 16px 22px;
}
.modal-islamic .modal-header .btn-close { filter: invert(1); }
.modal-islamic .modal-title { font-size: 0.95rem; font-weight: 600; }
.modal-islamic .modal-footer { border-top: 1px solid #e8f5e9; padding: 12px 22px; }

/* ======= TABLE ACTIONS ======= */
.table-actions { white-space: nowrap; }
.table-actions .btn { padding: 3px 8px; font-size: 0.78rem; border-radius: 7px; }

/* ======= RESPONSIVE FIXES ======= */
@media (max-width: 768px) {
    .page-header { flex-direction: column; align-items: flex-start; gap: 10px; }
    .page-actions { width: 100%; }
    #bulkBar { min-width: calc(100vw - 30px); }
}

@media (max-width: 992px) {
    .sidebar {
        transform: translateX(-100%);
    }
    .sidebar.open {
        transform: translateX(0);
    }
    .main-wrapper {
        margin-left: 0;
    }
    .sidebar-overlay {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,0.5);
        z-index: 1049;
    }
    .sidebar-overlay.show {
        display: block;
    }
}

/* ======= ISLAMIC DECORATIONS ======= */
.ornament-top {
    text-align: center;
    font-size: 1.2rem;
    color: var(--secondary);
    letter-spacing: 8px;
    margin-bottom: 8px;
}

.section-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 20px 0;
    color: var(--secondary-dark);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.section-divider::before,
.section-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--secondary-light), transparent);
}

/* ======= FLIGHT CARD ======= */
.flight-card {
    background: white;
    border-radius: 14px;
    padding: 18px;
    border: 1px solid var(--border);
    position: relative;
    overflow: hidden;
    transition: all 0.2s;
}

.flight-card:hover {
    box-shadow: 0 6px 20px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.flight-card::before {
    content: '';
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, var(--primary), var(--primary-light));
    border-radius: 14px 0 0 14px;
}

.flight-route {
    display: flex;
    align-items: center;
    gap: 10px;
}

.flight-route .city {
    text-align: center;
}

.flight-route .city .code {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--primary-dark);
}

.flight-route .city .name {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.flight-route .arrow {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.flight-route .arrow::before {
    content: '';
    position: absolute;
    left: 0; right: 0;
    height: 1px;
    border-top: 1.5px dashed var(--border);
}

.flight-route .arrow .plane-icon {
    background: white;
    padding: 0 8px;
    color: var(--primary);
    font-size: 1rem;
    position: relative;
    z-index: 1;
}

/* ======= EMPTY STATE ======= */
.empty-state {
    text-align: center;
    padding: 50px 20px;
    color: var(--text-muted);
}

.empty-state .empty-icon {
    font-size: 3.5rem;
    margin-bottom: 15px;
    opacity: 0.4;
}

.empty-state p {
    font-size: 0.9rem;
    margin-bottom: 15px;
}

/* ======= FILTERS BAR ======= */
.filters-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    padding: 14px 18px;
    background: #f8fcf9;
    border-bottom: 1px solid var(--border);
}

.filter-select {
    height: 34px;
    border: 1.5px solid var(--border);
    border-radius: 8px;
    padding: 0 10px;
    font-size: 0.8rem;
    color: var(--text-dark);
    background: white;
    cursor: pointer;
    transition: all 0.2s;
}

.filter-select:focus {
    outline: none;
    border-color: var(--primary-light);
}

/* ======= PAGINATION ======= */
.pagination-islamic .page-item .page-link {
    border-radius: 8px !important;
    margin: 0 2px;
    color: var(--primary);
    border: 1.5px solid var(--border);
    font-size: 0.82rem;
    padding: 5px 11px;
}

.pagination-islamic .page-item.active .page-link {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

/* ======= PRINT ======= */
@media print {
    .sidebar, .topbar, .no-print { display: none !important; }
    .main-wrapper { margin-left: 0; }
    .content-area { padding: 0; }
}

/* ═══════════════════════════════════════════════════
   ESPACE LOGISTIQUE – Composants spécifiques
   ═══════════════════════════════════════════════════ */

/* ── Stat card purple ───────────────────────────── */
.stat-card.purple::before { background: linear-gradient(90deg, #6f42c1, #9a6dd7); }
.stat-card.purple .stat-icon { background: linear-gradient(135deg, #f0ebfb, #d9c8f5); color: #6f42c1; }

.stat-card .stat-sub {
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-top: 4px;
}

/* ── Logistic row (list item) ───────────────────── */
.logistic-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid #f0f8f3;
    transition: background 0.15s;
}
.logistic-row:last-child { border-bottom: none; }
.logistic-row:hover { background: #f8fcf9; }

.logistic-row-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}

.logistic-row-body { flex: 1; min-width: 0; }

/* ── Progress bar simple ────────────────────────── */
.logistic-progress {
    height: 5px;
    background: #e8f5ee;
    border-radius: 10px;
    overflow: hidden;
}
.logistic-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--primary-light));
    border-radius: 10px;
    transition: width 0.8s ease;
}

/* ── Alert logistic ────────────────────────────── */
.alert-logistic {
    padding: 10px 16px;
    border-radius: 10px;
    font-size: 0.82rem;
    font-weight: 500;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    border-left: 4px solid;
}
.alert-logistic.alert-warning {
    background: #fff8e1;
    color: #856404;
    border-left-color: #ffc107;
}
.alert-logistic.alert-danger {
    background: #fdecea;
    color: #842029;
    border-left-color: #dc3545;
}
.alert-logistic.alert-info {
    background: #e8f0fc;
    color: #084298;
    border-left-color: #0d6efd;
}

/* ── btn-icon ────────────────────────────────────── */
.btn-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: #e8f5ee;
    color: var(--primary);
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s;
}
.btn-icon:hover {
    background: var(--primary);
    color: white;
    transform: scale(1.1);
}

/* ── Quick action cards ────────────────────────── */
.quick-action-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 20px 12px;
    border-radius: 14px;
    background: linear-gradient(135deg, #f4f8f5, #e8f5ee);
    border: 1.5px solid var(--border);
    color: var(--primary-dark);
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 600;
    text-align: center;
    transition: all 0.22s;
    cursor: pointer;
}
.quick-action-card i {
    font-size: 1.5rem;
    color: var(--primary);
}
.quick-action-card:hover {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    border-color: var(--primary);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(26,107,60,0.25);
}
.quick-action-card:hover i { color: white; }

/* ── Toast notification ────────────────────────── */
.logistic-toast {
    position: fixed;
    bottom: 25px;
    right: 25px;
    padding: 12px 20px;
    border-radius: 12px;
    font-size: 0.84rem;
    font-weight: 500;
    box-shadow: 0 8px 25px rgba(0,0,0,0.18);
    z-index: 9999;
    display: flex;
    align-items: center;
    opacity: 0;
    transform: translateY(15px);
    transition: all 0.3s ease;
    pointer-events: none;
}
.logistic-toast.show {
    opacity: 1;
    transform: translateY(0);
}
.logistic-toast.logistic-toast-success {
    background: linear-gradient(135deg, #1a6b3c, #2d9e5f);
    color: white;
}
.logistic-toast.logistic-toast-error {
    background: linear-gradient(135deg, #c0392b, #e74c3c);
    color: white;
}

/* ── Sidebar logistique section highlight ────────── */
.nav-item.logistique-highlight a {
    background: linear-gradient(135deg, rgba(201,168,76,0.08), rgba(201,168,76,0.04));
    border-left-color: var(--secondary) !important;
    color: var(--secondary-light) !important;
}
.nav-item.logistique-highlight a .nav-icon {
    background: rgba(201,168,76,0.18);
    color: var(--secondary-light);
}

