/* ==========================================================
   HAROUA FARMS SARL - DESIGN SYSTEM COMPLET
   Version : 7.0 - Fichier unique toutes pages
   ========================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Poppins:wght@500;600;700&display=swap');

:root {
    --primary: #0d4e2b;
    --primary-dark: #083a1f;
    --primary-light: #1a7a46;
    --primary-soft: #e8f3ed;
    
    --accent: #d4a017;
    --accent-light: #f0c14b;
    --accent-soft: #fdf6e3;
    
    --success: #10b981;
    --success-soft: #d1fae5;
    --danger: #ef4444;
    --danger-soft: #fee2e2;
    --info: #3b82f6;
    --info-soft: #dbeafe;
    --warning: #f59e0b;
    --warning-soft: #fef3c7;
    
    --bg: #f7f9fb;
    --surface: #ffffff;
    --border: #e5e9ef;
    --border-light: #f0f3f7;
    --text: #1a2332;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    
    --shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.05);
    --shadow: 0 4px 6px -1px rgba(16, 24, 40, 0.08), 0 2px 4px -2px rgba(16, 24, 40, 0.05);
    --shadow-md: 0 10px 15px -3px rgba(16, 24, 40, 0.08), 0 4px 6px -4px rgba(16, 24, 40, 0.05);
    --shadow-lg: 0 20px 25px -5px rgba(16, 24, 40, 0.1), 0 8px 10px -6px rgba(16, 24, 40, 0.05);
    
    --radius-sm: 6px;
    --radius: 10px;
    --radius-lg: 14px;
    --radius-xl: 20px;
    
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    
    --sidebar-width: 260px;
}

/* ==========================================================
   RESET & BASE
   ========================================================== */
* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    color: var(--text);
    font-size: 14px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    color: var(--text);
    letter-spacing: -0.01em;
}

a { text-decoration: none; color: inherit; transition: var(--transition); }
img { max-width: 100%; height: auto; }

code {
    background: var(--bg);
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-family: 'Courier New', monospace;
    color: var(--primary);
    border: 1px solid var(--border);
    word-break: break-word;
}

/* ==========================================================
   LOGIN
   ========================================================== */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
    position: relative;
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 50%, var(--primary-light) 100%);
    overflow: hidden;
}

.login-container::before {
    content: '';
    position: absolute;
    width: 600px; height: 600px;
    background: radial-gradient(circle, rgba(212, 160, 23, 0.15) 0%, transparent 70%);
    top: -200px; right: -200px;
    border-radius: 50%;
}

.login-container::after {
    content: '';
    position: absolute;
    width: 400px; height: 400px;
    background: radial-gradient(circle, rgba(212, 160, 23, 0.1) 0%, transparent 70%);
    bottom: -150px; left: -150px;
    border-radius: 50%;
}

.login-box {
    background: var(--surface);
    padding: 48px 40px;
    border-radius: var(--radius-xl);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.4);
    width: 100%;
    max-width: 440px;
    text-align: center;
    position: relative;
    z-index: 1;
    animation: slideUp 0.5s ease-out;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.login-logo-wrapper {
    width: 110px; height: 110px;
    margin: 0 auto 20px;
    background: var(--primary-soft);
    border: 2px solid var(--accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px;
    box-shadow: 0 10px 25px rgba(13, 78, 43, 0.15);
    animation: pulseGlow 3s ease-in-out infinite;
}

@keyframes pulseGlow {
    0%, 100% { box-shadow: 0 10px 25px rgba(13, 78, 43, 0.15); }
    50% { box-shadow: 0 10px 35px rgba(212, 160, 23, 0.35); }
}

.login-logo-wrapper img { max-width: 100%; max-height: 100%; object-fit: contain; }

.login-box h2 { color: var(--primary); font-size: 26px; margin-bottom: 8px; font-weight: 700; }
.login-box .subtitle { color: var(--text-secondary); font-size: 14px; margin-bottom: 32px; }

.input-group { margin-bottom: 20px; text-align: left; position: relative; }
.input-group label { display: block; margin-bottom: 8px; color: var(--text); font-weight: 500; font-size: 13px; }

.input-group input {
    width: 100%;
    padding: 13px 16px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    outline: none;
    font-size: 14px;
    font-family: inherit;
    background: var(--bg);
    transition: var(--transition);
}

.input-group input:focus {
    border-color: var(--primary);
    background: var(--surface);
    box-shadow: 0 0 0 4px var(--primary-soft);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: white;
    border: none;
    padding: 14px;
    width: 100%;
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
    transition: var(--transition);
    box-shadow: 0 4px 12px rgba(13, 78, 43, 0.3);
    margin-top: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(13, 78, 43, 0.4); }

/* ==========================================================
   LAYOUT PRINCIPAL
   ========================================================== */
.app-container { display: flex; min-height: 100vh; width: 100%; }

/* ==========================================================
   SIDEBAR
   ========================================================== */
.sidebar {
    width: var(--sidebar-width);
    background: linear-gradient(180deg, var(--primary-dark) 0%, var(--primary) 100%);
    color: white;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    left: 0; top: 0;
    z-index: 100;
    transition: var(--transition);
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.sidebar::before {
    content: '';
    position: absolute;
    top: -50px; right: -50px;
    width: 200px; height: 200px;
    background: radial-gradient(circle, rgba(212, 160, 23, 0.15) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.sidebar-header {
    padding: 24px 20px;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(0, 0, 0, 0.15);
}

.logo-wrapper {
    width: 130px; height: 130px;
    margin: 0 auto;
    background: #ffffff;
    border: 3px solid var(--accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3), 0 0 0 4px rgba(212, 160, 23, 0.15);
}

.logo-wrapper::after {
    content: '';
    position: absolute;
    inset: -8px;
    border: 1px dashed rgba(212, 160, 23, 0.4);
    border-radius: 50%;
    animation: rotateSlow 25s linear infinite;
}

@keyframes rotateSlow {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.logo-wrapper img { max-width: 100%; max-height: 100%; object-fit: contain; }

.sidebar-menu {
    list-style: none;
    flex: 1;
    padding: 20px 12px;
    overflow-y: auto;
    position: relative;
    z-index: 1;
}

.sidebar-menu::-webkit-scrollbar { width: 4px; }
.sidebar-menu::-webkit-scrollbar-track { background: transparent; }
.sidebar-menu::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.15); border-radius: 4px; }

.sidebar-menu li { margin-bottom: 4px; }

.sidebar-menu li a {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    color: rgba(255, 255, 255, 0.75);
    border-radius: var(--radius);
    font-weight: 500;
    font-size: 14px;
    position: relative;
    transition: var(--transition);
}

.sidebar-menu li a i { margin-right: 12px; width: 20px; text-align: center; font-size: 16px; }

.sidebar-menu li a:hover { background: rgba(255, 255, 255, 0.08); color: white; transform: translateX(4px); }

.sidebar-menu li a.active {
    background: linear-gradient(90deg, var(--accent) 0%, var(--accent-light) 100%);
    color: var(--primary-dark);
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(212, 160, 23, 0.35);
}

.sidebar-menu li a.active i { color: var(--primary-dark); }

.sidebar-menu .menu-section {
    padding: 18px 16px 8px 16px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: rgba(212, 160, 23, 0.75);
    pointer-events: none;
    user-select: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

.sidebar-menu .menu-section::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, rgba(212, 160, 23, 0.3), transparent);
}

.sidebar-menu li a .menu-badge {
    margin-left: auto;
    min-width: 22px;
    height: 22px;
    background: var(--danger);
    color: white;
    border-radius: 50px;
    font-size: 10px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 6px;
}

.sidebar-menu li a.active .menu-badge { background: var(--primary-dark); }

.sidebar-footer {
    padding: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(0, 0, 0, 0.2);
}

.sidebar-footer .user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: var(--radius);
    margin-bottom: 10px;
    font-size: 13px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.sidebar-footer .user-info .user-avatar {
    width: 36px; height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-light) 100%);
    color: var(--primary-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 15px;
    flex-shrink: 0;
    font-family: 'Poppins', sans-serif;
    overflow: hidden;
}

.sidebar-footer .user-info .user-avatar img { width: 100%; height: 100%; object-fit: cover; }

.sidebar-footer .user-info div { display: flex; flex-direction: column; line-height: 1.3; overflow: hidden; }
.sidebar-footer .user-info strong { color: white; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-footer .user-info span { color: rgba(255, 255, 255, 0.5); font-size: 11px; text-transform: uppercase; }

.btn-logout {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: white;
    background: rgba(239, 68, 68, 0.15);
    padding: 10px;
    border-radius: var(--radius);
    font-weight: 500;
    font-size: 13px;
    border: 1px solid rgba(239, 68, 68, 0.3);
    transition: var(--transition);
}

.btn-logout:hover { background: var(--danger); border-color: var(--danger); }

/* ==========================================================
   MAIN CONTENT
   ========================================================== */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    transition: var(--transition);
    min-width: 0;
}

/* ==========================================================
   TOPBAR
   ========================================================== */
.topbar {
    background: var(--surface);
    padding: 16px 28px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 50;
    box-shadow: var(--shadow-sm);
    gap: 12px;
    flex-wrap: nowrap;
}

.topbar-left { display: flex; align-items: center; gap: 16px; min-width: 0; flex: 1; }
.topbar-left h1 { color: var(--text); font-size: 22px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 20px;
    color: var(--primary);
    cursor: pointer;
    padding: 8px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    flex-shrink: 0;
}

.menu-toggle:hover { background: var(--primary-soft); }

.topbar-right { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }

/* ==========================================================
   NOTIFICATIONS / PROFIL / LANGUE
   ========================================================== */
.notification-wrapper,
.profile-wrapper,
.language-wrapper { position: relative; }

.notification-btn {
    width: 42px; height: 42px;
    border-radius: 50%;
    background: var(--bg);
    border: 1px solid var(--border);
    color: var(--text);
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    position: relative;
}

.notification-btn:hover { background: var(--primary-soft); border-color: var(--primary); color: var(--primary); }

.notification-badge {
    position: absolute;
    top: -4px; right: -4px;
    min-width: 20px; height: 20px;
    background: var(--danger);
    color: white;
    border-radius: 50px;
    font-size: 10px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
    border: 2px solid var(--surface);
    animation: pulseBadge 2s infinite;
}

@keyframes pulseBadge {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.user-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 14px 6px 6px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 50px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
    color: var(--text);
}

.user-badge:hover { background: var(--primary-soft); border-color: var(--primary); }

.user-badge .avatar {
    width: 32px; height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 13px;
    font-family: 'Poppins', sans-serif;
    flex-shrink: 0;
    overflow: hidden;
}

.user-badge .avatar img { width: 100%; height: 100%; object-fit: cover; }

.user-badge .user-details { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.2; }
.user-badge .user-name { font-weight: 600; font-size: 13px; }
.user-badge .user-role { font-size: 10px; color: var(--text-secondary); text-transform: uppercase; }
.user-badge .chevron { font-size: 10px; color: var(--text-secondary); margin-left: 4px; }
.user-badge.active .chevron { transform: rotate(180deg); }

/* Dropdown Panels */
.dropdown-panel {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: var(--transition);
    z-index: 200;
    overflow: hidden;
}

.dropdown-panel.show { opacity: 1; visibility: visible; transform: translateY(0); }

.notification-panel { width: 360px; max-width: calc(100vw - 32px); }
.language-panel { width: 240px; max-width: calc(100vw - 32px); }
.profile-panel { width: 260px; max-width: calc(100vw - 32px); }

.notification-panel .dropdown-header,
.language-panel .dropdown-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 18px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: white;
}

.notification-panel .dropdown-header h4,
.language-panel .dropdown-header h4 {
    color: white;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    margin: 0;
}

.notification-panel .dropdown-header h4 i,
.language-panel .dropdown-header h4 i { color: var(--accent); }

.mark-all-read {
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: white;
    width: 30px; height: 30px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}

.notification-panel .dropdown-body { max-height: 380px; overflow-y: auto; }

.notification-item {
    display: flex;
    gap: 12px;
    padding: 14px 18px;
    border-bottom: 1px solid var(--border-light);
    transition: var(--transition);
    text-decoration: none;
    color: inherit;
}

.notification-item:hover { background: var(--primary-soft); }
.notification-item.unread {
    background: linear-gradient(90deg, rgba(212, 160, 23, 0.08) 0%, transparent 100%);
    border-left: 3px solid var(--accent);
}

.notification-item .notif-icon {
    width: 38px; height: 38px;
    border-radius: 50%;
    background: var(--primary-soft);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    flex-shrink: 0;
}

.notification-item.warning .notif-icon { background: var(--warning-soft); color: var(--warning); }
.notification-item.danger .notif-icon { background: var(--danger-soft); color: var(--danger); }
.notification-item.success .notif-icon { background: var(--success-soft); color: var(--success); }

.notification-item .notif-content { flex: 1; min-width: 0; }
.notification-item .notif-title { font-weight: 600; font-size: 13px; display: block; margin-bottom: 2px; }
.notification-item .notif-message { font-size: 12px; color: var(--text-secondary); display: block; margin-bottom: 4px; }
.notification-item .notif-time { font-size: 11px; color: var(--text-muted); }

.notification-empty { padding: 40px 20px; text-align: center; color: var(--text-muted); }
.notification-empty i { font-size: 40px; opacity: 0.3; margin-bottom: 10px; display: block; }

.notification-panel .dropdown-footer {
    padding: 12px;
    text-align: center;
    border-top: 1px solid var(--border-light);
    background: var(--bg);
}

.notification-panel .dropdown-footer a {
    color: var(--primary);
    font-size: 13px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* Language Panel */
.language-list { list-style: none; padding: 8px; max-height: 320px; overflow-y: auto; }

.language-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: var(--radius);
    font-size: 13px;
    font-weight: 500;
}

.language-item:hover { background: var(--primary-soft); color: var(--primary); }
.language-item.active {
    background: linear-gradient(90deg, var(--accent-soft) 0%, transparent 100%);
    color: var(--primary);
    font-weight: 600;
}

.language-item .lang-flag-big { font-size: 24px; line-height: 1; }
.language-item .lang-info { display: flex; flex-direction: column; line-height: 1.3; flex: 1; }
.language-item .lang-info strong { font-size: 13px; font-weight: 600; }
.language-item .lang-info span { font-size: 10px; color: var(--text-muted); text-transform: uppercase; }
.language-item .lang-check { color: var(--success); font-size: 14px; }

.language-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 50px;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
    color: var(--text);
    font-size: 13px;
    font-weight: 600;
}

.language-btn:hover { background: var(--primary-soft); border-color: var(--primary); }
.language-btn .lang-flag { font-size: 18px; line-height: 1; }
.language-btn .lang-code { font-size: 11px; font-weight: 700; }
.language-btn .lang-chevron { font-size: 9px; color: var(--text-secondary); transition: transform 0.25s ease; }
.language-btn.active .lang-chevron { transform: rotate(180deg); }

/* Profile Panel */
.profile-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 18px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: white;
}

.profile-avatar-large {
    width: 48px; height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-light) 100%);
    color: var(--primary-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 20px;
    font-family: 'Poppins', sans-serif;
    flex-shrink: 0;
    overflow: hidden;
}

.profile-avatar-large img { width: 100%; height: 100%; object-fit: cover; }

.profile-info { display: flex; flex-direction: column; overflow: hidden; }
.profile-info strong { color: white; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.profile-info span { color: rgba(255, 255, 255, 0.7); font-size: 11px; text-transform: uppercase; }

.profile-menu { list-style: none; padding: 8px; }
.profile-menu li.divider { height: 1px; background: var(--border-light); margin: 6px 4px; }
.profile-menu li a { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: var(--radius); font-size: 13px; font-weight: 500; }
.profile-menu li a i { width: 18px; text-align: center; color: var(--text-secondary); font-size: 14px; }
.profile-menu li a:hover { background: var(--primary-soft); color: var(--primary); }
.profile-menu li a.logout-link { color: var(--danger); }
.profile-menu li a.logout-link i { color: var(--danger); }
.profile-menu li a.logout-link:hover { background: var(--danger-soft); }

/* ==========================================================
   CONTENT AREA
   ========================================================== */
.content-area { padding: 28px; flex: 1; min-width: 0; }

.content-area > h2 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 17px;
    color: var(--text);
    margin: 32px 0 16px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--border-light);
    flex-wrap: wrap;
}

.content-area > h2:first-child { margin-top: 0; }
.content-area > h2 i { color: var(--accent); font-size: 18px; }

/* ==========================================================
   STATS CARDS
   ========================================================== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 28px;
}

.stat-card {
    background: var(--surface);
    padding: 22px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    border: 1px solid var(--border-light);
    position: relative;
    overflow: hidden;
    transition: var(--transition);
    min-width: 0;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--accent) 0%, var(--accent-light) 100%);
}

.stat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }

.stat-card h3 {
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.stat-card h3 i { color: var(--accent); font-size: 14px; }

.stat-card p {
    color: var(--primary);
    font-size: 26px;
    font-weight: 700;
    font-family: 'Poppins', sans-serif;
    line-height: 1.1;
    word-break: break-word;
}

.stat-card small { display: block; margin-top: 6px; font-size: 11px; color: var(--text-muted); }

/* ==========================================================
   FORMS
   ========================================================== */
.form-container {
    background: var(--surface);
    padding: 28px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    border: 1px solid var(--border-light);
    margin-bottom: 24px;
}

.form-container h2 {
    font-size: 18px;
    color: var(--primary);
    margin-bottom: 24px;
    padding-bottom: 14px;
    border-bottom: 2px solid var(--border-light);
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.form-container h2 i { color: var(--accent); }

.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 18px; }

.form-group { margin-bottom: 18px; }
.form-group label { display: block; margin-bottom: 8px; font-weight: 600; font-size: 13px; }

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 11px 14px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    font-size: 14px;
    font-family: inherit;
    background: var(--surface);
    color: var(--text);
    outline: none;
    transition: var(--transition);
    min-width: 0;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-soft);
}

.form-group input:disabled { background: var(--bg); cursor: not-allowed; color: var(--text-muted); }

.form-group small { display: block; margin-top: 6px; font-size: 11px; color: var(--text-muted); }

.btn-submit {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: var(--radius);
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    font-family: 'Poppins', sans-serif;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
    box-shadow: 0 4px 12px rgba(13, 78, 43, 0.25);
}

.btn-submit:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(13, 78, 43, 0.35); }

.btn-cancel {
    background: var(--bg);
    color: var(--text);
    border: 1.5px solid var(--border);
    padding: 10px 20px;
    border-radius: var(--radius);
    cursor: pointer;
    font-weight: 600;
    font-size: 13px;
    font-family: 'Poppins', sans-serif;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-cancel:hover { background: var(--border-light); border-color: var(--text-muted); }

/* Texte d'aide sous les titres */
.form-help {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: var(--primary-soft);
    color: var(--primary);
    border-radius: var(--radius);
    font-size: 13px;
    margin-bottom: 24px;
    border-left: 3px solid var(--primary);
}

.form-help i { font-size: 15px; flex-shrink: 0; }

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 24px;
    background: var(--surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    border: 1px solid var(--border-light);
    margin-top: 24px;
    position: sticky;
    bottom: 20px;
    z-index: 10;
}

/* ==========================================================
   TABLES
   ========================================================== */
.table-responsive {
    background: var(--surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    border: 1px solid var(--border-light);
    overflow-x: auto;
    margin-bottom: 24px;
    -webkit-overflow-scrolling: touch;
    width: 100%;
}

table { width: 100%; border-collapse: collapse; min-width: 600px; }
thead { background: var(--bg); border-bottom: 2px solid var(--border); }

th {
    padding: 14px 18px;
    text-align: left;
    color: var(--text-secondary);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    white-space: nowrap;
}

td { padding: 14px 18px; border-bottom: 1px solid var(--border-light); font-size: 13px; vertical-align: middle; }
tbody tr:hover { background: var(--primary-soft); }
tbody tr:last-child td { border-bottom: none; }
table tfoot td { padding: 16px 18px; background: var(--bg); border-top: 2px solid var(--primary); font-weight: 700; }

/* ==========================================================
   BADGES
   ========================================================== */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 50px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    white-space: nowrap;
}

.badge-entree { background: var(--success-soft); color: #047857; }
.badge-sortie { background: var(--danger-soft); color: #b91c1c; }
.badge-vente  { background: var(--info-soft); color: #1d4ed8; }
.badge-gold   { background: var(--accent-soft); color: #92400e; }

/* ==========================================================
   BOUTONS
   ========================================================== */
.btn-icon {
    width: 34px; height: 34px;
    border-radius: var(--radius-sm);
    border: none;
    background: var(--primary-soft);
    color: var(--primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    transition: var(--transition);
    flex-shrink: 0;
    text-decoration: none;
}

.btn-icon:hover { background: var(--primary); color: white; transform: translateY(-2px); }
.btn-icon.btn-danger { background: var(--danger-soft); color: var(--danger); }
.btn-icon.btn-danger:hover { background: var(--danger); color: white; }
.btn-icon.btn-warning { background: var(--warning-soft); color: #92400e; }
.btn-icon.btn-warning:hover { background: var(--warning); color: white; }
.btn-icon.btn-success { background: var(--success-soft); color: #047857; }
.btn-icon.btn-success:hover { background: var(--success); color: white; }

.action-buttons { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }

.btn-delete {
    background: var(--danger-soft);
    color: var(--danger);
    border: none;
    padding: 7px 11px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 13px;
}

.btn-delete:hover { background: var(--danger); color: white; }

.btn-refresh {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-light) 100%);
    color: var(--primary-dark);
    border: none;
    padding: 10px 20px;
    border-radius: var(--radius);
    cursor: pointer;
    font-weight: 600;
    font-size: 13px;
    font-family: 'Poppins', sans-serif;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
}

.btn-refresh:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(212, 160, 23, 0.4); }

/* ==========================================================
   GRAPHIQUES
   ========================================================== */
.dashboard-charts { margin-bottom: 32px; }

.chart-card {
    background: var(--surface);
    padding: 24px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    border: 1px solid var(--border-light);
    margin-bottom: 24px;
    min-width: 0;
}

.chart-card-wide { grid-column: 1 / -1; margin-bottom: 24px; }

.charts-grid-dashboard,
.charts-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 24px;
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
    padding-bottom: 14px;
    border-bottom: 2px solid var(--border-light);
    flex-wrap: wrap;
    gap: 10px;
}

.chart-header h3 { font-size: 14px; display: flex; align-items: center; gap: 8px; font-weight: 600; margin: 0; }
.chart-header h3 i { color: var(--accent); }

.chart-legend-inline { display: flex; gap: 16px; font-size: 12px; flex-wrap: wrap; }
.chart-legend-inline span { display: flex; align-items: center; gap: 6px; }
.chart-legend-inline .dot { width: 10px; height: 10px; border-radius: 50%; }

.chart-body { position: relative; width: 100%; height: 320px; }
.chart-body-sm { height: 260px; }
.chart-body-donut { height: 260px; }

/* ==========================================================
   ALERTES FLASH
   ========================================================== */
.alert {
    padding: 14px 18px;
    border-radius: var(--radius);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    font-weight: 500;
    animation: slideDown 0.4s ease;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.alert-success { background: var(--success-soft); color: #047857; border-left: 4px solid var(--success); }
.alert-error { background: var(--danger-soft); color: #b91c1c; border-left: 4px solid var(--danger); }

/* ==========================================================
   MODALS
   ========================================================== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(3px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.modal-overlay.show { opacity: 1; visibility: visible; }

.modal-content {
    background: var(--surface);
    border-radius: var(--radius-lg);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.4);
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    transform: translateY(20px) scale(0.95);
    transition: var(--transition);
}

.modal-overlay.show .modal-content { transform: translateY(0) scale(1); }
.modal-content.modal-sm { max-width: 420px; }

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: white;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    position: sticky;
    top: 0;
    z-index: 10;
}

.modal-header h3 { color: white; font-size: 16px; display: flex; align-items: center; gap: 10px; margin: 0; }
.modal-header h3 i { color: var(--accent); }

.modal-close {
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: white;
    width: 34px; height: 34px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    flex-shrink: 0;
}

.modal-close:hover { background: rgba(255, 255, 255, 0.3); }

.modal-body { padding: 24px; }

.modal-footer {
    padding: 16px 24px 20px;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    border-top: 1px solid var(--border-light);
    background: var(--bg);
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

/* ==========================================================
   TOAST ANIMATIONS
   ========================================================== */
@keyframes slideInRight {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes slideOutRight {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(100%); opacity: 0; }
}

/* ==========================================================
   PAGE RAPPORTS
   ========================================================== */
.report-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--surface);
    padding: 16px 22px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    border: 1px solid var(--border-light);
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 12px;
}

.report-types-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 14px;
    margin-bottom: 24px;
}

.report-type-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 20px 16px;
    background: var(--surface);
    border: 2px solid var(--border-light);
    border-radius: var(--radius-lg);
    text-decoration: none;
    color: var(--text);
    transition: var(--transition);
    text-align: center;
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.report-type-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary) 0%, var(--accent) 100%);
    opacity: 0;
    transition: var(--transition);
}

.report-type-card:hover { border-color: var(--primary); transform: translateY(-3px); box-shadow: var(--shadow-md); }
.report-type-card:hover::before { opacity: 1; }
.report-type-card.active {
    border-color: var(--primary);
    background: linear-gradient(135deg, var(--primary-soft) 0%, var(--surface) 100%);
    box-shadow: 0 8px 20px rgba(13, 78, 43, 0.15);
}
.report-type-card.active::before { opacity: 1; }

.report-type-icon {
    width: 48px; height: 48px;
    border-radius: 50%;
    background: var(--primary-soft);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    transition: var(--transition);
}

.report-type-card.active .report-type-icon {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(13, 78, 43, 0.3);
}

.report-type-card:hover .report-type-icon { transform: scale(1.1); }
.report-type-card strong { font-size: 13px; font-weight: 600; font-family: 'Poppins', sans-serif; }
.report-type-card small { font-size: 11px; color: var(--text-secondary); line-height: 1.3; }

.report-filters { display: flex; flex-direction: column; gap: 18px; }
.report-filters-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; }

.report-period { display: flex; align-items: center; gap: 12px; }
.report-period label { font-weight: 600; font-size: 13px; display: flex; align-items: center; gap: 6px; }
.report-period label i { color: var(--accent); }
.report-period select {
    padding: 9px 14px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    font-size: 13px;
    font-family: inherit;
    background: var(--surface);
    color: var(--text);
    cursor: pointer;
    outline: none;
    font-weight: 500;
}
.report-period select:focus { border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-soft); }

.period-shortcuts {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    padding-top: 16px;
    border-top: 1px solid var(--border-light);
}

.period-label {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-right: 8px;
}

.period-btn {
    padding: 6px 14px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 50px;
    font-size: 12px;
    font-weight: 500;
    color: var(--text);
    text-decoration: none;
    transition: var(--transition);
    cursor: pointer;
    white-space: nowrap;
}

.period-btn:hover {
    background: var(--primary-soft);
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-1px);
}

.report-print-header { display: none; }

/* ==========================================================
   PAGE UTILISATEURS
   ========================================================== */
.users-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    background: var(--surface);
    padding: 16px 22px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    border: 1px solid var(--border-light);
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.users-search { flex: 1; min-width: 240px; position: relative; }
.users-search i {
    position: absolute;
    left: 14px; top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 14px;
    pointer-events: none;
}

.users-search input {
    width: 100%;
    padding: 11px 16px 11px 42px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    font-size: 14px;
    font-family: inherit;
    background: var(--bg);
    outline: none;
    transition: var(--transition);
}

.users-search input:focus { border-color: var(--primary); background: var(--surface); box-shadow: 0 0 0 4px var(--primary-soft); }

.users-filter { display: flex; gap: 10px; }
.users-filter select {
    padding: 11px 14px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    font-size: 13px;
    font-family: inherit;
    background: var(--surface);
    color: var(--text);
    cursor: pointer;
    outline: none;
    font-weight: 500;
}

.user-cell { display: flex; align-items: center; gap: 12px; }
.user-cell-avatar {
    width: 40px; height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 15px;
    font-family: 'Poppins', sans-serif;
    flex-shrink: 0;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(13, 78, 43, 0.2);
}

.user-cell-avatar img { width: 100%; height: 100%; object-fit: cover; }
.user-cell-info { display: flex; flex-direction: column; line-height: 1.3; }
.user-cell-info strong { color: var(--text); font-size: 13px; font-weight: 600; }
.user-cell-info span { color: var(--text-muted); font-size: 11px; }

.contact-line { font-size: 12px; color: var(--text-secondary); display: flex; align-items: center; gap: 6px; margin-bottom: 2px; }
.contact-line i { color: var(--text-muted); font-size: 11px; width: 14px; }

.role-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: 50px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

.role-admin { background: linear-gradient(135deg, var(--accent) 0%, var(--accent-light) 100%); color: var(--primary-dark); }
.role-manager { background: var(--info-soft); color: #1d4ed8; }
.role-employe { background: var(--primary-soft); color: var(--primary); }

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 50px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.status-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.status-active { background: var(--success-soft); color: #047857; }
.status-active .status-dot { background: var(--success); animation: pulseDot 2s infinite; }
.status-inactive { background: var(--danger-soft); color: #b91c1c; }
.status-inactive .status-dot { background: var(--danger); }

@keyframes pulseDot {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

.self-badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    background: var(--accent-soft);
    color: #92400e;
    font-size: 11px;
    font-weight: 700;
    border-radius: 50px;
    text-transform: uppercase;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 10px;
    background: var(--bg);
    border-radius: var(--radius);
    border: 1.5px solid var(--border);
    transition: var(--transition);
}

.checkbox-label:hover { border-color: var(--primary); }
.checkbox-label input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--primary); cursor: pointer; }
.checkbox-label span { font-weight: 500; color: var(--text); font-size: 13px; }

/* ==========================================================
   PAGE PROFIL
   ========================================================== */
.profile-card {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 24px;
    background: var(--surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    border: 1px solid var(--border-light);
    padding: 32px;
    margin-bottom: 24px;
}

.profile-avatar-section {
    text-align: center;
    padding-right: 24px;
    border-right: 1px solid var(--border-light);
}

.profile-avatar-big {
    width: 140px; height: 140px;
    margin: 0 auto 20px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    box-shadow: 0 10px 30px rgba(13, 78, 43, 0.2), 0 0 0 6px rgba(212, 160, 23, 0.15);
    overflow: hidden;
}

.profile-avatar-big img { width: 100%; height: 100%; object-fit: cover; }
.profile-avatar-big .avatar-placeholder {
    font-family: 'Poppins', sans-serif;
    font-size: 56px;
    font-weight: 700;
    color: white;
}

.avatar-upload-btn {
    position: absolute;
    bottom: 8px; right: 8px;
    width: 40px; height: 40px;
    border-radius: 50%;
    background: var(--accent);
    color: var(--primary-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: 3px solid var(--surface);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.avatar-upload-btn:hover { background: var(--accent-light); transform: scale(1.1); }

.profile-name { font-size: 20px; font-weight: 700; margin-bottom: 8px; }

.profile-role-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-light) 100%);
    color: var(--primary-dark);
    border-radius: 50px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.profile-meta {
    display: flex;
    flex-direction: column;
    gap: 12px;
    text-align: left;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border-light);
}

.profile-meta .meta-item { display: flex; align-items: center; gap: 12px; font-size: 13px; color: var(--text-secondary); }
.profile-meta .meta-item i { width: 20px; text-align: center; color: var(--primary); font-size: 14px; }

.profile-stats-section h3 {
    font-size: 16px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--border-light);
}

.profile-stats-section h3 i { color: var(--accent); }

.profile-stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }

.profile-stat {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    background: var(--bg);
    border-radius: var(--radius);
    border: 1px solid var(--border-light);
    transition: var(--transition);
}

.profile-stat:hover { transform: translateY(-2px); box-shadow: var(--shadow); }

.profile-stat .stat-icon {
    width: 46px; height: 46px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.profile-stat .stat-value { display: block; font-size: 20px; font-weight: 700; color: var(--primary); font-family: 'Poppins', sans-serif; }
.profile-stat .stat-label { display: block; font-size: 11px; color: var(--text-secondary); text-transform: uppercase; margin-top: 2px; }

.profile-forms-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-bottom: 24px; }

.password-input-wrapper { position: relative; }
.password-input-wrapper input { padding-right: 45px !important; }

.toggle-password {
    position: absolute;
    right: 12px; top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 6px;
    border-radius: 4px;
}

.toggle-password:hover { color: var(--primary); background: var(--primary-soft); }

.password-strength { margin-bottom: 18px; }
.strength-bar { height: 4px; background: var(--border); border-radius: 2px; overflow: hidden; margin-bottom: 6px; }
.strength-fill { height: 100%; width: 0; background: var(--border); border-radius: 2px; transition: all 0.3s ease; }
.strength-text { font-size: 11px; color: var(--text-muted); font-weight: 500; }

/* ==========================================================
   PAGE SEUILS
   ========================================================== */
.alert-summary {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px 24px;
    border-radius: var(--radius-lg);
    margin-bottom: 20px;
    border-left: 4px solid;
}

.alert-summary.danger { background: var(--danger-soft); border-left-color: var(--danger); color: #b91c1c; }
.alert-summary.success { background: var(--success-soft); border-left-color: var(--success); color: #047857; }
.alert-summary > i { font-size: 28px; flex-shrink: 0; }
.alert-summary strong { display: block; font-size: 15px; font-weight: 700; margin-bottom: 2px; }
.alert-summary p { margin: 0; font-size: 13px; opacity: 0.8; }

.stock-alerts-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin-bottom: 32px; }

.stock-alert-card {
    background: var(--surface);
    padding: 20px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    border: 2px solid var(--border-light);
    transition: var(--transition);
}

.stock-alert-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.stock-alert-card.status-ok { border-color: var(--success); background: linear-gradient(180deg, var(--success-soft) 0%, var(--surface) 30%); }
.stock-alert-card.status-low { border-color: var(--warning); background: linear-gradient(180deg, var(--warning-soft) 0%, var(--surface) 30%); }
.stock-alert-card.status-empty { border-color: var(--danger); background: linear-gradient(180deg, var(--danger-soft) 0%, var(--surface) 30%); }

.stock-alert-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }

.stock-alert-icon {
    width: 42px; height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: white;
}

.status-ok .stock-alert-icon { background: var(--success); }
.status-low .stock-alert-icon { background: var(--warning); }
.status-empty .stock-alert-icon { background: var(--danger); }

.stock-alert-badge {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 50px;
    color: white;
}

.status-ok .stock-alert-badge { background: var(--success); }
.status-low .stock-alert-badge { background: var(--warning); }
.status-empty .stock-alert-badge { background: var(--danger); }

.stock-alert-card h4 { font-size: 15px; font-weight: 600; margin-bottom: 8px; }
.stock-alert-numbers { display: flex; align-items: baseline; gap: 6px; margin-bottom: 12px; }
.stock-alert-quantity { font-size: 28px; font-weight: 700; font-family: 'Poppins', sans-serif; color: var(--text); line-height: 1; }
.stock-alert-sep { font-size: 20px; color: var(--text-muted); }
.stock-alert-threshold { font-size: 16px; font-weight: 600; color: var(--text-secondary); }

.stock-alert-bar { height: 6px; background: var(--border-light); border-radius: 3px; overflow: hidden; margin-bottom: 8px; }
.stock-alert-fill { height: 100%; border-radius: 3px; }
.status-ok .stock-alert-fill { background: linear-gradient(90deg, var(--success), #34d399); }
.status-low .stock-alert-fill { background: linear-gradient(90deg, var(--warning), #fbbf24); }
.status-empty .stock-alert-fill { background: linear-gradient(90deg, var(--danger), #f87171); }

.stock-alert-info { font-size: 11px; color: var(--text-muted); margin: 0; }

.threshold-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; }

.threshold-card {
    background: var(--bg);
    padding: 20px;
    border-radius: var(--radius);
    border: 1.5px solid var(--border-light);
    text-align: center;
    transition: var(--transition);
}

.threshold-card:hover { border-color: var(--primary); background: var(--surface); box-shadow: var(--shadow); }

.threshold-icon {
    width: 54px; height: 54px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    margin: 0 auto 12px;
}

.threshold-card label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 10px; }

.threshold-card input {
    width: 100%;
    padding: 10px 12px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 16px;
    font-weight: 700;
    font-family: 'Poppins', sans-serif;
    text-align: center;
    color: var(--primary);
    background: var(--surface);
    outline: none;
}

.threshold-card input:focus { border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-soft); }

.threshold-hint { display: block; font-size: 10px; color: var(--text-muted); margin-top: 6px; text-transform: uppercase; }

.settings-list { display: flex; flex-direction: column; gap: 4px; }

.settings-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    padding: 16px;
    border-radius: var(--radius);
    transition: var(--transition);
    border: 1px solid transparent;
}

.settings-item:hover { background: var(--bg); border-color: var(--border-light); }

.settings-item-info { display: flex; align-items: center; gap: 16px; flex: 1; min-width: 0; }

.settings-item-icon {
    width: 42px; height: 42px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
    flex-shrink: 0;
}

.settings-item-info strong { display: block; font-size: 14px; font-weight: 600; margin-bottom: 2px; }
.settings-item-info p { margin: 0; font-size: 12px; color: var(--text-secondary); line-height: 1.4; }

/* Toggle Switch */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px; height: 28px;
    flex-shrink: 0;
    cursor: pointer;
}

.toggle-switch input { opacity: 0; width: 0; height: 0; }

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: var(--border);
    transition: 0.3s;
    border-radius: 34px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 22px; width: 22px;
    left: 3px; bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

.toggle-switch input:checked + .toggle-slider { background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%); }
.toggle-switch input:checked + .toggle-slider:before { transform: translateX(22px); }
.toggle-switch input:focus + .toggle-slider { box-shadow: 0 0 0 4px var(--primary-soft); }

.frequency-options { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; }
.frequency-option { cursor: pointer; }
.frequency-option input[type="radio"] { display: none; }

.frequency-card {
    padding: 20px 16px;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    text-align: center;
    transition: var(--transition);
    background: var(--surface);
}

.frequency-option:hover .frequency-card { border-color: var(--primary-light); transform: translateY(-2px); box-shadow: var(--shadow); }
.frequency-option input:checked + .frequency-card {
    border-color: var(--primary);
    background: linear-gradient(135deg, var(--primary-soft) 0%, var(--surface) 100%);
    box-shadow: 0 4px 12px rgba(13, 78, 43, 0.15);
}

.frequency-card i { font-size: 24px; color: var(--primary); display: block; margin-bottom: 10px; }
.frequency-option input:checked + .frequency-card i { color: var(--accent); }
.frequency-card strong { display: block; font-size: 14px; font-weight: 600; margin-bottom: 4px; font-family: 'Poppins', sans-serif; }
.frequency-card span { display: block; font-size: 11px; color: var(--text-secondary); text-transform: uppercase; }

/* ==========================================================
   PAGE PARAMÈTRES
   ========================================================== */
.logo-upload-section { display: flex; align-items: center; gap: 32px; padding: 8px; }

.logo-preview-wrapper {
    width: 180px; height: 180px;
    border-radius: var(--radius-lg);
    background: #ffffff;
    border: 2px dashed var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
    transition: var(--transition);
}

.logo-preview-wrapper:hover { border-color: var(--primary); border-style: solid; }
.logo-preview-img { max-width: 85%; max-height: 85%; object-fit: contain; }

.logo-overlay-btn {
    position: absolute;
    bottom: 10px; right: 10px;
    width: 42px; height: 42px;
    border-radius: 50%;
    background: var(--accent);
    color: var(--primary-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: 3px solid #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.logo-overlay-btn:hover { background: var(--accent-light); transform: scale(1.1); }

.logo-info { flex: 1; }
.logo-info h4 { font-size: 16px; margin-bottom: 12px; font-weight: 600; }
.logo-info p { font-size: 13px; color: var(--text-secondary); margin-bottom: 6px; }
.logo-info p strong { color: var(--primary); }
.logo-actions { display: flex; gap: 10px; margin-top: 18px; flex-wrap: wrap; }

.company-preview {
    background: var(--surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-light);
    overflow: hidden;
    max-width: 600px;
    margin: 0 auto;
    position: relative;
}

.company-preview::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary) 0%, var(--accent) 100%);
}

.preview-header {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 28px 32px 20px;
    background: linear-gradient(135deg, var(--primary-soft) 0%, var(--surface) 100%);
}

.preview-logo {
    width: 80px; height: 80px;
    object-fit: contain;
    background: #fff;
    border-radius: var(--radius);
    padding: 8px;
    box-shadow: var(--shadow);
    flex-shrink: 0;
}

.preview-header h3 { font-size: 20px; color: var(--primary); margin-bottom: 4px; font-weight: 700; }
.preview-slogan { font-size: 13px; color: var(--text-secondary); font-style: italic; }

.preview-body { padding: 20px 32px; display: flex; flex-direction: column; gap: 12px; }
.preview-line { display: flex; align-items: center; gap: 12px; font-size: 13px; }
.preview-line i { width: 20px; text-align: center; color: var(--accent); font-size: 14px; }

.preview-footer {
    padding: 16px 32px;
    border-top: 1px solid var(--border-light);
    background: var(--bg);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.preview-badge {
    display: inline-flex;
    align-items: center;
    padding: 5px 14px;
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-light) 100%);
    color: var(--primary-dark);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    border-radius: 50px;
}

.preview-capital { font-size: 12px; color: var(--text-secondary); font-weight: 500; }

/* ==========================================================
   PAGE COULEURS
   ========================================================== */
.presets-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 16px;
    margin-top: 16px;
}

.preset-card {
    background: var(--bg);
    border: 2px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 16px;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
    font-family: inherit;
    color: var(--text);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.preset-card:hover { border-color: var(--primary); transform: translateY(-3px); box-shadow: var(--shadow-md); }
.preset-card:disabled { opacity: 0.5; cursor: not-allowed; }
.preset-card:disabled:hover { border-color: var(--border); box-shadow: none; transform: none; }

.preset-preview {
    display: flex;
    width: 100%;
    height: 44px;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.preset-preview span { flex: 1; height: 100%; }
.preset-card strong { font-size: 13px; font-weight: 600; font-family: 'Poppins', sans-serif; }
.preset-card small { font-size: 11px; color: var(--text-secondary); }

.theme-preview {
    display: flex;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-light);
    min-height: 320px;
    margin-bottom: 32px;
}

.preview-sidebar {
    width: 200px;
    background: linear-gradient(180deg, var(--primary-dark) 0%, var(--primary) 100%);
    padding: 16px 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-shrink: 0;
}

.preview-sidebar .preview-logo {
    width: 44px; height: 44px;
    border-radius: 50%;
    background: #fff;
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-family: 'Poppins', sans-serif;
    font-size: 16px;
    margin: 0 auto 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    padding: 0;
    object-fit: none;
}

.preview-menu-item {
    padding: 9px 14px;
    color: rgba(255, 255, 255, 0.75);
    border-radius: 8px;
    font-size: 12px;
    font-weight: 500;
}

.preview-menu-item.preview-active {
    background: linear-gradient(90deg, var(--accent) 0%, var(--accent-light) 100%);
    color: var(--primary-dark);
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(212, 160, 23, 0.35);
}

.preview-main { flex: 1; background: var(--bg); display: flex; flex-direction: column; }

.preview-topbar {
    background: #fff;
    padding: 14px 20px;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    font-size: 13px;
}

.preview-badge-live {
    background: var(--success);
    color: white;
    padding: 3px 10px;
    border-radius: 50px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    animation: pulseLive 2s infinite;
}

@keyframes pulseLive {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

.preview-content {
    padding: 20px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 12px;
    flex: 1;
}

.preview-stat {
    background: #fff;
    border-radius: 10px;
    padding: 12px;
    border-top: 3px solid var(--accent);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.preview-stat-label { font-size: 10px; text-transform: uppercase; color: var(--text-secondary); font-weight: 600; }
.preview-stat-value { font-size: 14px; font-weight: 700; font-family: 'Poppins', sans-serif; color: var(--primary); }

.preview-buttons { grid-column: 1 / -1; display: flex; gap: 10px; margin-top: 8px; }

.preview-btn-primary,
.preview-btn-accent {
    padding: 10px 18px;
    border: none;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
    cursor: pointer;
}

.preview-btn-primary { background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%); color: white; }
.preview-btn-accent { background: linear-gradient(135deg, var(--accent) 0%, var(--accent-light) 100%); color: var(--primary-dark); }

.preview-badges { grid-column: 1 / -1; display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }

.preview-badge {
    padding: 5px 12px;
    border-radius: 50px;
    font-size: 10px;
    font-weight: 700;
    color: white;
    text-transform: uppercase;
}

.preview-badge-success { background: var(--success); }
.preview-badge-danger { background: var(--danger); }
.preview-badge-warning { background: var(--warning); }
.preview-badge-info { background: var(--info); }

.color-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; }
.color-picker-item { display: flex; flex-direction: column; gap: 8px; }
.color-picker-item label { font-size: 13px; font-weight: 600; }

.color-picker-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    background: var(--bg);
    border-radius: var(--radius);
    border: 1.5px solid var(--border);
}

.color-picker-wrapper:focus-within { border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-soft); }

.color-picker-wrapper input[type="color"] {
    width: 44px; height: 44px;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    padding: 0;
    background: none;
    flex-shrink: 0;
}

.color-hex-input {
    flex: 1;
    padding: 8px 10px;
    border: none;
    background: transparent;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    outline: none;
    min-width: 0;
}

.color-picker-item small { font-size: 11px; color: var(--text-muted); line-height: 1.4; }

/* ==========================================================
   PAGE DEVISES
   ========================================================== */
.current-currency-card {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 24px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    border-radius: var(--radius-lg);
    color: white;
    box-shadow: 0 10px 30px rgba(13, 78, 43, 0.25);
    margin-bottom: 24px;
    position: relative;
    overflow: hidden;
    flex-wrap: wrap;
}

.current-currency-card::before {
    content: '';
    position: absolute;
    top: -50px; right: -50px;
    width: 200px; height: 200px;
    background: radial-gradient(circle, rgba(212, 160, 23, 0.3) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.current-currency-icon {
    width: 70px; height: 70px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    border: 2px solid rgba(212, 160, 23, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: var(--accent);
    flex-shrink: 0;
}

.current-currency-info { flex: 1; min-width: 200px; }
.current-currency-label { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: 1px; color: rgba(255, 255, 255, 0.7); margin-bottom: 6px; font-weight: 600; }
.current-currency-info h3 { color: white; font-size: 22px; margin-bottom: 10px; font-weight: 700; }
.current-currency-meta { display: flex; gap: 8px; flex-wrap: wrap; }

.currency-code-pill,
.currency-symbol-pill {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.currency-symbol-pill { background: var(--accent); color: var(--primary-dark); }

.current-currency-format {
    text-align: right;
    padding: 16px 20px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: var(--radius);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.format-label { display: block; font-size: 10px; text-transform: uppercase; color: rgba(255, 255, 255, 0.6); margin-bottom: 4px; font-weight: 600; }
.format-value { display: block; font-size: 18px; font-weight: 700; color: white; font-family: 'Poppins', sans-serif; }

.currency-code-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    background: var(--primary-soft);
    color: var(--primary);
    border-radius: 50px;
    font-size: 12px;
    font-weight: 700;
    font-family: 'Poppins', sans-serif;
}

.currency-code-badge.is-default { background: linear-gradient(135deg, var(--accent) 0%, var(--accent-light) 100%); color: var(--primary-dark); }

.symbol-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    padding: 4px 10px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 700;
    font-family: 'Poppins', sans-serif;
}

.rate-info { display: flex; flex-direction: column; gap: 4px; }
.rate-value { font-size: 14px; font-weight: 700; color: var(--primary); font-family: 'Poppins', sans-serif; }
.rate-hint { font-size: 10px; color: var(--text-muted); }

.rates-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }

.rate-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 16px;
    background: var(--bg);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    transition: var(--transition);
}

.rate-item:hover { border-color: var(--primary); background: var(--surface); }
.rate-item label { display: flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 600; }
.rate-item label span:last-child { font-weight: 500; color: var(--text-secondary); }

.rate-input {
    padding: 10px 12px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 700;
    font-family: 'Poppins', sans-serif;
    color: var(--primary);
    background: var(--surface);
    text-align: right;
}

.rate-input:focus { border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-soft); outline: none; }
.rate-unit { font-size: 11px; color: var(--text-muted); text-align: right; }

/* ==========================================================
   PAGE LANGUES
   ========================================================== */
.lang-cell { display: flex; align-items: center; gap: 12px; }
.lang-flag { font-size: 26px; line-height: 1; flex-shrink: 0; }
.lang-cell strong { display: block; font-size: 14px; font-weight: 600; margin-bottom: 2px; }

.lang-default-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-light) 100%);
    color: var(--primary-dark);
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    border-radius: 50px;
}

.lang-code-badge {
    display: inline-flex;
    padding: 4px 10px;
    background: var(--primary-soft);
    color: var(--primary);
    border-radius: 50px;
    font-size: 11px;
    font-weight: 700;
    font-family: 'Poppins', sans-serif;
}

.completion-bar {
    width: 100%;
    max-width: 120px;
    height: 6px;
    background: var(--border-light);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 4px;
}

.completion-fill { height: 100%; border-radius: 3px; }
.completion-success { background: linear-gradient(90deg, var(--success), #34d399); }
.completion-warning { background: linear-gradient(90deg, var(--warning), #fbbf24); }
.completion-danger { background: linear-gradient(90deg, var(--danger), #f87171); }
.completion-text { font-size: 11px; font-weight: 700; color: var(--text-secondary); }

.translation-search { position: relative; margin-bottom: 20px; }
.translation-search i {
    position: absolute;
    left: 14px; top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
}

.translation-search input {
    width: 100%;
    padding: 12px 140px 12px 42px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    font-size: 14px;
    font-family: inherit;
    background: var(--bg);
    outline: none;
}

.translation-search input:focus { border-color: var(--primary); background: var(--surface); box-shadow: 0 0 0 4px var(--primary-soft); }

.translation-count {
    position: absolute;
    right: 14px; top: 50%;
    transform: translateY(-50%);
    font-size: 12px;
    color: var(--text-secondary);
    background: var(--surface);
    padding: 4px 12px;
    border-radius: 50px;
    font-weight: 600;
    border: 1px solid var(--border);
}

.translations-list { display: flex; flex-direction: column; gap: 8px; max-height: 700px; overflow-y: auto; padding-right: 8px; }

.translation-item {
    background: var(--bg);
    border: 1.5px solid var(--border-light);
    border-radius: var(--radius);
    padding: 14px 16px;
    transition: var(--transition);
}

.translation-item:hover { border-color: var(--primary); background: var(--surface); box-shadow: var(--shadow-sm); }

.translation-key {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-family: 'Courier New', monospace;
    color: var(--primary);
    font-weight: 700;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px dashed var(--border);
}

.translation-values { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.translation-label { display: flex; align-items: center; gap: 6px; font-size: 10px; text-transform: uppercase; color: var(--text-muted); font-weight: 700; }

.translation-text-fr {
    padding: 10px 12px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 13px;
    color: var(--text-secondary);
    font-style: italic;
    min-height: 42px;
    display: flex;
    align-items: center;
}

.translation-status-ok { color: var(--success); font-weight: 700; font-size: 10px; margin-left: auto; }
.translation-status-missing { color: var(--warning); font-weight: 700; font-size: 10px; margin-left: auto; }

.translation-form { display: flex; gap: 6px; align-items: stretch; }

.translation-input {
    flex: 1;
    padding: 10px 12px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-family: inherit;
    background: var(--surface);
    outline: none;
}

.translation-input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }

.translation-save-btn {
    width: 40px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ==========================================================
   PAGE NOTIFICATIONS
   ========================================================== */
.notif-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    background: var(--surface);
    padding: 16px 20px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    border: 1px solid var(--border-light);
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.notif-filters { display: flex; align-items: center; gap: 10px; flex: 1; flex-wrap: wrap; }
.notif-search { position: relative; flex: 1; min-width: 240px; }
.notif-search i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--text-muted); }
.notif-search input {
    width: 100%;
    padding: 10px 14px 10px 40px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    font-size: 13px;
    background: var(--bg);
    outline: none;
}

.notif-filters select {
    padding: 10px 14px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    font-size: 13px;
    background: var(--surface);
    cursor: pointer;
}

.notif-list { display: flex; flex-direction: column; gap: 12px; }

.notif-card {
    display: flex;
    gap: 16px;
    padding: 18px 20px;
    background: var(--surface);
    border: 1.5px solid var(--border-light);
    border-radius: var(--radius-lg);
    position: relative;
    border-left-width: 4px;
    transition: var(--transition);
}

.notif-card:hover { transform: translateX(4px); box-shadow: var(--shadow-md); }
.notif-card.notif-unread { background: linear-gradient(90deg, var(--primary-soft), var(--surface)); }
.notif-card.notif-type-info { border-left-color: var(--info); }
.notif-card.notif-type-success { border-left-color: var(--success); }
.notif-card.notif-type-warning { border-left-color: var(--warning); }
.notif-card.notif-type-danger { border-left-color: var(--danger); }

.notif-pin-indicator {
    position: absolute;
    top: -8px; right: 20px;
    width: 24px; height: 24px;
    background: var(--accent);
    color: var(--primary-dark);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
}

.notif-icon-wrapper {
    width: 48px; height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.notif-icon-info { background: var(--info-soft); color: var(--info); }
.notif-icon-success { background: var(--success-soft); color: var(--success); }
.notif-icon-warning { background: var(--warning-soft); color: var(--warning); }
.notif-icon-danger { background: var(--danger-soft); color: var(--danger); }

.notif-content { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.notif-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.notif-title { font-size: 15px; font-weight: 600; margin: 0; }

.notif-category-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 50px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
}

.notif-new-badge {
    display: inline-flex;
    padding: 3px 10px;
    background: var(--danger);
    color: white;
    border-radius: 50px;
    font-size: 9px;
    font-weight: 700;
}

.notif-message { font-size: 13px; color: var(--text-secondary); line-height: 1.5; }
.notif-footer { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 4px; }
.notif-date { font-size: 11px; color: var(--text-muted); }
.notif-actions { display: flex; gap: 4px; flex-wrap: wrap; }

.notif-action-btn {
    width: 32px; height: 32px;
    border-radius: var(--radius-sm);
    border: none;
    background: var(--bg);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    text-decoration: none;
}

.notif-action-btn:hover { background: var(--primary-soft); color: var(--primary); }
.notif-action-btn.notif-action-danger { background: var(--danger-soft); color: var(--danger); }
.notif-action-btn.notif-action-active { background: var(--accent-soft); color: #92400e; }

.notif-empty {
    background: var(--surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    padding: 60px 20px;
    text-align: center;
}

.notif-empty-icon {
    width: 100px; height: 100px;
    margin: 0 auto 20px;
    border-radius: 50%;
    background: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    color: var(--text-muted);
    opacity: 0.5;
}

/* ==========================================================
   PAGE FACTURES
   ========================================================== */
.invoice-paper {
    background: white;
    padding: 40px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-light);
    max-width: 900px;
    margin: 0 auto;
}

.invoice-header {
    display: flex;
    justify-content: space-between;
    gap: 30px;
    padding-bottom: 30px;
    border-bottom: 3px solid var(--primary);
    margin-bottom: 30px;
}

.invoice-company { display: flex; gap: 16px; flex: 1; }
.invoice-logo { width: 80px; height: 80px; object-fit: contain; flex-shrink: 0; }
.invoice-company h2 { color: var(--primary); font-size: 22px; margin-bottom: 8px; font-family: 'Poppins', sans-serif; }
.invoice-company p { font-size: 12px; color: var(--text-secondary); margin-bottom: 2px; }

.invoice-meta { text-align: right; min-width: 250px; }
.invoice-meta h1 { font-size: 32px; color: var(--primary); letter-spacing: 3px; margin-bottom: 4px; font-family: 'Poppins', sans-serif; }
.invoice-number { font-size: 15px; color: var(--accent); font-weight: 700; margin-bottom: 16px; font-family: 'Courier New', monospace; }
.invoice-meta-table { width: 100%; font-size: 12px; }
.invoice-meta-table td { padding: 3px 0; }
.invoice-meta-table td:first-child { color: var(--text-secondary); padding-right: 12px; }

.invoice-client-section { margin-bottom: 30px; }

.invoice-client-card {
    background: var(--bg);
    padding: 20px;
    border-radius: var(--radius);
    border-left: 4px solid var(--accent);
    max-width: 350px;
}

.invoice-client-card h3 { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 10px; }
.invoice-client-name { font-size: 16px; font-weight: 700; margin-bottom: 8px !important; }
.invoice-client-card p { font-size: 12px; color: var(--text-secondary); margin-bottom: 4px; }
.invoice-client-card i { color: var(--primary); width: 16px; }

.invoice-items table { width: 100%; margin-bottom: 20px; min-width: 0; }
.invoice-items thead { background: var(--primary); }
.invoice-items th { padding: 12px; font-size: 11px; color: white; background: var(--primary); text-transform: uppercase; }
.invoice-items td { padding: 12px; font-size: 13px; border-bottom: 1px solid var(--border-light); }

.invoice-totals { display: flex; justify-content: flex-end; margin-bottom: 30px; }
.invoice-totals-table { width: 350px; }
.invoice-total-row { display: flex; justify-content: space-between; padding: 8px 0; font-size: 13px; border-bottom: 1px solid var(--border-light); }

.invoice-grand-total {
    margin-top: 8px;
    padding: 14px 0;
    border-top: 2px solid var(--primary);
    border-bottom: none;
    font-size: 16px;
}

.invoice-grand-total span { color: var(--primary); font-weight: 700; }
.invoice-grand-total strong { color: var(--accent); font-size: 20px; }

.invoice-notes {
    margin-top: 30px;
    padding: 16px;
    background: var(--accent-soft);
    border-radius: var(--radius);
    border-left: 4px solid var(--accent);
}

.invoice-notes h4 { font-size: 13px; margin-bottom: 8px; color: var(--primary); }
.invoice-notes p { font-size: 12px; line-height: 1.6; }

.invoice-footer {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid var(--border-light);
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.invoice-thanks { font-style: italic; color: var(--text-secondary); font-size: 13px; }
.invoice-signature { text-align: right; }
.invoice-signature p { font-size: 11px; color: var(--text-muted); margin-bottom: 30px; }
.signature-line { width: 200px; height: 1px; background: var(--border); }

.invoice-actions { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; gap: 12px; flex-wrap: wrap; }

.invoice-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.invoice-status-badge.status-brouillon { background: var(--info-soft); color: #1d4ed8; }
.invoice-status-badge.status-envoyee { background: var(--warning-soft); color: #92400e; }
.invoice-status-badge.status-payee { background: var(--success-soft); color: #047857; }
.invoice-status-badge.status-annulee { background: var(--danger-soft); color: #b91c1c; }

.invoice-item-row {
    display: grid;
    grid-template-columns: 2fr 100px 130px 130px 40px;
    gap: 10px;
    align-items: end;
    margin-bottom: 10px;
}

.invoice-item-row .form-group { margin: 0; }
.invoice-item-row label { font-size: 11px; }
.invoice-item-row .item-total { background: var(--bg); font-weight: 700; }

/* FAB */
.fab-button {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-light) 100%);
    color: var(--primary-dark);
    border: none;
    cursor: pointer;
    box-shadow: 0 8px 25px rgba(212, 160, 23, 0.5), 0 4px 10px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    transition: var(--transition);
    z-index: 500;
    animation: fabPulse 3s ease-in-out infinite;
}

.fab-button:hover { transform: scale(1.1) rotate(90deg); box-shadow: 0 12px 35px rgba(212, 160, 23, 0.7); }

@keyframes fabPulse {
    0%, 100% { box-shadow: 0 8px 25px rgba(212, 160, 23, 0.5), 0 4px 10px rgba(0, 0, 0, 0.15); }
    50% { box-shadow: 0 8px 25px rgba(212, 160, 23, 0.8), 0 4px 20px rgba(212, 160, 23, 0.4); }
}

.fab-button::before {
    content: 'Nouvelle facture';
    position: absolute;
    right: 75px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--text);
    color: white;
    padding: 8px 14px;
    border-radius: var(--radius);
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    pointer-events: none;
}

.fab-button:hover::before { opacity: 1; visibility: visible; right: 80px; }

/* ==========================================================
   RESPONSIVE - TABLETTES (≤1024px)
   ========================================================== */
@media (max-width: 1024px) {
    .stats-grid { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
    .charts-grid-dashboard,
    .charts-grid-2 { grid-template-columns: 1fr; }
    .chart-body-donut { height: 300px; }

    .profile-card { grid-template-columns: 1fr; padding: 24px; }
    .profile-avatar-section { padding-right: 0; padding-bottom: 24px; border-right: none; border-bottom: 1px solid var(--border-light); }
    .profile-forms-grid { grid-template-columns: 1fr; }

    .users-toolbar { flex-direction: column; align-items: stretch; }
    .users-filter { flex-direction: column; }
    .users-filter select { width: 100%; }

    .theme-preview { flex-direction: column; }
    .preview-sidebar { width: 100%; flex-direction: row; overflow-x: auto; padding: 12px; }
    .preview-sidebar .preview-logo { margin: 0; flex-shrink: 0; width: 38px; height: 38px; font-size: 14px; }
    .preview-menu-item { white-space: nowrap; }

    .translation-values { grid-template-columns: 1fr; }
}

/* ==========================================================
   RESPONSIVE - MOBILE (≤768px)
   ========================================================== */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        box-shadow: none;
        z-index: 1000;
        width: 280px;
    }

    .sidebar.active {
        transform: translateX(0);
        box-shadow: 8px 0 30px rgba(0, 0, 0, 0.4);
    }

    body.menu-open::before {
        content: '';
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 999;
        animation: fadeIn 0.3s ease;
    }

    @keyframes fadeIn {
        from { opacity: 0; }
        to { opacity: 1; }
    }

    .main-content { margin-left: 0; }

    .menu-toggle {
        display: flex !important;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        background: var(--primary-soft);
        color: var(--primary);
        border-radius: var(--radius);
        font-size: 18px;
    }

    .logo-wrapper { width: 100px; height: 100px; padding: 10px; }
    .sidebar-header { padding: 20px; }

    .topbar { padding: 12px 16px; gap: 8px; }
    .topbar-left { gap: 10px; }
    .topbar-left h1 { font-size: 17px; }
    .topbar-right { gap: 6px; }

    .notification-btn { width: 38px; height: 38px; font-size: 14px; }

    .user-badge .user-details { display: none; }
    .user-badge { padding: 4px; gap: 0; }
    .user-badge .chevron { display: none; }
    .user-badge .avatar { width: 32px; height: 32px; }

    .language-btn .lang-code { display: none; }
    .language-btn { padding: 8px 10px; }
    .language-btn .lang-flag { font-size: 16px; }

    .notification-panel { width: 320px; right: -20px; }
    .profile-panel { width: 240px; right: -10px; }
    .language-panel { width: 220px; right: -10px; }

    .content-area { padding: 16px; }
    .content-area > h2 { font-size: 15px; }
    .content-area > h2 i { font-size: 16px; }

    .stats-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
    .stat-card { padding: 16px; }
    .stat-card h3 { font-size: 10px; margin-bottom: 8px; }
    .stat-card p { font-size: 20px; }

    .form-container { padding: 18px; }
    .form-container h2 { font-size: 15px; }
    .form-row { grid-template-columns: 1fr; gap: 12px; }

    .table-responsive { border-radius: var(--radius); }
    table { min-width: 500px; }
    th, td { padding: 10px 12px; font-size: 12px; }
    th { font-size: 10px; }

    .modal-overlay { padding: 0; align-items: flex-end; }

    .modal-content {
        max-width: 100%;
        max-height: 92vh;
        border-radius: var(--radius-lg) var(--radius-lg) 0 0;
        transform: translateY(100%);
    }

    .modal-overlay.show .modal-content { transform: translateY(0); }
    .modal-header { padding: 16px 18px; border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
    .modal-header h3 { font-size: 14px; }
    .modal-body { padding: 18px; }

    .modal-footer { padding: 14px 18px; flex-direction: column-reverse; gap: 8px; }
    .modal-footer button,
    .modal-footer .btn-submit,
    .modal-footer .btn-cancel { width: 100%; justify-content: center; }

    .chart-card { padding: 16px; }
    .chart-header { flex-direction: column; align-items: flex-start; gap: 8px; }
    .chart-header h3 { font-size: 12px; }
    .chart-legend-inline { font-size: 11px; }
    .chart-body-sm, .chart-body-donut { height: 220px; }
    .chart-body { height: 240px; }

    .action-buttons { gap: 4px; }
    .btn-icon { width: 30px; height: 30px; font-size: 11px; }

    /* Rapports */
    .report-toolbar { flex-direction: column; align-items: stretch; }
    .report-period { flex-direction: column; align-items: stretch; }
    .btn-refresh { justify-content: center; }
    .report-types-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .report-type-card { padding: 14px 10px; gap: 6px; }
    .report-type-icon { width: 40px; height: 40px; font-size: 16px; }
    .report-type-card strong { font-size: 12px; }
    .report-type-card small { display: none; }
    .report-filters-grid { grid-template-columns: 1fr; gap: 12px; }
    .period-shortcuts { justify-content: center; }
    .period-label { width: 100%; text-align: center; margin-right: 0; }
    .period-btn { font-size: 11px; padding: 5px 12px; }

    /* Utilisateurs */
    .user-cell-avatar { width: 34px; height: 34px; font-size: 13px; }

    /* Profil */
    .profile-card { padding: 20px 16px; }
    .profile-avatar-big { width: 110px; height: 110px; }
    .profile-avatar-big .avatar-placeholder { font-size: 44px; }
    .profile-name { font-size: 17px; }
    .profile-stats-grid { grid-template-columns: 1fr; }

    /* Seuils */
    .stock-alerts-grid { grid-template-columns: 1fr; }
    .threshold-grid { grid-template-columns: 1fr 1fr; }
    .settings-item { flex-direction: column; align-items: flex-start; gap: 10px; }
    .settings-item .toggle-switch { align-self: flex-end; }
    .frequency-options { grid-template-columns: 1fr 1fr; }
    .form-actions { flex-direction: column-reverse; position: static; }
    .form-actions button { width: 100%; justify-content: center; }

    /* Paramètres */
    .logo-upload-section { flex-direction: column; align-items: center; text-align: center; }
    .logo-info { width: 100%; }
    .logo-actions { justify-content: center; }
    .logo-actions label,
    .logo-actions button { flex: 1; min-width: 140px; justify-content: center; }
    .preview-header { flex-direction: column; text-align: center; gap: 14px; }
    .preview-body { padding: 16px 20px; }
    .preview-footer { padding: 14px 20px; flex-direction: column; }

    /* Couleurs */
    .presets-grid { grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 10px; }
    .preset-card { padding: 12px 8px; }
    .color-grid { grid-template-columns: 1fr; }
    .preview-content { padding: 14px; gap: 10px; }
    .preview-buttons { flex-direction: column; }
    .preview-btn-primary, .preview-btn-accent { width: 100%; }

    /* Devises */
    .current-currency-card { padding: 20px; flex-direction: column; text-align: center; }
    .current-currency-icon { width: 60px; height: 60px; font-size: 24px; }
    .current-currency-meta { justify-content: center; }
    .current-currency-format { text-align: center; width: 100%; }
    .format-value { font-size: 16px; }
    .rates-grid { grid-template-columns: 1fr; }
    .rate-item { padding: 12px; }

    /* Langues */
    .translation-search input { padding: 12px 90px 12px 42px; }
    .translation-count { font-size: 10px; padding: 3px 8px; }
    .translation-item { padding: 12px; }
    .translation-key { font-size: 11px; }
    .translation-text-fr, .translation-input { font-size: 12px; padding: 8px 10px; }
    .lang-flag { font-size: 22px; }
    .completion-bar { max-width: 80px; }

    /* Notifications */
    .notif-toolbar { flex-direction: column; align-items: stretch; }
    .notif-filters { flex-direction: column; align-items: stretch; }
    .notif-search { min-width: 100%; }
    .notif-filters select { width: 100%; }
    .notif-card { padding: 14px 16px; gap: 12px; }
    .notif-icon-wrapper { width: 40px; height: 40px; font-size: 16px; }
    .notif-title { font-size: 14px; }
    .notif-header { flex-direction: column; align-items: flex-start; }
    .notif-footer { flex-direction: column; align-items: flex-start; }
    .notif-actions { width: 100%; justify-content: flex-end; }

    /* Factures */
    .invoice-paper { padding: 20px; }
    .invoice-header { flex-direction: column; gap: 16px; }
    .invoice-meta { text-align: left; min-width: 0; }
    .invoice-meta h1 { font-size: 24px; }
    .invoice-company { flex-direction: column; text-align: center; }
    .invoice-company > div { text-align: left; }
    .invoice-client-card { max-width: 100%; }
    .invoice-totals-table { width: 100%; }
    .invoice-item-row {
        grid-template-columns: 1fr;
        gap: 8px;
        padding: 12px;
        background: var(--bg);
        border-radius: var(--radius);
        margin-bottom: 12px;
    }

    /* FAB */
    .fab-button { width: 54px; height: 54px; bottom: 20px; right: 20px; font-size: 20px; }
    .fab-button::before { display: none; }
}

/* ==========================================================
   RESPONSIVE - PETITS MOBILES (≤480px)
   ========================================================== */
@media (max-width: 480px) {
    .login-box { padding: 32px 22px; }
    .login-logo-wrapper { width: 90px; height: 90px; }
    .login-box h2 { font-size: 22px; }

    .topbar-left h1 { font-size: 15px; }
    .stats-grid { grid-template-columns: 1fr; }
    .stat-card { padding: 14px; }
    .stat-card p { font-size: 18px; }

    .logo-wrapper { width: 90px; height: 90px; padding: 8px; }
    .sidebar { width: 260px; }

    .notification-panel,
    .language-panel {
        position: fixed;
        top: auto;
        left: 10px;
        right: 10px;
        bottom: 10px;
        width: auto;
        max-width: 100%;
        transform: translateY(20px);
    }

    .dropdown-panel.show { transform: translateY(0); }

    .chart-body-sm, .chart-body-donut { height: 200px; }
    .chart-body { height: 220px; }
    .chart-header h3 { font-size: 11px; }

    .report-types-grid { grid-template-columns: 1fr; }
    .period-btn { font-size: 10px; padding: 5px 10px; }

    /* Profil */
    .profile-avatar-big { width: 90px; height: 90px; }
    .profile-avatar-big .avatar-placeholder { font-size: 36px; }
    .profile-stat .stat-value { font-size: 17px; }

    /* Paramètres */
    .logo-preview-wrapper { width: 130px; height: 130px; }
    .preview-logo { width: 60px; height: 60px; }
    .preview-header h3 { font-size: 15px; }

    /* Devises */
    .current-currency-info h3 { font-size: 17px; }
    .format-value { font-size: 14px; }

    /* Seuils */
    .threshold-grid { grid-template-columns: 1fr; }
    .frequency-options { grid-template-columns: 1fr; }
    .alert-summary { flex-direction: column; text-align: center; gap: 10px; }

    /* Couleurs */
    .color-hex-input { font-size: 12px; letter-spacing: 0.5px; }
    .color-picker-wrapper input[type="color"] { width: 38px; height: 38px; }

    /* Langues */
    .lang-cell { gap: 8px; }
    .lang-flag { font-size: 20px; }
    .lang-cell strong { font-size: 13px; }
    .translation-search input { font-size: 13px; }
    .translation-save-btn { width: 36px; }

    code { font-size: 10px; padding: 2px 6px; }
    
    @media (max-width: 768px) {
    
    /* Sidebar cachée par défaut */
    .sidebar {
        transform: translateX(-100%);
        box-shadow: none;
        z-index: 1000;
        transition: transform 0.3s ease;
    }
    
    /* Sidebar visible quand active */
    .sidebar.active {
        transform: translateX(0);
        box-shadow: 8px 0 30px rgba(0, 0, 0, 0.4);
    }
    
    /* Bouton hamburger visible */
    .menu-toggle {
        display: flex !important;
        align-items: center;
        justify-content: center;
        width: 42px;
        height: 42px;
        background: var(--primary-soft);
        color: var(--primary);
        border: none;
        border-radius: var(--radius);
        font-size: 18px;
        cursor: pointer;
    }
    
    /* Overlay sombre */
    body.menu-open::before {
        content: '';
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 999;
    }
    
    /* Main content sans marge */
    .main-content {
        margin-left: 0;
    }
}
}

/* ==========================================================
   RESPONSIVE - TRÈS PETITS (≤360px)
   ========================================================== */
@media (max-width: 360px) {
    .topbar-left h1 { font-size: 14px; }
    .notification-btn { width: 34px; height: 34px; font-size: 13px; }
    .user-badge .avatar { width: 28px; height: 28px; }
    .language-btn { padding: 6px 8px; }
    .stat-card p { font-size: 16px; }
}

/* ==========================================================
   IMPRESSION
   ========================================================== */
@media print {
    .sidebar,
    .topbar,
    .menu-toggle,
    .report-types-grid,
    .report-filters,
    .report-toolbar,
    .btn-submit,
    .btn-cancel,
    .btn-icon,
    .notification-wrapper,
    .profile-wrapper,
    .language-wrapper,
    .form-actions,
    .notif-toolbar,
    .fab-button,
    .chart-card canvas {
        display: none !important;
    }

    .report-print-header {
        display: flex !important;
        align-items: center;
        gap: 20px;
        padding: 20px 0;
        border-bottom: 3px solid var(--primary);
        margin-bottom: 30px;
    }

    .report-print-logo { width: 80px; height: 80px; }
    .report-print-header h2 { font-size: 22px; color: var(--primary); }
    .report-print-subtitle { font-size: 14px; font-weight: 600; }
    .report-print-period { font-size: 12px; color: var(--text-muted); }

    body * { visibility: hidden; }
    .invoice-paper, .invoice-paper * { visibility: visible; }

    .invoice-paper {
        position: absolute;
        left: 0; top: 0; width: 100%;
        box-shadow: none;
        border: none;
        padding: 20px;
    }

    body { background: white !important; font-size: 11px; }
    .app-container { display: block; }
    .main-content { margin-left: 0 !important; display: block !important; }
    .content-area { padding: 0 !important; }

    .chart-card,
    .stat-card,
    .table-responsive { box-shadow: none; border: 1px solid #ddd; }

    thead { display: table-header-group; }
    tfoot { display: table-footer-group; }
    tr { page-break-inside: avoid; }

    @page { size: A4; margin: 15mm; }
}

/* ==========================================================
   PAGE CLIENTS
   ========================================================== */

/* En-tête de la vue détail client */
.client-detail-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-light);
    margin-bottom: 20px;
}

.client-detail-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), var(--accent-light));
    color: var(--primary-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 26px;
    font-family: 'Poppins', sans-serif;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(212, 160, 23, 0.3);
}

/* Infos détail */
.client-detail-info {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}

.detail-line {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    color: var(--text);
}

.detail-line i {
    width: 18px;
    color: var(--primary);
    font-size: 14px;
    flex-shrink: 0;
}

/* Stats détail */
.client-detail-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    padding: 16px;
    background: var(--bg);
    border-radius: var(--radius);
    margin-bottom: 16px;
}

.client-detail-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 8px;
}

.client-detail-stat .stat-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.client-detail-stat .stat-value {
    display: block;
    font-size: 16px;
    font-weight: 700;
    color: var(--primary);
    font-family: 'Poppins', sans-serif;
    line-height: 1.1;
}

.client-detail-stat .stat-label {
    display: block;
    font-size: 10px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 2px;
}

/* Notes */
.client-detail-notes {
    padding: 14px;
    background: var(--accent-soft);
    border-radius: var(--radius);
    border-left: 3px solid var(--accent);
}

.client-detail-notes h4 {
    font-size: 12px;
    color: var(--primary);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.client-detail-notes p {
    font-size: 13px;
    color: var(--text);
    line-height: 1.5;
    margin: 0;
}

/* Responsive */
@media (max-width: 768px) {
    .client-detail-stats {
        grid-template-columns: 1fr;
        gap: 14px;
    }
    
    .client-detail-stat {
        flex-direction: row;
        text-align: left;
        gap: 12px;
    }
    
    .client-detail-stat .stat-value {
        text-align: left;
    }
}

/* ==========================================================
   LOGIN - LOGO RÉDUIT ET OPTIMISÉ
   ========================================================== */

/* Logo réduit */
.login-logo-wrapper {
    width: 120px;
    height: 120px;
    margin: 0 auto 24px;
    padding: 12px;
}

.login-logo-wrapper img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* Messages d'alerte sur la page de connexion */
.login-box .alert {
    padding: 12px 16px;
    border-radius: var(--radius);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    font-weight: 500;
    text-align: left;
    animation: slideDown 0.4s ease;
}

.login-box .alert-error {
    background: var(--danger-soft);
    color: #b91c1c;
    border-left: 4px solid var(--danger);
}

.login-box .alert-success {
    background: var(--success-soft);
    color: #047857;
    border-left: 4px solid var(--success);
}

.login-box .alert i {
    font-size: 16px;
    flex-shrink: 0;
}

/* Labels avec icônes */
.input-group label i {
    color: var(--primary);
    margin-right: 6px;
    font-size: 12px;
    width: 14px;
}

/* Pied de page du login */
.login-footer {
    text-align: center;
}

/* Responsive - mobile */
@media (max-width: 480px) {
    .login-logo-wrapper {
        width: 100px;
        height: 100px;
        padding: 10px;
    }
    
    .login-box h2 {
        font-size: 22px;
    }
    
    .login-box .subtitle {
        font-size: 13px;
    }
}

/* ==========================================================
   LOGIN - EFFET DE BRILLANCE SCINTILLANT
   ========================================================== */

.login-container {
    position: relative;
    overflow: hidden;
}

/* Rayon de lumière tournant #1 */
.login-container::before {
    content: '';
    position: absolute;
    width: 200%;
    height: 200%;
    top: -50%;
    left: -50%;
    background: conic-gradient(
        from 0deg,
        transparent 0deg,
        rgba(212, 160, 23, 0.15) 40deg,
        transparent 80deg,
        transparent 180deg,
        rgba(240, 193, 75, 0.12) 220deg,
        transparent 260deg,
        transparent 360deg
    );
    animation: rotateGlow 20s linear infinite;
    pointer-events: none;
    z-index: 0;
}

/* Rayon de lumière tournant #2 */
.login-container::after {
    content: '';
    position: absolute;
    width: 150%;
    height: 150%;
    top: -25%;
    left: -25%;
    background: conic-gradient(
        from 180deg,
        transparent 0deg,
        rgba(255, 255, 255, 0.08) 30deg,
        transparent 60deg,
        transparent 300deg,
        rgba(212, 160, 23, 0.1) 330deg,
        transparent 360deg
    );
    animation: rotateGlowReverse 15s linear infinite;
    pointer-events: none;
    z-index: 0;
}

@keyframes rotateGlow {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes rotateGlowReverse {
    from { transform: rotate(360deg); }
    to { transform: rotate(0deg); }
}

/* Particules scintillantes */
.shimmer-particles {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

.shimmer-particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: radial-gradient(circle, #f0c14b 0%, rgba(240, 193, 75, 0.6) 40%, transparent 70%);
    border-radius: 50%;
    box-shadow: 0 0 8px 2px rgba(240, 193, 75, 0.5);
    animation: floatUp linear infinite;
    opacity: 0;
}

@keyframes floatUp {
    0% {
        transform: translateY(100vh) scale(0);
        opacity: 0;
    }
    10% {
        opacity: 1;
        transform: translateY(90vh) scale(1);
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-10vh) scale(0.5);
        opacity: 0;
    }
}

.shimmer-particle:nth-child(1) { left: 5%; animation-duration: 12s; animation-delay: 0s; width: 3px; height: 3px; }
.shimmer-particle:nth-child(2) { left: 15%; animation-duration: 15s; animation-delay: 1s; width: 5px; height: 5px; }
.shimmer-particle:nth-child(3) { left: 25%; animation-duration: 10s; animation-delay: 2s; width: 4px; height: 4px; }
.shimmer-particle:nth-child(4) { left: 35%; animation-duration: 18s; animation-delay: 0.5s; width: 3px; height: 3px; }
.shimmer-particle:nth-child(5) { left: 45%; animation-duration: 14s; animation-delay: 3s; width: 6px; height: 6px; }
.shimmer-particle:nth-child(6) { left: 55%; animation-duration: 11s; animation-delay: 1.5s; width: 4px; height: 4px; }
.shimmer-particle:nth-child(7) { left: 65%; animation-duration: 16s; animation-delay: 2.5s; width: 3px; height: 3px; }
.shimmer-particle:nth-child(8) { left: 75%; animation-duration: 13s; animation-delay: 0.8s; width: 5px; height: 5px; }
.shimmer-particle:nth-child(9) { left: 85%; animation-duration: 17s; animation-delay: 1.8s; width: 4px; height: 4px; }
.shimmer-particle:nth-child(10) { left: 95%; animation-duration: 12s; animation-delay: 3.5s; width: 3px; height: 3px; }
.shimmer-particle:nth-child(11) { left: 10%; animation-duration: 20s; animation-delay: 5s; width: 2px; height: 2px; }
.shimmer-particle:nth-child(12) { left: 30%; animation-duration: 22s; animation-delay: 6s; width: 5px; height: 5px; }
.shimmer-particle:nth-child(13) { left: 50%; animation-duration: 19s; animation-delay: 4s; width: 3px; height: 3px; }
.shimmer-particle:nth-child(14) { left: 70%; animation-duration: 21s; animation-delay: 7s; width: 4px; height: 4px; }
.shimmer-particle:nth-child(15) { left: 90%; animation-duration: 18s; animation-delay: 5.5s; width: 2px; height: 2px; }

/* Carte de connexion avec bordure lumineuse */
.login-box {
    position: relative;
    z-index: 2;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    box-shadow: 
        0 25px 50px -12px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(212, 160, 23, 0.2),
        0 0 30px rgba(212, 160, 23, 0.15);
}

.login-box::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: calc(var(--radius-xl) + 2px);
    background: linear-gradient(
        45deg,
        transparent 0%,
        rgba(212, 160, 23, 0.4) 25%,
        transparent 50%,
        rgba(240, 193, 75, 0.3) 75%,
        transparent 100%
    );
    background-size: 200% 200%;
    animation: shimmerBorder 3s ease-in-out infinite;
    z-index: -1;
    opacity: 0.6;
}

@keyframes shimmerBorder {
    0%, 100% { 
        background-position: 0% 50%;
        opacity: 0.4;
    }
    50% { 
        background-position: 100% 50%;
        opacity: 0.8;
    }
}

/* Effet brillant sur le logo */
.login-logo-wrapper {
    width: 120px;
    height: 120px;
    margin: 0 auto 24px;
    padding: 12px;
    position: relative;
}

.login-logo-wrapper::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.6) 50%,
        transparent 100%
    );
    animation: logoShine 4s ease-in-out infinite;
    border-radius: 50%;
    pointer-events: none;
}

@keyframes logoShine {
    0%, 100% { left: -100%; }
    50% { left: 100%; }
}

.login-logo-wrapper img {
    max-width: 100%;
    max-height: 100%;
    filter: drop-shadow(0 0 8px rgba(212, 160, 23, 0.4));
}

/* Bouton avec effet brillant */
.btn-primary {
    position: relative;
    overflow: hidden;
}

.btn-primary::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.3) 50%,
        transparent 100%
    );
    transition: left 0.5s ease;
}

.btn-primary:hover::after {
    left: 100%;
}

/* Responsive */
@media (max-width: 768px) {
    .login-container::before,
    .login-container::after {
        opacity: 0.7;
    }
    
    .shimmer-particle {
        box-shadow: 0 0 5px 1px rgba(240, 193, 75, 0.4);
    }
}

/* Accessibilité : réduire les animations */
@media (prefers-reduced-motion: reduce) {
    .login-container::before,
    .login-container::after,
    .shimmer-particle,
    .login-box::before,
    .login-logo-wrapper::after {
        animation: none !important;
    }
}

/* ==========================================================
   DROPDOWNS (Notifications / Profil / Langue)
   ========================================================== */

.notification-wrapper,
.profile-wrapper,
.language-wrapper {
    position: relative;
}

/* Panneau déroulant */
.dropdown-panel {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 200;
    overflow: hidden;
}

.dropdown-panel.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Notifications */
.notification-panel {
    width: 360px;
    max-width: calc(100vw - 32px);
}

.notification-panel .dropdown-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 18px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: white;
}

.notification-panel .dropdown-header h4 {
    color: white;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    margin: 0;
}

.notification-panel .dropdown-header h4 i {
    color: var(--accent);
}

.mark-all-read {
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    transition: all 0.25s;
}

.mark-all-read:hover {
    background: rgba(255, 255, 255, 0.3);
}

.notification-panel .dropdown-body {
    max-height: 380px;
    overflow-y: auto;
}

.notification-item {
    display: flex;
    gap: 12px;
    padding: 14px 18px;
    border-bottom: 1px solid var(--border-light);
    transition: all 0.25s;
    text-decoration: none;
    color: inherit;
}

.notification-item:hover {
    background: var(--primary-soft);
}

.notification-item.unread {
    background: linear-gradient(90deg, rgba(212, 160, 23, 0.08) 0%, transparent 100%);
    border-left: 3px solid var(--accent);
}

.notification-item .notif-icon {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--primary-soft);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    flex-shrink: 0;
}

.notification-item.warning .notif-icon { background: var(--warning-soft); color: var(--warning); }
.notification-item.danger .notif-icon { background: var(--danger-soft); color: var(--danger); }
.notification-item.success .notif-icon { background: var(--success-soft); color: var(--success); }

.notification-item .notif-content { flex: 1; min-width: 0; }
.notification-item .notif-title {
    font-weight: 600;
    font-size: 13px;
    display: block;
    margin-bottom: 2px;
    color: var(--text);
}
.notification-item .notif-message {
    font-size: 12px;
    color: var(--text-secondary);
    display: block;
    margin-bottom: 4px;
    line-height: 1.4;
}
.notification-item .notif-time {
    font-size: 11px;
    color: var(--text-muted);
}

.notification-empty {
    padding: 40px 20px;
    text-align: center;
    color: var(--text-muted);
}

.notification-empty i {
    font-size: 40px;
    opacity: 0.3;
    margin-bottom: 10px;
    display: block;
}

.notification-panel .dropdown-footer {
    padding: 12px;
    text-align: center;
    border-top: 1px solid var(--border-light);
    background: var(--bg);
}

.notification-panel .dropdown-footer a {
    color: var(--primary);
    font-size: 13px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
}

/* Profil */
.profile-panel {
    width: 260px;
    max-width: calc(100vw - 32px);
}

.profile-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 18px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: white;
}

.profile-avatar-large {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-light) 100%);
    color: var(--primary-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 20px;
    font-family: 'Poppins', sans-serif;
    flex-shrink: 0;
    overflow: hidden;
}

.profile-avatar-large img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-info { display: flex; flex-direction: column; overflow: hidden; }
.profile-info strong {
    color: white;
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.profile-info span {
    color: rgba(255, 255, 255, 0.7);
    font-size: 11px;
    text-transform: uppercase;
}

.profile-menu { list-style: none; padding: 8px; }
.profile-menu li.divider {
    height: 1px;
    background: var(--border-light);
    margin: 6px 4px;
}

.profile-menu li a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: var(--radius);
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    color: var(--text);
    transition: all 0.25s;
}

.profile-menu li a i {
    width: 18px;
    text-align: center;
    color: var(--text-secondary);
    font-size: 14px;
}

.profile-menu li a:hover {
    background: var(--primary-soft);
    color: var(--primary);
}

.profile-menu li a.logout-link { color: var(--danger); }
.profile-menu li a.logout-link i { color: var(--danger); }
.profile-menu li a.logout-link:hover { background: var(--danger-soft); }

/* Langue */
.language-panel {
    width: 240px;
    max-width: calc(100vw - 32px);
}

.language-panel .dropdown-header {
    padding: 14px 18px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: white;
}

.language-panel .dropdown-header h4 {
    color: white;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    margin: 0;
}

.language-list {
    list-style: none;
    padding: 8px;
    max-height: 320px;
    overflow-y: auto;
}

.language-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: var(--radius);
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    color: var(--text);
    transition: all 0.25s;
}

.language-item:hover {
    background: var(--primary-soft);
    color: var(--primary);
}

.language-item.active {
    background: linear-gradient(90deg, var(--accent-soft) 0%, transparent 100%);
    color: var(--primary);
    font-weight: 600;
}

.language-item .lang-flag-big { font-size: 24px; line-height: 1; }
.language-item .lang-info { display: flex; flex-direction: column; line-height: 1.3; flex: 1; }
.language-item .lang-info strong { font-size: 13px; font-weight: 600; }
.language-item .lang-info span { font-size: 10px; color: var(--text-muted); text-transform: uppercase; }
.language-item .lang-check { color: var(--success); font-size: 14px; }

/* Boutons */
.notification-btn {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--bg);
    border: 1px solid var(--border);
    color: var(--text);
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s;
    position: relative;
}

.notification-btn:hover {
    background: var(--primary-soft);
    border-color: var(--primary);
    color: var(--primary);
}

.notification-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.notification-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 20px;
    height: 20px;
    background: var(--danger);
    color: white;
    border-radius: 50px;
    font-size: 10px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
    border: 2px solid var(--surface);
    animation: pulseBadge 2s infinite;
}

@keyframes pulseBadge {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.language-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.25s;
    font-family: inherit;
    color: var(--text);
    font-size: 13px;
    font-weight: 600;
}

.language-btn:hover {
    background: var(--primary-soft);
    border-color: var(--primary);
}

.language-btn.active {
    background: var(--primary-soft);
    border-color: var(--primary);
}

.language-btn .lang-flag { font-size: 18px; line-height: 1; }
.language-btn .lang-code { font-size: 11px; font-weight: 700; }
.language-btn .lang-chevron {
    font-size: 9px;
    color: var(--text-secondary);
    transition: transform 0.25s ease;
}
.language-btn.active .lang-chevron {
    transform: rotate(180deg);
}

.user-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 14px 6px 6px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 50px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.25s;
    font-family: inherit;
    color: var(--text);
}

.user-badge:hover {
    background: var(--primary-soft);
    border-color: var(--primary);
}

.user-badge.active {
    background: var(--primary-soft);
    border-color: var(--primary);
}

.user-badge .avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 13px;
    font-family: 'Poppins', sans-serif;
    flex-shrink: 0;
    overflow: hidden;
}

.user-badge .avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-badge .user-details {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1.2;
}

.user-badge .user-name { font-weight: 600; font-size: 13px; }
.user-badge .user-role {
    font-size: 10px;
    color: var(--text-secondary);
    text-transform: uppercase;
}
.user-badge .chevron {
    font-size: 10px;
    color: var(--text-secondary);
    margin-left: 4px;
    transition: transform 0.25s ease;
}
.user-badge.active .chevron {
    transform: rotate(180deg);
}