/* ═══════════════════════════════════════════════════════════════════════════
   SHOPCLIP.NL - Professional Dashboard
   Matching dark theme with website design
   ═══════════════════════════════════════════════════════════════════════════ */

:root {
    /* Colors - Dark cinematic theme */
    --black: #0a0a0a;
    --dark: #111111;
    --darker: #0d0d0d;
    --card: #161616;
    --card-hover: #1a1a1a;
    --border: #252525;
    --white: #ffffff;
    --gray-100: #f5f5f5;
    --gray-200: #e5e5e5;
    --gray-300: #d4d4d4;
    --gray-400: #a3a3a3;
    --gray-500: #737373;
    --gray-600: #525252;
    --gray-700: #404040;
    --gray-800: #262626;
    --gray-900: #171717;
    
    /* Accent - Vibrant orange */
    --accent: #ff5f1f;
    --accent-light: #ff7a45;
    --accent-dark: #e54d0f;
    --accent-hover: #ff7a45;
    --accent-glow: rgba(255, 95, 31, 0.4);
    
    /* Status colors */
    --success: #22c55e;
    --success-bg: rgba(34, 197, 94, 0.1);
    --warning: #f59e0b;
    --warning-bg: rgba(245, 158, 11, 0.1);
    --danger: #ef4444;
    --danger-bg: rgba(239, 68, 68, 0.1);
    --info: #3b82f6;
    --info-bg: rgba(59, 130, 246, 0.1);
    
    /* Typography */
    --font-sans: 'Manrope', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-serif: 'Instrument Serif', Georgia, serif;
    --text: #e5e5e5;
    --text-muted: #a3a3a3;
    
    /* Form elements */
    --input-bg: #1a1a1a;
    
    /* Sizing */
    --sidebar-width: 260px;
    --header-height: 80px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   BASE STYLES
   ═══════════════════════════════════════════════════════════════════════════ */

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

html {
    -webkit-font-smoothing: antialiased;
}

body {
    font-family: var(--font-sans);
    font-size: 14px;
    line-height: 1.5;
    color: var(--white);
    background: var(--black);
}

/* ═══════════════════════════════════════════════════════════════════════════
   DASHBOARD LAYOUT
   ═══════════════════════════════════════════════════════════════════════════ */

.dashboard {
    display: flex;
    min-height: 100vh;
}

/* ═══════════════════════════════════════════════════════════════════════════
   SIDEBAR
   ═══════════════════════════════════════════════════════════════════════════ */

.sidebar {
    width: var(--sidebar-width);
    background: var(--dark);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 100;
}

.sidebar-header {
    padding: 24px;
    border-bottom: 1px solid var(--border);
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--white);
}

.logo-icon {
    color: var(--accent);
    font-size: 16px;
}

.logo-text {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.sidebar-nav {
    padding: 16px 12px;
    flex: 1;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 8px;
    color: var(--gray-400);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    margin-bottom: 4px;
}

.nav-item:hover {
    background: var(--card);
    color: var(--white);
    border-left: 3px solid var(--accent);
    padding-left: 17px;
}

.nav-item.active {
    background: var(--card);
    color: var(--white);
    border-left: 3px solid var(--accent);
    padding-left: 17px;
}

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

.nav-icon svg {
    display: block;
}

.sidebar-footer {
    padding: 20px;
    border-top: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: auto;
}

.connection-status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--gray-400);
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--gray-500);
}

.status-dot.online {
    background: var(--success);
    box-shadow: 0 0 8px var(--success);
    animation: pulse 2s infinite;
}

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

/* ═══════════════════════════════════════════════════════════════════════════
   MAIN CONTENT
   ═══════════════════════════════════════════════════════════════════════════ */

.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    padding: 24px 32px;
    min-height: 100vh;
}

/* Fix: Modals inside main-content must not affect layout */
.main-content > .modal,
#linkedinDetailModal,
#channelOutreachModal,
#closeDealModal,
#editDealModal {
    display: none !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    z-index: 1000 !important;
    visibility: hidden !important;
}

.main-content > .modal.active,
#linkedinDetailModal.active,
#channelOutreachModal.active,
#closeDealModal.active,
#editDealModal.active {
    display: flex !important;
    visibility: visible !important;
    align-items: center;
    justify-content: center;
}

/* ═══════════════════════════════════════════════════════════════════════════
   HEADER
   ═══════════════════════════════════════════════════════════════════════════ */

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

.header h1 {
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 4px;
}

.header-subtitle {
    color: var(--gray-500);
    font-size: 14px;
}

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

/* Profile Switcher */
.profile-switcher {
    display: flex;
    align-items: center;
    gap: 12px;
}

.profile-switcher-label {
    font-size: 13px;
    color: var(--gray-400);
    white-space: nowrap;
}

.profile-buttons {
    display: flex;
    gap: 8px;
}

.profile-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 20px;
    color: var(--text);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.profile-btn:hover {
    background: var(--card-hover);
    border-color: var(--gray-600);
}

.profile-btn.active {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--white);
}

.profile-btn .profile-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--gray-700);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 600;
    color: var(--white);
}

.profile-btn.active .profile-avatar {
    background: rgba(255, 255, 255, 0.2);
}

.profile-btn.all-profiles {
    padding: 8px 16px;
}

.profile-select {
    padding: 8px 12px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    min-width: 140px;
}

.profile-select:hover {
    border-color: var(--gray-600);
}

.profile-select:focus {
    outline: none;
    border-color: var(--accent);
}

.btn-refresh {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 18px;
    height: 44px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--white);
    font-family: var(--font-sans);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-refresh:hover {
    background: var(--accent);
    border-color: var(--accent);
    box-shadow: 0 0 20px var(--accent-glow);
}

.btn-refresh .refresh-icon {
    font-size: 16px;
    transition: transform 0.4s ease;
}

.btn-refresh:hover .refresh-icon {
    transform: rotate(180deg);
}

.last-update {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0 18px;
    height: 44px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 8px;
}

.update-label {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--gray-500);
    margin-bottom: 2px;
}

.update-time {
    font-size: 16px;
    font-weight: 700;
    color: var(--accent);
}

.btn-refresh.loading .refresh-icon {
    animation: spin 1s linear infinite;
}

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

/* ═══════════════════════════════════════════════════════════════════════════
   STATS CARDS
   ═══════════════════════════════════════════════════════════════════════════ */

.stats-section {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 32px;
}

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

.stat-card:hover {
    border-color: var(--gray-700);
    transform: translateY(-2px);
}

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

.stat-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.stat-icon.sent {
    background: var(--success-bg);
    color: var(--success);
}

.stat-icon.spam {
    background: var(--danger-bg);
    color: var(--danger);
}

.stat-icon.meetings {
    background: var(--info-bg);
    color: var(--info);
}

.stat-icon.rate {
    background: rgba(255, 95, 31, 0.1);
    color: var(--accent);
}

.stat-trend {
    font-size: 12px;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 50px;
}

.stat-trend.up {
    background: var(--success-bg);
    color: var(--success);
}

.stat-trend.down {
    background: var(--danger-bg);
    color: var(--danger);
}

.stat-value {
    font-size: 36px;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 4px;
}

.stat-label {
    font-size: 13px;
    color: var(--gray-500);
    margin-bottom: 16px;
}

.stat-bar {
    height: 4px;
    background: var(--gray-800);
    border-radius: 2px;
    overflow: hidden;
}

.stat-bar-fill {
    height: 100%;
    border-radius: 2px;
    transition: width 1s ease;
}

.stat-bar-fill.sent { background: var(--success); }
.stat-bar-fill.spam { background: var(--danger); }
.stat-bar-fill.meetings { background: var(--info); }
.stat-bar-fill.rate { background: var(--accent); }

/* ═══════════════════════════════════════════════════════════════════════════
   CONTENT GRID
   ═══════════════════════════════════════════════════════════════════════════ */

.content-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 24px;
}

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

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

.card-header h2 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    font-weight: 600;
}

.card-icon {
    font-size: 18px;
}

.card-badge {
    font-size: 12px;
    font-weight: 600;
    padding: 6px 12px;
    background: var(--gray-800);
    border-radius: 50px;
    color: var(--gray-400);
}

/* ═══════════════════════════════════════════════════════════════════════════
   EMAILS LIST
   ═══════════════════════════════════════════════════════════════════════════ */

.emails-list {
    max-height: 400px;
    overflow-y: auto;
}

.email-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 24px;
    border-bottom: 1px solid var(--border);
    transition: background 0.2s ease;
}

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

.email-item:hover {
    background: var(--card-hover);
}

.email-status {
    flex-shrink: 0;
}

.status-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

.status-badge.sent {
    background: var(--success-bg);
    color: var(--success);
}

.status-badge.processing {
    background: var(--warning-bg);
    color: var(--warning);
}

.status-badge.spam {
    background: var(--danger-bg);
    color: var(--danger);
}

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

.email-subject {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.email-sender {
    font-size: 13px;
    color: var(--gray-500);
}

.email-time {
    font-size: 12px;
    color: var(--gray-600);
    white-space: nowrap;
}

/* ═══════════════════════════════════════════════════════════════════════════
   MEETINGS LIST
   ═══════════════════════════════════════════════════════════════════════════ */

.meetings-list {
    max-height: 400px;
    overflow-y: auto;
}

.meeting-item {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
    transition: background 0.2s ease;
}

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

.meeting-item:hover {
    background: var(--card-hover);
}

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

.meeting-title {
    font-weight: 600;
    font-size: 15px;
}

.meeting-status {
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 4px;
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.meeting-details {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: center;
}

.meeting-detail {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--gray-400);
    white-space: nowrap;
}

.meeting-detail-icon {
    font-size: 14px;
    flex-shrink: 0;
}

/* ═══════════════════════════════════════════════════════════════════════════
   ACTIVITY TIMELINE
   ═══════════════════════════════════════════════════════════════════════════ */

.activity-card {
    margin-bottom: 24px;
}

.activity-timeline {
    padding: 16px 24px;
}

.timeline-item {
    display: flex;
    gap: 16px;
    padding: 12px 0;
    position: relative;
}

.timeline-item:not(:last-child)::before {
    content: '';
    position: absolute;
    left: 5px;
    top: 32px;
    bottom: 0;
    width: 2px;
    background: var(--border);
}

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

.timeline-dot.sent { background: var(--success); box-shadow: 0 0 8px var(--success); }
.timeline-dot.meeting { background: var(--info); box-shadow: 0 0 8px var(--info); }
.timeline-dot.spam { background: var(--danger); box-shadow: 0 0 8px var(--danger); }

.timeline-content {
    flex: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.timeline-text {
    font-size: 14px;
    color: var(--gray-300);
}

.timeline-text strong {
    color: var(--white);
}

.timeline-time {
    font-size: 12px;
    color: var(--gray-600);
}

/* ═══════════════════════════════════════════════════════════════════════════
   EMPTY & LOADING STATES
   ═══════════════════════════════════════════════════════════════════════════ */

.loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 24px;
    color: var(--gray-500);
}

.loading-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid var(--gray-800);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 12px;
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 24px;
    color: var(--gray-500);
}

.empty-icon {
    font-size: 48px;
    margin-bottom: 12px;
    opacity: 0.5;
}

/* ═══════════════════════════════════════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════════════════════════════════════ */

.dashboard-footer {
    margin-top: auto;
    padding: 20px 0;
    text-align: center;
    color: var(--gray-600);
    font-size: 12px;
    border-top: 1px solid var(--border);
}

/* ═══════════════════════════════════════════════════════════════════════════
   SCROLLBAR
   ═══════════════════════════════════════════════════════════════════════════ */

::-webkit-scrollbar {
    width: 6px;
}

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

::-webkit-scrollbar-thumb {
    background: var(--gray-700);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--gray-600);
}

/* ═══════════════════════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════════════════════ */

@media (max-width: 1200px) {
    .stats-section {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .content-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .sidebar {
        display: none;
    }
    
    .main-content {
        margin-left: 0;
        padding: 16px;
    }
    
    .header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
    
    .header-right {
        width: 100%;
        justify-content: space-between;
    }
    
    .stats-section {
        grid-template-columns: 1fr;
    }
    
    .stat-card {
        padding: 16px;
    }
    
    .stat-value {
        font-size: 28px;
    }
    
    .meeting-details {
        flex-direction: column;
        gap: 8px;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   ANIMATIONS
   ═══════════════════════════════════════════════════════════════════════════ */

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

@keyframes slideIn {
    from { 
        opacity: 0; 
        transform: translateX(100%);
    }
    to { 
        opacity: 1; 
        transform: translateX(0);
    }
}

@keyframes slideOut {
    from { 
        opacity: 1; 
        transform: translateX(0);
    }
    to { 
        opacity: 0; 
        transform: translateX(100%);
    }
}

.stat-card,
.content-card,
.email-item,
.meeting-item,
.timeline-item {
    animation: fadeIn 0.4s ease forwards;
}

.stat-card:nth-child(1) { animation-delay: 0.1s; }
.stat-card:nth-child(2) { animation-delay: 0.2s; }
.stat-card:nth-child(3) { animation-delay: 0.3s; }
.stat-card:nth-child(4) { animation-delay: 0.4s; }

.email-item:nth-child(1) { animation-delay: 0.1s; }
.email-item:nth-child(2) { animation-delay: 0.15s; }
.email-item:nth-child(3) { animation-delay: 0.2s; }
.email-item:nth-child(4) { animation-delay: 0.25s; }
.email-item:nth-child(5) { animation-delay: 0.3s; }

/* ═══════════════════════════════════════════════════════════════════════════
   LOGIN SCREEN
   ═══════════════════════════════════════════════════════════════════════════ */

.login-screen {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, var(--black) 0%, var(--darker) 50%, #1a0f0a 100%);
    padding: 20px;
    position: relative;
    overflow: hidden;
}

.login-screen::before {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
    top: -250px;
    right: -250px;
    pointer-events: none;
}

.login-screen::after {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(255, 95, 31, 0.15) 0%, transparent 70%);
    bottom: -300px;
    left: -300px;
    pointer-events: none;
}

.login-container {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 48px;
    width: 100%;
    max-width: 440px;
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.6),
        0 0 0 1px rgba(255, 255, 255, 0.05) inset;
    position: relative;
    z-index: 1;
    animation: loginSlideIn 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes loginSlideIn {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.login-header {
    text-align: center;
    margin-bottom: 40px;
}

.login-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 8px;
}

.login-logo .logo-icon {
    font-size: 32px;
    color: var(--accent);
    text-shadow: 0 0 20px var(--accent-glow);
}

.login-logo h1 {
    font-family: var(--font-serif);
    font-size: 28px;
    font-weight: 400;
    color: var(--white);
    margin: 0;
}

.login-subtitle {
    font-size: 15px;
    color: var(--gray-400);
    margin: 0;
}

.login-content {
    width: 100%;
}

.login-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.login-btn {
    width: 100%;
    padding: 14px 24px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--card);
    color: var(--white);
    font-family: var(--font-sans);
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.login-btn:hover {
    background: var(--card-hover);
    border-color: var(--gray-700);
    transform: translateY(-2px);
}

.login-btn:active {
    transform: translateY(0);
}

.google-btn {
    background: white;
    color: #1f2937;
    border: none;
}

.google-btn:hover {
    background: #f9fafb;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

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

.divider {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 24px 0;
    color: var(--gray-500);
    font-size: 13px;
}

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

.email-login-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
    animation: fadeIn 0.3s ease;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.input-group label {
    font-size: 14px;
    font-weight: 500;
    color: var(--gray-300);
}

.input-group input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--darker);
    color: var(--white);
    font-family: var(--font-sans);
    font-size: 15px;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.input-group input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.input-group input::placeholder {
    color: var(--gray-600);
}

.error-message {
    display: none;
    color: var(--danger);
    font-size: 13px;
    margin-top: 4px;
}

.form-buttons {
    display: flex;
    gap: 12px;
    margin-top: 8px;
}

.primary-btn {
    flex: 2;
    background: var(--accent);
    border: none;
    color: var(--white);
}

.primary-btn:hover {
    background: var(--accent-light);
    box-shadow: 0 4px 12px var(--accent-glow);
}

.secondary-btn {
    flex: 1;
    background: var(--card);
    border: 1px solid var(--border);
}

.login-footer {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
    text-align: center;
}

.access-note {
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-300);
    margin: 0 0 4px 0;
}

.access-text {
    font-size: 13px;
    color: var(--gray-500);
    margin: 0;
}

/* User Info in Sidebar */
.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--card);
    border-radius: 12px;
    margin-bottom: 12px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-weight: 600;
    font-size: 14px;
    background-size: cover;
    background-position: center;
    flex-shrink: 0;
}

.user-details {
    flex: 1;
    min-width: 0;
}

.user-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--white);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-email {
    font-size: 12px;
    color: var(--gray-500);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.logout-btn {
    width: 100%;
    padding: 12px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--gray-400);
    font-family: var(--font-sans);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 12px;
}

.logout-btn:hover {
    background: var(--card-hover);
    border-color: var(--danger);
    color: var(--danger);
}

/* Responsive Login */
@media (max-width: 480px) {
    .login-container {
        padding: 32px 24px;
    }
    
    .login-logo h1 {
        font-size: 24px;
    }
    
    .form-buttons {
        flex-direction: column;
    }
    
    .secondary-btn {
        flex: 1;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   PAGE SECTIONS (SPA Navigation)
   ═══════════════════════════════════════════════════════════════════════════ */

.page {
    display: none;
}

.page.active {
    display: block;
}

.page-content {
    padding: 24px 0;
}

.clickable {
    cursor: pointer;
}

.clickable:hover {
    transform: translateX(4px);
}

/* Search and Filter */
.search-box input {
    padding: 10px 16px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-family: var(--font-sans);
    font-size: 14px;
    width: 200px;
}

.header-right select {
    padding: 10px 16px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-family: var(--font-sans);
    font-size: 14px;
    cursor: pointer;
}

/* ═══════════════════════════════════════════════════════════════════════════
   MODALS
   ═══════════════════════════════════════════════════════════════════════════ */

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
}

.modal-content {
    position: relative;
    z-index: 1;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 16px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    animation: fadeIn 0.3s ease;
}

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

.modal-header h2 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text);
}

.modal-close {
    background: none;
    border: none;
    color: var(--gray-400);
    font-size: 24px;
    cursor: pointer;
    padding: 4px 8px;
}

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

.modal-body {
    padding: 24px;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 16px 24px;
    border-top: 1px solid var(--border);
}

.email-meta, .meeting-meta {
    margin-bottom: 20px;
    padding: 16px;
    background: var(--background);
    border-radius: 8px;
}

.email-meta p, .meeting-meta p {
    margin: 8px 0;
    font-size: 14px;
    color: var(--gray-300);
}

/* Old email modal styles removed - see EMAIL MODAL IMPROVEMENTS section below */

.meeting-section {
    margin-top: 20px;
}

.meeting-section h3 {
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-400);
    margin-bottom: 12px;
}

.meeting-section textarea {
    width: 100%;
    min-height: 100px;
    padding: 12px;
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-family: var(--font-sans);
    font-size: 14px;
    resize: vertical;
}

/* Contact Modal */
.contact-modal-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.contact-modal-section {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.contact-modal-section.full-width {
    grid-column: 1 / -1;
}

.contact-modal-section label {
    font-size: 12px;
    font-weight: 600;
    color: var(--gray-400);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.contact-modal-section p {
    font-size: 14px;
    color: var(--text);
    margin: 0;
}

.contact-modal-section a {
    color: var(--accent);
    text-decoration: none;
    transition: color 0.2s ease;
}

.contact-modal-section a:hover {
    color: var(--accent-hover);
    text-decoration: underline;
}

/* Status Modal */
.modal-small .modal-content {
    max-width: 500px;
}

.status-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.status-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: var(--background);
    border: 2px solid var(--border);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: var(--font-sans);
    width: 100%;
    text-align: left;
}

.status-option:hover {
    background: var(--card-hover);
    border-color: var(--gray-700);
    transform: translateY(-2px);
}

.status-option .status-icon {
    font-size: 24px;
}

.status-option .status-label {
    font-size: 15px;
    font-weight: 500;
    color: var(--text);
}

.status-option.status-new:hover {
    border-color: var(--info);
}

.status-option.status-contacted:hover {
    border-color: var(--warning);
}

.status-option.status-meeting:hover {
    border-color: var(--accent);
}

.status-option.status-customer:hover {
    border-color: var(--success);
}

.status-option.status-lost:hover {
    border-color: var(--danger);
}

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

/* Buttons */
.btn-primary {
    padding: 10px 20px;
    background: var(--accent);
    color: var(--background);
    border: none;
    border-radius: 8px;
    font-family: var(--font-sans);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

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

.btn-secondary {
    padding: 10px 20px;
    background: var(--card);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 8px;
    font-family: var(--font-sans);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

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

/* ═══════════════════════════════════════════════════════════════════════════
   CONTACTS / CRM
   ═══════════════════════════════════════════════════════════════════════════ */

.contact-stats {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
}

.contact-stat {
    flex: 1;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 12px 8px;
    text-align: center;
}

.contact-stat.clickable {
    cursor: pointer;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.contact-stat.clickable:hover {
    transform: translateY(-2px);
    border-color: var(--accent);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.contact-stat.clickable:active {
    transform: translateY(0);
}

.contact-stat.active {
    background: rgba(255, 107, 53, 0.15);
    border: 1px solid var(--accent);
}

.contact-stat.active .stat-number {
    color: var(--accent);
}

.contact-stat.active .stat-label {
    color: var(--gray-300);
}

.contact-stat .stat-number {
    display: block;
    font-size: 24px;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 2px;
}

.contact-stat .stat-label {
    font-size: 10px;
    color: var(--gray-400);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.contacts-table-wrapper {
    overflow-x: auto;
}

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

.contacts-table th {
    text-align: left;
    padding: 12px 16px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--gray-500);
    border-bottom: 1px solid var(--border);
}

.contacts-table th.sortable {
    cursor: pointer;
    user-select: none;
    transition: color 0.2s ease;
}

.contacts-table th.sortable:hover {
    color: var(--accent);
}

.contacts-table th.sortable.active {
    color: var(--accent);
}

.sort-icon {
    margin-left: 4px;
    font-size: 10px;
    opacity: 0.5;
    transition: opacity 0.2s ease;
}

.contacts-table th.sortable:hover .sort-icon,
.contacts-table th.sortable.active .sort-icon {
    opacity: 1;
}

.contacts-table td {
    padding: 14px 16px;
    font-size: 14px;
    border-bottom: 1px solid var(--border);
    color: var(--gray-200);
}

.contact-row {
    cursor: pointer;
    transition: background 0.2s ease;
}

.contact-row:hover {
    background: var(--card-hover);
}

.contact-company {
    font-weight: 600;
    color: var(--text);
}

.contact-domain a {
    color: var(--accent);
    text-decoration: none;
}

.contact-domain a:hover {
    text-decoration: underline;
}

.contact-email {
    color: var(--gray-400);
}

.contact-source {
    font-size: 12px;
    color: var(--gray-500);
}

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

.btn-icon {
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    font-size: 16px;
    opacity: 0.6;
    transition: opacity 0.2s ease;
}

.btn-icon:hover {
    opacity: 1;
}

/* Contact status badges */
.status-new {
    background: rgba(255, 95, 31, 0.2);
    color: var(--accent);
}

.status-contacted {
    background: rgba(59, 130, 246, 0.2);
    color: #3b82f6;
}

.status-meeting {
    background: rgba(139, 92, 246, 0.2);
    color: #8b5cf6;
}

.status-customer {
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
}

.status-lost {
    background: rgba(156, 163, 175, 0.2);
    color: #9ca3af;
}

.table-pagination {
    padding: 16px;
    text-align: center;
}

.empty-row td {
    padding: 40px;
}

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

/* ═══════════════════════════════════════════════════════════════════════════
   LINKEDIN CRM STYLES
   ═══════════════════════════════════════════════════════════════════════════ */

/* Platform Filter Icons */
.platform-filter {
    display: flex;
    gap: 4px;
    background: var(--gray-800);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 4px;
}

.platform-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: var(--gray-400);
    cursor: pointer;
    transition: all 0.2s ease;
}

.platform-btn:hover {
    background: var(--gray-700);
    color: var(--text);
}

.platform-btn.active {
    background: var(--accent);
    color: white;
}

.platform-btn .platform-icon {
    font-size: 18px;
}

.platform-btn .platform-svg {
    width: 18px;
    height: 18px;
}

/* Small platform buttons for analytics funnel */
.platform-btn.small {
    width: 28px;
    height: 28px;
    padding: 5px;
    border-radius: 6px;
}

.platform-btn.small .platform-svg {
    width: 14px;
    height: 14px;
}

.funnel-platform-filter {
    display: flex;
    gap: 6px;
}

/* Multi-select channel filter for Analytics */
.channel-filter-multi {
    display: flex;
    gap: 4px;
    background: var(--gray-800);
    border-radius: 8px;
    border: 1px solid var(--border);
    padding: 4px;
}

.channel-filter-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 32px;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: var(--gray-400);
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 12px;
    font-weight: 500;
}

.channel-filter-btn[data-channel="all"] {
    width: auto;
    padding: 0 12px;
}

.channel-filter-btn:hover {
    background: var(--gray-700);
    color: var(--text);
}

.channel-filter-btn.active {
    background: var(--accent);
    color: white;
}

.channel-filter-btn svg {
    width: 18px;
    height: 18px;
}

.linkedin-stats-row {
    display: flex;
    gap: 20px;
    margin-bottom: 24px;
    align-items: stretch;
}

.linkedin-stats {
    display: flex;
    gap: 12px;
    flex: 1;
}

.linkedin-stats .linkedin-stat {
    flex: 1;
    min-width: 0;
}

.linkedin-stat {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 12px 8px;
    text-align: center;
}

.linkedin-stat.clickable {
    cursor: pointer;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.linkedin-stat.clickable:hover {
    transform: translateY(-2px);
    border-color: var(--accent);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.linkedin-stat.clickable:active {
    transform: translateY(0);
}

.linkedin-stat.highlight {
    background: transparent;
    border: 2px solid var(--success);
}

.linkedin-stat.highlight .stat-number {
    color: var(--success);
}

.linkedin-stat.highlight .stat-label {
    color: var(--gray-400);
}

.linkedin-stat.active {
    background: rgba(255, 107, 53, 0.15);
    border: 1px solid var(--accent);
}

.linkedin-stat.active .stat-number {
    color: var(--accent);
}

.linkedin-stat.active .stat-label {
    color: var(--gray-300);
}

/* LinkedIn Metrics Panel - compact version without bars */
.linkedin-metrics-panel {
    display: flex;
    align-items: center;
    gap: 16px;
    background: var(--gray-800);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 12px 20px;
}

.metrics-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.metrics-icon {
    font-size: 20px;
    opacity: 0.9;
}

.metrics-content {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.metrics-value {
    font-size: 18px;
    font-weight: 700;
    color: var(--accent);
}

.metrics-label {
    font-size: 10px;
    color: var(--gray-400);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.metrics-divider {
    width: 1px;
    height: 32px;
    background: var(--border);
}

.linkedin-stat .stat-number {
    font-size: 24px;
    font-weight: 700;
    color: var(--accent);
    display: block;
    margin-bottom: 2px;
}

.linkedin-stat .stat-label {
    font-size: 10px;
    color: var(--gray-400);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* LinkedIn Table - unified with contacts table */
.linkedin-table-wrapper {
    overflow-x: auto;
}

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

.linkedin-table th {
    text-align: left;
    padding: 12px 16px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--gray-500);
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

.linkedin-table th:nth-child(1) { width: 22%; }  /* Bedrijf */
.linkedin-table th:nth-child(2) { width: 15%; }  /* Channels */
.linkedin-table th:nth-child(3) { width: 14%; }  /* Status */
.linkedin-table th:nth-child(4) { width: 18%; }  /* Laatste bericht */
.linkedin-table th:nth-child(5) { width: 8%; }   /* Acties */

.linkedin-table td {
    padding: 14px 16px;
    font-size: 14px;
    border-bottom: 1px solid var(--border);
    color: var(--gray-200);
}

.linkedin-table th.sortable {
    cursor: pointer;
    user-select: none;
    transition: color 0.2s ease;
}

.linkedin-table th.sortable:hover {
    color: var(--accent);
}

.linkedin-table th.sortable.active {
    color: var(--accent);
}

.linkedin-table th.sortable:hover .sort-icon,
.linkedin-table th.sortable.active .sort-icon {
    opacity: 1;
}

.linkedin-table tbody tr {
    cursor: pointer;
    transition: background 0.2s ease;
}

.linkedin-table tbody tr:hover {
    background: var(--card-hover);
}

.linkedin-link {
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
}

.linkedin-link:hover {
    text-decoration: underline;
}

/* LinkedIn Status Badges */
.li-status-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.li-status-new {
    background: rgba(156, 163, 175, 0.2);
    color: #9ca3af;
}

.li-status-connection_sent {
    background: rgba(251, 191, 36, 0.2);
    color: #fbbf24;
}

.li-status-connected {
    background: rgba(59, 130, 246, 0.2);
    color: #3b82f6;
}

.li-status-messaged {
    background: rgba(139, 92, 246, 0.2);
    color: #8b5cf6;
}

.li-status-replied {
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
}

.li-status-meeting_booked {
    background: rgba(255, 95, 31, 0.2);
    color: var(--accent);
}

.li-status-lost {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

/* Channel Icons in Table */
.channels-cell {
    white-space: nowrap;
    padding: 8px 12px !important;
}

.channels-cell .channel-icon {
    margin-right: 8px;
    vertical-align: middle;
}

.channel-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    padding: 5px;
    transition: all 0.2s ease;
    border: 2px solid transparent;
}

.channel-icon svg {
    width: 100%;
    height: 100%;
}

.channel-icon.available {
    background: var(--gray-700);
    color: var(--gray-400);
    border-color: var(--gray-600);
}

.channel-icon.contacted {
    background: var(--accent);
    color: var(--white);
    border-color: var(--accent-light);
}

.channel-icon.clickable {
    cursor: pointer;
    position: relative;
}

.channel-icon.clickable:hover {
    transform: scale(1.2);
    box-shadow: 0 0 12px var(--accent-glow);
    border-color: var(--accent);
}

.channel-icon.clickable:active {
    transform: scale(1.1);
}

.channel-icon .conv-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: var(--success);
    color: white;
    font-size: 9px;
    font-weight: 700;
    min-width: 14px;
    height: 14px;
    border-radius: 7px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 3px;
}

.no-channels {
    color: var(--gray-600);
}

/* Channel Outreach Modal (v2.2) */
.channel-modal-icon {
    display: inline-flex;
    width: 24px;
    height: 24px;
    margin-right: 8px;
    vertical-align: middle;
}

.channel-modal-icon svg {
    width: 100%;
    height: 100%;
    fill: var(--accent);
}

/* Channel Detail Grid */
.channel-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 24px;
}

.channel-detail-section {
    background: var(--gray-800);
    border-radius: 8px;
    padding: 16px;
}

.channel-detail-section h3 {
    font-size: 14px;
    font-weight: 600;
    color: var(--accent);
    margin-bottom: 12px;
}

.channel-info-row {
    display: flex;
    margin-bottom: 8px;
}

.channel-label {
    font-weight: 500;
    color: var(--gray-400);
    width: 100px;
    flex-shrink: 0;
}

.channel-value {
    color: var(--text);
}

.channel-profile-link {
    margin-top: 12px;
}

.channel-profile-link a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.channel-status-selector {
    margin-bottom: 16px;
}

.channel-status-selector select {
    width: 100%;
    padding: 10px 12px;
    border-radius: 6px;
    background: var(--input-bg);
    border: 1px solid var(--border);
    color: var(--text);
    font-size: 14px;
}

.channel-notes-section label {
    display: block;
    font-weight: 500;
    color: var(--gray-400);
    margin-bottom: 8px;
}

.channel-notes-section textarea {
    width: 100%;
    padding: 10px 12px;
    border-radius: 6px;
    background: var(--input-bg);
    border: 1px solid var(--border);
    color: var(--text);
    font-size: 14px;
    resize: vertical;
}

/* Channel Messages Section */
.channel-messages-section {
    background: var(--gray-800);
    border-radius: 8px;
    padding: 16px;
}

.channel-messages-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.channel-messages-header h3 {
    font-size: 14px;
    font-weight: 600;
    color: var(--accent);
    margin: 0;
}

.channel-messages-list {
    max-height: 300px;
    overflow-y: auto;
    margin-bottom: 16px;
    padding-right: 8px;
}

.channel-message {
    background: var(--gray-700);
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 8px;
}

.channel-message.sent {
    border-left: 3px solid var(--accent);
}

.channel-message.received {
    border-left: 3px solid var(--success);
}

.channel-message .message-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
    font-size: 12px;
}

.channel-message .message-type {
    font-weight: 600;
    color: var(--gray-300);
}

.channel-message .message-date {
    color: var(--gray-500);
}

.channel-message .message-actions {
    margin-left: auto;
    display: flex;
    gap: 4px;
}

.channel-message .message-content {
    color: var(--text);
    line-height: 1.5;
    white-space: pre-wrap;
}

/* Channel Suggestion Box */
.channel-suggestion-box {
    background: var(--gray-700);
    border: 1px solid var(--accent);
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 16px;
}

.channel-suggestion-box .suggestion-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--accent);
}

.channel-suggestion-box .suggestion-content {
    color: var(--text);
    line-height: 1.5;
    white-space: pre-wrap;
}

.channel-suggestion-box .loading {
    color: var(--accent);
}

.channel-suggestion-box .error {
    color: var(--error);
}

/* Channel Add Message */
.channel-add-message {
    border-top: 1px solid var(--border);
    padding-top: 16px;
}

.channel-add-message .message-type-toggle {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.channel-add-message textarea {
    width: 100%;
    padding: 10px 12px;
    border-radius: 6px;
    background: var(--input-bg);
    border: 1px solid var(--border);
    color: var(--text);
    font-size: 14px;
    resize: vertical;
    margin-bottom: 12px;
}

/* Channel Deal Actions */
.channel-deal-actions {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: center;
}

.channel-deal-actions .btn-deal {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    border: none;
    padding: 12px 32px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.channel-deal-actions .btn-deal:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
}

.channel-outreach-status {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    padding: 12px 16px;
    background: var(--gray-800);
    border-radius: 8px;
}

.channel-outreach-status label {
    font-weight: 600;
    color: var(--gray-300);
}

.channel-outreach-status select {
    padding: 8px 12px;
    border-radius: 6px;
    background: var(--input-bg);
    border: 1px solid var(--border);
    color: var(--text);
    font-size: 14px;
}

.conversations-section h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--accent);
}

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

.no-conversations {
    text-align: center;
    padding: 40px 20px;
    color: var(--gray-400);
}

.no-conversations p {
    margin-bottom: 16px;
}

.conversation-card {
    background: var(--gray-800);
    border-radius: 8px;
    border: 1px solid var(--border);
    overflow: hidden;
}

.conversation-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: var(--gray-700);
    cursor: pointer;
}

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

.conversation-info strong {
    color: var(--white);
}

.conversation-status {
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 4px;
    font-weight: 600;
}

.conversation-status.status-awaiting_reply {
    background: var(--warning-bg);
    color: var(--warning);
}

.conversation-status.status-replied {
    background: var(--success-bg);
    color: var(--success);
}

.conversation-status.status-closed {
    background: var(--gray-700);
    color: var(--gray-400);
}

.conversation-meta {
    display: flex;
    gap: 16px;
    font-size: 12px;
    color: var(--gray-400);
}

.conversation-actions {
    display: flex;
    gap: 4px;
}

.conversation-messages {
    padding: 16px;
    max-height: 400px;
    overflow-y: auto;
}

.conversation-messages.collapsed {
    display: none;
}

.conv-message {
    padding: 12px;
    margin-bottom: 8px;
    border-radius: 8px;
    background: var(--card);
}

.conv-message.sent {
    border-left: 3px solid var(--accent);
}

.conv-message.received {
    border-left: 3px solid var(--success);
}

.message-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    font-size: 12px;
    color: var(--gray-400);
}

.message-direction {
    font-size: 14px;
}

.message-source {
    font-size: 10px;
    padding: 2px 6px;
    background: var(--gray-700);
    border-radius: 4px;
}

.message-actions {
    margin-left: auto;
    display: flex;
    gap: 6px;
}

.msg-action-btn {
    background: var(--gray-700);
    border: none;
    border-radius: 4px;
    cursor: pointer;
    padding: 4px 8px;
    font-size: 12px;
    opacity: 0.7;
    transition: all 0.2s;
}

.msg-action-btn:hover {
    opacity: 1;
    background: var(--gray-600);
}

.msg-action-btn.delete:hover {
    background: rgba(239, 68, 68, 0.2);
}

.message-content {
    color: var(--text);
    line-height: 1.5;
    white-space: pre-wrap;
}

.add-message-form {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.add-message-form textarea {
    width: 100%;
    padding: 10px;
    margin: 8px 0;
    border-radius: 6px;
    background: var(--input-bg);
    border: 1px solid var(--border);
    color: var(--text);
    resize: vertical;
    font-family: inherit;
}

.message-type-toggle.small {
    display: flex;
    gap: 8px;
}

.message-type-toggle.small .toggle-btn {
    padding: 6px 12px;
    font-size: 12px;
}

.btn-add-conv {
    margin-top: 16px;
    width: 100%;
}

.edit-message-textarea {
    width: 100%;
    padding: 8px;
    margin-bottom: 8px;
    border-radius: 6px;
    background: var(--input-bg);
    border: 1px solid var(--accent);
    color: var(--text);
    resize: vertical;
    font-family: inherit;
    min-height: 60px;
}

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

.no-messages {
    color: var(--gray-500);
    font-style: italic;
    text-align: center;
    padding: 20px;
}

.li-tags {
    font-size: 12px;
    color: var(--gray-400);
}

/* LinkedIn Modal */
.modal-large {
    max-width: 800px;
    width: 95%;
}

.linkedin-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 24px;
}

.li-detail-section {
    background: var(--gray-800);
    border-radius: 8px;
    padding: 16px;
}

.li-detail-section h3 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--accent);
}

.li-info-row {
    display: grid;
    grid-template-columns: 100px 1fr;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
    align-items: start;
}

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

.li-label {
    color: var(--gray-400);
    font-size: 13px;
    flex-shrink: 0;
}

.li-value {
    color: var(--text);
    font-size: 14px;
    font-weight: 500;
    text-align: right;
    word-break: break-word;
}

/* LinkedIn Button Links */
.li-linkedin-buttons {
    display: flex;
    gap: 12px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.li-linkedin-btn {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: linear-gradient(135deg, var(--gray-700) 0%, var(--gray-800) 100%);
    border: 1px solid var(--border);
    border-radius: 10px;
    text-decoration: none;
    color: var(--text);
    transition: all 0.2s ease;
}

.li-linkedin-btn:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.li-linkedin-btn.disabled {
    opacity: 0.4;
    pointer-events: none;
}

.li-btn-icon {
    font-size: 20px;
}

.li-btn-text {
    font-size: 13px;
    font-weight: 500;
}

.li-person-role {
    font-size: 11px;
    padding: 2px 8px;
    background: rgba(99, 102, 241, 0.2);
    color: var(--accent);
    border-radius: 4px;
    margin-left: auto;
    text-transform: capitalize;
}

.li-linkedin-company:hover {
    background: linear-gradient(135deg, #0077b5 0%, #005885 100%);
    border-color: #0077b5;
}

.li-linkedin-person:hover {
    background: linear-gradient(135deg, var(--accent) 0%, #4f46e5 100%);
    border-color: var(--accent);
}

.li-status-selector select {
    width: 100%;
    padding: 10px;
    background: var(--gray-700);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text);
    font-size: 14px;
    margin-bottom: 12px;
}

.li-tags-section,
.li-notes-section {
    margin-top: 12px;
}

.li-tags-section label,
.li-notes-section label {
    display: block;
    font-size: 12px;
    color: var(--gray-400);
    margin-bottom: 6px;
}

.li-tags-section input,
.li-notes-section textarea {
    width: 100%;
    padding: 10px;
    background: var(--gray-700);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text);
    font-size: 14px;
    resize: vertical;
}

/* Messages Section */
.li-messages-section {
    background: var(--gray-800);
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 16px;
}

.li-messages-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.li-messages-header h3 {
    font-size: 14px;
    font-weight: 600;
    color: var(--accent);
    margin: 0;
}

.li-messages-list {
    max-height: 300px;
    overflow-y: auto;
    margin-bottom: 16px;
}

.li-message {
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 8px;
}

.li-message.sent {
    background: var(--gray-700);
    margin-left: 20px;
}

.li-message.received {
    background: #1e3a5f;
    margin-right: 20px;
}

.message-header {
    display: flex;
    align-items: center;
    font-size: 11px;
    color: var(--gray-400);
    margin-bottom: 6px;
    gap: 12px;
}

.message-actions {
    margin-left: auto;
    display: flex;
    gap: 4px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.li-message:hover .message-actions {
    opacity: 1;
}

.msg-action-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 2px 6px;
    font-size: 12px;
    opacity: 0.6;
    transition: opacity 0.2s ease;
}

.msg-action-btn:hover {
    opacity: 1;
}

.message-content {
    font-size: 14px;
    line-height: 1.5;
}

.edit-message-textarea {
    width: 100%;
    padding: 10px;
    background: var(--gray-700);
    border: 1px solid var(--accent);
    border-radius: 6px;
    color: var(--text);
    font-size: 14px;
    resize: vertical;
    margin-bottom: 8px;
}

.edit-message-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

.no-messages {
    text-align: center;
    color: var(--gray-500);
    padding: 20px;
}

/* Suggestion Box */
.li-suggestion-box {
    background: linear-gradient(135deg, var(--gray-700), var(--gray-800));
    border: 1px solid var(--accent);
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 16px;
}

.suggestion-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    font-size: 12px;
    color: var(--accent);
}

.btn-copy {
    background: var(--accent);
    color: var(--background);
    border: none;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 11px;
    cursor: pointer;
}

.btn-copy:hover {
    opacity: 0.9;
}

.suggestion-content {
    font-size: 14px;
    line-height: 1.6;
    color: var(--text);
}

.loading {
    color: var(--gray-400);
}

/* Add Message */
.li-add-message {
    border-top: 1px solid var(--border);
    padding-top: 16px;
}

/* Message Type Toggle Buttons */
.message-type-toggle {
    display: flex;
    gap: 0;
    margin-bottom: 12px;
    background: var(--gray-700);
    border-radius: 8px;
    padding: 4px;
}

.toggle-btn {
    flex: 1;
    padding: 10px 16px;
    border: none;
    background: transparent;
    color: var(--gray-400);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.toggle-btn:hover {
    color: var(--text);
}

.toggle-btn.active {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

.message-type-selector {
    display: flex;
    gap: 16px;
    margin-bottom: 12px;
}

.message-type-selector label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--gray-300);
    cursor: pointer;
}

.li-add-message textarea {
    width: 100%;
    padding: 10px;
    background: var(--gray-700);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text);
    font-size: 14px;
    resize: vertical;
    margin-bottom: 12px;
}

/* Chat History */
.li-chat-history-section {
    background: var(--gray-800);
    border-radius: 8px;
    padding: 16px;
}

.li-chat-history-section h3 {
    font-size: 14px;
    font-weight: 600;
    color: var(--accent);
    margin-bottom: 8px;
}

.li-chat-history-section .hint {
    font-size: 12px;
    color: var(--gray-500);
    margin-bottom: 12px;
}

.li-chat-history-section textarea {
    width: 100%;
    padding: 10px;
    background: var(--gray-700);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text);
    font-size: 13px;
    resize: vertical;
    margin-bottom: 12px;
    font-family: monospace;
}

/* Button Variants */
.btn-small {
    padding: 6px 12px;
    font-size: 12px;
}

.btn-action {
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px 8px;
    font-size: 14px;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.btn-action:hover {
    opacity: 1;
}

.actions-cell {
    white-space: nowrap;
}

/* LinkedIn URL columns */
.url-cell {
    text-align: center;
    width: 80px;
}

.li-url-link {
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
    padding: 4px 8px;
    border-radius: 4px;
    background: rgba(99, 102, 241, 0.1);
    font-size: 12px;
}

.li-url-link:hover {
    background: rgba(99, 102, 241, 0.2);
}

.li-url-none {
    color: var(--gray-500);
    font-size: 12px;
}

.company-cell {
    min-width: 150px;
}

.company-cell strong {
    display: block;
}

.shopify-badge {
    display: inline-block;
    font-size: 10px;
    padding: 2px 6px;
    background: #96bf48;
    color: #1a1a1a;
    border-radius: 3px;
    margin-top: 4px;
}

.li-role-badge {
    display: inline-block;
    font-size: 11px;
    padding: 2px 6px;
    background: rgba(99, 102, 241, 0.2);
    color: var(--accent);
    border-radius: 3px;
    margin-left: 8px;
    text-transform: capitalize;
}

@media (max-width: 1200px) {
    .linkedin-stats {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 768px) {
    .linkedin-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .linkedin-detail-grid {
        grid-template-columns: 1fr;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   VIDEO GENERATION
   ═══════════════════════════════════════════════════════════════════════════ */

.video-form {
    display: flex;
    flex-direction: column;
    gap: 24px;
    padding: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-family: var(--font-sans);
    font-weight: 600;
    font-size: 14px;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-group label svg {
    flex-shrink: 0;
}

.form-select {
    padding: 12px;
    background: var(--input-bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-family: var(--font-sans);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.form-select:hover {
    border-color: var(--accent);
}

.form-select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.form-textarea {
    padding: 12px;
    background: var(--input-bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-family: var(--font-sans);
    font-size: 14px;
    resize: vertical;
    min-height: 100px;
    transition: all 0.2s ease;
}

.form-textarea:hover {
    border-color: var(--accent);
}

.form-textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.form-hint {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
}

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

input[type="file"] {
    padding: 12px;
    background: var(--input-bg);
    border: 2px dashed var(--border);
    border-radius: 8px;
    color: var(--text);
    font-family: var(--font-sans);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

input[type="file"]:hover {
    border-color: var(--accent);
}

/* Upload Dropzone */
.upload-dropzone {
    border: 2px dashed var(--border);
    border-radius: 8px;
    padding: 32px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    background: var(--gray-800);
}

.upload-dropzone:hover {
    border-color: var(--accent);
    background: var(--gray-700);
}

.upload-dropzone.dragover {
    border-color: var(--accent);
    background: rgba(249, 115, 22, 0.1);
}

.dropzone-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

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

.dropzone-text {
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
}

.dropzone-hint {
    font-size: 12px;
    color: var(--gray-500);
}

.image-preview {
    position: relative;
    margin-top: 0;
    border: none;
    border-radius: 8px;
    overflow: hidden;
    max-width: 100%;
}

.image-preview img {
    width: 100%;
    height: auto;
    display: block;
}

.remove-image {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 32px;
    height: 32px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.remove-image:hover {
    background: var(--danger);
    transform: scale(1.1);
}

.btn-large {
    padding: 16px 32px;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    margin-top: 8px;
}

.btn-icon {
    font-size: 20px;
}

.loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    gap: 16px;
}

.spinner {
    width: 48px;
    height: 48px;
    border: 4px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.loading-state p {
    font-size: 14px;
    color: var(--text-muted);
}

.video-preview {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 20px;
    background: var(--darker);
    border: 1px solid var(--border);
    border-radius: 12px;
    margin-top: 16px;
}

.video-preview h3 {
    font-family: var(--font-sans);
    font-size: 18px;
    font-weight: 600;
    color: var(--success);
    margin: 0;
}

.video-preview video {
    width: 100%;
    max-width: 800px;
    border-radius: 8px;
    background: black;
}

.video-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.video-actions button {
    flex: 1;
    min-width: 150px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   TOAST NOTIFICATIONS
   ═══════════════════════════════════════════════════════════════════════════ */

.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    padding: 14px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    z-index: 10000;
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s ease;
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

.toast-success {
    background: var(--success);
    color: #fff;
}

.toast-error {
    background: var(--error);
    color: #fff;
}

/* ═══════════════════════════════════════════════════════════════════════════
   DEAL COMPONENTS (v2.1)
   ═══════════════════════════════════════════════════════════════════════════ */

.li-deal-actions {
    display: flex;
    gap: 12px;
    padding: 20px;
    border-top: 1px solid var(--border);
    margin-top: 20px;
    background: var(--card);
    position: sticky;
    bottom: 0;
    z-index: 10;
}

.btn-deal {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 24px;
    background: linear-gradient(135deg, var(--success) 0%, #059669 100%);
    border: none;
    border-radius: 8px;
    color: #fff;
    font-family: var(--font-sans);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-deal:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(16, 185, 129, 0.4);
}

.btn-assign {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 24px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--white);
    font-family: var(--font-sans);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-assign:hover {
    background: var(--accent);
    border-color: var(--accent);
}

.btn-assign.assigned {
    background: var(--accent);
    border-color: var(--accent);
}

/* Deal Form */
.deal-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.deal-form .form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.deal-form .form-group label {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--gray-400);
}

.deal-form .form-input {
    padding: 12px 16px;
    background: var(--gray-800);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--white);
    font-family: var(--font-sans);
    font-size: 14px;
    transition: border-color 0.2s ease;
}

.deal-form .form-input:focus {
    outline: none;
    border-color: var(--accent);
}

.deal-form .form-input[readonly] {
    background: var(--gray-900);
    color: var(--gray-400);
}

.deal-products-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 8px;
}

.deal-product-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr auto;
    gap: 8px;
    align-items: center;
}

.deal-product-row input {
    padding: 8px 12px;
    background: var(--gray-800);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--white);
    font-size: 13px;
}

.deal-product-row input:focus {
    outline: none;
    border-color: var(--accent);
}

.deal-product-row .btn-remove-product {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--gray-500);
    cursor: pointer;
    transition: all 0.2s ease;
}

.deal-product-row .btn-remove-product:hover {
    background: var(--error);
    border-color: var(--error);
    color: #fff;
}

.btn-deal-submit {
    background: linear-gradient(135deg, var(--success) 0%, #059669 100%) !important;
}

.btn-deal-submit:hover {
    box-shadow: 0 4px 20px rgba(16, 185, 129, 0.4);
}

/* Confetti animation - starts invisible to prevent pixel glitch */
@keyframes confetti-fall {
    0% {
        transform: translateY(-100vh) rotate(0deg) scale(0);
        opacity: 0;
    }
    5% {
        transform: translateY(-90vh) rotate(36deg) scale(1);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(720deg) scale(1);
        opacity: 0;
    }
}

.confetti {
    position: fixed;
    width: 10px;
    height: 10px;
    top: 0;
    z-index: 10001;
    opacity: 0;
    transform: scale(0);
    animation: confetti-fall 3s ease-out forwards;
}

.confetti-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10001;
    overflow: hidden;
}

.toast-info {
    background: var(--accent);
    color: #fff;
}

/* ═══════════════════════════════════════════════════════════════════════════
   ANALYTICS PAGE
   ═══════════════════════════════════════════════════════════════════════════ */

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

.metric-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px;
    transition: all 0.2s ease;
}

.metric-card:hover {
    border-color: var(--gray-700);
    transform: translateY(-2px);
}

.metric-card.highlight {
    background: linear-gradient(135deg, rgba(255, 95, 31, 0.1) 0%, var(--card) 100%);
    border-color: var(--accent);
}

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

.metric-icon {
    font-size: 24px;
}

.metric-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--gray-400);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-left: auto;
}

.metric-value {
    font-size: 36px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 12px;
}

.metric-detail {
    display: flex;
    gap: 16px;
    font-size: 13px;
    color: var(--gray-400);
}

.metric-detail span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.analytics-charts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

/* Funnel Chart */
.funnel-chart {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 20px 0;
}

.funnel-stage {
    display: flex;
    align-items: center;
}

.funnel-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    background: var(--info);
    border-radius: 8px;
    color: #fff;
    font-weight: 500;
    transition: all 0.3s ease;
    min-width: 200px;
}

.funnel-bar.connection {
    background: var(--warning);
}

.funnel-bar.connected {
    background: #8b5cf6;
}

.funnel-bar.messaged {
    background: #06b6d4;
}

.funnel-bar.replied {
    background: #10b981;
}

.funnel-bar.meeting {
    background: var(--success);
}

.funnel-label {
    font-size: 14px;
}

.funnel-count {
    font-size: 14px;
    font-weight: 700;
}

/* Distribution Chart */
.distribution-chart {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 20px 0;
}

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

.distribution-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.distribution-label {
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
}

.distribution-value {
    font-size: 14px;
    font-weight: 700;
    color: var(--accent);
}

.distribution-bar {
    height: 8px;
    background: var(--background);
    border-radius: 4px;
    overflow: hidden;
}

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

.distribution-fill.new {
    background: var(--info);
}

.distribution-fill.contacted {
    background: var(--warning);
}

.distribution-fill.meeting {
    background: var(--accent);
}

.distribution-fill.customer {
    background: var(--success);
}

/* Leaderboard */
.leaderboard-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 20px 0;
}

.leaderboard-item {
    display: grid;
    grid-template-columns: 60px 1fr auto auto;
    gap: 16px;
    align-items: center;
    padding: 16px 20px;
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: 8px;
    transition: all 0.2s ease;
}

.leaderboard-item:hover {
    background: var(--card-hover);
    border-color: var(--gray-700);
}

.leaderboard-rank {
    font-size: 20px;
    font-weight: 700;
    color: var(--accent);
    text-align: center;
}

.leaderboard-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
}

.leaderboard-deals {
    font-size: 14px;
    color: var(--gray-400);
    white-space: nowrap;
}

.leaderboard-revenue {
    font-size: 16px;
    font-weight: 700;
    color: var(--success);
    white-space: nowrap;
}

/* Chart Styling */
.chart-container {
    position: relative;
    height: 350px;
    margin-top: 20px;
}

.chart-subtitle {
    font-size: 12px;
    color: var(--gray-400);
    font-weight: 400;
    margin-left: auto;
}

/* Revenue Stats Grid */
.revenue-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 16px;
    margin-top: 20px;
    padding: 20px;
    background: var(--background);
    border-radius: 8px;
}

.revenue-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
    text-align: center;
}

.revenue-label {
    font-size: 12px;
    color: var(--gray-400);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

.revenue-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--success);
}

@media (max-width: 1024px) {
    .analytics-charts {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .analytics-metrics {
        grid-template-columns: 1fr;
    }
    
    .leaderboard-item {
        grid-template-columns: 50px 1fr auto;
        gap: 12px;
    }
    
    .leaderboard-deals {
        display: none;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   PROMPTS PAGE
   ═══════════════════════════════════════════════════════════════════════════ */

.prompts-container {
    padding: 32px;
}

.prompts-section {
    margin-bottom: 48px;
}

.section-heading {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 24px;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 8px;
}

.section-icon {
    font-size: 28px;
}

.section-description {
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 24px;
    line-height: 1.6;
}

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

.prompt-card:hover {
    background: var(--card-hover);
    border-color: var(--accent);
    box-shadow: 0 4px 24px rgba(255, 95, 31, 0.1);
}

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

.prompt-header h3 {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 20px;
    font-weight: 600;
    color: var(--white);
    margin: 0;
}

.prompt-icon {
    font-size: 24px;
}

.prompt-status {
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    background: var(--success-bg);
    color: var(--success);
}

.prompt-status.saving {
    background: var(--warning-bg);
    color: var(--warning);
}

.prompt-status.error {
    background: var(--danger-bg);
    color: var(--danger);
}

.prompt-description {
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 16px;
    line-height: 1.5;
}

.prompt-editor {
    margin-bottom: 16px;
}

.prompt-textarea {
    width: 100%;
    min-height: 240px;
    padding: 16px;
    background: var(--input-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--text);
    font-family: 'SF Mono', 'Monaco', 'Consolas', monospace;
    font-size: 13px;
    line-height: 1.6;
    resize: vertical;
    transition: all 0.3s ease;
}

.prompt-textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.prompt-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

/* Video Prompts Grid */
.video-prompts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
}

.video-prompt-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s ease;
}

.video-prompt-card:hover {
    background: var(--card-hover);
    border-color: var(--border);
    transform: translateY(-2px);
}

.video-prompt-card h4 {
    font-size: 16px;
    font-weight: 600;
    color: var(--white);
    margin: 0 0 12px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.video-prompt-card p {
    color: var(--text-muted);
    font-size: 13px;
    line-height: 1.6;
    margin: 0;
}

.video-prompt-badge {
    display: inline-block;
    padding: 4px 8px;
    background: var(--accent-glow);
    color: var(--accent);
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    margin-left: auto;
}

@media (max-width: 1024px) {
    .video-prompts-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }
}

@media (max-width: 768px) {
    .prompts-container {
        padding: 20px;
    }
    
    .video-prompts-grid {
        grid-template-columns: 1fr;
    }
    
    .prompt-card {
        padding: 20px;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
<<<<<<< HEAD
   SETTINGS PAGE
   ═══════════════════════════════════════════════════════════════════════════ */

.settings-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.settings-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
}

.settings-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: var(--gray-800);
    border-bottom: 1px solid var(--border);
}

.settings-icon {
    font-size: 20px;
}

.settings-card-header h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
    margin: 0;
}

.settings-card-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

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

.settings-item label {
    font-size: 13px;
    font-weight: 500;
    color: var(--gray-300);
}

.settings-input,
.settings-select {
    background: var(--gray-800);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 14px;
    color: var(--text);
    transition: border-color 0.2s ease;
}

.settings-input:focus,
.settings-select:focus {
    outline: none;
    border-color: var(--accent);
}

.settings-input:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.settings-select {
    cursor: pointer;
}

/* Toggle Switch */
.settings-toggle-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}

.settings-toggle-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.toggle-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.toggle-label {
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
}

.toggle-description {
    font-size: 12px;
    color: var(--gray-400);
}

.toggle-switch {
    position: relative;
    width: 48px;
    height: 26px;
    flex-shrink: 0;
}

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

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gray-600);
    border-radius: 26px;
    transition: 0.3s ease;
}

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

.toggle-switch input:checked + .toggle-slider {
    background: var(--accent);
}

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

/* Integrations */
.settings-integration {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}

.settings-integration:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.integration-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.integration-name {
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
}

.integration-status {
    font-size: 12px;
    color: var(--gray-400);
}

.integration-status.connected {
    color: var(--success);
}

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

/* Team Channel Settings */
.settings-card-wide {
    grid-column: 1 / -1;
}

.settings-description {
    font-size: 13px;
    color: var(--gray-400);
    margin-bottom: 8px;
}

.team-channel-settings {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.team-member-channels {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: var(--gray-800);
    border-radius: 8px;
}

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

.team-member-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    color: white;
}

.team-member-name {
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
}

.channel-toggles {
    display: flex;
    gap: 8px;
}

.channel-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 32px;
    border-radius: 6px;
    background: var(--gray-700);
    border: 1px solid var(--border);
    cursor: pointer;
    transition: all 0.2s ease;
    opacity: 0.5;
    color: var(--gray-400);
}

.channel-toggle svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

.channel-toggle:hover {
    border-color: var(--gray-500);
}

.channel-toggle.active {
    background: var(--accent);
    border-color: var(--accent);
    opacity: 1;
    color: white;
}

.channel-toggle.active:hover {
    background: var(--accent-hover);
}

/* Settings Actions */
.settings-actions {
    margin-top: 24px;
    display: flex;
    justify-content: flex-end;
}

@media (max-width: 1024px) {
    .settings-grid {
        grid-template-columns: 1fr;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   EMAIL MODAL IMPROVEMENTS
   ═══════════════════════════════════════════════════════════════════════════ */

.modal-large {
    max-width: 900px !important;
    width: 90%;
}

.email-meta {
    display: flex;
    gap: 24px;
    padding: 16px;
    background: var(--input-bg);
    border-radius: 12px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.meta-item {
    display: flex;
    gap: 8px;
    align-items: center;
}

.meta-label {
    font-weight: 600;
    color: var(--text-muted);
    font-size: 14px;
}

.meta-value {
    color: var(--text);
    font-size: 14px;
}

.meta-value.status-badge {
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
}

.status-sent {
    background: rgba(16, 185, 129, 0.2);
    color: var(--success);
}

.status-processing {
    background: rgba(251, 191, 36, 0.2);
    color: var(--warning);
}

.status-draft {
    background: rgba(59, 130, 246, 0.2);
    color: var(--info);
}

.status-spam {
    background: rgba(239, 68, 68, 0.2);
    color: var(--danger);
}

.email-thread {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 24px;
}

.thread-message {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px;
    transition: all 0.3s ease;
}

.thread-message:hover {
    border-color: var(--accent);
    box-shadow: 0 2px 12px rgba(255, 95, 31, 0.1);
}

.thread-message.incoming {
    border-left: 3px solid var(--info);
}

.thread-message.outgoing {
    border-left: 3px solid var(--success);
}

.message-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
}

.message-from {
    font-weight: 600;
    color: var(--white);
    font-size: 14px;
}

.message-date {
    font-size: 12px;
    color: var(--text-muted);
}

.message-body {
    color: var(--text);
    line-height: 1.6;
    font-size: 14px;
    white-space: pre-wrap;
    word-wrap: break-word;
    max-height: 200px;
    overflow-y: auto;
}

.message-body.expanded {
    max-height: none;
}

.message-expand-btn {
    margin-top: 8px;
    padding: 4px 12px;
    background: var(--card-hover);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--accent);
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.message-expand-btn:hover {
    background: var(--border);
}

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

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

.section-header h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--white);
    margin: 0;
}

.btn-icon {
    padding: 6px;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text);
    cursor: pointer;
    font-size: 16px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
}

.btn-icon:hover {
    background: var(--card-hover);
    border-color: var(--accent);
    color: var(--accent);
}

.email-draft-container {
    background: var(--input-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px;
    color: var(--text);
    line-height: 1.6;
    font-size: 14px;
}

.draft-editor {
    width: 100%;
    min-height: 200px;
    padding: 16px;
    background: var(--input-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--text);
    font-family: var(--font-sans);
    font-size: 14px;
    line-height: 1.6;
    resize: vertical;
    transition: all 0.3s ease;
}

.draft-editor:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.draft-note {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 8px;
    font-style: italic;
}

.loading {
    text-align: center;
    padding: 40px;
    color: var(--text-muted);
    font-size: 14px;
}

.loading::after {
    content: '...';
    animation: loading-dots 1.5s infinite;
}

@keyframes loading-dots {
    0%, 20% { content: ''; }
    40% { content: '.'; }
    60% { content: '..'; }
    80%, 100% { content: '...'; }
}

.empty-state {
    text-align: center;
    padding: 40px;
    color: var(--text-muted);
    font-size: 14px;
}

@media (max-width: 768px) {
    .modal-large {
        width: 95%;
        max-width: none;
    }
    
    .email-meta {
        flex-direction: column;
        gap: 12px;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   CALENDLY INTEGRATION
   ═══════════════════════════════════════════════════════════════════════════ */

/* Calendly popup widget only - no inline embed */

/* ═══════════════════════════════════════════════════════════════════════════
   LEADERBOARD PAGE
   ═══════════════════════════════════════════════════════════════════════════ */

/* Personal Stats Card */
.personal-stats-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, var(--gray-800) 0%, var(--gray-900) 100%);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 24px 32px;
    margin-bottom: 24px;
}

.stats-left {
    display: flex;
    align-items: center;
}

.user-level-badge {
    display: flex;
    align-items: center;
    gap: 20px;
}

.level-circle {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), #ff8f6b);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(255, 107, 53, 0.3);
}

.level-number {
    font-size: 28px;
    font-weight: 800;
    color: white;
}

.level-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.level-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text);
}

.xp-bar {
    width: 180px;
    height: 8px;
    background: var(--gray-700);
    border-radius: 4px;
    overflow: hidden;
}

.xp-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent), #ff8f6b);
    border-radius: 4px;
    transition: width 0.5s ease;
}

.xp-text {
    font-size: 13px;
    color: var(--gray-400);
}

.stats-right {
    display: flex;
    gap: 32px;
}

.quick-stat {
    text-align: center;
}

.quick-stat-value {
    display: block;
    font-size: 28px;
    font-weight: 700;
    color: var(--text);
}

.quick-stat-label {
    font-size: 12px;
    color: var(--gray-400);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.quick-stat.streak .quick-stat-value {
    color: var(--accent);
}

/* Leaderboard Grid */
.leaderboard-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 24px;
    margin-bottom: 24px;
}

/* Team Leaderboard */
.leaderboard-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.leaderboard-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 16px;
    background: var(--gray-800);
    border-radius: 10px;
    transition: transform 0.2s ease;
}

.leaderboard-item:hover {
    transform: translateX(4px);
}

.leaderboard-item.current-user {
    background: rgba(255, 107, 53, 0.15);
    border: 1px solid var(--accent);
}

.leaderboard-rank {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    background: var(--gray-700);
    color: var(--gray-300);
}

.leaderboard-item:nth-child(1) .leaderboard-rank {
    background: linear-gradient(135deg, #FFD700, #FFA500);
    color: #1a1a1a;
}

.leaderboard-item:nth-child(2) .leaderboard-rank {
    background: linear-gradient(135deg, #C0C0C0, #A0A0A0);
    color: #1a1a1a;
}

.leaderboard-item:nth-child(3) .leaderboard-rank {
    background: linear-gradient(135deg, #CD7F32, #A0522D);
    color: white;
}

.leaderboard-user {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.leaderboard-name {
    font-weight: 600;
    color: var(--text);
}

.leaderboard-stats {
    font-size: 12px;
    color: var(--gray-400);
}

.leaderboard-value {
    font-size: 18px;
    font-weight: 700;
    color: var(--accent);
}

/* Achievements */
.achievements-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.achievement {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 16px 12px;
    background: var(--gray-800);
    border-radius: 12px;
    text-align: center;
    transition: transform 0.2s ease;
}

.achievement:hover {
    transform: scale(1.05);
}

.achievement.unlocked {
    background: linear-gradient(135deg, rgba(255, 107, 53, 0.15), rgba(255, 143, 107, 0.1));
    border: 1px solid rgba(255, 107, 53, 0.3);
}

.achievement.locked {
    opacity: 0.5;
    filter: grayscale(1);
}

.achievement-icon {
    font-size: 28px;
}

.achievement-name {
    font-size: 11px;
    font-weight: 600;
    color: var(--text);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* Activity Feed */
.activity-feed {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.activity-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--gray-800);
    border-radius: 10px;
}

.activity-icon {
    font-size: 20px;
}

.activity-text {
    flex: 1;
    font-size: 14px;
    color: var(--text);
}

.activity-time {
    font-size: 12px;
    color: var(--gray-500);
}

@media (max-width: 1024px) {
    .leaderboard-grid {
        grid-template-columns: 1fr;
    }
    
    .personal-stats-card {
        flex-direction: column;
        gap: 24px;
        text-align: center;
    }
    
    .stats-right {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .achievements-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   LEADERBOARD PAGE
   ═══════════════════════════════════════════════════════════════════════════ */

/* Personal Stats Card */
.personal-stats-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, var(--gray-800) 0%, var(--gray-900) 100%);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 24px 32px;
    margin-bottom: 24px;
}

.stats-left {
    display: flex;
    align-items: center;
}

.user-level-badge {
    display: flex;
    align-items: center;
    gap: 20px;
}

.level-circle {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), #ff8f6b);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(255, 107, 53, 0.3);
}

.level-number {
    font-size: 28px;
    font-weight: 800;
    color: white;
}

.level-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.level-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text);
}

.xp-bar {
    width: 180px;
    height: 8px;
    background: var(--gray-700);
    border-radius: 4px;
    overflow: hidden;
}

.xp-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent), #ff8f6b);
    border-radius: 4px;
    transition: width 0.5s ease;
}

.xp-text {
    font-size: 13px;
    color: var(--gray-400);
}

.stats-right {
    display: flex;
    gap: 32px;
}

.quick-stat {
    text-align: center;
}

.quick-stat-value {
    display: block;
    font-size: 28px;
    font-weight: 700;
    color: var(--text);
}

.quick-stat-label {
    font-size: 12px;
    color: var(--gray-400);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.quick-stat.streak .quick-stat-value {
    color: var(--accent);
}

/* Leaderboard Grid */
.leaderboard-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 24px;
    margin-bottom: 24px;
}

/* Team Leaderboard */
.leaderboard-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.leaderboard-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 16px;
    background: var(--gray-800);
    border-radius: 10px;
    transition: transform 0.2s ease;
}

.leaderboard-item:hover {
    transform: translateX(4px);
}

.leaderboard-item.current-user {
    background: rgba(255, 107, 53, 0.15);
    border: 1px solid var(--accent);
}

.leaderboard-rank {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    background: var(--gray-700);
    color: var(--gray-300);
}

.leaderboard-item:nth-child(1) .leaderboard-rank {
    background: linear-gradient(135deg, #FFD700, #FFA500);
    color: #1a1a1a;
}

.leaderboard-item:nth-child(2) .leaderboard-rank {
    background: linear-gradient(135deg, #C0C0C0, #A0A0A0);
    color: #1a1a1a;
}

.leaderboard-item:nth-child(3) .leaderboard-rank {
    background: linear-gradient(135deg, #CD7F32, #A0522D);
    color: white;
}

.leaderboard-user {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.leaderboard-name {
    font-weight: 600;
    color: var(--text);
}

.leaderboard-stats {
    font-size: 12px;
    color: var(--gray-400);
}

.leaderboard-value {
    font-size: 18px;
    font-weight: 700;
    color: var(--accent);
}

/* Achievements */
.achievements-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.achievement {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 16px 12px;
    background: var(--gray-800);
    border-radius: 12px;
    text-align: center;
    transition: transform 0.2s ease;
}

.achievement:hover {
    transform: scale(1.05);
}

.achievement.unlocked {
    background: linear-gradient(135deg, rgba(255, 107, 53, 0.15), rgba(255, 143, 107, 0.1));
    border: 1px solid rgba(255, 107, 53, 0.3);
}

.achievement.locked {
    opacity: 0.5;
    filter: grayscale(1);
}

.achievement-icon {
    font-size: 28px;
}

.achievement-name {
    font-size: 11px;
    font-weight: 600;
    color: var(--text);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* Activity Feed */
.activity-feed {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.activity-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--gray-800);
    border-radius: 10px;
}

.activity-icon {
    font-size: 20px;
}

.activity-text {
    flex: 1;
    font-size: 14px;
    color: var(--text);
}

.activity-time {
    font-size: 12px;
    color: var(--gray-500);
}

@media (max-width: 1024px) {
    .leaderboard-grid {
        grid-template-columns: 1fr;
    }
    
    .personal-stats-card {
        flex-direction: column;
        gap: 24px;
        text-align: center;
    }
    
    .stats-right {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .achievements-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* =========================================================================
   DEALS PAGE
   ========================================================================= */

.deals-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.deal-stat-card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    border: 1px solid var(--border);
}

.deal-stat-icon {
    font-size: 32px;
}

.deal-stat-content {
    display: flex;
    flex-direction: column;
}

.deal-stat-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--text);
}

.deal-stat-label {
    font-size: 13px;
    color: var(--gray-400);
}

.deals-filters {
    display: flex;
    gap: 12px;
}

.deals-filters select {
    padding: 8px 12px;
    border-radius: 6px;
    background: var(--input-bg);
    border: 1px solid var(--border);
    color: var(--text);
    font-size: 14px;
}

.deals-table-wrapper {
    overflow-x: auto;
}

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

.deals-table th {
    text-align: left;
    padding: 12px 16px;
    font-weight: 600;
    color: var(--gray-400);
    font-size: 12px;
    text-transform: uppercase;
    border-bottom: 1px solid var(--border);
}

.deals-table td {
    padding: 16px;
    border-bottom: 1px solid var(--border);
}

.deal-row {
    cursor: pointer;
    transition: background 0.2s;
}

.deal-row:hover {
    background: var(--gray-800);
}

.deal-amount strong {
    color: var(--success);
}

.channel-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    background: var(--gray-700);
    border-radius: 20px;
    font-size: 12px;
    text-transform: capitalize;
}

.deal-status-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.deal-status-badge.status-won {
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
}

.deal-status-badge.status-pending {
    background: rgba(251, 191, 36, 0.2);
    color: #fbbf24;
}

.no-deals {
    text-align: center;
    padding: 40px !important;
    color: var(--gray-500);
}

@media (max-width: 1024px) {
    .deals-stats {
        grid-template-columns: repeat(2, 1fr);
    }
}

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

/* Channel Switch Icons in Modal Header */
.channel-switch-icons {
    display: flex;
    gap: 6px;
    margin-left: auto;
    margin-right: 16px;
}

.channel-switch-btn {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    border: none;
    background: var(--gray-700);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    color: var(--gray-400);
}

.channel-switch-btn:hover {
    background: var(--gray-600);
    color: var(--gray-200);
}

.channel-switch-btn.active {
    background: rgba(255, 95, 31, 0.2);
    color: var(--accent);
}

.channel-switch-btn.has-messages {
    color: var(--accent);
}

.channel-switch-btn svg {
    width: 16px;
    height: 16px;
}

.channel-icon-cell {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.channel-icon-cell svg {
    width: 20px;
    height: 20px;
}

/* Center channel icons in Deals table */
.deals-table .deal-channel,
.deals-table th.deal-channel-header {
    text-align: center !important;
}

/* Closed status badge */
.li-status-closed {
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
}
