/*
 * BGFIBank - Plateforme de Pilotage de la Performance Commerciale
 * Charte: Bleu #005296 | Vert-gris #919B79
 */

:root {
    --bgfi-blue: #005296;
    --bgfi-blue-dark: #00407A;
    --bgfi-blue-darker: #002D5C;
    --bgfi-blue-80: rgba(0, 82, 150, 0.8);
    --bgfi-blue-60: rgba(0, 82, 150, 0.6);
    --bgfi-blue-40: rgba(0, 82, 150, 0.4);
    --bgfi-blue-20: rgba(0, 82, 150, 0.2);
    --bgfi-blue-10: rgba(0, 82, 150, 0.1);
    --bgfi-blue-05: rgba(0, 82, 150, 0.05);
    --bgfi-green: #919B79;
    --bgfi-green-80: rgba(145, 155, 121, 0.8);
    --bgfi-green-60: rgba(145, 155, 121, 0.6);
    --bgfi-green-40: rgba(145, 155, 121, 0.4);
    --bgfi-green-20: rgba(145, 155, 121, 0.2);
    --gold: #C9A227;
    --silver: #A8A8A8;
    --bronze: #CD7F32;
    --zone-green: #2E7D4A;
    --zone-green-light: #E8F5E9;
    --zone-red: #C0392B;
    --zone-red-light: #FFEBEE;
    --bg-body: #F5F7FA;
    --bg-white: #FFFFFF;
    --bg-sidebar: #001F3F;
    --bg-sidebar-hover: #002D5C;
    --bg-card: #FFFFFF;
    --text-dark: #1A2B3C;
    --text-medium: #4A5568;
    --text-light: #718096;
    --text-muted: #A0AEC0;
    --text-white: #FFFFFF;
    --border-light: #E2E8F0;
    --border-medium: #CBD5E0;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.12);
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s ease;
    --sidebar-width: 260px;
    --sidebar-collapsed-width: 80px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: 'Source Sans 3', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-body);
    color: var(--text-dark);
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}
.dashboard-layout { display: flex; min-height: 100vh; }

/* ============================================
   SIDEBAR
   ============================================ */

.sidebar {
    width: var(--sidebar-width);
    background: linear-gradient(180deg, var(--bg-sidebar) 0%, #00152A 100%);
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    transition: width var(--transition-normal);
    overflow: visible;
}

.sidebar-header {
    padding: 1.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    text-align: center;
    transition: var(--transition-normal);
    min-height: 120px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.logo-wrapper {
    background: #fff;
    border-radius: 8px;
    padding: 0.75rem;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-normal);
    width: 80px;
    height: 60px;
    overflow: hidden;
}

.sidebar-logo { 
    max-height: 40px;
    max-width: 60px;
    width: auto;
    height: auto;
    object-fit: contain;
    transition: var(--transition-normal);
}

.platform-info { 
    text-align: center; 
    overflow: hidden;
    transition: var(--transition-normal);
}

.platform-title {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-white);
    letter-spacing: 0.02em;
    margin-bottom: 0.1rem;
    white-space: nowrap;
}

.platform-subtitle {
    font-size: 0.7rem;
    color: var(--bgfi-green);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    white-space: nowrap;
}

.sidebar-nav { 
    flex: 1; 
    padding: 1rem 0; 
    overflow-y: auto;
    overflow-x: hidden;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.25rem;
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    font-size: 0.85rem;
    transition: var(--transition-fast);
    border-left: 3px solid transparent;
    white-space: nowrap;
    position: relative;
}

.nav-item:hover {
    /* Hover désactivé */
}

.nav-item.active {
    color: var(--text-white);
    background: var(--bgfi-blue);
    border-left-color: var(--bgfi-green);
}

.nav-item i { 
    width: 20px; 
    min-width: 20px;
    text-align: center; 
    font-size: 1rem;
}

.nav-text {
    transition: opacity var(--transition-normal), width var(--transition-normal);
    overflow: hidden;
}

.nav-badge {
    margin-left: auto;
    padding: 0.15rem 0.5rem;
    background: var(--bgfi-green);
    color: white;
    font-size: 0.6rem;
    font-weight: 700;
    border-radius: 8px;
    transition: var(--transition-normal);
}

/* Sidebar Collapse Button */
.sidebar-collapse-btn {
    position: absolute;
    bottom: 140px;
    right: -14px;
    width: 28px;
    height: 28px;
    background: var(--bgfi-blue);
    border: 3px solid var(--bg-body);
    border-radius: 50%;
    color: white;
    font-size: 0.7rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1001;
    transition: var(--transition-normal);
    box-shadow: var(--shadow-md);
}

.sidebar-collapse-btn:hover {
    background: var(--bgfi-green);
    transform: scale(1.1);
}

.sidebar-collapse-btn i {
    transition: transform var(--transition-normal);
}

/* Sidebar Collapsed State */
.sidebar.collapsed {
    width: var(--sidebar-collapsed-width);
}

.sidebar.collapsed .sidebar-header {
    padding: 1rem 0.5rem;
    min-height: 90px;
}

.sidebar.collapsed .logo-wrapper {
    width: 50px;
    height: 45px;
    padding: 0.5rem;
    margin-bottom: 0;
}

.sidebar.collapsed .sidebar-logo {
    max-height: 30px;
    max-width: 35px;
}

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

.sidebar.collapsed .nav-item {
    justify-content: center;
    padding: 0.75rem;
}

.sidebar.collapsed .nav-text,
.sidebar.collapsed .nav-badge {
    display: none;
}

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

.sidebar.collapsed .logout-btn {
    justify-content: center;
    padding: 0.75rem;
}

.sidebar.collapsed .logout-btn .nav-text {
    display: none;
}

.sidebar.collapsed .sidebar-credits {
    display: none;
}

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

/* Tooltip for collapsed sidebar */
.sidebar.collapsed .nav-item:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    left: 100%;
    top: 50%;
    transform: translateY(-50%);
    background: var(--bg-sidebar);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.8rem;
    white-space: nowrap;
    margin-left: 10px;
    z-index: 1002;
    box-shadow: var(--shadow-md);
}

/* Sidebar Footer */
.sidebar-footer {
    padding: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    text-align: center;
}

.logout-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.65rem;
    background: rgba(231, 76, 60, 0.1);
    border: 1px solid rgba(231, 76, 60, 0.3);
    border-radius: 8px;
    color: #E74C3C;
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 500;
    transition: var(--transition-normal);
    white-space: nowrap;
    margin-bottom: 0.75rem;
}

.logout-btn:hover {
    background: rgba(231, 76, 60, 0.2);
    border-color: rgba(231, 76, 60, 0.5);
    color: #C0392B;
}

.logout-btn i { 
    font-size: 0.9rem;
    min-width: 18px;
}

.sidebar-credits {
    font-size: 0.6rem;
    color: rgba(255, 255, 255, 0.35);
    line-height: 1.5;
}

.sidebar-credits .copyright {
    margin-bottom: 0.25rem;
}

.sidebar-credits .dev-by a {
    color: var(--bgfi-green);
    text-decoration: none;
    font-weight: 600;
}

.sidebar-credits .dev-by a:hover {
    text-decoration: underline;
}

/* Mobile Overlay */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-normal);
}

.sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    background: var(--bgfi-blue-10);
    border: none;
    font-size: 1.25rem;
    color: var(--bgfi-blue);
    cursor: pointer;
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    margin-right: 0.75rem;
    transition: var(--transition-fast);
}

.mobile-menu-toggle:hover {
    background: var(--bgfi-blue-20);
}

/* ============================================
   MAIN CONTENT
   ============================================ */

.main-content { 
    flex: 1; 
    margin-left: var(--sidebar-width); 
    min-height: 100vh; 
    transition: margin-left var(--transition-normal);
}

/* ============================================
   TOP HEADER
   ============================================ */

.top-header {
    background: var(--bg-white);
    padding: 0.875rem 1.5rem;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 50;
}

.header-left { 
    display: flex; 
    align-items: center; 
    gap: 1rem; 
}

.page-title {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--bgfi-blue);
}

.header-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.3rem 0.75rem;
    background: rgb(145, 155, 122);
    border: 1px solid var(--bgfi-green-40);
    border-radius: 50px;
    font-size: 0.7rem;
    font-weight: 600;
    color: #ffffff;
}

/* Week Selector */
.week-selector {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--bg-body);
    padding: 0.35rem;
    border-radius: 8px;
    border: 1px solid var(--border-light);
}

.week-selector button {
    width: 28px;
    height: 28px;
    border: none;
    background: var(--bg-white);
    border-radius: 6px;
    color: var(--text-medium);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
}

.week-selector button:hover {
    background: var(--bgfi-blue);
    color: white;
}

.week-selector button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.week-selector button:disabled:hover {
    background: var(--bg-white);
    color: var(--text-medium);
}

.week-selector .week-display {
    min-width: 100px;
    text-align: center;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--bgfi-blue);
}

.header-right { display: flex; align-items: center; gap: 1rem; }

.header-profile {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.4rem 0.6rem 0.4rem 0.875rem;
    background: linear-gradient(135deg, #1a3a52 0%, #0d2840 100%);
    border-radius: 5px;
    cursor: pointer;
    transition: var(--transition-normal);
    text-decoration: none;
    color: inherit;
}

.header-profile:hover { 
    box-shadow: 0 4px 15px rgba(0, 31, 63, 0.25); 
}

.header-profile-info { text-align: right; }

.header-profile-name { 
    font-size: 0.85rem; 
    font-weight: 600; 
    color: var(--text-white); 
    line-height: 1.3; 
}

.header-profile-role { 
    font-size: 0.65rem; 
    color: var(--bgfi-green); 
    text-transform: uppercase; 
    letter-spacing: 0.05em; 
}

.header-profile-avatar {
    width: 38px;
    height: 38px;
    border-radius: 6px;
    background: linear-gradient(135deg, var(--bgfi-blue) 0%, var(--bgfi-green) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 700;
    color: white;
}

/* ============================================
   DASHBOARD CONTENT
   ============================================ */

.dashboard-content { padding: 1.5rem; }

/* Welcome Section */
.welcome-section { margin-bottom: 1.5rem; }

.welcome-card {
    background: linear-gradient(135deg, var(--bgfi-blue) 0%, var(--bgfi-blue-dark) 100%);
    border-radius: 12px;
    padding: 1.5rem;
    color: white;
    position: relative;
    overflow: hidden;
}

.welcome-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, rgba(145, 155, 121, 0.15) 0%, transparent 70%);
    pointer-events: none;
}

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

.welcome-title {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.35rem;
}

.welcome-subtitle { 
    font-size: 0.9rem; 
    opacity: 0.85; 
    margin-bottom: 1.25rem; 
}

.welcome-stats { 
    display: flex; 
    gap: 2.5rem; 
    flex-wrap: wrap;
}

.welcome-stat { text-align: left; }

.welcome-stat-value { 
    font-size: 1.75rem; 
    font-weight: 700; 
    line-height: 1.2; 
}

.welcome-stat-label { 
    font-size: 0.75rem; 
    opacity: 0.7; 
}

/* ============================================
   PROGRESSION CARDS
   ============================================ */

.progression-section { margin-bottom: 1.5rem; }

.section-header { 
    display: flex; 
    align-items: baseline; 
    gap: 1rem; 
    margin-bottom: 1.25rem; 
    flex-wrap: wrap;
}

.section-title {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0;
}

.section-subtitle { 
    font-size: 0.8rem; 
    color: var(--text-light); 
}

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

.progression-card {
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    padding: 1.25rem;
    transition: var(--transition-normal);
}

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

.progression-card-header { 
    display: flex; 
    justify-content: space-between; 
    align-items: flex-start; 
    margin-bottom: 0.875rem; 
}

.progression-icon {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

.progression-icon.odc { background: rgba(46, 125, 74, 0.12); color: var(--zone-green); }
.progression-icon.dat { background: var(--bgfi-blue-10); color: var(--bgfi-blue); }
.progression-icon.mec { background: rgba(201, 162, 39, 0.12); color: var(--gold); }
.progression-icon.acp { background: var(--bgfi-green-20); color: var(--bgfi-green); }
.progression-icon.abm { background: rgba(142, 68, 173, 0.12); color: #8E44AD; }
.progression-icon.vic { background: rgba(230, 126, 34, 0.12); color: #E67E22; }

.progression-trend {
    display: flex;
    align-items: center;
    gap: 0.2rem;
    padding: 0.25rem 0.5rem;
    border-radius: 15px;
    font-size: 0.7rem;
    font-weight: 700;
}

.progression-trend.positive { background: rgba(46, 125, 74, 0.1); color: var(--zone-green); }
.progression-trend.negative { background: rgba(192, 57, 43, 0.1); color: var(--zone-red); }

.progression-card-body { margin-bottom: 0.875rem; }

.progression-label { 
    font-size: 0.75rem; 
    color: var(--text-light); 
    margin-bottom: 0.3rem; 
}

.indicator-code {
    display: inline-block;
    padding: 0.1rem 0.35rem;
    background: var(--bgfi-blue-10);
    color: var(--bgfi-blue);
    font-size: 0.6rem;
    font-weight: 700;
    border-radius: 3px;
    margin-left: 0.3rem;
    vertical-align: middle;
}

.progression-value { 
    font-size: 1.5rem; 
    font-weight: 700; 
    color: var(--text-dark); 
    line-height: 1.2; 
}

.progression-comparison { 
    font-size: 0.7rem; 
    color: var(--text-muted); 
    margin-top: 0.2rem; 
}

.progression-bar-container { 
    height: 5px; 
    background: var(--border-light); 
    border-radius: 3px; 
    overflow: hidden; 
}

.progression-bar { 
    height: 100%; 
    border-radius: 3px; 
    transition: width 1s ease; 
}

.progression-bar.odc { background: var(--zone-green); }
.progression-bar.dat { background: var(--bgfi-blue); }
.progression-bar.mec { background: var(--gold); }
.progression-bar.acp { background: var(--bgfi-green); }
.progression-bar.abm { background: #8E44AD; }
.progression-bar.vic { background: #E67E22; }

.view-all-container { text-align: center; }

.view-all-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.7rem 1.5rem;
    background: var(--bgfi-blue);
    color: white;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: 50px;
    transition: var(--transition-normal);
}

.view-all-btn:hover {
    background: var(--bgfi-blue-dark);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 82, 150, 0.3);
}

.view-all-btn i { transition: transform var(--transition-fast); }
.view-all-btn:hover i { transform: translateX(4px); }

/* ============================================
   QUICK ACTIONS
   ============================================ */

.quick-actions-section { margin-bottom: 1.5rem; }

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

.quick-action-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: 10px;
    text-decoration: none;
    transition: var(--transition-normal);
}

.quick-action-card:hover {
    border-color: var(--bgfi-blue-40);
    box-shadow: var(--shadow-sm);
    transform: translateX(4px);
}

.quick-action-icon {
    width: 45px;
    height: 45px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.quick-action-icon.trophy { background: rgba(201, 162, 39, 0.12); color: var(--gold); }
.quick-action-icon.report { background: var(--bgfi-blue-10); color: var(--bgfi-blue); }
.quick-action-icon.top { background: rgba(46, 125, 74, 0.12); color: var(--zone-green); }

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

.quick-action-title { 
    font-weight: 600; 
    font-size: 0.9rem; 
    color: var(--text-dark); 
    margin-bottom: 0.1rem; 
}

.quick-action-desc { 
    font-size: 0.75rem; 
    color: var(--text-light); 
}

.quick-action-arrow { 
    color: var(--text-muted); 
    font-size: 0.85rem; 
    transition: var(--transition-fast); 
    flex-shrink: 0;
}

.quick-action-card:hover .quick-action-arrow { 
    color: var(--bgfi-blue); 
    transform: translateX(3px); 
}

/* ============================================
   KPI CARDS
   ============================================ */

.kpi-section { margin-bottom: 1.5rem; }

.kpi-grid { 
    display: grid; 
    grid-template-columns: repeat(6, 1fr); 
    gap: 0.875rem; 
}

.kpi-card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: 10px;
    padding: 1rem;
    text-align: center;
    transition: var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.kpi-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    opacity: 0;
    transition: var(--transition-normal);
}

.kpi-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.kpi-card:hover::before { opacity: 1; }

.kpi-card.odc::before { background: var(--zone-green); }
.kpi-card.dat::before { background: var(--bgfi-blue); }
.kpi-card.mec::before { background: var(--gold); }
.kpi-card.acp::before { background: var(--bgfi-green); }
.kpi-card.abm::before { background: #8E44AD; }
.kpi-card.vic::before { background: #E67E22; }

.kpi-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 0.6rem;
    border-radius: 8px;
    font-size: 0.9rem;
}

.kpi-card.odc .kpi-icon { background: rgba(46, 125, 74, 0.1); color: var(--zone-green); }
.kpi-card.dat .kpi-icon { background: var(--bgfi-blue-10); color: var(--bgfi-blue); }
.kpi-card.mec .kpi-icon { background: rgba(201, 162, 39, 0.1); color: var(--gold); }
.kpi-card.acp .kpi-icon { background: var(--bgfi-green-20); color: var(--bgfi-green); }
.kpi-card.abm .kpi-icon { background: rgba(142, 68, 173, 0.1); color: #8E44AD; }
.kpi-card.vic .kpi-icon { background: rgba(230, 126, 34, 0.1); color: #E67E22; }

.kpi-label { 
    font-size: 0.65rem; 
    font-weight: 700; 
    letter-spacing: 0.08em; 
    text-transform: uppercase; 
    color: var(--text-dark); 
    margin-bottom: 0.1rem; 
}

.kpi-sublabel { 
    font-size: 0.6rem; 
    color: var(--text-muted); 
    margin-bottom: 0.35rem; 
}

.kpi-points { 
    font-size: 0.75rem; 
    font-weight: 600; 
    color: var(--bgfi-blue); 
}

/* ============================================
   TABS - CORRIGÉ
   ============================================ */

.tabs-section { margin-bottom: 1.25rem; }

.tabs-wrapper {
    background: var(--bg-white);
    border-radius: 12px;
    padding: 0.5rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
}

.nav-tabs-custom {
    display: flex;
    gap: 0.5rem;
    list-style: none;
    padding: 0;
    margin: 0;
    border: none;
}

.nav-tabs-custom .nav-item { 
    flex: 1;
}

.nav-tabs-custom .nav-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 1rem;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-medium);
    background: transparent;
    border: 2px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition-normal);
    width: 100%;
}

.nav-tabs-custom .nav-link i {
    font-size: 1rem;
    transition: var(--transition-normal);
}

.nav-tabs-custom .nav-link:hover {
    color: var(--bgfi-blue);
    background: var(--bgfi-blue-05);
    border-color: var(--bgfi-blue-20);
}

.nav-tabs-custom .nav-link.active {
    color: var(--text-white);
    background: linear-gradient(135deg, var(--bgfi-blue) 0%, var(--bgfi-blue-dark) 100%);
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(0, 82, 150, 0.3);
}

.nav-tabs-custom .nav-link.active i {
    color: var(--text-white);
}

.tab-count {
    padding: 0.15rem 0.5rem;
    background: rgba(255,255,255,0.2);
    border-radius: 10px;
    font-size: 0.65rem;
    font-weight: 700;
}

.nav-tabs-custom .nav-link:not(.active) .tab-count {
    background: var(--bgfi-blue-10);
    color: var(--bgfi-blue);
}

/* ============================================
   TABLE TOOLBAR
   ============================================ */

.table-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    background: var(--bg-body);
    border-bottom: 1px solid var(--border-light);
    gap: 1rem;
    flex-wrap: wrap;
}

.toolbar-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.toolbar-right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Search Box */
.search-box {
    position: relative;
    display: flex;
    align-items: center;
}

.search-box i {
    position: absolute;
    left: 0.875rem;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.search-input {
    padding: 0.6rem 0.875rem 0.6rem 2.25rem;
    border: 1px solid var(--border-light);
    border-radius: 8px;
    font-size: 0.8rem;
    width: 220px;
    transition: var(--transition-fast);
}

.search-input:focus {
    outline: none;
    border-color: var(--bgfi-blue);
    box-shadow: 0 0 0 3px var(--bgfi-blue-10);
}

/* Filter Dropdown */
.filter-dropdown {
    position: relative;
}

.filter-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1rem;
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: 8px;
    font-size: 0.8rem;
    color: var(--text-medium);
    cursor: pointer;
    transition: var(--transition-fast);
}

.filter-btn:hover {
    border-color: var(--bgfi-blue);
    color: var(--bgfi-blue);
}

.filter-btn.active {
    background: var(--bgfi-blue-10);
    border-color: var(--bgfi-blue);
    color: var(--bgfi-blue);
}

.filter-panel {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    width: 280px;
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
    padding: 1rem;
    z-index: 9999;
    display: none;
}

.filter-panel.active {
    display: block !important;
}

.filter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #e0e0e0;
}

.filter-header span {
    font-weight: 600;
    font-size: 0.85rem;
    color: #1a1a2e;
}

.filter-reset {
    background: none;
    border: none;
    color: #dc3545;
    font-size: 0.75rem;
    cursor: pointer;
}

.filter-reset:hover {
    text-decoration: underline;
}

.filter-group {
    margin-bottom: 0.875rem;
}

.filter-group label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: #555;
    margin-bottom: 0.4rem;
}

.filter-select,
.filter-input {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 0.8rem;
    background-color: #fff;
    color: #333;
    appearance: auto;
    -webkit-appearance: auto;
}

.filter-select option {
    background-color: #fff;
    color: #333;
    padding: 0.5rem;
}

.filter-select:focus,
.filter-input:focus {
    outline: none;
    border-color: var(--bgfi-blue);
}

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

.filter-range .filter-input {
    width: calc(50% - 1rem);
}

.filter-range span {
    color: var(--text-muted);
    font-size: 0.8rem;
}

.filter-apply {
    width: 100%;
    padding: 0.6rem;
    background: #005296;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 0.5rem;
}

.filter-apply:hover {
    background: #003d70;
}

/* Export Buttons */
.export-btn {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.6rem 1rem;
    border: none;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-fast);
}

.export-btn.excel {
    background: rgba(33, 150, 83, 0.1);
    color: #219653;
}

.export-btn.excel:hover {
    background: rgba(33, 150, 83, 0.2);
}

.export-btn.pdf {
    background: rgba(235, 87, 87, 0.1);
    color: #EB5757;
}

.export-btn.pdf:hover {
    background: rgba(235, 87, 87, 0.2);
}

/* ============================================
   TABLE
   ============================================ */

.ranking-container {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.table-header-bar {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.table-title {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0;
}

.table-legend { display: flex; gap: 1rem; font-size: 0.7rem; color: var(--text-light); }
.legend-item { display: flex; align-items: center; gap: 0.35rem; }
.legend-dot { width: 8px; height: 8px; border-radius: 2px; }
.legend-dot.green { background: var(--zone-green); }
.legend-dot.red { background: var(--zone-red); }

.table-header {
    display: grid;
    grid-template-columns: 70px 1fr repeat(6, 55px) 65px;
    padding: 0.6rem 1.25rem;
    background: var(--bgfi-blue-05);
    border-bottom: 1px solid var(--border-light);
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-light);
}

.table-header > div { display: flex; align-items: center; cursor: pointer; gap: 0.25rem; user-select: none; transition: opacity 0.2s; }
.table-header > div:hover { opacity: 0.7; }
.table-header > div:not(:first-child):not(:nth-child(2)) { justify-content: center; }
.table-header > div .sort-icon { font-size: 0.55rem; opacity: 0.4; transition: opacity 0.2s, transform 0.2s; }
.table-header > div.sort-active .sort-icon { opacity: 1; color: var(--bgfi-blue); }
.table-header > div.sort-desc .sort-icon { transform: rotate(180deg); }

.table-body {
    min-height: 200px;
}

.ranking-row {
    display: grid;
    grid-template-columns: 70px 1fr repeat(6, 55px) 65px;
    padding: 0.75rem 1.25rem;
    align-items: center;
    border-bottom: 1px solid var(--border-light);
    transition: var(--transition-fast);
    position: relative;
}

.ranking-row:last-child { border-bottom: none; }

.ranking-row::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    opacity: 0;
    transition: var(--transition-fast);
}

.ranking-row:hover { background: var(--bgfi-blue-05); }
.ranking-row:hover::before { opacity: 1; }
.ranking-row.zone-green::before { background: var(--zone-green); }
.ranking-row.zone-red::before { background: var(--zone-red); }
.ranking-row.zone-red { background: var(--zone-red-light); }

.zone-separator {
    height: 2px;
    margin: 0;
    background: repeating-linear-gradient(90deg, var(--gold) 0px, var(--gold) 6px, transparent 6px, transparent 12px);
    opacity: 0.6;
}

.rank-cell { display: flex; align-items: center; gap: 0.4rem; }
.rank-trend { width: 14px; font-size: 0.7rem; display: flex; justify-content: center; }
.trend-up { color: var(--zone-green); }
.trend-down { color: var(--zone-red); }
.trend-same { color: var(--text-muted); }

.rank-number {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.8rem;
    border-radius: 6px;
    color: var(--text-light);
    background: var(--bg-body);
    border: 1px solid var(--border-light);
}

.rank-1 .rank-number {
    background: linear-gradient(135deg, #FFD700 0%, #FFC000 100%);
    color: #5D4E00;
    border: none;
    box-shadow: 0 2px 6px rgba(255, 215, 0, 0.3);
}

.rank-2 .rank-number {
    background: linear-gradient(135deg, #E8E8E8 0%, #C0C0C0 100%);
    color: #444;
    border: none;
}

.rank-3 .rank-number {
    background: linear-gradient(135deg, #E8A862 0%, #CD7F32 100%);
    color: #4A2C00;
    border: none;
}

.player-cell { display: flex; align-items: center; gap: 0.75rem; padding-right: 0.75rem; min-width: 0; }

.player-avatar {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    object-fit: cover;
    border: 2px solid var(--border-light);
    transition: var(--transition-fast);
    flex-shrink: 0;
}

.ranking-row:hover .player-avatar { border-color: var(--bgfi-blue-40); }

.agency-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--bgfi-blue) 0%, var(--bgfi-blue-dark) 100%);
    color: white;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.player-info { display: flex; flex-direction: column; gap: 0.05rem; min-width: 0; }
.player-name { font-weight: 600; font-size: 0.8rem; color: var(--text-dark); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player-agency { font-size: 0.7rem; color: var(--text-light); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.stat-cell { text-align: center; font-variant-numeric: tabular-nums; }
.stat-value { font-size: 0.8rem; font-weight: 500; color: var(--text-medium); }
.stat-value.total { font-size: 0.85rem; font-weight: 700; color: var(--bgfi-blue); }

/* ============================================
   PAGINATION
   ============================================ */

.table-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    background: var(--bg-body);
    border-top: 1px solid var(--border-light);
    flex-wrap: wrap;
    gap: 1rem;
}

.pagination-info {
    font-size: 0.8rem;
    color: var(--text-light);
}

.pagination-info strong {
    color: var(--text-dark);
}

.pagination-controls {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.pagination-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: 6px;
    color: var(--text-medium);
    cursor: pointer;
    transition: var(--transition-fast);
}

.pagination-btn:hover:not(:disabled) {
    border-color: var(--bgfi-blue);
    color: var(--bgfi-blue);
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination-pages {
    display: flex;
    gap: 0.25rem;
}

.page-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: 6px;
    color: var(--text-medium);
    font-size: 0.8rem;
    cursor: pointer;
    transition: var(--transition-fast);
}

.page-btn:hover {
    border-color: var(--bgfi-blue);
    color: var(--bgfi-blue);
}

.page-btn.active {
    background: var(--bgfi-blue);
    border-color: var(--bgfi-blue);
    color: white;
}

.pagination-size {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.pagination-size label {
    font-size: 0.8rem;
    color: var(--text-light);
}

.page-size-select {
    padding: 0.4rem 0.6rem;
    border: 1px solid var(--border-light);
    border-radius: 6px;
    font-size: 0.8rem;
}

/* ============================================
   DATA LIST CARDS
   ============================================ */

.data-list-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1rem;
}

.data-card {
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    padding: 1.25rem;
    transition: var(--transition-normal);
}

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

.data-card-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-light);
}

.data-card-avatar {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    object-fit: cover;
    border: 2px solid var(--border-light);
}

.data-card-icon {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--bgfi-blue) 0%, var(--bgfi-blue-dark) 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.data-card-info { flex: 1; }

.data-card-name {
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-dark);
    margin-bottom: 0.15rem;
}

.data-card-subtitle {
    font-size: 0.8rem;
    color: var(--text-light);
}

.data-card-rank {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.5rem;
    background: var(--bg-body);
    border-radius: 8px;
}

.data-card-rank-label {
    font-size: 0.6rem;
    color: var(--text-muted);
    text-transform: uppercase;
}

.data-card-rank-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--bgfi-blue);
}

.data-card-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.data-card-stat {
    text-align: center;
    padding: 0.5rem;
    background: var(--bg-body);
    border-radius: 6px;
}

.data-card-stat-value {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-dark);
}

.data-card-stat-label {
    font-size: 0.65rem;
    color: var(--text-muted);
    text-transform: uppercase;
}

.data-card-actions {
    display: flex;
    gap: 0.5rem;
}

.data-card-btn {
    flex: 1;
    padding: 0.6rem;
    border: none;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-fast);
    text-decoration: none;
    text-align: center;
}

.data-card-btn.primary {
    background: var(--bgfi-blue);
    color: white;
}

.data-card-btn.primary:hover {
    background: var(--bgfi-blue-dark);
}

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

.data-card-btn.secondary:hover {
    border-color: var(--bgfi-blue);
    color: var(--bgfi-blue);
}

/* ============================================
   HISTORY / TIMELINE
   ============================================ */

.timeline {
    position: relative;
    padding-left: 2rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0.5rem;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--border-light);
}

.timeline-item {
    position: relative;
    padding-bottom: 1.5rem;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -1.65rem;
    top: 0.25rem;
    width: 12px;
    height: 12px;
    background: var(--bgfi-blue);
    border-radius: 50%;
    border: 2px solid var(--bg-body);
}

.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-date {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}

.timeline-content {
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: 8px;
    padding: 1rem;
}

.timeline-title {
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.25rem;
}

.timeline-desc {
    font-size: 0.85rem;
    color: var(--text-light);
}

/* ============================================
   REPORTS
   ============================================ */

.report-card {
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.25rem;
    transition: var(--transition-normal);
}

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

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

.report-icon.pdf { background: rgba(235, 87, 87, 0.1); color: #EB5757; }
.report-icon.excel { background: rgba(33, 150, 83, 0.1); color: #219653; }
.report-icon.chart { background: var(--bgfi-blue-10); color: var(--bgfi-blue); }

.report-info { flex: 1; }

.report-title {
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-dark);
    margin-bottom: 0.25rem;
}

.report-desc {
    font-size: 0.85rem;
    color: var(--text-light);
}

.report-btn {
    padding: 0.75rem 1.5rem;
    background: var(--bgfi-blue);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-fast);
    text-decoration: none;
}

.report-btn:hover {
    background: var(--bgfi-blue-dark);
    color: white;
}

/* ============================================
   LOGIN PAGE
   ============================================ */

.login-page {
    min-height: 100vh;
    display: flex;
    background: linear-gradient(135deg, var(--bgfi-blue) 0%, var(--bgfi-blue-darker) 100%);
}

.login-left {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 3rem;
    color: white;
}

.login-logo {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    margin-bottom: 2rem;
}

.login-logo img {
    height: 60px;
}

.login-title {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 2rem;
    font-weight: 600;
    text-align: center;
    margin-bottom: 0.5rem;
}

.login-subtitle {
    font-size: 1rem;
    opacity: 0.8;
    text-align: center;
}

.login-right {
    width: 480px;
    background: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 3rem;
}

.login-form-title {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.login-form-subtitle {
    color: var(--text-light);
    margin-bottom: 2rem;
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-medium);
    margin-bottom: 0.5rem;
}

.form-control {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 1px solid var(--border-light);
    border-radius: 8px;
    font-size: 0.95rem;
    transition: var(--transition-fast);
}

.form-control:focus {
    outline: none;
    border-color: var(--bgfi-blue);
    box-shadow: 0 0 0 3px var(--bgfi-blue-10);
}

.form-check {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.form-check input {
    width: 18px;
    height: 18px;
    accent-color: var(--bgfi-blue);
}

.form-check label {
    font-size: 0.85rem;
    color: var(--text-medium);
}

.btn-login {
    width: 100%;
    padding: 1rem;
    background: var(--bgfi-blue);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-normal);
    margin-bottom: 1rem;
}

.btn-login:hover {
    background: var(--bgfi-blue-dark);
}

.login-links {
    text-align: center;
}

.login-links a {
    color: var(--bgfi-blue);
    text-decoration: none;
    font-size: 0.85rem;
}

.login-links a:hover {
    text-decoration: underline;
}

.login-divider {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 1.5rem 0;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.login-divider::before,
.login-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-light);
}

.btn-magic-link {
    width: 100%;
    padding: 0.875rem;
    background: var(--bg-body);
    color: var(--text-medium);
    border: 1px solid var(--border-light);
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-normal);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-magic-link:hover {
    border-color: var(--bgfi-blue);
    color: var(--bgfi-blue);
}

/* Success Page */
.success-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-body);
}

.success-card {
    background: white;
    padding: 3rem;
    border-radius: 16px;
    text-align: center;
    max-width: 420px;
    box-shadow: var(--shadow-lg);
}

.success-icon {
    width: 80px;
    height: 80px;
    background: rgba(46, 125, 74, 0.1);
    color: var(--zone-green);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    margin: 0 auto 1.5rem;
}

.success-title {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.75rem;
}

.success-desc {
    color: var(--text-light);
    margin-bottom: 2rem;
    line-height: 1.6;
}

/* ============================================
   FOOTER
   ============================================ */

.dashboard-footer {
    padding: 1.25rem 1.5rem;
    text-align: center;
    border-top: 1px solid var(--border-light);
    background: var(--bg-white);
    font-size: 0.75rem;
    color: var(--text-light);
}

.dashboard-footer a { color: var(--bgfi-blue); text-decoration: none; }

/* ============================================
   ANIMATIONS
   ============================================ */

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.ranking-row { animation: fadeInUp 0.3s ease forwards; opacity: 0; }
.ranking-row:nth-child(1) { animation-delay: 0.02s; }
.ranking-row:nth-child(2) { animation-delay: 0.04s; }
.ranking-row:nth-child(3) { animation-delay: 0.06s; }
.ranking-row:nth-child(4) { animation-delay: 0.08s; }
.ranking-row:nth-child(5) { animation-delay: 0.10s; }

/* No results */
.no-results {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-light);
}

.no-results i {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.no-results p {
    font-size: 0.9rem;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 1200px) {
    .progression-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .kpi-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .quick-actions-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 992px) {
    .sidebar {
        transform: translateX(-100%);
        width: var(--sidebar-width);
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    .sidebar-collapse-btn {
        display: none;
    }
    
    .sidebar-overlay {
        display: block;
    }
    
    .main-content {
        margin-left: 0 !important;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    .table-header { display: none; }
    
    .ranking-row {
        grid-template-columns: auto 1fr auto;
        gap: 0.5rem;
    }
    
    .stat-cell:not(.total-cell) { display: none; }
    
    .nav-tabs-custom .nav-link span:not(.tab-count) {
        display: none;
    }
    
    .login-left { display: none; }
    .login-right { width: 100%; }
}

@media (max-width: 768px) {
    .dashboard-content { padding: 1rem; }
    
    .top-header { 
        padding: 0.75rem 1rem;
        flex-wrap: wrap;
        gap: 0.75rem;
    }
    
    .page-title { font-size: 1.2rem; }
    
    .header-badge { display: none; }
    
    .header-profile-info { display: none; }
    
    .header-profile { padding: 0.4rem; }
    
    .week-selector .week-display { min-width: 80px; font-size: 0.75rem; }
    
    .progression-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .quick-actions-grid {
        grid-template-columns: 1fr;
    }
    
    .kpi-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .data-list-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 576px) {
    .progression-grid {
        grid-template-columns: 1fr;
    }
    
    .welcome-stats {
        gap: 1rem;
    }
    
    .welcome-stat-value {
        font-size: 1.5rem;
    }
    
    .login-right {
        padding: 2rem 1.5rem;
    }
}

/* ============================================
   MODAL STYLES
   ============================================ */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 1rem;
    backdrop-filter: blur(4px);
}

.modal-overlay.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 16px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-header h3 {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0;
}

.modal-close {
    width: 36px;
    height: 36px;
    border: none;
    background: var(--bg-body);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-medium);
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: var(--zone-red);
    color: white;
}

.modal-body {
    padding: 1.5rem;
}

.modal-profile {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #eee;
}

.modal-avatar {
    width: 80px;
    height: 80px;
    border-radius: 12px;
    object-fit: cover;
    border: 3px solid var(--bgfi-blue-10);
}

.modal-avatar-icon {
    width: 80px;
    height: 80px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--bgfi-blue), var(--bgfi-blue-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2rem;
}

.modal-info h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0 0 0.25rem 0;
}

.modal-info p {
    font-size: 0.85rem;
    color: var(--text-light);
    margin: 0;
}

.modal-badge {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 600;
    margin-top: 0.5rem;
}

.modal-badge.senior {
    background: linear-gradient(135deg, #C9A227, #9A7B1A);
    color: white;
}

.modal-badge.junior {
    background: linear-gradient(135deg, #4CAF50, #388E3C);
    color: white;
}

.modal-rank {
    text-align: center;
    padding: 1rem;
    background: linear-gradient(135deg, var(--bgfi-blue-05), var(--bgfi-green-05));
    border-radius: 12px;
    margin-bottom: 1.5rem;
}

.modal-rank-number {
    font-size: 3rem;
    font-weight: 700;
    color: var(--bgfi-blue);
    line-height: 1;
}

.modal-rank-label {
    font-size: 0.8rem;
    color: var(--text-light);
    margin-top: 0.25rem;
}

.modal-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.modal-stat {
    text-align: center;
    padding: 1rem;
    background: var(--bg-body);
    border-radius: 10px;
}

.modal-stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--bgfi-blue);
}

.modal-stat-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.modal-kpis {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
}

.modal-kpi {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    background: var(--bg-body);
    border-radius: 8px;
}

.modal-kpi-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-medium);
}

.modal-kpi-value {
    font-size: 1rem;
    font-weight: 700;
    color: var(--bgfi-blue);
}

.modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid #eee;
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
}

.modal-btn {
    padding: 0.6rem 1.25rem;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}

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

.modal-btn-primary:hover {
    background: var(--bgfi-blue-dark);
}

.modal-btn-secondary {
    background: var(--bg-body);
    color: var(--text-medium);
}

.modal-btn-secondary:hover {
    background: #e0e0e0;
}

/* Clickable rows */
.ranking-row {
    cursor: pointer;
    transition: all 0.2s ease;
}

.ranking-row:hover {
    transform: translateX(4px);
    box-shadow: -4px 0 0 var(--bgfi-blue);
}

/* Header profile clickable */
.header-profile {
    cursor: pointer;
    transition: all 0.2s ease;
}

.header-profile:hover {
    opacity: 0.85;
}
