/* ========================================
   AgoraHop - CSS Centralisé Mobile-First
   ======================================== */

/* --- Variables CSS --- */

:root {
    /* =========================
       Couleurs de marque (logo)
       ========================= */
    --brand-navy: #1D264E;
    --brand-navy-rgb: 29, 38, 78;

    --brand-purple: #3B3387;
    --brand-purple-rgb: 59, 51, 135;

    --brand-teal: #52BBCC;
    --brand-teal-rgb: 82, 187, 204;

    /* Mapping UI (accents) */
    --primary: var(--brand-purple);
    --primary-dark: #2F2A6B;
    --primary-light: #6A63C7;
    --secondary: var(--brand-teal);

    /* Tintes utiles (fonds / bordures) */
    --primary-50: #F1F0FA;
    --primary-100: #E3E1F4;
    --primary-200: #CCCBDE;

    --teal-50: #ECFAFC;
    --teal-100: #D8F4F7;
    --teal-200: #B8E9EF;

    /* Dégradés de marque */
    --gradient-brand: linear-gradient(135deg, var(--brand-purple) 0%, var(--brand-teal) 100%);
    --gradient-brand-soft: linear-gradient(135deg, rgba(var(--brand-purple-rgb), 0.14) 0%, rgba(var(--brand-teal-rgb), 0.14) 100%);

    /* États */
    --success: #22c55e;
    --warning: #eab308;
    --danger: #ef4444;
    /* Neutres */
    --white: #ffffff;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    
    /* Espacements */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    
    /* Typographie */
    --font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    --font-size-xs: 0.75rem;
    --font-size-sm: 0.875rem;
    --font-size-base: 1rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.25rem;
    --font-size-2xl: 1.5rem;
    --font-size-3xl: 1.875rem;
    
    /* Rayons */
    --radius-sm: 0.25rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-full: 9999px;
    
    /* Ombres */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
    
    /* Navigation */
    --nav-height: 60px;
    --bottom-nav-height: 70px;
    
    /* Alias sémantiques pour texte et arrière-plans */
    --text-primary: var(--gray-800);
    --text-secondary: var(--gray-500);
    --bg-primary: var(--white);
    --bg-secondary: var(--gray-100);
    --border-color: var(--gray-200);
}

/* --- Reset & Base --- */

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

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    line-height: 1.5;
    color: var(--gray-800);
    background-color: var(--gray-50);
    min-height: 100vh;
    padding-bottom: var(--bottom-nav-height);
}

a {
    color: var(--primary);
    text-decoration: none;
}

a:hover {
    color: var(--primary-dark);
}

img {
    max-width: 100%;
    height: auto;
}

/* --- Layout Principal --- */

.app-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.main-content {
    flex: 1;
    padding: var(--space-sm) var(--space-md);
    padding-bottom: calc(var(--bottom-nav-height) + var(--space-sm));
}

/* --- Header Top --- */

.header-top {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--white);
    border-bottom: 1px solid var(--gray-200);
    padding: var(--space-sm) var(--space-md);
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--nav-height);
}

/* Style pour le logo image dans le header */

.header-logo {
    font-size: var(--font-size-xl);
    font-weight: 700;
    color: var(--primary);
    display: flex;
    align-items: center;
}

.logo-img {
    height: 36px;
    width: auto;
    display: block;
}

/* Option wordmark (si tu utilises un logo en texte)
   Exemple HTML :
   <a class="header-logo" href="...">
     <span class="logo-wordmark"><span class="logo-agora">Agora</span><span class="logo-hop">Hop</span></span>
   </a>
*/

.logo-wordmark { font-weight: 800; letter-spacing: -0.3px; }

.logo-agora { color: var(--brand-navy); }

.logo-hop { color: var(--brand-teal); }

@media (min-width: 768px) {
    .logo-img {
        height: 42px;
    }
}

.header-actions {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.header-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gray-100);
    color: var(--gray-600);
    position: relative;
    cursor: pointer;
    border: none;
    transition: background 0.2s;
}

.header-icon:hover {
    background: var(--gray-200);
}

.header-icon .badge {
    position: absolute;
    top: -2px;
    right: -2px;
    background: var(--danger);
    color: var(--white);
    font-size: var(--font-size-xs);
    min-width: 18px;
    height: 18px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ============================================
   PROFILE DROPDOWN MENU
   ============================================ */

.header-profile-menu {
    position: relative;
}

.profile-dropdown {
    /* TRIPLE SÉCURITÉ pour masquer le dropdown */
    display: none; /* Force le masquage par défaut */
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    width: 280px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
    overflow: hidden;
}

.profile-dropdown.active {
    display: block; /* Affiche quand actif */
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Flèche du dropdown */

.profile-dropdown::before {
    content: '';
    position: absolute;
    top: -6px;
    right: 16px;
    width: 12px;
    height: 12px;
    background: white;
    transform: rotate(45deg);
    box-shadow: -2px -2px 4px rgba(0, 0, 0, 0.05);
}

/* Header du dropdown avec avatar */

.profile-dropdown-header {
    padding: var(--space-md);
    background: var(--gradient-brand);
    color: white;
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.profile-dropdown-avatar {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--font-size-lg);
    font-weight: 700;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

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

.profile-dropdown-name {
    font-size: var(--font-size-sm);
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.profile-dropdown-email {
    font-size: var(--font-size-xs);
    opacity: 0.9;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 2px;
}

/* Navigation items */

.profile-dropdown-nav {
    padding: var(--space-xs) 0;
}

.profile-dropdown-item {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    color: var(--gray-800);
    text-decoration: none;
    font-size: var(--font-size-sm);
    font-weight: 500;
    transition: all 0.2s;
    cursor: pointer;
}

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

.profile-dropdown-item i {
    width: 18px;
    height: 18px;
    color: var(--gray-500);
}

.profile-dropdown-item:hover i {
    color: var(--brand-purple);
}

/* Logout avec style spécial */

.profile-dropdown-logout {
    color: #ef4444;
}

.profile-dropdown-logout:hover {
    background: #fef2f2;
    color: #dc2626;
}

.profile-dropdown-logout i {
    color: #ef4444;
}

.profile-dropdown-logout:hover i {
    color: #dc2626;
}

/* Divider */

.profile-dropdown-divider {
    height: 1px;
    background: var(--gray-200);
    margin: var(--space-xs) 0;
}

/* Responsive - Mobile très compact */

@media (max-width: 375px) {
    .profile-dropdown {
        width: 260px;
        right: -8px; /* Ajustement pour petits écrans */
    }
}

.header-avatar {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    object-fit: cover;
}

/* --- Navigation Bottom (Mobile) --- */

.nav-bottom {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: var(--white);
    border-top: 1px solid var(--gray-200);
    height: var(--bottom-nav-height);
    display: flex;
    align-items: center;
    justify-content: space-around;
    padding-bottom: env(safe-area-inset-bottom, 0);
    box-shadow: var(--shadow-lg);
}

.nav-bottom-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--space-xs) var(--space-sm);
    color: var(--gray-500);
    text-decoration: none;
    font-size: var(--font-size-xs);
    min-width: 60px;
    transition: color 0.2s;
}

.nav-bottom-item:hover,

.nav-bottom-item.active {
    color: var(--primary);
}

.nav-bottom-item.active {
    font-weight: 600;
}

.nav-bottom-icon {
    font-size: 1.5rem;
    margin-bottom: 2px;
}

.nav-bottom-label {
    white-space: nowrap;
}

/* --- Page Header --- */

.page-header {
    margin-bottom: var(--space-md);
}

.page-title {
    font-size: var(--font-size-2xl);
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: var(--space-xs);
}

.page-subtitle {
    font-size: var(--font-size-sm);
    color: var(--gray-500);
}

/* --- Sous-navigation (tabs) --- */

.sub-nav {
    display: flex;
    gap: var(--space-sm);
    overflow-x: auto;
    padding-bottom: var(--space-sm);
    margin-bottom: var(--space-md);
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.sub-nav::-webkit-scrollbar {
    display: none;
}

.sub-nav-item {
    flex-shrink: 0;
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-full);
    background: var(--gray-100);
    color: var(--gray-600);
    font-size: var(--font-size-sm);
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s;
}

.sub-nav-item:hover {
    background: var(--gray-200);
    color: var(--gray-700);
}

.sub-nav-item.active {
    background: var(--primary);
    color: var(--white);
}

/* --- Cards --- */

.card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: var(--space-md);
    margin-bottom: var(--space-md);
    box-shadow: var(--shadow-sm);
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-md);
}

.card-title {
    font-size: var(--font-size-lg);
    font-weight: 600;
}

/* --- Placeholder pour contenu vide --- */

.placeholder-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--space-lg);
    text-align: center;
    color: var(--gray-400);
    min-height: auto;  /* Retire la prise de l'espace complet */
}

.placeholder-icon {
    font-size: 3rem;
    margin-bottom: var(--space-md);
}

.placeholder-text {
    font-size: var(--font-size-sm);
}

/* --- Boutons --- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-md);
    font-size: var(--font-size-sm);
    font-weight: 500;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
}

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

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

.btn-secondary {
    background: var(--gray-100);
    color: var(--gray-700);
}

.btn-secondary:hover {
    background: var(--gray-200);
}

/* --- Menu Slide (pour sous-pages) --- */

.slide-menu {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2000;
    visibility: hidden;
    opacity: 0;
    transition: all 0.3s;
}

.slide-menu.active {
    visibility: visible;
    opacity: 1;
}

.slide-menu-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
}

.slide-menu-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--white);
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    padding: var(--space-lg);
    padding-bottom: calc(var(--space-lg) + env(safe-area-inset-bottom, 0));
    transform: translateY(100%);
    transition: transform 0.3s;
}

.slide-menu.active .slide-menu-content {
    transform: translateY(0);
}

.slide-menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-md);
}

.slide-menu-title {
    font-size: var(--font-size-lg);
    font-weight: 600;
}

.slide-menu-close {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-full);
    background: var(--gray-100);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slide-menu-list {
    list-style: none;
}

.slide-menu-link {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md);
    color: var(--gray-700);
    text-decoration: none;
    border-radius: var(--radius-md);
    transition: background 0.2s;
}

.slide-menu-link:hover,

.slide-menu-link.active {
    background: var(--gray-100);
}

.slide-menu-link.active {
    color: var(--primary);
    font-weight: 500;
}

/* ========================================
   RESPONSIVE - Tablette et Desktop
   ======================================== */

/* Base : contenu full-width avec petite marge fluide sur tous devices */

.main-content{
    width: 100%;
    max-width: none;
    margin: 0;
    padding-left: clamp(12px, 3vw, 24px);
    padding-right: clamp(12px, 3vw, 24px);
    box-sizing: border-box;
}

/* Tablette */

@media (min-width: 768px) {
    :root {
        --space-md: 1.25rem;
        --space-lg: 2rem;
    }
    /* On ne limite PAS la largeur (pas de max-width/margin auto) */
}

/* Desktop */

@media (min-width: 1024px) {
    body {
        padding-bottom: 0;
    }
    
    .app-container {
        flex-direction: row;
        width: 100%;
        max-width: none;
    }
    
    /* Sidebar gauche pour desktop */
    .nav-sidebar {
        position: fixed;
        left: 0;
        top: 0;
        bottom: 0;
        width: 260px;
        background: var(--white);
        border-right: 1px solid var(--gray-200);
        padding: var(--space-lg);
        display: flex;
        flex-direction: column;
    }
    
    /* Masquer nav bottom sur desktop */
    .nav-bottom {
        display: none;
    }
    
    .main-content {
        margin-left: 260px;
        max-width: none;

        /* Padding desktop : top/bottom généreux, côtés fluides (petite marge) */
        padding-top: var(--space-xl);
        padding-bottom: var(--space-xl);
        padding-left: clamp(12px, 2vw, 24px);
        padding-right: clamp(12px, 2vw, 24px);
    }
    
    .header-top {
        margin-left: 260px;
    }
}

/* Large Desktop : on ne recape pas la largeur */

@media (min-width: 1280px) {
    .main-content {
        max-width: none;
        margin-right: 0;
    }
}

/* ========================================
   PAGE AUTOUR DE MOI - GEO MATCHING
   ======================================== */

/* --- Système d'onglets --- */

.page-tabs {
    display: flex;
    gap: var(--space-xs);
    margin-bottom: var(--space-lg);
    border-bottom: 2px solid var(--gray-200);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.page-tabs::-webkit-scrollbar {
    display: none;
}

.page-tab {
    flex-shrink: 0;
    padding: var(--space-sm) var(--space-md);
    background: none;
    border: none;
    font-weight: 600;
    font-size: var(--font-size-sm);
    color: var(--gray-500);
    cursor: pointer;
    transition: all 0.3s;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    white-space: nowrap;
}

.page-tab:hover {
    color: var(--gray-700);
}

.page-tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
}

.stat-card {
    background: var(--white);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    text-align: center;
    box-shadow: var(--shadow-sm);
}

.stat-value {
    font-size: var(--font-size-2xl);
    font-weight: 700;
    color: var(--primary);
    margin-bottom: var(--space-xs);
}

.stat-label {
    font-size: var(--font-size-xs);
    color: var(--gray-600);
}

/* --- History List --- */

.history-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.history-item {
    background: var(--white);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    box-shadow: var(--shadow-sm);
}

.history-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-sm);
}

.history-date {
    font-size: var(--font-size-sm);
    font-weight: 600;
    color: var(--gray-700);
}

.history-duration {
    font-size: var(--font-size-xs);
    color: var(--gray-500);
}

.history-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-sm);
    font-size: var(--font-size-xs);
}

.history-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.history-stat-value {
    font-weight: 700;
    color: var(--primary);
}

.history-stat-label {
    color: var(--gray-600);
}

/* ========================================
   HOTSPOTS
   ======================================== */

.hotspots-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.hotspot-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    box-shadow: var(--shadow-md);
    transition: all 0.3s;
    border: 2px solid transparent;
}

.hotspot-card:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(var(--brand-purple-rgb), 0.15);
}

.hotspot-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: var(--space-md);
}

.hotspot-info {
    flex: 1;
}

.hotspot-name {
    font-size: var(--font-size-lg);
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: var(--space-xs);
}

.hotspot-badges {
    display: flex;
    gap: var(--space-xs);
    flex-wrap: wrap;
}

.badge {
    display: inline-block;
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--radius-full);
    font-size: var(--font-size-xs);
    font-weight: 600;
}

.badge-fire {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: var(--white);
}

.badge-new {
    background: var(--success);
    color: var(--white);
}

.badge-trending {
    background: var(--warning);
    color: var(--gray-900);
}

.badge-stable {
    background: var(--gray-200);
    color: var(--gray-700);
}

.badge-popular {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    color: var(--white);
}

.hotspot-subscribe {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    background: var(--gray-100);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    flex-shrink: 0;
}

.hotspot-subscribe:hover {
    background: var(--gray-200);
}

.hotspot-subscribe.active {
    background: var(--primary);
    color: var(--white);
}

.hotspot-stats {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-md);
    margin-bottom: var(--space-md);
}

.hotspot-stat {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    font-size: var(--font-size-sm);
    color: var(--gray-600);
}

.stat-icon {
    font-size: var(--font-size-base);
}

.hotspot-sectors {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-xs);
    margin-bottom: var(--space-md);
}

.sector-tag {
    padding: var(--space-xs) var(--space-sm);
    background: var(--gray-100);
    color: var(--gray-700);
    border-radius: var(--radius-md);
    font-size: var(--font-size-xs);
    font-weight: 500;
}

.hotspot-action-btn {
    width: 100%;
    padding: var(--space-md);
    background: var(--primary);
    color: var(--white);
    border: none;
    border-radius: var(--radius-md);
    font-size: var(--font-size-base);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.hotspot-action-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

/* ========================================
   ÉVÉNEMENTS
   ======================================== */

.events-filters {
    background: var(--white);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    margin-bottom: var(--space-lg);
    box-shadow: var(--shadow-sm);
}

.events-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.event-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    box-shadow: var(--shadow-md);
    transition: all 0.3s;
    border: 2px solid transparent;
    position: relative;
}

.event-card:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(var(--brand-purple-rgb), 0.15);
}

.event-flash {
    border: 2px solid var(--danger);
    background: linear-gradient(135deg, #fff5f5 0%, #ffffff 100%);
}

.event-flash-badge {
    position: absolute;
    top: -12px;
    right: var(--space-md);
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: var(--white);
    padding: var(--space-xs) var(--space-md);
    border-radius: var(--radius-full);
    font-size: var(--font-size-xs);
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    box-shadow: var(--shadow-md);
}

.event-badges {
    position: absolute;
    top: var(--space-md);
    right: var(--space-md);
    display: flex;
    gap: var(--space-xs);
}

.event-header {
    display: flex;
    gap: var(--space-md);
    margin-bottom: var(--space-md);
}

.event-date {
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    background: var(--primary);
    border-radius: var(--radius-md);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--white);
}

.event-day {
    font-size: var(--font-size-2xl);
    font-weight: 700;
    line-height: 1;
}

.event-month {
    font-size: var(--font-size-xs);
    font-weight: 600;
    text-transform: uppercase;
}

.event-info {
    flex: 1;
}

.event-title {
    font-size: var(--font-size-lg);
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: var(--space-xs);
}

.event-meta {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-md);
    font-size: var(--font-size-sm);
    color: var(--gray-600);
}

.event-meta span {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
}

.event-description {
    font-size: var(--font-size-sm);
    color: var(--gray-600);
    margin-bottom: var(--space-md);
    line-height: 1.6;
}

.event-stats {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-md);
    margin-bottom: var(--space-md);
}

.event-stat {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    font-size: var(--font-size-sm);
    color: var(--gray-600);
}

.event-sectors {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-xs);
    margin-bottom: var(--space-md);
}

.event-rsvp-btn {
    width: 100%;
    padding: var(--space-md);
    background: var(--primary);
    color: var(--white);
    border: none;
    border-radius: var(--radius-md);
    font-size: var(--font-size-base);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-xs);
}

.event-rsvp-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

.event-rsvp-btn.registered {
    background: var(--success);
}

.event-rsvp-flash {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
    }
    50% {
        box-shadow: 0 4px 24px rgba(239, 68, 68, 0.6);
    }
}

.empty-state {
    text-align: center;
    padding: var(--space-2xl);
    color: var(--gray-400);
}

@media (min-width: 768px) {
    .map-container {
        height: 500px;
    }
    
    .filters-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .duration-options {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .stats-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .alert-actions {
        flex-direction: row;
    }
    
    .hotspot-stats,
    .event-stats {
        gap: var(--space-lg);
    }
}

@media (min-width: 1024px) {
    .filters-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .hotspots-list,
    .events-list {
        display: grid;

/* ========================================
   PAGE OPPORTUNITÉS - SWIPE SYSTEM
   ======================================== */

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

    /* ============================================
       FILTRES ACTIFS
    ============================================ */

    .filter-bar {
        display: flex;
        gap: 8px;
        overflow-x: auto;
        padding: 15px 20px;
        margin: 0 -20px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .filter-bar::-webkit-scrollbar {
        display: none;
    }

    .filter-chip {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        padding: 8px 14px;
        background: white;
        border: 2px solid var(--primary-100);
        border-radius: 20px;
        font-size: 13px;
        font-weight: 600;
        color: var(--primary);
        white-space: nowrap;
        cursor: pointer;
        transition: all 0.2s;
    }

    .filter-chip:hover,

    .filter-chip.active {
        background: var(--primary);
        color: white;
        transform: translateY(-1px);
    }

    .filter-chip i {
        width: 16px;
        height: 16px;
    }

    .filter-count {
        background: rgba(255, 255, 255, 0.3);
        padding: 2px 6px;
        border-radius: 10px;
        font-size: 11px;
        font-weight: 700;
    }

    /* ============================================
       STATS RAPIDES
    ============================================ */

    .quick-stats {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
        gap: 12px;
        padding: 0 20px 20px;
    }

    .quick-stat {
        background: white;
        border-radius: 12px;
        padding: 15px;
        text-align: center;
        box-shadow: 0 2px 8px rgba(var(--brand-purple-rgb), 0.08);
    }

    .quick-stat-icon {
        font-size: 24px;
        margin-bottom: 8px;
    }

    .quick-stat-value {
        font-size: 24px;
        font-weight: 800;
        background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
        margin-bottom: 4px;
    }

    .quick-stat-label {
        font-size: 11px;
        color: #999;
        font-weight: 600;
        text-transform: uppercase;
    }

    /* ============================================
       SECTION COMMUNE
    ============================================ */

    .section {
        background: white;
        border-radius: 16px;
        padding: 20px;
        margin: 0 20px 20px;
        box-shadow: 0 2px 8px rgba(var(--brand-purple-rgb), 0.08);
    }

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

    .section-title {
        font-size: 18px;
        font-weight: 700;
        color: #1a1a1a;
        display: flex;
        align-items: center;
        gap: 8px;
    }

    .section-subtitle {
        font-size: 13px;
        color: #999;
        margin-top: 4px;
    }

    .section-action {
        display: flex;
        align-items: center;
        gap: 4px;
        padding: 6px 12px;
        background: #f8f9fa;
        border: 2px solid var(--primary-100);
        border-radius: 8px;
        font-size: 12px;
        font-weight: 600;
        color: var(--primary);
        cursor: pointer;
        transition: all 0.2s;
    }

    .section-action:hover {
        background: var(--primary-100);
    }

    .section-action i {
        width: 16px;
        height: 16px;
    }

    /* ============================================
       LISTE CANDIDATURES (MOBILE-FIRST)
    ============================================ */

    .application-list {
        display: flex;
        flex-direction: column;
        gap: 12px;
    }

    .application-card {
        background: #f8f9fa;
        border-radius: 12px;
        padding: 16px;
        border-left: 4px solid var(--primary);
        transition: all 0.2s;
    }

    .application-card:hover {
        transform: translateX(4px);
        box-shadow: 0 4px 12px rgba(var(--brand-purple-rgb), 0.15);
    }

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

    .application-info {
        flex: 1;
    }

    .application-company {
        font-size: 15px;
        font-weight: 700;
        color: #1a1a1a;
        margin-bottom: 4px;
    }

    .application-position {
        font-size: 13px;
        color: var(--primary);
        font-weight: 600;
        margin-bottom: 4px;
    }

    .application-location {
        font-size: 12px;
        color: #999;
        display: flex;
        align-items: center;
        gap: 4px;
    }

    .application-location i {
        width: 14px;
        height: 14px;
    }

    .application-status-badge {
        display: inline-flex;
        align-items: center;
        gap: 4px;
        padding: 6px 12px;
        border-radius: 20px;
        font-size: 11px;
        font-weight: 700;
        white-space: nowrap;
    }

    .status-liked { 
        background: #ffe0e0; 
        color: #d63447; 
    }

    .status-applied { 
        background: var(--primary-100); 
        color: var(--primary); 
    }

    .status-interview { 
        background: #d4edda; 
        color: #155724; 
    }

    .status-test { 
        background: #fff3cd; 
        color: #856404; 
    }

    .status-offer { 
        background: #d1ecf1; 
        color: #0c5460; 
    }

    .status-rejected { 
        background: #f8d7da; 
        color: #721c24; 
    }

    .application-meta {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        margin-bottom: 12px;
    }

    .meta-item {
        display: flex;
        align-items: center;
        gap: 4px;
        font-size: 12px;
        color: #666;
    }

    .meta-item i {
        width: 14px;
        height: 14px;
        color: #999;
    }

    .application-activity {
        background: white;
        padding: 10px;
        border-radius: 8px;
        margin-bottom: 12px;
    }

    .activity-text {
        font-size: 12px;
        color: #333;
        margin-bottom: 4px;
    }

    .activity-time {
        font-size: 11px;
        color: #999;
    }

    .application-actions {
        display: flex;
        gap: 8px;
    }

    .action-btn {
        flex: 1;
        padding: 10px;
        border: none;
        border-radius: 8px;
        font-size: 13px;
        font-weight: 600;
        cursor: pointer;
        transition: all 0.2s;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 4px;
    }

    .action-btn-primary {
        background: linear-gradient(135deg, var(--primary), var(--secondary));
        color: white;
    }

    .action-btn-primary:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(var(--brand-purple-rgb), 0.3);
    }

    .action-btn-secondary {
        background: white;
        color: var(--primary);
        border: 2px solid var(--primary-100);
    }

    .action-btn-secondary:hover {
        background: var(--primary-100);
    }

    .action-btn i {
        width: 16px;
        height: 16px;
    }

    .action-menu-btn {
        padding: 8px;
        background: white;
        border: 2px solid var(--primary-100);
        border-radius: 8px;
        cursor: pointer;
        transition: all 0.2s;
    }

    .action-menu-btn:hover {
        background: var(--primary-100);
    }

    .action-menu-btn i {
        width: 20px;
        height: 20px;
        color: var(--primary);
    }

    /* ============================================
       FUNNEL SANKEY
    ============================================ */

    .funnel-container {
        background: white;
        border-radius: 12px;
        padding: 15px;
        min-height: 300px;
    }

    /* ============================================
       AXES D'AMÉLIORATION
    ============================================ */

    .improvement-grid {
        display: grid;
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .improvement-card {
        background: #f8f9fa;
        border-radius: 12px;
        padding: 16px;
        border-left: 4px solid var(--primary);
    }

    .improvement-header {
        display: flex;
        align-items: center;
        gap: 12px;
        margin-bottom: 12px;
    }

    .improvement-icon {
        font-size: 32px;
    }

    .improvement-title {
        font-size: 15px;
        font-weight: 700;
        color: #1a1a1a;
    }

    .improvement-description {
        font-size: 13px;
        color: #666;
        line-height: 1.5;
        margin-bottom: 12px;
    }

    .improvement-progress {
        background: #e0e0e0;
        height: 6px;
        border-radius: 10px;
        overflow: hidden;
        margin-bottom: 6px;
    }

    .improvement-progress-bar {
        height: 100%;
        background: linear-gradient(135deg, var(--primary), var(--secondary));
        border-radius: 10px;
        transition: width 0.5s ease;
    }

    .improvement-footer {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .improvement-progress-label {
        font-size: 11px;
        color: #999;
        font-weight: 600;
    }

    .improvement-action {
        padding: 6px 12px;
        background: linear-gradient(135deg, var(--primary), var(--secondary));
        color: white;
        border: none;
        border-radius: 6px;
        font-size: 12px;
        font-weight: 600;
        cursor: pointer;
        transition: all 0.2s;
    }

    .improvement-action:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(var(--brand-purple-rgb), 0.3);
    }

    /* ============================================
       EMPTY STATE
    ============================================ */

    .empty-state {
        text-align: center;
        padding: 40px 20px;
    }

    .empty-icon {
        font-size: 64px;
        margin-bottom: 16px;
        opacity: 0.5;
    }

    .empty-title {
        font-size: 18px;
        font-weight: 700;
        color: #333;
        margin-bottom: 8px;
    }

    .empty-text {
        font-size: 14px;
        color: #999;
    }

    /* ============================================
       RESPONSIVE TABLET & DESKTOP
    ============================================ */

    @media (min-width: 768px) {
        .quick-stats {
            grid-template-columns: repeat(4, 1fr);
        }
        
        .improvement-grid {
            grid-template-columns: repeat(2, 1fr);
        }
        
        .application-list {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
        }
    }

    @media (min-width: 1024px) {
        .improvement-grid {
            grid-template-columns: repeat(3, 1fr);
        }
    }

/* ============================================
   PAGE OFFRES FLASH - 0.1-OffresFlash.php
   ============================================ */

/* Page Header avec retour/fermeture */

.page-header-flash {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    background: white;
    border-bottom: 1px solid #f0f0f0;
    position: sticky;
    top: 60px;
    z-index: 100;
}

.btn-back {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: transparent;
    border: none;
    color: var(--primary);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border-radius: 8px;
}

.btn-back:hover {
    background: #f8f9fa;
}

.btn-back i {
    width: 18px;
    height: 18px;
}

.btn-close-flash {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: #f8f9fa;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-close-flash:hover {
    background: var(--primary-100);
    transform: rotate(90deg);
}

.btn-close-flash i {
    width: 20px;
    height: 20px;
    color: var(--primary);
}

/* Stats Cards - Version compressée */

.stats-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    padding: 12px 20px;
}

.stat-card-flash {
    background: white;
    border-radius: 10px;
    padding: 12px;
    text-align: center;
    box-shadow: 0 2px 6px rgba(var(--brand-purple-rgb), 0.06);
}

.stat-icon-flash {
    font-size: 24px;
    margin-bottom: 6px;
}

.stat-value-flash {
    font-size: 24px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 2px;
}

.stat-label-flash {
    font-size: 11px;
    color: #999;
    font-weight: 600;
}

/* Section Title compacte */

.section-title-flash {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
}

.section-title-flash h2 {
    font-size: 18px;
    font-weight: 700;
    color: #1a1a1a;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 2px;
}

.section-title-flash h2 i {
    width: 20px;
    height: 20px;
}

.section-title-flash p {
    font-size: 12px;
    color: #999;
    margin: 0;
}

/* Filtres - Version compressée */

.filters-flash {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 0 20px 12px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.filters-flash::-webkit-scrollbar {
    display: none;
}

.filter-button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: white;
    border: 2px solid var(--primary-100);
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    color: var(--primary);
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.2s;
}

.filter-button:hover,

.filter-button.active {
    background: var(--primary);
    color: white;
    transform: translateY(-1px);
}

.filter-button i {
    width: 14px;
    height: 14px;
}

/* Container des offres - Version compressée */

.offers-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 0 20px 20px;
}

/* Carte d'offre - Version compressée */

.offer-card {
    background: white;
    border-radius: 12px;
    padding: 14px;
    box-shadow: 0 2px 6px rgba(var(--brand-purple-rgb), 0.06);
    transition: all 0.3s;
    position: relative;
    border-left: 3px solid transparent;
}

.offer-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(var(--brand-purple-rgb), 0.12);
}

.offer-card.nouveau {
    border-left-color: #22c55e;
}

.offer-card.nouveau::before {
    content: '✨ NOUVEAU';
    position: absolute;
    top: 10px;
    right: 10px;
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: white;
    padding: 3px 8px;
    border-radius: 10px;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

/* Header de l'offre - Version compressée */

.offer-header {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.offer-logo {
    width: 48px;
    height: 48px;
    background: #f8f9fa;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
}

.offer-info {
    flex: 1;
}

.offer-title {
    font-size: 15px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 3px;
}

.offer-company {
    font-size: 13px;
    color: var(--primary);
    font-weight: 600;
    margin-bottom: 5px;
}

.offer-type {
    display: inline-block;
    padding: 3px 8px;
    background: var(--primary-100);
    color: var(--primary);
    border-radius: 10px;
    font-size: 10px;
    font-weight: 700;
}

/* Description - Version compressée */

.offer-description {
    font-size: 13px;
    color: #666;
    line-height: 1.4;
    margin-bottom: 10px;
}

/* Détails de l'offre - Version compressée */

.offer-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 10px;
}

.detail-item {
    background: #f8f9fa;
    padding: 8px;
    border-radius: 6px;
}

.detail-label {
    font-size: 10px;
    color: #999;
    margin-bottom: 2px;
    font-weight: 600;
}

.detail-value {
    font-size: 12px;
    color: #333;
    font-weight: 600;
}

.detail-value.salary {
    color: #22c55e;
    font-weight: 700;
}

.detail-value.distance {
    color: var(--primary);
}

/* Compétences - Version compressée */

.offer-competences {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-bottom: 10px;
}

.competence-tag {
    padding: 4px 10px;
    background: #f8f9fa;
    border: 1px solid var(--primary-100);
    border-radius: 10px;
    font-size: 11px;
    color: var(--primary);
    font-weight: 600;
}

/* Footer de l'offre - Version compressée */

.offer-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 10px;
    border-top: 1px solid #f0f0f0;
}

.expire-time {
    font-size: 11px;
    color: #999;
    font-weight: 600;
}

.expire-time.urgent {
    color: #ef4444;
    font-weight: 700;
    animation: pulseOpacity 2s infinite;
}

@keyframes pulseOpacity {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

.offer-actions {
    display: flex;
    gap: 6px;
}

.action-btn {
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}

.action-btn:not(.primary) {
    background: #f8f9fa;
    color: var(--primary);
    border: 2px solid var(--primary-100);
}

.action-btn:not(.primary):hover {
    background: var(--primary-100);
}

.action-btn.primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
}

.action-btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(var(--brand-purple-rgb), 0.3);
}

/* Empty State */

.empty-state-flash {
    text-align: center;
    padding: 40px 20px;
}

.empty-state-flash.hidden {
    display: none;
}

.empty-icon-flash {
    font-size: 60px;
    margin-bottom: 16px;
    opacity: 0.3;
}

.empty-title-flash {
    font-size: 18px;
    font-weight: 700;
    color: #333;
    margin-bottom: 8px;
}

.empty-text-flash {
    font-size: 13px;
    color: #999;
}

/* Bouton refresh - Version compacte */

.refresh-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: white;
    border: 2px solid var(--primary-100);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s;
    padding: 0;
}

.refresh-btn:hover {
    background: var(--primary-100);
}

.refresh-btn i {
    width: 18px;
    height: 18px;
    color: var(--primary);
}

/* Responsive */

@media (min-width: 768px) {
    .offers-container {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
    
    .offer-details {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .btn-back span {
        display: inline;
    }
}

@media (min-width: 1024px) {
    .offers-container {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Masquer le texte "Retour" sur mobile */

@media (max-width: 767px) {
    .btn-back span {
        display: none;
    }
}

/* ============================================
   PAGE MESSAGERIE - 0.2-Messagerie.php
   ============================================ */

/* Page Header */

.page-header-messages {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    background: white;
    border-bottom: 1px solid #f0f0f0;
    position: sticky;
    top: 60px;
    z-index: 100;
}

.header-actions-messages {
    display: flex;
    gap: 8px;
}

.btn-icon-msg {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: #f8f9fa;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-icon-msg:hover {
    background: var(--primary-100);
}

.btn-icon-msg i {
    width: 18px;
    height: 18px;
    color: var(--primary);
}

/* Search Bar */

.search-bar-messages {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: white;
    border-bottom: 1px solid #f0f0f0;
}

.search-input-msg {
    flex: 1;
    padding: 10px 14px;
    border: 2px solid var(--primary-100);
    border-radius: 20px;
    font-size: 14px;
    outline: none;
    transition: all 0.2s;
}

.search-input-msg:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(var(--brand-purple-rgb), 0.1);
}

.btn-clear-search {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    border: none;
    border-radius: 50%;
    cursor: pointer;
}

.btn-clear-search i {
    width: 16px;
    height: 16px;
    color: #999;
}

/* Stats Messages */

.stats-messages {
    display: flex;
    justify-content: space-around;
    padding: 12px 20px;
    background: white;
    border-bottom: 1px solid #f0f0f0;
}

.stat-msg {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.stat-msg i {
    width: 20px;
    height: 20px;
    color: var(--primary);
}

.stat-msg span {
    font-size: 20px;
    font-weight: 700;
    color: #1a1a1a;
}

.stat-msg small {
    font-size: 11px;
    color: #999;
    font-weight: 600;
}

.stat-msg.unread i {
    color: #ef4444;
}

.stat-msg.unread span {
    color: #ef4444;
}

/* Filtres Messages */

.filters-messages {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 12px 20px;
    border-bottom: 1px solid #f0f0f0;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.filters-messages::-webkit-scrollbar {
    display: none;
}

.filter-msg {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: white;
    border: 2px solid var(--primary-100);
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    color: var(--primary);
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.2s;
}

.filter-msg:hover,

.filter-msg.active {
    background: var(--primary);
    color: white;
}

.filter-msg i {
    width: 14px;
    height: 14px;
}

/* Messages Container */

.messages-container {
    padding: 0 20px 20px;
}

/* Message Item */

.message-item {
    display: flex;
    gap: 12px;
    padding: 14px;
    background: white;
    border-radius: 12px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.2s;
    border-left: 3px solid transparent;
}

.message-item:hover {
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(var(--brand-purple-rgb), 0.12);
}

.message-item.unread {
    background: #f8f9ff;
    border-left-color: var(--primary);
}

.message-item.important {
    border-left-color: #fbbf24;
}

.message-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 700;
    flex-shrink: 0;
}

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

.message-header-item {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 4px;
}

.message-from {
    font-size: 14px;
    font-weight: 700;
    color: #1a1a1a;
}

.message-date {
    font-size: 11px;
    color: #999;
    font-weight: 600;
    white-space: nowrap;
}

.message-company {
    font-size: 12px;
    color: var(--primary);
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.message-subject {
    font-size: 13px;
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.message-preview {
    font-size: 12px;
    color: #666;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    margin-bottom: 6px;
}

.message-badges {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.badge-status {
    display: inline-flex;
    align-items: center;
    padding: 3px 8px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 700;
}

.badge-status.interview {
    background: #dbeafe;
    color: #1e40af;
}

.badge-status.offer {
    background: #dcfce7;
    color: #166534;
}

.badge-status.rejected {
    background: #fee2e2;
    color: #991b1b;
}

.badge-status.questions {
    background: #fef3c7;
    color: #92400e;
}

.badge-status.test {
    background: var(--primary-100);
    color: #3730a3;
}

.badge-status.pending {
    background: #f3f4f6;
    color: #6b7280;
}

.badge-status.opportunity {
    background: #fce7f3;
    color: #9f1239;
}

.badge-attachment,

.badge-important {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
}

.badge-attachment i {
    width: 12px;
    height: 12px;
    color: #999;
}

.badge-important i {
    width: 12px;
    height: 12px;
    color: #fbbf24;
}

/* Message Detail Modal */

.message-detail-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9998;
}

.message-detail-overlay.active {
    display: block;
}

.message-detail-modal {
    display: none;
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    max-width: 600px;
    background: white;
    z-index: 9999;
    overflow-y: auto;
    animation: slideInRight 0.3s;
}

.message-detail-modal.active {
    display: flex;
    flex-direction: column;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
    }
    to {
        transform: translateX(0);
    }
}

.message-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #f0f0f0;
    background: white;
    position: sticky;
    top: 0;
    z-index: 10;
}

.btn-back-detail {
    display: flex;
    align-items: center;
    padding: 8px;
    background: transparent;
    border: none;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.2s;
}

.btn-back-detail:hover {
    background: #f8f9fa;
}

.btn-back-detail i {
    width: 24px;
    height: 24px;
    color: var(--primary);
}

.message-detail-actions {
    display: flex;
    gap: 8px;
}

.btn-icon-detail {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: #f8f9fa;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-icon-detail:hover {
    background: var(--primary-100);
}

.btn-icon-detail i {
    width: 18px;
    height: 18px;
    color: var(--primary);
}

.message-detail-content {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
}

.detail-sender {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #f0f0f0;
}

.detail-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 700;
    flex-shrink: 0;
}

.detail-sender-info {
    flex: 1;
}

.detail-from {
    font-size: 16px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 4px;
}

.detail-company {
    font-size: 13px;
    color: var(--primary);
    font-weight: 600;
    margin-bottom: 4px;
}

.detail-date {
    font-size: 12px;
    color: #999;
}

.detail-subject {
    font-size: 18px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 12px;
}

.detail-status {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 20px;
}

.detail-status.interview {
    background: #dbeafe;
    color: #1e40af;
}

.detail-status.offer {
    background: #dcfce7;
    color: #166534;
}

.detail-status.rejected {
    background: #fee2e2;
    color: #991b1b;
}

.detail-status.questions {
    background: #fef3c7;
    color: #92400e;
}

.detail-status.test {
    background: var(--primary-100);
    color: #3730a3;
}

.detail-status.pending {
    background: #f3f4f6;
    color: #6b7280;
}

.detail-status.opportunity {
    background: #fce7f3;
    color: #9f1239;
}

.detail-body {
    font-size: 14px;
    color: #333;
    line-height: 1.7;
    white-space: pre-wrap;
}

.detail-attachments {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #f0f0f0;
}

.attachment-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 8px;
}

.attachment-item i {
    width: 20px;
    height: 20px;
    color: var(--primary);
}

.attachment-item span {
    flex: 1;
    font-size: 13px;
    font-weight: 600;
    color: #333;
}

.btn-download {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border: 2px solid var(--primary-100);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-download:hover {
    background: var(--primary-100);
}

.btn-download i {
    width: 16px;
    height: 16px;
    color: var(--primary);
}

/* Reply Section */

.message-reply-section {
    padding: 16px 20px;
    border-top: 1px solid #f0f0f0;
    background: white;
}

.reply-textarea {
    width: 100%;
    min-height: 100px;
    padding: 12px;
    border: 2px solid var(--primary-100);
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
    margin-bottom: 12px;
    transition: all 0.2s;
}

.reply-textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(var(--brand-purple-rgb), 0.1);
}

.reply-actions {
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

.btn-reply-action {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    background: #f8f9fa;
    border: 2px solid var(--primary-100);
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--primary);
    cursor: pointer;
    transition: all 0.2s;
}

.btn-reply-action:hover {
    background: var(--primary-100);
}

.btn-reply-action i {
    width: 16px;
    height: 16px;
}

.btn-reply-primary {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-reply-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(var(--brand-purple-rgb), 0.3);
}

.btn-reply-primary i {
    width: 16px;
    height: 16px;
}

@media (min-width: 768px) {
    .message-detail-modal {
        max-width: 500px;
    }
}

@media (max-width: 767px) {
    .message-detail-modal {
        max-width: 100%;
    }
    
    .btn-back span {
        display: none;
    }
    
    .filter-msg span {
        display: none;
    }
    
    .stat-msg small {
        display: none;
    }
}

/* ============================================
   PAGE AUTO APPLY - 2.1.3-AutoApply.php
   ============================================ */

/* Hero Section */

.autoapply-hero {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    padding: 24px 20px;
    margin: 0 20px 20px;
    border-radius: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 20px rgba(var(--brand-purple-rgb), 0.25);
    position: relative;
    overflow: hidden;
}

.autoapply-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 300px;
    height: 300px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
}

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

.autoapply-hero h1 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 6px;
}

.autoapply-hero p {
    font-size: 13px;
    opacity: 0.95;
    margin-bottom: 8px;
}

.hero-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    backdrop-filter: blur(10px);
}

.hero-toggle {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    position: relative;
    z-index: 1;
}

.toggle-status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: #22c55e;
}

.status-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #6b7280;
    animation: pulse-indicator 2s infinite;
}

.status-indicator.active {
    background: #22c55e;
}

@keyframes pulse-indicator {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Switch Hero */

.switch-hero {
    position: relative;
    display: inline-block;
    width: 56px;
    height: 32px;
}

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

.slider-hero {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.3);
    transition: 0.3s;
    border-radius: 32px;
}

.slider-hero:before {
    position: absolute;
    content: "";
    height: 24px;
    width: 24px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

.switch-hero input:checked + .slider-hero {
    background-color: rgba(34, 197, 94, 0.3);
}

.switch-hero input:checked + .slider-hero:before {
    transform: translateX(24px);
}

/* Quick Stats Auto */

.autoapply-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    padding: 0 20px 20px;
}

.stat-card-auto {
    background: white;
    border-radius: 12px;
    padding: 16px;
    text-align: center;
    box-shadow: 0 2px 6px rgba(var(--brand-purple-rgb), 0.06);
}

.stat-card-auto i {
    width: 24px;
    height: 24px;
    color: var(--primary);
    margin-bottom: 8px;
}

.stat-value-auto {
    font-size: 24px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 4px;
}

.stat-label-auto {
    font-size: 11px;
    color: #999;
    font-weight: 600;
}

/* Tabs */

.tabs-autoapply {
    display: flex;
    overflow-x: auto;
    gap: 8px;
    padding: 0 20px 16px;
    border-bottom: 2px solid #f0f0f0;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.tabs-autoapply::-webkit-scrollbar {
    display: none;
}

.tab-auto {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    color: #999;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.tab-auto:hover,

.tab-auto.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.tab-auto i {
    width: 16px;
    height: 16px;
}

/* Tab Content */

.tab-content-auto {
    display: none;
    padding: 20px;
}

.tab-content-auto.active {
    display: block;
}

/* Card Auto */

.card-auto {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: 0 2px 6px rgba(var(--brand-purple-rgb), 0.06);
}

.card-header-auto {
    margin-bottom: 20px;
}

.card-header-auto h3 {
    font-size: 16px;
    font-weight: 700;
    color: #1a1a1a;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.card-header-auto h3 i {
    width: 20px;
    height: 20px;
    color: var(--primary);
}

.card-header-auto p {
    font-size: 12px;
    color: #999;
    margin: 0;
}

.card-header-auto {
    display: flex;
    justify-content: space-between;
    align-items: start;
}

/* Form Elements */

.form-section-auto {
    margin-bottom: 20px;
}

.label-auto {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.help-text {
    display: block;
    font-size: 11px;
    color: #999;
    margin-top: 6px;
}

.slider-container {
    margin-bottom: 8px;
}

.range-auto {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: var(--primary-100);
    outline: none;
    -webkit-appearance: none;
}

.range-auto::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(var(--brand-purple-rgb), 0.3);
}

.range-auto::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(var(--brand-purple-rgb), 0.3);
    border: none;
}

.slider-values {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: #999;
    margin-top: 6px;
}

.slider-values .current-value {
    color: var(--primary);
    font-weight: 700;
}

.form-grid-auto {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

.form-group-auto {
    display: flex;
    flex-direction: column;
}

.input-auto,

.select-auto {
    padding: 10px 12px;
    border: 2px solid var(--primary-100);
    border-radius: 8px;
    font-size: 13px;
    background: white;
    transition: all 0.2s;
}

.input-auto:focus,

.select-auto:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(var(--brand-purple-rgb), 0.1);
}

.input-with-suffix {
    position: relative;
}

.input-with-suffix input {
    padding-right: 40px;
}

.suffix {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 13px;
    font-weight: 600;
    color: #999;
}

.select-small {
    padding: 6px 10px;
    font-size: 12px;
}

/* Preferences Grid */

.preferences-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.preference-item {
    background: #f8f9fa;
    padding: 14px;
    border-radius: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.pref-info {
    flex: 1;
}

.pref-label {
    font-size: 13px;
    font-weight: 600;
    color: #333;
    margin-bottom: 2px;
}

.pref-sublabel {
    font-size: 11px;
    color: #999;
}

.importance-selector {
    display: flex;
    gap: 4px;
}

.imp-btn {
    padding: 6px 12px;
    border: 2px solid var(--primary-100);
    background: white;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 600;
    color: var(--primary);
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.imp-btn:hover,

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

/* Chips */

.chips-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.chip-auto {
    padding: 8px 14px;
    border: 2px solid var(--primary-100);
    background: white;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    color: var(--primary);
    cursor: pointer;
    transition: all 0.2s;
}

.chip-auto:hover,

.chip-auto.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* AI Settings */

.ai-settings {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.setting-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px;
    background: #f8f9fa;
    border-radius: 10px;
}

.setting-info {
    flex: 1;
}

.setting-label {
    font-size: 13px;
    font-weight: 600;
    color: #333;
    margin-bottom: 2px;
}

.setting-sublabel {
    font-size: 11px;
    color: #999;
}

/* Switch Small */

.switch-small {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

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

.slider-small {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #e0e0e0;
    transition: 0.3s;
    border-radius: 24px;
}

.slider-small:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

.switch-small input:checked + .slider-small {
    background-color: var(--primary);
}

.switch-small input:checked + .slider-small:before {
    transform: translateX(20px);
}

/* Actions Bar */

.actions-bar {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 20px;
}

.btn-auto {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}

.btn-auto i {
    width: 16px;
    height: 16px;
}

.btn-primary-auto {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
}

.btn-primary-auto:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(var(--brand-purple-rgb), 0.3);
}

.btn-secondary-auto {
    background: #f8f9fa;
    color: var(--primary);
    border: 2px solid var(--primary-100);
}

.btn-secondary-auto:hover {
    background: var(--primary-100);
}

.btn-small-auto {
    padding: 6px 12px;
    font-size: 12px;
}

/* Timeline */

.timeline-auto {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.timeline-item {
    display: flex;
    gap: 12px;
}

.timeline-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-top: 4px;
    flex-shrink: 0;
}

.timeline-dot.new {
    background: var(--primary);
}

.timeline-dot.success {
    background: #22c55e;
}

.timeline-dot.warning {
    background: #ef4444;
}

.timeline-content {
    flex: 1;
}

.timeline-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 4px;
}

.timeline-title {
    font-size: 13px;
    font-weight: 600;
    color: #333;
}

.timeline-time {
    font-size: 11px;
    color: #999;
}

.timeline-body {
    font-size: 12px;
    color: #666;
}

.timeline-body strong {
    color: #333;
}

.timeline-meta {
    display: flex;
    gap: 10px;
    margin-top: 4px;
    font-size: 11px;
    color: #999;
}

.timeline-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
    margin-top: 6px;
}

.timeline-badge.success {
    background: #dcfce7;
    color: #166534;
}

.timeline-badge.rejected {
    background: #fee2e2;
    color: #991b1b;
}

/* Actions List */

.actions-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.action-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 10px;
}

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

.action-icon.interview {
    background: #dbeafe;
}

.action-icon.test {
    background: var(--primary-100);
}

.action-icon.reminder {
    background: #fef3c7;
}

.action-content {
    flex: 1;
}

.action-title {
    font-size: 13px;
    font-weight: 600;
    color: #333;
    margin-bottom: 2px;
}

.action-date {
    font-size: 11px;
    color: #999;
}

/* Applications List */

.applications-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.application-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 14px;
    background: #f8f9fa;
    border-radius: 10px;
}

.app-main {
    flex: 1;
}

.app-company-name {
    font-size: 14px;
    font-weight: 700;
    color: #333;
    margin-bottom: 2px;
}

.app-position-name {
    font-size: 12px;
    color: var(--primary);
    font-weight: 600;
    margin-bottom: 6px;
}

.app-meta-info {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 4px;
}

.meta-badge {
    padding: 3px 8px;
    background: white;
    border-radius: 8px;
    font-size: 10px;
    color: #666;
    font-weight: 600;
}

.app-date {
    font-size: 11px;
    color: #999;
}

.status-badge-app {
    padding: 6px 12px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}

.status-badge-app.pending {
    background: var(--primary-100);
    color: var(--primary);
}

.status-badge-app.interview {
    background: #dcfce7;
    color: #166534;
}

.status-badge-app.offer {
    background: #d1ecf1;
    color: #0c5460;
}

.status-badge-app.rejected {
    background: #fee2e2;
    color: #991b1b;
}

/* Stats Grid Large */

.stats-grid-large {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 16px;
}

.stat-card-large {
    background: white;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 2px 6px rgba(var(--brand-purple-rgb), 0.06);
}

.stat-icon-large {
    font-size: 32px;
    margin-bottom: 10px;
}

.stat-value-large {
    font-size: 32px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 6px;
}

.stat-label-large {
    font-size: 12px;
    color: #666;
    font-weight: 600;
    margin-bottom: 4px;
}

.stat-trend {
    font-size: 11px;
    font-weight: 600;
}

.stat-trend.positive {
    color: #22c55e;
}

.stat-trend.neutral {
    color: #999;
}

/* Response Breakdown */

.response-breakdown {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.breakdown-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.breakdown-bar {
    height: 8px;
    background: var(--color);
    border-radius: 4px;
    width: var(--percentage);
    transition: width 0.5s ease;
}

.breakdown-label {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
}

.breakdown-label span {
    color: #666;
}

.breakdown-label strong {
    color: #333;
}

/* Time Stats */

.time-stats {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.time-stat-item {
    display: flex;
    justify-content: space-between;
    padding: 14px;
    background: #f8f9fa;
    border-radius: 10px;
}

.time-stat-label {
    font-size: 13px;
    color: #666;
}

.time-stat-value {
    font-size: 13px;
    font-weight: 700;
    color: var(--primary);
}

/* Filters Inline */

.filters-inline {
    display: flex;
    gap: 8px;
}

@media (min-width: 768px) {
    .autoapply-stats {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .form-grid-auto {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .stats-grid-large {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* ============================================
   FORMULAIRES - Styles génériques (utilisés par plusieurs pages)
   ============================================ */
.form-group {
    margin-bottom: 16px;
}

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #333;
    margin-bottom: 6px;
}

.form-input,
.form-select {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--primary-100);
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.2s;
}

.form-input:focus,
.form-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(var(--brand-purple-rgb), 0.1);
}

.form-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

.btn-submit {
    flex: 1;
    padding: 14px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(var(--brand-purple-rgb), 0.3);
}

.btn-cancel {
    padding: 14px 24px;
    background: #f8f9fa;
    color: var(--primary);
    border: 2px solid var(--primary-100);
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-cancel:hover {
    background: var(--primary-100);
}

/* ============================================
   MODAL SYSTEM - Global Styles
   À ajouter dans style.css après les autres styles
   ============================================ */

/* ==================== COMPATIBILITÉ (anciens modals) ==================== */
/* Certains écrans utilisaient .modal + .modal.show. On les mappe sur le nouveau système (.modal-overlay + .show). */
.modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
}

.modal.show {
    display: flex;
}

/* Si l'ancien HTML contient un overlay interne, on le rend neutre (le nouvel overlay est .modal-overlay) */
.modal .modal-overlay {
    position: absolute;
    inset: 0;
    background: transparent;
    backdrop-filter: none;
}

/* ==================== MODAL OVERLAY & STRUCTURE ==================== */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(4px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    padding: 0;
    overflow-y: auto;
}

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

/* Modal Content */

.modal-content {
    background: var(--gray-50);
    border-radius: var(--radius-xl);
    max-width: 900px;
    width: 100%;
    max-height: 95vh;
    margin: auto;
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
    transform: translateY(30px);
    transition: transform 0.3s ease;
    position: relative;
}

.modal-overlay.show .modal-content {
    transform: translateY(0);
}

/* Modal Header */

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

.modal-title {
    font-size: 20px;
    font-weight: 700;
    color: #1a1a1a;
}

.modal-close {
    padding: 8px;
    background: #f8f9fa;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.modal-close:hover {
    background: #e0e7ff;
    transform: rotate(90deg);
}

.modal-close i {
    width: 20px;
    height: 20px;
}

/* Modal Body */

.modal-body {
    padding: var(--space-xl);
    overflow-y: auto;
    flex: 1;
}

/* Custom scrollbar */

.modal-body::-webkit-scrollbar {
    width: 8px;
}

.modal-body::-webkit-scrollbar-track {
    background: var(--gray-100);
    border-radius: var(--radius-full);
}

.modal-body::-webkit-scrollbar-thumb {
    background: var(--brand-purple);
    border-radius: var(--radius-full);
}

.modal-body::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

/* ==================== STATS CARDS (Commun aux 3 modales) ==================== */

.stats-cards-modal {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-sm);
    margin-bottom: var(--space-lg);
}

.stat-card-modal {
    background: white;
    padding: var(--space-md);
    border-radius: var(--radius-md);
    text-align: center;
    box-shadow: var(--shadow-sm);
}

.stat-icon-modal {
    font-size: 24px;
    margin-bottom: var(--space-xs);
}

.stat-value-modal {
    font-size: var(--font-size-xl);
    font-weight: 700;
    color: var(--brand-purple);
    margin-bottom: 4px;
}

.stat-label-modal {
    font-size: var(--font-size-xs);
    color: var(--gray-500);
    font-weight: 600;
}

/* ==================== FILTERS (Commun aux 3 modales) ==================== */

.filters-modal {
    display: flex;
    gap: var(--space-xs);
    margin-bottom: var(--space-lg);
    overflow-x: auto;
    scrollbar-width: none;
}

.filters-modal::-webkit-scrollbar {
    display: none;
}

.filter-btn-modal {
    flex-shrink: 0;
    padding: var(--space-xs) var(--space-sm);
    background: white;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-md);
    font-size: var(--font-size-xs);
    font-weight: 600;
    color: var(--gray-600);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    transition: all 0.2s;
}

.filter-btn-modal:hover {
    background: var(--gray-50);
    border-color: var(--brand-purple);
}

.filter-btn-modal.active {
    background: var(--brand-purple);
    color: white;
    border-color: var(--brand-purple);
}

.filter-btn-modal i {
    width: 14px;
    height: 14px;
}

.filter-badge-modal {
    padding: 2px 6px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: var(--radius-full);
    font-size: 10px;
    min-width: 18px;
    text-align: center;
}

/* ==================== SEARCH BAR (Messagerie) ==================== */

.search-bar-modal {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    background: white;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-md);
    transition: all 0.2s;
}

.search-bar-modal:focus-within {
    border-color: var(--brand-purple);
    box-shadow: 0 0 0 3px rgba(59, 51, 135, 0.1);
}

.search-bar-modal i {
    width: 18px;
    height: 18px;
    color: var(--gray-400);
}

.search-bar-modal input {
    flex: 1;
    border: none;
    outline: none;
    font-size: var(--font-size-sm);
    color: var(--gray-900);
}

.search-bar-modal input::placeholder {
    color: var(--gray-400);
}

/* ==================== EMPTY STATE (Commun) ==================== */

.empty-state-modal {
    text-align: center;
    padding: var(--space-2xl) var(--space-md);
}

.empty-icon-modal {
    font-size: 80px;
    margin-bottom: var(--space-lg);
    opacity: 0.5;
}

.empty-title-modal {
    font-size: var(--font-size-xl);
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: var(--space-sm);
}

.empty-text-modal {
    font-size: var(--font-size-sm);
    color: var(--gray-500);
}

/* ==================== OFFERS CARDS (Offres Flash) ==================== */

.offers-container-modal {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.offer-card-modal {
    background: white;
    padding: var(--space-md);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s;
}

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

.offer-card-modal.nouveau {
    border-left: 4px solid #fbbf24;
}

.offer-header-modal {
    display: flex;
    gap: var(--space-md);
    margin-bottom: var(--space-md);
}

.offer-logo-modal {
    width: 48px;
    height: 48px;
    background: var(--gray-100);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
}

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

.offer-title-modal {
    font-size: var(--font-size-base);
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: var(--space-xs);
}

.offer-company-modal {
    font-size: var(--font-size-sm);
    color: var(--brand-purple);
    font-weight: 600;
    margin-bottom: var(--space-xs);
}

.offer-type-modal {
    display: inline-block;
    padding: 4px var(--space-xs);
    background: var(--gray-100);
    color: var(--gray-700);
    border-radius: var(--radius-sm);
    font-size: var(--font-size-xs);
    font-weight: 600;
}

.offer-description-modal {
    font-size: var(--font-size-sm);
    color: var(--gray-600);
    line-height: 1.6;
    margin-bottom: var(--space-md);
}

.offer-details-modal {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-sm);
    margin-bottom: var(--space-md);
}

.detail-item-modal {
    background: var(--gray-50);
    padding: var(--space-sm);
    border-radius: var(--radius-sm);
}

.detail-label-modal {
    font-size: var(--font-size-xs);
    color: var(--gray-500);
    font-weight: 600;
    margin-bottom: 4px;
}

.detail-value-modal {
    font-size: var(--font-size-sm);
    color: var(--gray-900);
    font-weight: 600;
}

.detail-value-modal.salary {
    color: var(--success);
}

.offer-competences-modal {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-xs);
    margin-bottom: var(--space-md);
}

.competence-tag-modal {
    padding: 4px var(--space-sm);
    background: rgba(59, 51, 135, 0.1);
    color: var(--brand-purple);
    border-radius: var(--radius-sm);
    font-size: var(--font-size-xs);
    font-weight: 600;
}

.offer-footer-modal {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: var(--space-md);
    border-top: 1px solid var(--gray-100);
}

.expire-time-modal {
    font-size: var(--font-size-sm);
    color: var(--gray-600);
    font-weight: 600;
}

.expire-time-modal.urgent {
    color: var(--danger);
    animation: pulseOpacity 2s infinite;
}

.offer-actions-modal {
    display: flex;
    gap: var(--space-xs);
}

.action-btn-modal {
    padding: var(--space-xs) var(--space-md);
    background: var(--gray-100);
    border: none;
    border-radius: var(--radius-md);
    font-size: var(--font-size-sm);
    font-weight: 600;
    color: var(--gray-700);
    cursor: pointer;
    transition: all 0.2s;
}

.action-btn-modal:hover {
    background: var(--gray-200);
}

.action-btn-modal.primary {
    background: var(--gradient-brand);
    color: white;
}

.action-btn-modal.primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

/* ==================== CONVERSATIONS CARDS (Messagerie) ==================== */

.conversations-list-modal {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.conversation-card-modal {
    display: flex;
    align-items: flex-start;
    gap: var(--space-md);
    padding: var(--space-md);
    background: white;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
}

.conversation-card-modal:hover {
    box-shadow: var(--shadow-md);
    transform: translateX(4px);
}

.conversation-card-modal.unread {
    background: linear-gradient(to right, rgba(59, 51, 135, 0.05), white);
    border-left: 4px solid var(--brand-purple);
}

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

.conversation-avatar-modal {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-full);
    background: var(--gradient-brand);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--font-size-lg);
    font-weight: 700;
}

.online-indicator-modal {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 12px;
    height: 12px;
    background: #22c55e;
    border: 2px solid white;
    border-radius: var(--radius-full);
}

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

.conversation-header-modal {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: var(--space-xs);
}

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

.conversation-name-modal {
    font-size: var(--font-size-sm);
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 2px;
}

.conversation-meta-modal {
    font-size: var(--font-size-xs);
    color: var(--gray-500);
    display: flex;
    align-items: center;
    gap: var(--space-xs);
}

.conversation-company-modal {
    font-weight: 600;
    color: var(--brand-purple);
}

.meta-separator {
    opacity: 0.5;
}

.conversation-role-modal {
    font-style: italic;
}

.conversation-time-modal {
    font-size: var(--font-size-xs);
    color: var(--gray-400);
    white-space: nowrap;
    flex-shrink: 0;
}

.conversation-message-preview-modal {
    font-size: var(--font-size-sm);
    color: var(--gray-600);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.conversation-card-modal.unread .conversation-message-preview-modal {
    font-weight: 600;
    color: var(--gray-900);
}

.unread-badge-modal {
    position: absolute;
    top: var(--space-md);
    right: var(--space-md);
    min-width: 24px;
    height: 24px;
    padding: 0 var(--space-xs);
    background: var(--brand-purple);
    color: white;
    border-radius: var(--radius-full);
    font-size: var(--font-size-xs);
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ==================== RESPONSIVE - MOBILE ==================== */

@media (max-width: 768px) {
    .modal-overlay {
        padding: 0;
        align-items: flex-start;
    }
    
    .modal-content {
        max-width: 100%;
        max-height: 100vh;
        height: 100vh;
        border-radius: 0;
        margin: 0;
    }
    
    .modal-header {
        border-radius: 0;
        padding: var(--space-md) var(--space-lg);
        padding-top: calc(var(--space-md) + env(safe-area-inset-top, 0));
    }
    
    .modal-title {
        font-size: var(--font-size-lg);
    }
    
    .modal-close {
        width: 36px;
        height: 36px;
    }
    
    .modal-body {
        padding: var(--space-md);
        padding-bottom: calc(var(--space-md) + var(--bottom-nav-height) + env(safe-area-inset-bottom, 0));
    }
    
    .offer-details-modal {
        grid-template-columns: 1fr;
    }
    
    .offer-footer-modal {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-sm);
    }
    
    .offer-actions-modal {
        width: 100%;
    }
    
    .action-btn-modal {
        flex: 1;
    }
}

/* Helper class */

.hidden {
    display: none !important;
}
