/* ============================================
   IQOS Virement Platform - Custom Design System
   Modern, Clean & Professional UI
   ============================================ */

/* ---- CSS Variables / Design Tokens ---- */
:root {
    /* Brand Colors - IQOS inspired turquoise/teal */
    --primary: #00968F;
    --primary-dark: #007A74;
    --primary-light: #E0F5F4;
    --primary-gradient: linear-gradient(135deg, #00968F 0%, #006B66 100%);
    
    /* Accent */
    --accent: #D4A03C;
    --accent-light: #FFF8E7;
    
    /* Neutrals */
    --dark: #1A1D29;
    --dark-secondary: #2D3142;
    --gray-900: #1F2937;
    --gray-800: #374151;
    --gray-700: #4B5563;
    --gray-600: #6B7280;
    --gray-500: #9CA3AF;
    --gray-400: #D1D5DB;
    --gray-300: #E5E7EB;
    --gray-200: #F3F4F6;
    --gray-100: #F9FAFB;
    --white: #FFFFFF;
    
    /* Status Colors */
    --status-draft: #6B7280;
    --status-sent: #3B82F6;
    --status-deposited: #F59E0B;
    --status-validated: #10B981;
    --status-rejected: #EF4444;

    /* Semantic Colors */
    --danger: #DC2626;
    --danger-dark: #B91C1C;
    --success: #059669;
    --success-dark: #047857;
    --info: #3B82F6;
    --info-dark: #2563EB;
    --secondary: #6B7280;
    --secondary-dark: #4B5563;
    
    /* Shadows */
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.04);
    
    /* Sidebar */
    --sidebar-width: 260px;
    --sidebar-collapsed-width: 72px;
    --sidebar-bg: #1A1D29;
    --sidebar-hover: rgba(255, 255, 255, 0.06);
    --sidebar-active: rgba(0, 150, 143, 0.15);
    --sidebar-active-border: var(--primary);
    
    /* Radius */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-xl: 20px;
    --radius-full: 9999px;
    
    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 350ms cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--gray-100);
    color: var(--gray-800);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ---- Scrollbar ---- */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: var(--gray-400);
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--gray-500);
}

/* ============================================
   SIDEBAR
   ============================================ */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: var(--sidebar-width);
    background: var(--sidebar-bg);
    z-index: 1050;
    display: flex;
    flex-direction: column;
    transition: width var(--transition-base);
    overflow: hidden;
}

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

.sidebar-brand-icon {
    width: 40px;
    height: 40px;
    background: var(--primary-gradient);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.sidebar-brand-text {
    color: var(--white);
    font-weight: 700;
    font-size: 1.15rem;
    letter-spacing: -0.3px;
    white-space: nowrap;
}

.sidebar-brand-text small {
    display: block;
    font-size: 0.65rem;
    font-weight: 400;
    color: var(--gray-500);
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-top: -2px;
}

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

.sidebar-nav-label {
    color: var(--gray-500);
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    padding: 16px 12px 8px;
    white-space: nowrap;
}

.sidebar-nav-item {
    list-style: none;
    margin-bottom: 2px;
}

.sidebar-nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    color: var(--gray-500);
    text-decoration: none;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 500;
    transition: all var(--transition-fast);
    white-space: nowrap;
    position: relative;
}

.sidebar-nav-link:hover {
    color: var(--gray-300);
    background: var(--sidebar-hover);
}

.sidebar-nav-link.active {
    color: var(--primary);
    background: var(--sidebar-active);
}

.sidebar-nav-link.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 20px;
    background: var(--primary);
    border-radius: 0 3px 3px 0;
}

.sidebar-nav-link i {
    font-size: 1.1rem;
    width: 22px;
    text-align: center;
    flex-shrink: 0;
}

.sidebar-footer {
    padding: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    flex-shrink: 0;
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    text-decoration: none;
    transition: background var(--transition-fast);
}

.sidebar-user:hover {
    background: var(--sidebar-hover);
}

.sidebar-user-avatar {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    background: var(--primary-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.sidebar-user-info {
    flex: 1;
    min-width: 0;
    white-space: nowrap;
}

.sidebar-user-name {
    color: var(--gray-300);
    font-size: 0.825rem;
    font-weight: 600;
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-user-role {
    color: var(--gray-500);
    font-size: 0.7rem;
    display: block;
}

/* ============================================
   MAIN CONTENT AREA
   ============================================ */
.main-content {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    transition: margin-left var(--transition-base);
}

/* ---- Top Header ---- */
.top-header {
    background: var(--white);
    padding: 16px 32px;
    border-bottom: 1px solid var(--gray-300);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1040;
}

.top-header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.breadcrumb-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--gray-500);
}

.breadcrumb-nav a {
    color: var(--gray-500);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.breadcrumb-nav a:hover {
    color: var(--primary);
}

.breadcrumb-nav .separator {
    font-size: 0.7rem;
}

.page-title-header h1 {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--dark);
    margin: 0;
    letter-spacing: -0.3px;
}

.page-title-header p {
    font-size: 0.8rem;
    color: var(--gray-500);
    margin: 0;
}

.top-header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-btn {
    width: 38px;
    height: 38px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--gray-300);
    background: var(--white);
    color: var(--gray-600);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-fast);
    font-size: 1rem;
    position: relative;
}

.header-btn:hover {
    background: var(--gray-100);
    color: var(--dark);
    border-color: var(--gray-400);
}

.header-btn .badge-dot {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 8px;
    height: 8px;
    background: var(--status-rejected);
    border-radius: 50%;
    border: 2px solid white;
}

/* ---- Page Body ---- */
.page-body {
    padding: 28px 32px;
}

/* ============================================
   CARDS
   ============================================ */
.card {
    background: var(--white);
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xs);
    transition: box-shadow var(--transition-fast);
}

.card:hover {
    box-shadow: var(--shadow-sm);
}

.card-header {
    background: transparent;
    border-bottom: 1px solid var(--gray-200);
    padding: 18px 24px;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--dark);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-header .card-header-icon {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 10px;
    font-size: 0.9rem;
}

.card-header .card-header-icon.primary { background: var(--primary-light); color: var(--primary); }
.card-header .card-header-icon.warning { background: #FEF3C7; color: #D97706; }
.card-header .card-header-icon.success { background: #D1FAE5; color: #059669; }
.card-header .card-header-icon.info { background: #DBEAFE; color: #2563EB; }
.card-header .card-header-icon.danger { background: #FEE2E2; color: #DC2626; }

.card-body {
    padding: 24px;
}

/* ============================================
   STAT CARDS
   ============================================ */
.stat-card {
    background: var(--white);
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-lg);
    padding: 24px;
    display: flex;
    align-items: flex-start;
    gap: 16px;
    transition: all var(--transition-fast);
    position: relative;
    overflow: hidden;
}

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

.stat-card-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    flex-shrink: 0;
}

.stat-card-icon.draft { background: #F3F4F6; color: #6B7280; }
.stat-card-icon.sent { background: #DBEAFE; color: #3B82F6; }
.stat-card-icon.deposited { background: #FEF3C7; color: #D97706; }
.stat-card-icon.validated { background: #D1FAE5; color: #059669; }

.stat-card-content h3 {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--dark);
    line-height: 1;
    margin-bottom: 4px;
    letter-spacing: -0.5px;
}

.stat-card-content p {
    font-size: 0.8rem;
    color: var(--gray-500);
    margin: 0;
    font-weight: 500;
}

.stat-card-trend {
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    margin-top: 8px;
}

.stat-card-trend.up { background: #D1FAE5; color: #059669; }
.stat-card-trend.down { background: #FEE2E2; color: #DC2626; }

/* ============================================
   STATUS BADGES
   ============================================ */
.badge-status,
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.2px;
}

.badge-status .status-dot,
.status-badge .status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

/* Status: Brouillon / Draft / Secondary */
.badge-status.draft,
.status-badge.status-secondary {
    background: #F3F4F6;
    color: #4B5563;
}
.badge-status.draft::before,
.status-badge.status-secondary::before {
    content: '';
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #6B7280;
    flex-shrink: 0;
}

/* Status: Envoyée / Sent / Info */
.badge-status.sent,
.status-badge.status-info {
    background: #DBEAFE;
    color: #1D4ED8;
}
.badge-status.sent::before,
.status-badge.status-info::before {
    content: '';
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #3B82F6;
    flex-shrink: 0;
}

/* Status: Versée / Deposited / Warning */
.badge-status.deposited,
.status-badge.status-warning {
    background: #FEF3C7;
    color: #92400E;
}
.badge-status.deposited::before,
.status-badge.status-warning::before {
    content: '';
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #F59E0B;
    flex-shrink: 0;
}

/* Status: Validée / Validated / Success */
.badge-status.validated,
.status-badge.status-success {
    background: #D1FAE5;
    color: #065F46;
}
.badge-status.validated::before,
.status-badge.status-success::before {
    content: '';
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #10B981;
    flex-shrink: 0;
}

/* Status: Rejetée / Rejected / Danger */
.badge-status.rejected,
.status-badge.status-danger {
    background: #FEE2E2;
    color: #991B1B;
}
.badge-status.rejected::before,
.status-badge.status-danger::before {
    content: '';
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #EF4444;
    flex-shrink: 0;
}

/* Status: Annulée / Cancelled / Dark */
.badge-status.cancelled,
.status-badge.status-dark {
    background: #E5E7EB;
    color: #1F2937;
}
.badge-status.cancelled::before,
.status-badge.status-dark::before {
    content: '';
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #4B5563;
    flex-shrink: 0;
}

/* Status: Primary */
.status-badge.status-primary {
    background: rgba(0,150,143,0.1);
    color: var(--primary-dark);
}
.status-badge.status-primary::before {
    content: '';
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--primary);
    flex-shrink: 0;
}

/* ============================================
   TABLES
   ============================================ */
.table-modern {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.table-modern thead th {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--gray-200);
    background: var(--gray-100);
    white-space: nowrap;
}

.table-modern thead th:first-child { border-radius: var(--radius-sm) 0 0 0; }
.table-modern thead th:last-child { border-radius: 0 var(--radius-sm) 0 0; }

.table-modern tbody td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--gray-200);
    font-size: 0.875rem;
    color: var(--gray-700);
    vertical-align: middle;
}

.table-modern tbody tr {
    transition: background var(--transition-fast);
}

.table-modern tbody tr:hover {
    background: var(--gray-100);
}

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

.table-ref {
    font-weight: 600;
    color: var(--primary-dark);
    text-decoration: none;
}

.table-ref:hover {
    color: var(--primary);
    text-decoration: underline;
}

.table-amount {
    font-weight: 700;
    color: var(--dark);
    font-variant-numeric: tabular-nums;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
    font-weight: 600;
    font-size: 0.875rem;
    border-radius: var(--radius-sm);
    padding: 10px 20px;
    transition: all var(--transition-fast);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: none;
    cursor: pointer;
}

.btn-primary {
    background: var(--primary-gradient);
    color: white;
    box-shadow: 0 1px 2px rgba(0, 150, 143, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #007A74 0%, #005F5A 100%);
    box-shadow: 0 4px 12px rgba(0, 150, 143, 0.3);
    color: white;
    transform: translateY(-1px);
}

.btn-ghost {
    background: transparent;
    color: var(--gray-600);
    border: 1px solid var(--gray-300);
}

.btn-ghost:hover {
    background: var(--gray-100);
    color: var(--dark);
    border-color: var(--gray-400);
}

.btn-icon {
    width: 36px;
    height: 36px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    border: 1px solid var(--gray-300);
    background: white;
    color: var(--gray-600);
    transition: all var(--transition-fast);
    cursor: pointer;
}

.btn-icon:hover {
    background: var(--gray-100);
    color: var(--primary);
    border-color: var(--primary-light);
}

.btn-success {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    color: white;
}

.btn-success:hover {
    background: linear-gradient(135deg, #047857 0%, #065F46 100%);
    color: white;
}

.btn-warning {
    background: linear-gradient(135deg, #D97706 0%, #B45309 100%);
    color: white;
}

.btn-warning:hover {
    background: linear-gradient(135deg, #B45309 0%, #92400E 100%);
    color: white;
}

.btn-danger {
    background: linear-gradient(135deg, #DC2626 0%, #B91C1C 100%);
    color: white;
}

.btn-danger:hover {
    background: linear-gradient(135deg, #B91C1C 0%, #991B1B 100%);
    color: white;
}

.btn-sm {
    padding: 6px 14px;
    font-size: 0.8rem;
}

.btn-lg {
    padding: 14px 28px;
    font-size: 1rem;
}

/* ============================================
   FORM CONTROLS
   ============================================ */
.form-control, .form-select {
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    font-size: 0.875rem;
    transition: all var(--transition-fast);
    color: var(--gray-800);
    background-color: var(--white);
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 150, 143, 0.12);
    outline: none;
}

.form-control::placeholder {
    color: var(--gray-400);
}

.form-label {
    font-size: 0.825rem;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 6px;
}

.input-group-text {
    background: var(--gray-100);
    border: 1px solid var(--gray-300);
    color: var(--gray-500);
    font-size: 0.9rem;
}

/* ============================================
   ALERTS
   ============================================ */
.alert {
    border-radius: var(--radius-md);
    padding: 14px 20px;
    font-size: 0.875rem;
    border: none;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-success {
    background: #ECFDF5;
    color: #065F46;
    border-left: 4px solid #10B981;
}

.alert-danger {
    background: #FEF2F2;
    color: #991B1B;
    border-left: 4px solid #EF4444;
}

.alert-warning {
    background: #FFFBEB;
    color: #92400E;
    border-left: 4px solid #F59E0B;
}

.alert-info {
    background: #EFF6FF;
    color: #1E40AF;
    border-left: 4px solid #3B82F6;
}

/* ============================================
   EMPTY STATE
   ============================================ */
.empty-state {
    text-align: center;
    padding: 60px 40px;
}

.empty-state-icon {
    width: 80px;
    height: 80px;
    border-radius: var(--radius-xl);
    background: var(--gray-100);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--gray-400);
    margin-bottom: 20px;
}

.empty-state h3 {
    font-size: 1.1rem;
    color: var(--dark);
    font-weight: 600;
    margin-bottom: 8px;
}

.empty-state p {
    color: var(--gray-500);
    font-size: 0.875rem;
    max-width: 360px;
    margin: 0 auto 20px;
}

/* ============================================
   QUICK ACTION CARDS
   ============================================ */
.action-card {
    background: var(--white);
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-lg);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
    transition: all var(--transition-fast);
}

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

.action-card-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.action-card-text h4 {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--dark);
    margin: 0;
}

.action-card-text p {
    font-size: 0.775rem;
    color: var(--gray-500);
    margin: 0;
}

/* ============================================
   PROFILE CARD
   ============================================ */
.profile-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 24px;
    background: var(--gray-100);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    border-bottom: 1px solid var(--gray-200);
}

.profile-avatar {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-full);
    background: var(--primary-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 1.3rem;
    flex-shrink: 0;
}

.profile-info h3 {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--dark);
    margin: 0;
}

.profile-info p {
    font-size: 0.8rem;
    color: var(--gray-500);
    margin: 0;
}

.profile-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    padding: 20px 24px;
}

.profile-meta-item label {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: block;
    margin-bottom: 4px;
}

.profile-meta-item span {
    font-size: 0.875rem;
    color: var(--dark);
    font-weight: 500;
}

/* ============================================
   WELCOME / HERO SECTION (Operator Dashboard)
   ============================================ */
.welcome-banner {
    background: var(--primary-gradient);
    border-radius: var(--radius-lg);
    padding: 32px;
    color: white;
    position: relative;
    overflow: hidden;
}

.welcome-banner::after {
    content: '';
    position: absolute;
    right: -40px;
    top: -40px;
    width: 200px;
    height: 200px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 50%;
}

.welcome-banner::before {
    content: '';
    position: absolute;
    right: 60px;
    bottom: -60px;
    width: 150px;
    height: 150px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 50%;
}

.welcome-banner h2 {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 6px;
}

.welcome-banner p {
    opacity: 0.85;
    font-size: 0.9rem;
    margin-bottom: 20px;
}

.welcome-banner .btn {
    background: white;
    color: var(--primary-dark);
    font-weight: 600;
}

.welcome-banner .btn:hover {
    background: var(--gray-100);
    transform: translateY(-1px);
}

/* ============================================
   FILTERS BAR
   ============================================ */
.filters-bar {
    background: var(--white);
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-lg);
    padding: 18px 20px;
    margin-bottom: 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: end;
}

.filters-bar .form-group {
    flex: 1;
    min-width: 150px;
}

.filters-bar .form-group label {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: block;
    margin-bottom: 4px;
}

.filters-bar .form-control,
.filters-bar .form-select {
    padding: 8px 12px;
    font-size: 0.825rem;
}

.filters-bar .filter-actions {
    display: flex;
    gap: 8px;
}

/* ============================================
   WORKFLOW / PROGRESS STEPS
   ============================================ */
.workflow-steps {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    padding: 24px 16px;
    background: var(--gray-100);
    border-radius: var(--radius-lg);
    margin-bottom: 24px;
}

.workflow-step {
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
}

.workflow-step-circle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--gray-300);
    color: var(--gray-500);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
    flex-shrink: 0;
    transition: all var(--transition-base);
}

.workflow-step-text {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--gray-500);
    white-space: nowrap;
}

.workflow-step.active .workflow-step-circle {
    background: var(--primary);
    color: white;
    box-shadow: 0 0 0 4px rgba(0, 150, 143, 0.15);
}

.workflow-step.active .workflow-step-text { color: var(--primary-dark); }

.workflow-step.completed .workflow-step-circle {
    background: #10B981;
    color: white;
}

.workflow-step.completed .workflow-step-text { color: #059669; }

.workflow-step-line {
    width: 60px;
    height: 2px;
    background: var(--gray-300);
    margin: 0 12px;
}

.workflow-step-line.completed { background: #10B981; }
.workflow-step-line.active { background: linear-gradient(to right, #10B981, var(--primary)); }

/* ============================================
   DROPDOWN
   ============================================ */
.dropdown-menu {
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    padding: 6px;
    min-width: 200px;
}

.dropdown-item {
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    font-size: 0.85rem;
    color: var(--gray-700);
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all var(--transition-fast);
}

.dropdown-item:hover {
    background: var(--gray-100);
    color: var(--dark);
}

.dropdown-item.text-danger:hover {
    background: #FEF2F2;
}

.dropdown-divider {
    margin: 4px 0;
    border-color: var(--gray-200);
}

/* ============================================
   MOBILE / RESPONSIVE
   ============================================ */
.sidebar-toggle {
    display: none;
    background: none;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-sm);
    padding: 8px;
    color: var(--gray-600);
    cursor: pointer;
}

.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1049;
    opacity: 0;
    transition: opacity var(--transition-base);
}

@media (max-width: 1024px) {
    .sidebar {
        transform: translateX(-100%);
        width: 280px;
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    .sidebar-overlay.show {
        display: block;
        opacity: 1;
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .sidebar-toggle {
        display: flex;
    }
    
    .page-body {
        padding: 20px 16px;
    }
    
    .top-header {
        padding: 12px 16px;
    }
}

@media (max-width: 768px) {
    .stat-card {
        padding: 16px;
    }
    
    .stat-card-content h3 {
        font-size: 1.4rem;
    }
    
    .filters-bar {
        flex-direction: column;
    }
    
    .filters-bar .form-group {
        min-width: 100%;
    }
    
    .workflow-steps {
        flex-direction: column;
        gap: 4px;
    }
    
    .workflow-step-line {
        width: 2px;
        height: 24px;
        margin: 4px 0;
    }
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.4s ease-out forwards;
}

.fade-in-delay-1 { animation-delay: 0.05s; opacity: 0; }
.fade-in-delay-2 { animation-delay: 0.1s; opacity: 0; }
.fade-in-delay-3 { animation-delay: 0.15s; opacity: 0; }
.fade-in-delay-4 { animation-delay: 0.2s; opacity: 0; }

/* ============================================
   LOGIN PAGE
   ============================================ */
.login-page {
    min-height: 100vh;
    display: flex;
    background: var(--gray-100);
}

.login-left {
    flex: 1;
    background: var(--primary-gradient);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px;
    color: white;
    position: relative;
    overflow: hidden;
}

.login-left::before {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.04);
    top: -200px;
    right: -200px;
}

.login-left::after {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.03);
    bottom: -100px;
    left: -100px;
}

.login-left-content {
    position: relative;
    z-index: 1;
    max-width: 380px;
    text-align: center;
}

.login-left-content .brand-icon {
    width: 72px;
    height: 72px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-xl);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin-bottom: 28px;
    backdrop-filter: blur(10px);
}

.login-left-content h1 {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 12px;
    letter-spacing: -0.5px;
}

.login-left-content p {
    opacity: 0.8;
    font-size: 1rem;
    line-height: 1.6;
}

.login-features {
    margin-top: 40px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.login-feature {
    display: flex;
    align-items: center;
    gap: 12px;
    text-align: left;
}

.login-feature-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.login-feature span {
    font-size: 0.85rem;
    opacity: 0.9;
}

.login-right {
    width: 480px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    flex-shrink: 0;
}

.login-form-container {
    width: 100%;
    max-width: 380px;
}

.login-form-container h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 4px;
}

.login-form-container .subtitle {
    color: var(--gray-500);
    font-size: 0.875rem;
    margin-bottom: 32px;
}

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

.login-form-container .form-group label {
    font-size: 0.825rem;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 8px;
    display: block;
}

.login-form-container .form-control {
    padding: 12px 14px;
    border-radius: var(--radius-md);
}

.login-form-container .btn-login {
    width: 100%;
    padding: 14px;
    font-size: 0.95rem;
    font-weight: 700;
    border-radius: var(--radius-md);
    background: var(--primary-gradient);
    color: white;
    border: none;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.login-form-container .btn-login:hover {
    box-shadow: 0 4px 16px rgba(0, 150, 143, 0.35);
    transform: translateY(-1px);
}

.login-form-container .login-footer {
    margin-top: 28px;
    text-align: center;
    font-size: 0.8rem;
    color: var(--gray-500);
}

.login-form-container .login-footer i {
    color: var(--primary);
    margin-right: 4px;
}

@media (max-width: 900px) {
    .login-left {
        display: none;
    }
    
    .login-right {
        width: 100%;
    }
}

/* ============================================
   DATATABLE OVERRIDES
   ============================================ */
.dataTables_wrapper .dataTables_length select,
.dataTables_wrapper .dataTables_filter input {
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-sm);
    padding: 6px 10px;
    font-size: 0.825rem;
}

.dataTables_wrapper .dataTables_filter input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 150, 143, 0.1);
    outline: none;
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
    border-radius: var(--radius-sm) !important;
    border: 1px solid var(--gray-300) !important;
    margin: 0 2px;
    font-size: 0.8rem;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current {
    background: var(--primary) !important;
    border-color: var(--primary) !important;
    color: white !important;
}

.dataTables_wrapper .dataTables_info {
    font-size: 0.8rem;
    color: var(--gray-500);
}

/* ============================================
   ADDITIONAL COMPONENTS
   ============================================ */

/* Input Icon Wrapper */
.input-icon-wrapper {
    position: relative;
}

.input-icon-wrapper .input-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-400);
    font-size: 0.9rem;
    z-index: 4;
    pointer-events: none;
}

.input-icon-wrapper .form-control {
    padding-left: 38px;
}

/* Login Brand Icon */
.login-brand-icon {
    width: 80px;
    height: 80px;
    border-radius: 20px;
    background: rgba(255,255,255,0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
    font-size: 2.2rem;
}

/* Login Form Header */
.login-form-header {
    margin-bottom: 32px;
}

.login-form-header h2 {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--gray-900);
    margin-bottom: 4px;
}

.login-form-header p {
    color: var(--gray-500);
    font-size: 0.9rem;
    margin: 0;
}

/* Login Form */
.login-form .form-group {
    margin-bottom: 20px;
}

.login-form .btn-login {
    width: 100%;
    padding: 12px;
    font-weight: 600;
    font-size: 1rem;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border: none;
    color: white;
    transition: all 0.3s ease;
}

.login-form .btn-login:hover {
    box-shadow: 0 4px 16px rgba(0, 150, 143, 0.35);
    transform: translateY(-1px);
}

/* Login Feature - fix for non-icon layout */
.login-feature {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
}

.login-feature i {
    font-size: 1.1rem;
    opacity: 0.8;
}

.login-feature span {
    font-size: 0.9rem;
    opacity: 0.9;
}

/* Workflow Step Number (alternative to circle) */
.workflow-step-number {
    width: 32px;
    height: 32px;
    min-width: 32px;
    border-radius: 50%;
    background: var(--gray-200);
    color: var(--gray-600);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.8rem;
    transition: all 0.2s;
}

.workflow-step.active .workflow-step-number {
    background: var(--primary);
    color: white;
}

/* Filters Bar */
.filters-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    padding: 1rem;
    background: var(--gray-50);
    border-radius: var(--radius-md);
    border: 1px solid var(--gray-200);
}

.filter-group {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

/* Form Group spacing */
.form-group {
    margin-bottom: 1.25rem;
}

/* Sidebar overlay */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 998;
    transition: opacity 0.3s;
}

.sidebar-overlay.show {
    display: block;
}

/* Sidebar Toggle Button */
.sidebar-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--gray-700);
    padding: 0.25rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
}

.sidebar-toggle:hover {
    background: var(--gray-100);
}

@media (max-width: 1024px) {
    .sidebar-toggle {
        display: flex;
    }
    
    .sidebar.open {
        left: 0;
    }
    
    .sidebar-overlay.show {
        display: block;
    }
}

/* Flash warning alert */
.alert.alert-warning {
    background: #FFF3CD;
    border-left: 4px solid var(--warning);
    color: #856404;
}

.alert.alert-warning i {
    color: var(--warning);
}

/* Card header with colored background */
.card-header[style*="background:var(--success)"],
.card-header[style*="background:var(--danger)"] {
    border-bottom: none;
}

/* Workflow steps - vertical layout override for nouvelle_demande */
.workflow-steps {
    padding: 1rem;
}

.workflow-step {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--gray-100);
}

.workflow-step:last-child {
    border-bottom: none;
}

.workflow-step strong {
    font-size: 0.85rem;
    display: block;
}

.workflow-step small {
    font-size: 0.75rem;
}

/* ============================================
   BANK PREVIEW CARD
   ============================================ */
.bank-preview {
    background: linear-gradient(135deg, var(--gray-50), #fff);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    border: 1px solid var(--gray-200);
}

.bank-preview .font-monospace {
    font-family: 'Courier New', Courier, monospace;
    letter-spacing: 0.5px;
}

/* ============================================
   OUTLINE & VARIANT BUTTON STYLES
   ============================================ */
.btn-outline-danger {
    color: var(--danger);
    border: 1.5px solid var(--danger);
    background: transparent;
}

.btn-outline-danger:hover {
    background: var(--danger);
    color: #fff;
    border-color: var(--danger);
}

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

.btn-outline-success:hover {
    background: var(--success);
    color: #fff;
    border-color: var(--success);
}

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

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

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

.btn-outline-info:hover {
    background: var(--info);
    color: #fff;
    border-color: var(--info);
}

.btn-outline-secondary {
    color: var(--secondary);
    border: 1.5px solid var(--gray-400);
    background: transparent;
}

.btn-outline-secondary:hover {
    background: var(--gray-200);
    color: var(--dark);
    border-color: var(--gray-500);
}

.btn-info {
    background: linear-gradient(135deg, var(--info) 0%, var(--info-dark) 100%);
    color: #fff;
}

.btn-info:hover {
    background: linear-gradient(135deg, var(--info-dark) 0%, #1D4ED8 100%);
    color: #fff;
}

/* Font monospace utility */
.font-monospace {
    font-family: 'Courier New', Courier, monospace !important;
}

/* ============================================
   DOCUMENT SECTION STYLES
   ============================================ */
.doc-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.doc-actions .btn {
    flex: 1;
    min-width: 120px;
}
