/* ================================================
   QWOTA PRO - Base CSS
   Couleurs: Dark, Noir, Gris, #5270ff
   ================================================ */

/* Variables CSS */
:root {
    /* Couleurs principales */
    --primary: #5270ff;
    --primary-hover: #3d5bd9;
    --primary-light: rgba(82, 112, 255, 0.1);
    --primary-glow: rgba(82, 112, 255, 0.3);

    /* Couleurs de fond */
    --bg-dark: #0f172a;
    --bg-darker: #0a0f1a;
    --bg-card: #1e293b;
    --bg-sidebar: #0f172a;
    --bg-hover: #1e293b;
    --bg-active: #334155;

    /* Couleurs de texte */
    --text-primary: #ffffff;
    --text-secondary: #a0a0b0;
    --text-muted: #6b6b7b;

    /* Bordures */
    --border-color: #334155;
    --border-light: #1e293b;

    /* États */
    --success: #22c55e;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #3b82f6;

    /* Dimensions */
    --sidebar-width: 280px;
    --sidebar-collapsed: 80px;
    --topbar-height: 70px;
    --border-radius: 12px;
    --border-radius-sm: 8px;
    --border-radius-lg: 16px;

    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;

    /* Shadows */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 20px var(--primary-glow);
}

/* Mode clair */
.light-mode {
    --bg-dark: #f5f5f7;
    --bg-darker: #ffffff;
    --bg-card: #ffffff;
    --bg-sidebar: #fafafa;
    --bg-hover: #f0f0f2;
    --bg-active: #e8e8ec;
    --text-primary: #1a1a2e;
    --text-secondary: #5a5a6e;
    --text-muted: #8a8a9a;
    --border-color: #e0e0e5;
    --border-light: #eaeaef;
}

.light-mode body,
body.light-mode {
    background: linear-gradient(135deg, #f5f5f7 0%, #e8e8ec 100%);
}

/* Reset & Base */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    background-attachment: fixed;
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

button {
    border: none;
    background: none;
    cursor: pointer;
    font-family: inherit;
}

img {
    max-width: 100%;
    display: block;
}

/* ================================================
   APP CONTAINER
   ================================================ */
.app-container {
    display: flex;
    min-height: 100vh;
}

/* ================================================
   SIDEBAR
   ================================================ */
.sidebar {
    width: var(--sidebar-width);
    height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    transition: width var(--transition-normal), transform var(--transition-normal);
    z-index: 1000;
    overflow: hidden;
    overscroll-behavior: contain;
}

.sidebar.collapsed {
    width: var(--sidebar-collapsed);
}

.sidebar.collapsed .logo-text,
.sidebar.collapsed .user-info,
.sidebar.collapsed .user-menu-btn,
.sidebar.collapsed .nav-section-title,
.sidebar.collapsed .nav-link span,
.sidebar.collapsed .nav-badge,
.sidebar.collapsed .submenu-arrow,
.sidebar.collapsed .footer-link span {
    display: none;
}

.sidebar.collapsed .submenu {
    display: none;
}

.sidebar.collapsed .logo {
    justify-content: center;
    width: 100%;
}

.sidebar.collapsed .sidebar-header {
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 15px 10px;
}

.sidebar.collapsed .sidebar-toggle {
    position: static;
    margin-top: 5px;
}

.sidebar.collapsed .nav-link i:first-child {
    margin: 0 auto;
}

.sidebar.collapsed .footer-link i {
    margin: 0 auto;
}

/* Sidebar Header */
.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
    position: relative;
    min-height: 82px;
}

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

.logo-icon-img {
    width: 42px;
    height: 42px;
    object-fit: contain;
    display: none;
}

.logo-full-img {
    height: 38px;
    width: auto;
    object-fit: contain;
    transition: opacity var(--transition-normal);
}

.sidebar.collapsed .logo-icon-img {
    display: block;
}

.sidebar.collapsed .logo-full-img {
    display: none;
}

/* Brand logo - company branding */
.brand-logo-img {
    height: 42px;
    max-width: 140px;
    object-fit: contain;
    transition: all var(--transition-normal);
}

.sidebar.collapsed .brand-logo-img {
    max-width: 42px;
    height: 38px;
}

.sidebar-toggle {
    width: 32px;
    height: 32px;
    border-radius: var(--border-radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: all var(--transition-fast);
}

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

.sidebar.collapsed .sidebar-toggle i {
    transform: rotate(180deg);
}

/* User Profile */
.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px;
    margin: 10px 15px;
    background: var(--bg-card);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    transition: all var(--transition-normal);
}

.sidebar.collapsed .user-profile {
    justify-content: center;
    padding: 15px;
    margin: 10px;
}

.user-avatar {
    position: relative;
    flex-shrink: 0;
}

.user-avatar img {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary);
}

.status-indicator {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid var(--bg-card);
}

.status-indicator.online {
    background: var(--success);
}

.status-indicator.offline {
    background: var(--text-muted);
}

.status-indicator.busy {
    background: var(--danger);
}

.user-info {
    flex: 1;
    min-width: 0;
    transition: opacity var(--transition-normal);
}

.user-name {
    display: block;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-role {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.user-menu-btn {
    width: 30px;
    height: 30px;
    border-radius: var(--border-radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: all var(--transition-fast);
}

.user-menu-btn:hover {
    background: var(--bg-hover);
    color: var(--primary);
}

/* Sidebar Navigation */
.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 10px 0;
    overscroll-behavior: contain;
}

.sidebar-nav::-webkit-scrollbar {
    width: 4px;
}

.sidebar-nav::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar-nav::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 2px;
}

.nav-section {
    margin-bottom: 20px;
}

.nav-section-title {
    display: block;
    padding: 0 25px;
    margin-bottom: 8px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    transition: opacity var(--transition-normal);
}

.sidebar.collapsed .nav-section-title {
    text-align: center;
    padding: 0;
}

.nav-list {
    padding: 0 10px;
}

.nav-item {
    margin-bottom: 4px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    border-radius: var(--border-radius-sm);
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    transition: all var(--transition-fast);
    position: relative;
}

.sidebar.collapsed .nav-link {
    justify-content: center;
    padding: 12px;
}

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

.nav-link span {
    white-space: nowrap;
    transition: opacity var(--transition-normal);
}

.nav-link:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

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

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

.nav-badge {
    margin-left: auto;
    padding: 2px 8px;
    font-size: 0.7rem;
    font-weight: 600;
    background: var(--primary);
    color: white;
    border-radius: 10px;
    transition: opacity var(--transition-normal);
}

.nav-badge.warning {
    background: var(--warning);
}

.nav-badge.danger {
    background: var(--danger);
}

/* Submenu */
.submenu-arrow {
    margin-left: auto;
    font-size: 0.7rem;
    transition: transform var(--transition-fast), opacity var(--transition-normal);
}

.nav-item.has-submenu.open .submenu-arrow {
    transform: rotate(180deg);
}

.submenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--transition-normal);
}

.nav-item.has-submenu.open .submenu {
    max-height: 200px;
}

.submenu-item {
    margin-left: 20px;
}

.submenu-item a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 15px;
    font-size: 0.85rem;
    color: var(--text-muted);
    border-radius: var(--border-radius-sm);
    transition: all var(--transition-fast);
}

.submenu-item a i {
    font-size: 0.9rem;
    width: 18px;
    text-align: center;
}

.submenu-item a:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.submenu-item.active a {
    color: var(--primary);
}

/* Sidebar Footer */
.sidebar-footer {
    padding: 15px;
    border-top: 1px solid var(--border-color);
}

.footer-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 15px;
    border-radius: var(--border-radius-sm);
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    transition: all var(--transition-fast);
}

.sidebar.collapsed .footer-link {
    justify-content: center;
    padding: 10px;
}

.footer-link i {
    font-size: 1rem;
    width: 20px;
    text-align: center;
}

.footer-link:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.footer-link.logout:hover {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}

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

.sidebar.collapsed ~ .main-content {
    margin-left: var(--sidebar-collapsed);
}

/* Top Bar */
.top-bar {
    height: var(--topbar-height);
    background: var(--bg-darker);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 30px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.top-bar-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.company-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.company-logo {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    object-fit: contain;
    background: var(--bg-card);
    padding: 4px;
    border: 1px solid var(--border-color);
}

.company-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.mobile-menu-btn {
    display: none;
    width: 40px;
    height: 40px;
    border-radius: var(--border-radius-sm);
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-size: 1.2rem;
    transition: all var(--transition-fast);
}

.mobile-menu-btn:hover {
    background: var(--bg-hover);
    color: var(--primary);
}

.search-box {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    min-width: 300px;
    transition: all var(--transition-fast);
}

.search-box:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.search-box i {
    color: var(--text-muted);
}

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

.search-box input::placeholder {
    color: var(--text-muted);
}

.top-bar-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.top-bar-btn {
    width: 42px;
    height: 42px;
    border-radius: var(--border-radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-size: 1.1rem;
    transition: all var(--transition-fast);
    position: relative;
}

.top-bar-btn:hover {
    background: var(--bg-hover);
    color: var(--primary);
}

.help-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 20px;
    background: rgba(255,255,255,0.08);
    color: var(--text-secondary);
    font-size: 0.82rem;
    font-weight: 600;
    border: 1px solid var(--border-color);
    cursor: pointer;
    transition: all var(--transition-fast);
    white-space: nowrap;
}
.help-btn:hover {
    background: rgba(255,255,255,0.14);
    color: var(--text-primary);
    border-color: var(--text-muted);
}
.help-btn i { font-size: 0.9rem; }
@media (max-width: 768px) {
    .help-btn-text { display: none; }
    .help-btn { padding: 6px 8px; border-radius: 8px; }
}

.help-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
}
.help-overlay.active { display: flex; }
.help-modal {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    width: 520px;
    max-width: 92vw;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}
.help-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px;
    border-bottom: 1px solid var(--border-color);
}
.help-modal-header h3 {
    margin: 0;
    font-size: 1.05rem;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-primary);
}
.help-modal-header button {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.1rem;
    cursor: pointer;
    padding: 4px;
}
.help-modal-body { padding: 20px; }
.help-desc {
    font-size: 0.88rem;
    color: var(--text-secondary);
    margin: 0 0 16px 0;
    line-height: 1.5;
}
.help-option {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    margin-bottom: 10px;
    text-decoration: none;
    color: var(--text-primary);
    transition: all var(--transition-fast);
    cursor: pointer;
}
.help-option:hover {
    background: var(--bg-hover);
    border-color: var(--primary);
}
.help-option-icon {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}
.help-option-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.help-option-title {
    font-weight: 600;
    font-size: 0.9rem;
}
.help-option-detail {
    font-size: 0.8rem;
    color: var(--text-secondary);
}
.help-option-arrow {
    color: var(--text-muted);
    font-size: 0.8rem;
}
.help-textarea {
    width: 100%;
    padding: 12px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    background: var(--bg-dark);
    color: var(--text-primary);
    font-size: 0.88rem;
    font-family: inherit;
    resize: none;
    min-height: 120px;
}
.help-textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(139,92,246,0.15);
}
.help-photos {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}
.help-photo-thumb {
    position: relative;
    width: 60px;
    height: 60px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border-color);
}
.help-photo-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.help-photo-thumb .help-photo-del {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: rgba(0,0,0,0.7);
    color: #fff;
    border: none;
    font-size: 0.6rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}
.help-form-actions {
    display: flex;
    gap: 10px;
    margin-top: 12px;
}
.help-upload-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: var(--bg-dark);
    color: var(--text-secondary);
    font-size: 0.82rem;
    cursor: pointer;
    transition: all var(--transition-fast);
}
.help-upload-btn:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}
.help-send-btn {
    flex: 1;
    padding: 8px 14px;
    border-radius: 8px;
    border: none;
    background: #8b5cf6;
    color: #fff;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all var(--transition-fast);
}
.help-send-btn:hover { background: #7c3aed; }
.help-send-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.help-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 18px 0 14px;
    color: var(--text-muted);
    font-size: 0.78rem;
}
.help-divider::before, .help-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-color);
}
.help-direct-options {
    display: flex;
    gap: 10px;
}
.help-option-small {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: var(--bg-dark);
    color: var(--text-primary);
    font-size: 0.82rem;
    text-decoration: none;
    transition: all var(--transition-fast);
}
.help-option-small:hover {
    background: var(--bg-hover);
    border-color: var(--primary);
}

.connection-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 42px;
    cursor: default;
    color: rgba(255,255,255,0.15);
}
.connection-indicator .wifi-arc {
    transition: color 0.3s, opacity 0.3s;
}
.connection-indicator.online {
    color: #22c55e;
}
.connection-indicator.offline {
    color: #ef4444;
}
.connection-indicator.slow {
    color: #f59e0b;
}
.connection-indicator.slow .arc-3,
.connection-indicator.slow .arc-4 {
    opacity: 0.15;
}
.light-mode .connection-indicator {
    color: rgba(0,0,0,0.12);
}
.light-mode .connection-indicator.online {
    color: #16a34a;
}
.light-mode .connection-indicator.offline {
    color: #dc2626;
}
.light-mode .connection-indicator.slow {
    color: #d97706;
}

.conn-toast {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(-30px);
    opacity: 0;
    padding: 10px 22px;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 99999;
    transition: opacity 0.3s, transform 0.3s;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}
.conn-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}
.conn-toast-offline {
    background: #dc2626;
    color: #fff;
}
.conn-toast-slow {
    background: #f59e0b;
    color: #fff;
}
.conn-toast-online {
    background: #22c55e;
    color: #fff;
}

.notification-btn {
    font-size: 1.3rem;
}

.notification-btn .notification-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    background: #ef4444;
    border-radius: 8px;
    border: 2px solid var(--bg-darker);
    font-size: 0.6rem;
    font-weight: 700;
    color: white;
    display: none;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.notification-btn .notification-badge.show {
    display: flex;
}

/* Bell animation when has notifications */
.notification-btn.shake i {
    animation: bellShake 0.8s ease-in-out;
}

@keyframes bellShake {
    0%, 100% { transform: rotate(0); }
    10%, 30%, 50%, 70%, 90% { transform: rotate(-10deg); }
    20%, 40%, 60%, 80% { transform: rotate(10deg); }
}

.top-bar-user {
    margin-left: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 5px 10px;
    border-radius: var(--border-radius-sm);
    transition: background var(--transition-fast);
}

.top-bar-user:hover {
    background: var(--bg-hover);
}

.top-bar-user img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.top-bar-user .avatar-ring-container img {
    width: 36px;
    height: 36px;
    border: none;
}

.user-name-header {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-primary);
}

@media (max-width: 768px) {
    .user-name-header {
        display: none;
    }
}

/* =============================================
   QWOTA PRO - CUSTOM DROPDOWNS
   ============================================= */

.dropdown {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5), 0 0 1px rgba(82, 112, 255, 0.1);
    min-width: 320px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-15px);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 2000;
    overflow: hidden;
}

.dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, #5270ff, transparent);
    opacity: 0.5;
}

.dropdown-header {
    padding: 18px 24px;
    border-bottom: 1px solid #334155;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #0f172a;
}

.dropdown-header h3 {
    font-size: 0.95rem;
    font-weight: 600;
    color: #f1f5f9;
    letter-spacing: 0.3px;
}

.dropdown-header .badge {
    background: #5270ff;
    color: #ffffff;
    padding: 3px 10px;
    border-radius: 8px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.dropdown-body {
    max-height: 380px;
    overflow-y: auto;
    background: #1e293b;
}

.dropdown-body::-webkit-scrollbar {
    width: 6px;
}

.dropdown-body::-webkit-scrollbar-track {
    background: #0f172a;
}

.dropdown-body::-webkit-scrollbar-thumb {
    background: #334155;
    border-radius: 3px;
}

.dropdown-body::-webkit-scrollbar-thumb:hover {
    background: #5270ff;
}

.dropdown-footer {
    padding: 14px 24px;
    border-top: 1px solid #334155;
    text-align: center;
    background: #0f172a;
}

.dropdown-footer a {
    color: #5270ff;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.2s ease;
    letter-spacing: 0.3px;
}

.dropdown-footer a:hover {
    color: #7690ff;
    text-decoration: none;
}

/* =============================================
   NOTIFICATION ITEMS - QWOTA PRO CUSTOM
   ============================================= */

.notification-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 16px 24px;
    border-bottom: 1px solid #334155;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.notification-item:hover {
    background: #0f172a;
}

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

.notification-item.unread {
    background: rgba(82, 112, 255, 0.05);
    border-left: 3px solid #5270ff;
    padding-left: 21px;
}

.notification-item.unread:hover {
    background: rgba(82, 112, 255, 0.08);
}

.notification-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1.1rem;
    border: 2px solid transparent;
}

.notification-icon.info {
    background: rgba(82, 112, 255, 0.15);
    color: #5270ff;
    border-color: rgba(82, 112, 255, 0.2);
}

.notification-icon.success {
    background: rgba(34, 197, 94, 0.15);
    color: #22c55e;
    border-color: rgba(34, 197, 94, 0.2);
}

.notification-icon.warning {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
    border-color: rgba(245, 158, 11, 0.2);
}

.notification-icon.danger {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    border-color: rgba(239, 68, 68, 0.2);
}

.notification-content {
    flex: 1;
    min-width: 0;
}

.notification-content p {
    font-size: 0.875rem;
    color: #f1f5f9;
    margin-bottom: 5px;
    line-height: 1.5;
    font-weight: 500;
}

.notification-content span {
    font-size: 0.75rem;
    color: #94a3b8;
    font-weight: 400;
}

.notification-empty {
    padding: 60px 24px;
    text-align: center;
    color: #64748b;
}

.notification-empty i {
    font-size: 3rem;
    margin-bottom: 12px;
    opacity: 0.3;
    color: #5270ff;
}

/* Notification Delete Button */
.notification-delete-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 20px;
    height: 20px;
    border: none;
    background: transparent;
    color: #64748b;
    cursor: pointer;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    opacity: 0;
    transition: all 0.2s ease;
}

.notification-item:hover .notification-delete-btn {
    opacity: 1;
}

.notification-delete-btn:hover {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

@keyframes fadeOut {
    from { opacity: 1; transform: translateX(0); }
    to { opacity: 0; transform: translateX(20px); }
}

/* Notification Avatar */
.notification-avatar {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
}

.notification-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.notification-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.notification-author {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
}

.notification-time {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.notification-channel {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.notification-channel i {
    font-size: 0.75rem;
}

.notification-text {
    font-size: 0.85rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.notification-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
}

.notification-unread-dot {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 8px;
    height: 8px;
    background: #ef4444;
    border-radius: 50%;
}

.mark-all-read-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    background: transparent;
    border: none;
    color: var(--primary);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.mark-all-read-btn:hover {
    background: var(--primary-light);
}

.notification-dropdown {
    min-width: 380px;
}

.notification-dropdown .dropdown-body {
    max-height: 400px;
    overflow-y: auto;
}

.notification-dropdown .dropdown-footer {
    border-top: 1px solid var(--border-color);
}

/* Nav Badge */
.nav-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    background: #ef4444;
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    border-radius: 10px;
    margin-left: auto;
}

.sidebar.collapsed .nav-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    min-width: 18px;
    height: 18px;
    font-size: 0.65rem;
}

/* =============================================
   USER DROPDOWN MENU - QWOTA PRO CUSTOM
   ============================================= */

.user-dropdown-menu {
    min-width: 280px;
}

.user-dropdown-header {
    padding: 24px;
    border-bottom: 1px solid #334155;
    display: flex;
    align-items: center;
    gap: 16px;
    background: #0f172a;
    position: relative;
    overflow: hidden;
}

.dropdown-brand-logo {
    position: absolute !important;
    top: 10px;
    right: 10px;
    width: 32px !important;
    height: 32px !important;
    object-fit: contain;
    border-radius: 6px !important;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.user-dropdown-header:hover .dropdown-brand-logo {
    opacity: 0.9;
}

.user-dropdown-header img {
    width: 52px;
    height: 52px;
    border-radius: 50%;
}

.user-dropdown-header .avatar-ring-container img {
    width: 46px;
    height: 46px;
    border: none;
    box-shadow: none;
}

.user-dropdown-info h4 {
    font-size: 0.95rem;
    font-weight: 600;
    color: #f1f5f9;
    margin-bottom: 3px;
    letter-spacing: 0.2px;
}

.user-dropdown-info p {
    font-size: 0.8rem;
    color: #94a3b8;
}

.user-dropdown-info .role-badge {
    display: inline-block;
    margin-top: 6px;
    padding: 3px 10px;
    background: rgba(82, 112, 255, 0.15);
    color: #5270ff;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: 1px solid rgba(82, 112, 255, 0.2);
}

.dropdown-menu-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 24px;
    color: #cbd5e1;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    position: relative;
}

.dropdown-menu-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 0;
    background: #5270ff;
    transition: height 0.2s ease;
}

.dropdown-menu-item i {
    width: 20px;
    text-align: center;
    font-size: 1rem;
    color: #64748b;
    transition: all 0.2s ease;
}

.dropdown-menu-item:hover {
    background: #0f172a;
    color: #f1f5f9;
}

.dropdown-menu-item:hover::before {
    height: 24px;
}

.dropdown-menu-item:hover i {
    color: #5270ff;
    transform: scale(1.1);
}

.dropdown-menu-item.danger:hover {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.dropdown-menu-item.danger:hover::before {
    background: #ef4444;
}

.dropdown-menu-item.danger:hover i {
    color: #ef4444;
}

.dropdown-divider {
    height: 1px;
    background: #334155;
    margin: 6px 0;
}

/* Page Content */
.page-content {
    flex: 1;
    overflow-y: auto;
}

/* Welcome Screen */
.welcome-screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
    text-align: center;
}

.welcome-icon {
    width: 100px;
    height: 100px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: white;
    margin-bottom: 30px;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 0 20px var(--primary-glow);
    }
    50% {
        box-shadow: 0 0 40px var(--primary-glow);
    }
}

.welcome-screen h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.welcome-screen p {
    color: var(--text-muted);
    font-size: 1rem;
}

/* Page Placeholder */
.page-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 50vh;
    text-align: center;
    color: var(--text-muted);
}

.page-placeholder i {
    font-size: 4rem;
    margin-bottom: 20px;
    color: var(--primary);
    opacity: 0.5;
}

.page-placeholder h2 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.page-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 50vh;
    color: var(--text-muted);
    font-size: 1.1rem;
}

/* User Dropdown */
.user-dropdown {
    position: fixed;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    min-width: 200px;
    padding: 8px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all var(--transition-fast);
    z-index: 2000;
}

.user-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 15px;
    border-radius: var(--border-radius-sm);
    color: var(--text-secondary);
    font-size: 0.9rem;
    transition: all var(--transition-fast);
}

.dropdown-item i {
    width: 18px;
    text-align: center;
}

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

.dropdown-item.logout:hover {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}

.dropdown-divider {
    height: 1px;
    background: var(--border-color);
    margin: 8px 0;
}

/* ================================================
   RESPONSIVE
   ================================================ */
@media (max-width: 1024px) {
    .search-box {
        min-width: 200px;
    }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.mobile-open {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
    }

    .mobile-menu-btn {
        display: flex;
    }

    .search-box {
        display: none;
    }

    .top-bar {
        padding: 0 15px;
    }

    .page-content {
    }
}

/* ================================================
   UTILITY CLASSES
   ================================================ */
.text-primary { color: var(--primary) !important; }
.text-success { color: var(--success) !important; }
.text-warning { color: var(--warning) !important; }
.text-danger { color: var(--danger) !important; }
.text-muted { color: var(--text-muted) !important; }

.bg-primary { background-color: var(--primary) !important; }
.bg-card { background-color: var(--bg-card) !important; }

.rounded { border-radius: var(--border-radius) !important; }
.rounded-sm { border-radius: var(--border-radius-sm) !important; }
.rounded-lg { border-radius: var(--border-radius-lg) !important; }

.shadow { box-shadow: var(--shadow-md) !important; }
.shadow-lg { box-shadow: var(--shadow-lg) !important; }
.shadow-glow { box-shadow: var(--shadow-glow) !important; }

/* Cards */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 24px;
    margin-bottom: 0;
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: -24px -24px 24px -24px;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-dark);
}

.card-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.quarterly-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    overflow: hidden;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: var(--border-radius-sm);
    transition: all var(--transition-fast);
    cursor: pointer;
}

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

.btn-primary:hover {
    background: var(--primary-hover);
    box-shadow: var(--shadow-glow);
}

.btn-secondary {
    background: var(--bg-hover);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--bg-active);
    border-color: var(--primary);
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
}

.btn-ghost:hover {
    background: var(--bg-hover);
    color: var(--primary);
}

/* Forms */
.form-group {
    margin-bottom: 0;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.form-row .form-group {
    margin-bottom: 0;
}

form .form-group:not(:last-child) {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-dark);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    color: var(--text-primary);
    font-size: 0.9rem;
    transition: all var(--transition-fast);
}

.form-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.form-input::placeholder {
    color: var(--text-muted);
}

/* Tables */
.table-container {
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table th,
.table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.table th {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    background: var(--bg-hover);
}

.table td {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.table tr:hover td {
    background: var(--bg-hover);
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-dark);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* ================================================
   PAGE COMPONENTS
   ================================================ */

/* Page Header */
.page-header {
    margin-bottom: 30px;
}

.page-header h1 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 5px;
}

.page-header p {
    color: var(--text-muted);
}

/* Dashboard Header (shared across pages) */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
}

.dashboard-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.dashboard-subtitle {
    font-size: 0.95rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 8px;
}

.dashboard-header-actions {
    display: flex;
    gap: 12px;
}

.dashboard-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}

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

.dashboard-btn.primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 16px var(--primary-glow);
}

.dashboard-btn.secondary {
    background: var(--bg-card);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.dashboard-btn.secondary:hover {
    background: var(--bg-hover);
    border-color: var(--primary);
    color: var(--primary);
}

/* Page Centered Container */
.page-centered {
    max-width: 1000px;
    margin: 0 auto;
}

.page-centered .page-header {
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 30px;
}

/* Form Row */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

@media (max-width: 600px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}

/* Form Actions */
.form-actions {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

/* Form Select */
/* =============================================
   CUSTOM DROPDOWN SELECT - QWOTA PRO
   ============================================= */

.custom-select {
    position: relative;
    min-width: 180px;
}

.custom-select-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: #0f172a;
    border: 1px solid #334155;
    border-radius: 8px;
    color: #f1f5f9;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 500;
    gap: 12px;
}

.custom-select-trigger:hover {
    border-color: #5270ff;
    background: #1e293b;
}

.custom-select.open .custom-select-trigger {
    border-color: #5270ff;
    box-shadow: 0 0 0 3px rgba(82, 112, 255, 0.15);
    background: #1e293b;
}

.custom-select-trigger i {
    font-size: 0.75rem;
    color: #94a3b8;
    transition: transform 0.2s ease;
}

.custom-select.open .custom-select-trigger i {
    transform: rotate(180deg);
    color: #5270ff;
}

.custom-select-options {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
    overflow: hidden;
    max-height: 240px;
    overflow-y: auto;
}

.custom-select.open .custom-select-options {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.custom-select-option {
    padding: 12px 16px;
    color: #cbd5e1;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.custom-select-option:hover {
    background: #0f172a;
    color: #f1f5f9;
}

.custom-select-option.selected {
    background: rgba(82, 112, 255, 0.1);
    color: #5270ff;
    font-weight: 600;
}

.custom-select-option.selected::after {
    content: '\f00c';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    font-size: 0.75rem;
    color: #5270ff;
}

.custom-select-options::-webkit-scrollbar {
    width: 6px;
}

.custom-select-options::-webkit-scrollbar-track {
    background: #0f172a;
}

.custom-select-options::-webkit-scrollbar-thumb {
    background: #334155;
    border-radius: 3px;
}

.custom-select-options::-webkit-scrollbar-thumb:hover {
    background: #5270ff;
}

/* Custom Select with Search */
.custom-select-search {
    padding: 8px;
    border-bottom: 1px solid #334155;
    position: sticky;
    top: 0;
    background: #1e293b;
    z-index: 1;
}

.custom-select-search input {
    width: 100%;
    padding: 10px 12px;
    background: #0f172a;
    border: 1px solid #334155;
    border-radius: 6px;
    color: #f1f5f9;
    font-size: 0.85rem;
    outline: none;
    transition: border-color 0.2s ease;
}

.custom-select-search input:focus {
    border-color: #5270ff;
}

.custom-select-search input::placeholder {
    color: #64748b;
}

.custom-select-options-list {
    padding: 4px 0;
}

.custom-select-option.hidden {
    display: none;
}

.custom-select-empty {
    padding: 16px;
    text-align: center;
    color: #64748b;
    font-size: 0.85rem;
}

.custom-select-add {
    padding: 8px;
    border-top: 1px solid #334155;
    position: sticky;
    bottom: 0;
    background: #1e293b;
}

.custom-select-add button {
    width: 100%;
    padding: 10px;
    background: transparent;
    border: 1px dashed #334155;
    border-radius: 6px;
    color: #5270ff;
    font-size: 0.85rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.custom-select-add button:hover {
    background: rgba(82, 112, 255, 0.1);
    border-color: #5270ff;
}

/* Custom Select Option with Icon */
.custom-select-option-icon {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    font-size: 12px;
    margin-right: 10px;
}

.custom-select-option-content {
    flex: 1;
    display: flex;
    align-items: center;
}

.custom-select-option-badge {
    font-size: 0.75rem;
    color: #64748b;
    margin-left: auto;
}

/* Custom Select Small - for toolbars */
.custom-select.custom-select-sm {
    min-width: 100px;
}

.custom-select-sm .custom-select-trigger {
    padding: 6px 10px;
    font-size: 0.8rem;
}

.custom-select-sm .custom-select-trigger i {
    font-size: 0.65rem;
}

.custom-select-sm .custom-select-options {
    min-width: 150px;
}

.custom-select-sm .custom-select-option {
    padding: 8px 12px;
    font-size: 0.85rem;
}

.custom-select-sm .custom-select-search input {
    padding: 8px 10px;
    font-size: 0.8rem;
}

/* =============================================
   TOGGLE SWITCH - QWOTA PRO CUSTOM
   ============================================= */

.toggle-switch {
    position: relative;
    width: 52px;
    height: 28px;
    cursor: pointer;
    display: inline-block;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #334155;
    border-radius: 28px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid #1e293b;
}

.toggle-slider:before {
    content: '';
    position: absolute;
    height: 22px;
    width: 22px;
    left: 2px;
    bottom: 2px;
    background: #cbd5e1;
    border-radius: 50%;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.toggle-switch input:checked + .toggle-slider {
    background: #5270ff;
    border-color: #5270ff;
}

.toggle-switch input:checked + .toggle-slider:before {
    transform: translateX(24px);
    background: #ffffff;
    box-shadow: 0 2px 6px rgba(82, 112, 255, 0.4);
}

.toggle-switch:hover .toggle-slider {
    background: #475569;
}

.toggle-switch input:checked:hover + .toggle-slider {
    background: #7690ff;
}

/* Button Danger */
.btn-danger {
    background: rgba(239, 68, 68, 0.12);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.25);
}

.btn-danger:hover {
    background: rgba(239, 68, 68, 0.2);
    transform: translateY(-1px);
}

/* Button Success */
.btn-success {
    background: rgba(34, 197, 94, 0.12);
    color: #22c55e;
    border: 1px solid rgba(34, 197, 94, 0.25);
}

.btn-success:hover {
    background: rgba(34, 197, 94, 0.2);
    transform: translateY(-1px);
}

/* Button Small */
.btn-sm {
    padding: 8px 16px;
    font-size: 0.85rem;
}

/* Settings Components */
/* =============================================
   QWOTA PRO - SETTINGS PAGE CUSTOM STYLES
   ============================================= */

.settings-container {
    max-width: 1000px;
    margin: 0 auto;
    padding-top: 24px;
}

.settings-section {
    margin-bottom: 24px;
}

.settings-section:last-child {
    margin-bottom: 0;
}

.settings-section-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
}

.settings-section-header > i {
    width: 44px;
    height: 44px;
    background: rgba(82, 112, 255, 0.15);
    color: #5270ff;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    border: 1px solid rgba(82, 112, 255, 0.2);
}

.settings-section-header h3 {
    font-size: 1.15rem;
    font-weight: 600;
    color: #f1f5f9;
    margin-bottom: 3px;
    letter-spacing: 0.3px;
}

.settings-section-header p {
    font-size: 0.85rem;
    color: #94a3b8;
}

.settings-card {
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.settings-card > form {
    padding: 24px;
}

.setting-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 22px 24px;
    border-bottom: 1px solid #334155;
    transition: background 0.2s ease;
}

.setting-item:hover {
    background: #0f172a;
}

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

.setting-info h4 {
    font-size: 0.95rem;
    font-weight: 600;
    color: #f1f5f9;
    margin-bottom: 4px;
    letter-spacing: 0.2px;
}

.setting-info p {
    font-size: 0.85rem;
    color: #94a3b8;
}

/* Theme Selector */
.theme-selector {
    display: flex;
    gap: 10px;
}

.theme-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 18px;
    background: #0f172a;
    border: 1px solid #334155;
    border-radius: 8px;
    color: #cbd5e1;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.theme-btn:hover {
    background: #1e293b;
    color: #f1f5f9;
    border-color: #5270ff;
}

.theme-btn.active {
    background: rgba(82, 112, 255, 0.15);
    border-color: #5270ff;
    color: #5270ff;
    box-shadow: 0 0 0 3px rgba(82, 112, 255, 0.1);
}

.theme-btn i {
    font-size: 1rem;
}

/* Danger Zone */
.danger-zone .settings-section-header > i {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    border-color: rgba(239, 68, 68, 0.2);
}

.danger-zone .settings-card {
    border-color: rgba(239, 68, 68, 0.3);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.1);
}

/* Modal / Popup */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3000;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-fast);
}

.modal-overlay.show {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow: hidden;
    transform: scale(0.9);
    transition: transform var(--transition-fast);
}

.modal-overlay.show .modal {
    transform: scale(1);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.modal-close {
    width: 32px;
    height: 32px;
    border-radius: var(--border-radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.modal-close:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.modal-body {
    padding: 20px;
    overflow-y: auto;
    max-height: calc(90vh - 140px);
}

.modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    padding: 15px 20px;
    border-top: 1px solid var(--border-color);
}

/* No Photo Modal */
.no-photo-modal {
    max-width: 400px;
    text-align: center;
    padding: 40px 30px;
}

.no-photo-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, rgba(82, 112, 255, 0.2), rgba(82, 112, 255, 0.05));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.no-photo-icon i {
    font-size: 40px;
    color: #5270ff;
}

.no-photo-modal h3 {
    font-size: 1.3rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 12px;
}

.no-photo-modal p {
    font-size: 0.95rem;
    color: #94a3b8;
    line-height: 1.5;
    margin-bottom: 28px;
}

.no-photo-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.no-photo-actions .btn {
    padding: 12px 24px;
    font-size: 0.9rem;
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 4000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    min-width: 300px;
    max-width: 400px;
    transform: translateX(120%);
    transition: transform var(--transition-normal);
}

.toast.show {
    transform: translateX(0);
}

.toast-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.toast.success .toast-icon {
    background: rgba(34, 197, 94, 0.15);
    color: var(--success);
}

.toast.error .toast-icon {
    background: rgba(239, 68, 68, 0.15);
    color: var(--danger);
}

.toast.warning .toast-icon {
    background: rgba(245, 158, 11, 0.15);
    color: var(--warning);
}

.toast.info .toast-icon {
    background: rgba(59, 130, 246, 0.15);
    color: var(--info);
}

.toast-content {
    flex: 1;
}

.toast-content h4 {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.toast-content p {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.toast-close {
    color: var(--text-muted);
    cursor: pointer;
    padding: 5px;
    transition: color var(--transition-fast);
}

.toast-close:hover {
    color: var(--text-primary);
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 10px;
}

.badge-primary {
    background: var(--primary-light);
    color: var(--primary);
}

.badge-success {
    background: rgba(34, 197, 94, 0.15);
    color: var(--success);
}

.badge-warning {
    background: rgba(245, 158, 11, 0.15);
    color: var(--warning);
}

.badge-danger {
    background: rgba(239, 68, 68, 0.15);
    color: var(--danger);
}

/* Empty State */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
}

.empty-state i {
    font-size: 3rem;
    color: var(--text-muted);
    margin-bottom: 20px;
    opacity: 0.5;
}

.empty-state h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.empty-state p {
    color: var(--text-muted);
    max-width: 300px;
}

/* Loading Spinner */
.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border-color);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
}

/* =============================================
   AVATAR MODAL - QWOTA PRO CUSTOM
   ============================================= */

.avatar-modal {
    max-width: 600px;
}

.avatar-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 20px;
}

.avatar-option-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 30px 20px;
    background: #0f172a;
    border: 2px solid #334155;
    border-radius: 12px;
    color: #cbd5e1;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.avatar-option-btn i {
    font-size: 2rem;
    color: #5270ff;
    transition: transform 0.2s ease;
}

.avatar-option-btn:hover {
    background: #1e293b;
    border-color: #5270ff;
    color: #f1f5f9;
    transform: translateY(-2px);
}

.avatar-option-btn:hover i {
    transform: scale(1.1);
}

.avatar-preview-container {
    margin-top: 20px;
}

.avatar-preview {
    position: relative;
    width: 300px;
    height: 300px;
    margin: 0 auto 20px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid #5270ff;
    background: #0f172a;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    cursor: move;
    user-select: none;
}

.avatar-preview-wrapper {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.avatar-preview img {
    max-width: none;
    position: relative;
    transition: none;
    pointer-events: none;
}

.avatar-preview-controls {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.avatar-control-group {
    display: flex;
    align-items: center;
    gap: 12px;
}

.avatar-control-label {
    font-size: 0.85rem;
    color: #cbd5e1;
    min-width: 80px;
    font-weight: 500;
}

.avatar-control-buttons {
    display: flex;
    gap: 8px;
    margin-top: 10px;
    justify-content: center;
}

.avatar-control-btn {
    padding: 8px 16px;
    background: #0f172a;
    border: 1px solid #334155;
    border-radius: 8px;
    color: #cbd5e1;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.avatar-control-btn:hover {
    background: #1e293b;
    border-color: #5270ff;
    color: #f1f5f9;
}

.avatar-control-btn i {
    font-size: 0.9rem;
}

#avatarZoom {
    width: 100%;
    margin-top: 15px;
    -webkit-appearance: none;
    appearance: none;
    height: 6px;
    background: #334155;
    border-radius: 3px;
    outline: none;
}

#avatarZoom::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    background: #5270ff;
    border-radius: 50%;
    cursor: pointer;
    border: 3px solid #1e293b;
    transition: all 0.2s ease;
}

#avatarZoom::-webkit-slider-thumb:hover {
    background: #7690ff;
    box-shadow: 0 0 0 4px rgba(82, 112, 255, 0.2);
}

#avatarZoom::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: #5270ff;
    border-radius: 50%;
    cursor: pointer;
    border: 3px solid #1e293b;
    transition: all 0.2s ease;
}

#avatarZoom::-moz-range-thumb:hover {
    background: #7690ff;
    box-shadow: 0 0 0 4px rgba(82, 112, 255, 0.2);
}

#webcamVideo {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

#webcamCanvas {
    display: none;
}

/* Avatar Edit Button */
.avatar-container {
    position: relative;
    display: inline-block;
}

.avatar-edit-btn {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 36px;
    height: 36px;
    background: #5270ff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.85rem;
    cursor: pointer;
    border: 3px solid #1e293b;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.avatar-edit-btn:hover {
    background: #7690ff;
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(82, 112, 255, 0.4);
}

@media (max-width: 600px) {
    .setting-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .theme-selector {
        width: 100%;
    }

    .theme-btn {
        flex: 1;
        justify-content: center;
    }

    .toast-container {
        left: 10px;
        right: 10px;
    }

    .toast {
        min-width: auto;
        max-width: none;
    }

    .avatar-options {
        grid-template-columns: 1fr;
    }

    .avatar-preview {
        width: 250px;
        height: 250px;
    }
}

/* =============================================
   GAMIFICATION - QWOTA PRO
   ============================================= */

/* Tier Badge - Sidebar */
.tier-badge-container {
    margin: 10px 15px;
    padding: 12px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tier-badge-container:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.tier-badge-container.active {
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(82, 112, 255, 0.2);
}

.sidebar.collapsed .tier-badge-container {
    padding: 10px;
    margin: 10px;
}

.tier-badge {
    display: flex;
    align-items: center;
    gap: 12px;
}

.tier-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.tier-badge-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.tier-info {
    flex: 1;
    min-width: 0;
}

.sidebar.collapsed .tier-info {
    display: none;
}

.tier-name {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.tier-xp {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* XP Progress Bar */
.xp-progress-bar {
    height: 6px;
    background: var(--bg-dark);
    border-radius: 3px;
    overflow: hidden;
    margin-top: 8px;
}

.sidebar.collapsed .xp-progress-bar {
    display: none;
}

.xp-progress-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.5s ease;
    background: linear-gradient(90deg, #5270ff, #7690ff);
}

.xp-progress-fill.bronze { background: linear-gradient(90deg, #cd7f32, #e5a55a); }
.xp-progress-fill.silver { background: linear-gradient(90deg, #a0a0a0, #c0c0c0); }
.xp-progress-fill.gold { background: linear-gradient(90deg, #ffc800, #ffd700); }
.xp-progress-fill.platinum { background: linear-gradient(90deg, #c0c0c0, #e5e4e2); }
.xp-progress-fill.diamond { background: linear-gradient(90deg, #7ec8e3, #b9f2ff); }

/* Achievement Cards */
.achievements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.achievement-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: flex-start;
    gap: 16px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.achievement-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.achievement-card.locked {
    opacity: 0.6;
}

.achievement-card.locked::before {
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 10px,
        rgba(0, 0, 0, 0.05) 10px,
        rgba(0, 0, 0, 0.05) 20px
    );
}

.achievement-card.unlocked {
    border-color: var(--primary);
    background: linear-gradient(135deg, var(--bg-card), rgba(82, 112, 255, 0.05));
}

.achievement-icon {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.achievement-card.locked .achievement-icon {
    background: var(--bg-dark);
    color: var(--text-muted);
}

.achievement-card.unlocked .achievement-icon {
    background: rgba(82, 112, 255, 0.15);
    color: var(--primary);
}

.achievement-icon.revenue { background: rgba(34, 197, 94, 0.15); color: #22c55e; }
.achievement-icon.clients { background: rgba(245, 158, 11, 0.15); color: #f59e0b; }
.achievement-icon.soumissions { background: rgba(59, 130, 246, 0.15); color: #3b82f6; }
.achievement-icon.sales { background: rgba(139, 92, 246, 0.15); color: #8b5cf6; }

.achievement-content {
    flex: 1;
}

.achievement-name {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.achievement-card.locked .achievement-name {
    color: var(--text-muted);
}

.achievement-description {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.achievement-xp {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 6px;
    background: rgba(82, 112, 255, 0.1);
    color: var(--primary);
}

.achievement-date {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 8px;
}

.achievement-lock-icon {
    position: absolute;
    top: 12px;
    right: 12px;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.achievement-check-icon {
    position: absolute;
    top: 12px;
    right: 12px;
    font-size: 0.9rem;
    color: #22c55e;
}

/* Achievement Toast Notification */
.achievement-toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: linear-gradient(135deg, #1e293b, #0f172a);
    border: 1px solid var(--primary);
    border-radius: 16px;
    padding: 20px 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5), 0 0 40px rgba(82, 112, 255, 0.2);
    z-index: 5000;
    transform: translateX(150%);
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    min-width: 340px;
    max-width: 450px;
}

.achievement-toast.show {
    transform: translateX(0);
}

.achievement-toast-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(82, 112, 255, 0.15);
    border: 2px solid var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--primary);
    flex-shrink: 0;
    animation: achievementPulse 1s ease-in-out infinite;
}

@keyframes achievementPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(82, 112, 255, 0.4); }
    50% { box-shadow: 0 0 20px 10px rgba(82, 112, 255, 0); }
}

.achievement-toast-content {
    flex: 1;
}

.achievement-toast-label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--primary);
    margin-bottom: 4px;
}

.achievement-toast-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.achievement-toast-xp {
    font-size: 0.9rem;
    color: #22c55e;
    font-weight: 600;
}

.achievement-toast-close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.2s ease;
}

.achievement-toast-close:hover {
    color: var(--text-primary);
}

/* Level Up Toast */
.levelup-toast {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    opacity: 0;
    background: linear-gradient(135deg, #1e293b, #0f172a);
    border: 2px solid;
    border-radius: 24px;
    padding: 40px 60px;
    text-align: center;
    box-shadow: 0 40px 80px rgba(0, 0, 0, 0.6);
    z-index: 5001;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.levelup-toast.show {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
}

.levelup-toast.bronze { border-color: #cd7f32; }
.levelup-toast.silver { border-color: #c0c0c0; }
.levelup-toast.gold { border-color: #ffd700; }
.levelup-toast.platinum { border-color: #e5e4e2; }
.levelup-toast.diamond { border-color: #b9f2ff; }

.levelup-icon {
    width: 100px;
    height: 100px;
    margin: 0 auto 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    animation: levelUpBounce 0.6s ease-out;
}

@keyframes levelUpBounce {
    0% { transform: scale(0); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

.levelup-icon.bronze { background: rgba(205, 127, 50, 0.2); color: #cd7f32; }
.levelup-icon.silver { background: rgba(192, 192, 192, 0.2); color: #c0c0c0; }
.levelup-icon.gold { background: rgba(255, 215, 0, 0.2); color: #ffd700; }
.levelup-icon.platinum { background: rgba(229, 228, 226, 0.2); color: #e5e4e2; }
.levelup-icon.diamond { background: rgba(185, 242, 255, 0.2); color: #b9f2ff; }

.levelup-label {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--primary);
    margin-bottom: 8px;
}

.levelup-tier {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 12px;
}

.levelup-tier.bronze { color: #cd7f32; }
.levelup-tier.silver { color: #c0c0c0; }
.levelup-tier.gold { color: #ffd700; }
.levelup-tier.platinum { color: #e5e4e2; }
.levelup-tier.diamond { color: #b9f2ff; }

.levelup-message {
    font-size: 1rem;
    color: var(--text-secondary);
}

/* Gamification Widget (Dashboard) - Mini Full Width */
.gamification-widget {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    padding: 12px 20px;
    gap: 16px;
    box-sizing: border-box;
}

.gamification-widget-header {
    display: none;
}

.gamification-widget-title {
    display: none;
}

.gamification-widget-link {
    display: none;
}

.gamification-widget-body {
    display: none;
}

.gamification-level-display {
    display: none;
}

.gamification-level-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.gamification-level-icon::after {
    display: none;
}

.gamification-level-info {
    display: none;
}

.gamification-level-tier {
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
}

.gamification-level-xp {
    font-size: 0.75rem;
    color: var(--text-secondary);
    white-space: nowrap;
    margin-left: auto;
    flex-shrink: 0;
}

.gamification-level-progress {
    flex: 1;
    height: 6px;
    background: var(--bg-dark);
    border-radius: 3px;
    overflow: hidden;
    min-width: 100px;
}

.gamification-level-progress-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.5s ease;
}

.gamification-recent-achievements {
    display: none;
}

.gamification-recent-achievement {
    display: none;
}

.gamification-recent-achievement i {
    color: var(--primary);
}

/* Gamification Page Header */
.gamification-page-header {
    display: flex;
    align-items: center;
    gap: 32px;
    padding: 40px;
    background: linear-gradient(135deg, var(--bg-card), rgba(82, 112, 255, 0.05));
    border: 1px solid var(--border-color);
    border-radius: 20px;
    margin-bottom: 32px;
}

.gamification-level-ring {
    position: relative;
    width: 140px;
    height: 140px;
}

.gamification-ring-svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.gamification-ring-bg {
    fill: none;
    stroke: var(--bg-dark);
    stroke-width: 8;
}

.gamification-ring-progress {
    fill: none;
    stroke-width: 8;
    stroke-linecap: round;
    transition: stroke-dashoffset 1s ease;
}

.gamification-ring-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
}

.gamification-header-info {
    flex: 1;
}

.gamification-header-tier {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 8px;
}

.gamification-header-xp {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.gamification-header-next {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--bg-dark);
    border-radius: 8px;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.gamification-header-next strong {
    color: var(--text-primary);
}

/* Milestones Section */
.milestones-section {
    margin-bottom: 32px;
}

.milestones-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.milestone-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 12px;
}

.milestone-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.milestone-name {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
}

.milestone-value {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.milestone-progress {
    height: 8px;
    background: var(--bg-dark);
    border-radius: 4px;
    overflow: hidden;
}

.milestone-progress-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.5s ease;
}

.milestone-progress-fill.revenue { background: linear-gradient(90deg, #22c55e, #4ade80); }
.milestone-progress-fill.clients { background: linear-gradient(90deg, #f59e0b, #fbbf24); }
.milestone-progress-fill.soumissions { background: linear-gradient(90deg, #3b82f6, #60a5fa); }

/* XP History */
.xp-history {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
}

.xp-history-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
}

.xp-history-list {
    max-height: 300px;
    overflow-y: auto;
}

.xp-history-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 20px;
    border-bottom: 1px solid var(--border-color);
}

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

.xp-history-reason {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.xp-history-amount {
    font-size: 0.9rem;
    font-weight: 700;
    color: #22c55e;
}

.xp-history-date {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 4px;
}

@media (max-width: 768px) {
    .gamification-page-header {
        flex-direction: column;
        text-align: center;
        padding: 30px 20px;
    }

    .gamification-header-info {
        width: 100%;
    }

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

    .achievement-toast {
        bottom: 20px;
        right: 20px;
        left: 20px;
        min-width: auto;
    }
}

/* =============================================
   STATS ROW & STAT CARDS
   ============================================= */

.stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 24px;
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    border-color: var(--primary);
}

.stat-card-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.stat-info {
    flex: 1;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 8px;
    font-weight: 500;
}

.stat-value {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-primary);
    margin: 0 0 8px 0;
    line-height: 1;
}

.stat-trend {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 6px;
}

.stat-trend.primary {
    background: rgba(82, 112, 255, 0.1);
    color: var(--primary);
}

.stat-trend.success {
    background: rgba(34, 197, 94, 0.1);
    color: #22c55e;
}

.stat-trend.warning {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
}

.stat-trend.danger {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.stat-icon-wrapper {
    width: 60px;
    height: 60px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

/* Stat Progress Bar */
.stat-progress {
    height: 6px;
    background: var(--bg-dark);
    border-radius: 3px;
    overflow: hidden;
    margin-top: 16px;
}

.stat-progress-bar {
    height: 100%;
    border-radius: 3px;
    transition: width 0.5s ease;
}

.stat-progress-primary { background: linear-gradient(90deg, #5270ff, #7690ff); }
.stat-progress-success { background: linear-gradient(90deg, #22c55e, #4ade80); }
.stat-progress-warning { background: linear-gradient(90deg, #f59e0b, #fbbf24); }
.stat-progress-info { background: linear-gradient(90deg, #3b82f6, #60a5fa); }
.stat-progress-info-alt { background: linear-gradient(90deg, #8b5cf6, #a78bfa); }

/* Stat Icon Wrapper Colors */
.stat-icon-primary { background: rgba(82, 112, 255, 0.15); color: #5270ff; }
.stat-icon-success { background: rgba(34, 197, 94, 0.15); color: #22c55e; }
.stat-icon-warning { background: rgba(245, 158, 11, 0.15); color: #f59e0b; }
.stat-icon-info { background: rgba(59, 130, 246, 0.15); color: #3b82f6; }

/* Tiers Display Section */
.tiers-section {
    margin-top: 32px;
}

.tiers-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.tiers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
}

.tier-card {
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: 16px;
    padding: 24px;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.tier-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.2);
}

.tier-card.current {
    border-color: var(--primary);
    background: linear-gradient(135deg, var(--bg-card), rgba(82, 112, 255, 0.1));
}

.tier-card.current::before {
    content: 'Actuel';
    position: absolute;
    top: 12px;
    right: -24px;
    background: var(--primary);
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 4px 30px;
    transform: rotate(45deg);
}

.tier-card.locked {
    opacity: 0.5;
}

.tier-card-icon {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    margin: 0 auto 16px;
    position: relative;
}

.tier-card-icon::after {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    border: 2px solid currentColor;
    opacity: 0.3;
}

.tier-card-icon.bronze { background: rgba(205, 127, 50, 0.2); color: #cd7f32; }
.tier-card-icon.silver { background: rgba(192, 192, 192, 0.2); color: #c0c0c0; }
.tier-card-icon.gold { background: rgba(255, 215, 0, 0.2); color: #ffd700; }
.tier-card-icon.platinum { background: rgba(229, 228, 226, 0.2); color: #e5e4e2; }
.tier-card-icon.diamond { background: rgba(185, 242, 255, 0.2); color: #b9f2ff; }

.tier-card-name {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.tier-card-name.bronze { color: #cd7f32; }
.tier-card-name.silver { color: #c0c0c0; }
.tier-card-name.gold { color: #ffd700; }
.tier-card-name.platinum { color: #e5e4e2; }
.tier-card-name.diamond { color: #b9f2ff; }

.tier-card-xp {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.tier-card-check {
    position: absolute;
    top: 12px;
    left: 12px;
    color: #22c55e;
    font-size: 1rem;
}

@media (max-width: 768px) {
    .stats-row {
        grid-template-columns: 1fr;
    }

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

/* =============================================
   AVATAR PROGRESS RING
   ============================================= */

.avatar-ring-container {
    position: relative;
    width: 44px;
    height: 44px;
}

.avatar-ring-svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
    z-index: 1;
}

.avatar-ring-bg {
    stroke: var(--border-color);
}

.avatar-ring-progress {
    transition: stroke-dashoffset 0.5s ease, stroke 0.3s ease;
}

.avatar-ring-container img {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
}

/* Dropdown avatar ring - plus grand */
.dropdown-avatar-ring {
    width: 56px;
    height: 56px;
}

.dropdown-avatar-ring img {
    width: 46px;
    height: 46px;
}
