/* ==========================================
   VIVA TECHNOLOGIES - ULTRA PREMIUM UI
   ========================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700&display=swap');

:root {
    /* Luminous Light Theme */
    --primary: #4F46E5;
    --primary-gradient: linear-gradient(135deg, #4F46E5 0%, #7C3AED 100%);
    --primary-hover: #4338CA;
    --bg-color: #F8FAFC;
    --card-bg: rgba(255, 255, 255, 0.7);
    --card-border: rgba(255, 255, 255, 0.5);
    --text-main: #0F172A;
    --text-muted: #64748B;
    --border: #E2E8F0;
    --sidebar-bg: rgba(255, 255, 255, 0.8);
    --sidebar-text: #0F172A;
    --success: #10B981;
    --warning: #F59E0B;
    --glow: rgba(79, 70, 229, 0.15);
    --glass-blur: blur(16px);
    color-scheme: light; /* Add this line */
}

[data-theme="dark"] {
    /* Obsidian Dark Tech Theme */
    --primary: #6366F1;
    --primary-gradient: linear-gradient(135deg, #6366F1 0%, #A855F7 100%);
    --primary-hover: #4F46E5;
    --bg-color: #0B0F19; /* Deep Obsidian */
    --card-bg: rgba(17, 24, 39, 0.6);
    --card-border: rgba(255, 255, 255, 0.05);
    --text-main: #F8FAFC;
    --text-muted: #94A3B8;
    --border: rgba(255, 255, 255, 0.1);
    --sidebar-bg: rgba(11, 15, 25, 0.85);
    --sidebar-text: #F8FAFC;
    --glow: rgba(99, 102, 241, 0.25);
    color-scheme: dark;
}

* { 
    box-sizing: border-box; 
    margin: 0; 
    padding: 0; 
    font-family: 'Plus Jakarta Sans', system-ui, sans-serif; 
}
/* ==========================================
   PREMIUM DROPDOWN (SELECT) STYLING
   ========================================== */
select {
    /* Remove default system arrow */
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    
    /* Add sleek custom chevron arrow */
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748B' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1.2em;
    padding-right: 2.5rem !important; /* Make room for the new arrow */
    cursor: pointer;
}

select:focus {
    /* Change arrow color when focused (Primary glow color) */
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234F46E5' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
}

/* Style the actual dropdown list items */
select option {
    background-color: var(--bg-color); 
    color: var(--text-main);
    font-weight: 500;
    padding: 10px;
}

/* Deep Obsidian fix specifically for dark mode options */
[data-theme="dark"] select option {
    background-color: #0F172A; /* Deep rich dark blue/black */
    color: #F8FAFC;
}

[data-theme="dark"] optgroup {
    background-color: #0F172A; /* Deep rich dark blue/black */
    color: #F8FAFC;
}
body { 
    background-color: var(--bg-color); 
    background-image: 
        radial-gradient(at 0% 0%, var(--glow) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(168, 85, 247, 0.1) 0px, transparent 50%);
    background-attachment: fixed;
    color: var(--text-main); 
    transition: background-color 0.4s ease, color 0.4s ease; 
    overflow-x: hidden;
}

/* Scrollbar Styling */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* Utilities & Glassmorphism Cards */
.mt-2 { margin-top: 1.5rem; }
.card { 
    background: var(--card-bg); 
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--card-border);
    padding: 1.5rem; 
    border-radius: 16px; 
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.1); 
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.card:hover {
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.2); 
}

/* Premium Buttons */
.btn { 
    padding: 0.6rem 1.2rem; 
    border: none; 
    border-radius: 8px; 
    cursor: pointer; 
    font-weight: 600; 
    letter-spacing: 0.3px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); 
    position: relative;
    overflow: hidden;
}
.btn-primary { 
    background: var(--primary-gradient); 
    color: white; 
    box-shadow: 0 4px 15px var(--glow);
}
.btn-primary:hover { 
    transform: translateY(-2px);
    box-shadow: 0 8px 25px var(--glow); 
    filter: brightness(1.1);
    
}
.refresh-btn i {
    transition: 0.3s;
}

.refresh-btn:hover i {
    animation: fa-spin 2.5s linear infinite;
}




.btn-secondary { 
    background: transparent; 
    color: var(--text-main); 
    border: 1px solid var(--border);
}
.btn-secondary:hover { 
    background: var(--border); 
}
.btn-sm { padding: 0.4rem 0.8rem; font-size: 0.85rem; }

/* Typography */
h1 { margin-bottom: 1.5rem; font-size: 2rem; font-weight: 700; letter-spacing: -0.5px; }
h2 { font-weight: 700; letter-spacing: -0.5px; background: var(--primary-gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
h3 { margin-bottom: 1rem; font-weight: 600; }

/* Premium Forms */
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.5rem; }
.form-group { display: flex; flex-direction: column; gap: 0.4rem; }
.form-group label { font-size: 0.85rem; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; }
input, select, textarea { 
    padding: 0.75rem 1rem; 
    border: 1px solid var(--border); 
    border-radius: 10px; 
    background: rgba(255, 255, 255, 0.03); 
    color: var(--text-main); 
    outline: none; 
    transition: all 0.3s ease;
    font-size: 0.95rem;
}
input:focus, select:focus, textarea:focus { 
    border-color: var(--primary); 
    box-shadow: 0 0 0 3px var(--glow); 
    background: transparent;
}

/* Layout & Glass Sidebar */
.app-container { display: flex; min-height: 100vh; }
.sidebar { 
    width: 260px; 
    background: var(--sidebar-bg); 
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-right: 1px solid var(--card-border);
    color: var(--sidebar-text); 
    display: flex; 
    flex-direction: column; 
    transition: 0.4s cubic-bezier(0.4, 0, 0.2, 1); 
    z-index: 100; 
}
.sidebar-header { padding: 2rem 1.5rem; display: flex; justify-content: space-between; align-items: center; }
.sidebar-nav { flex: 1; padding: 1rem 0; display: flex; flex-direction: column; gap: 0.25rem; }
.nav-item { 
    padding: 1rem 1.5rem; 
    margin: 0 1rem;
    border-radius: 10px;
    background: transparent; 
    color: var(--sidebar-text); 
    border: none; 
    text-align: left; 
    cursor: pointer; 
    font-size: 0.95rem; 
    font-weight: 500;
    transition: all 0.3s ease; 
}
.nav-item:hover { background: rgba(255, 255, 255, 0.05); transform: translateX(5px); }
.nav-item.active { 
    background: var(--primary-gradient); 
    color: white; 
    box-shadow: 0 4px 15px var(--glow);
}
.nav-item i { width: 24px; margin-right: 10px; opacity: 0.8; }
.nav-item.active i { opacity: 1; }
.sidebar-footer { padding: 1.5rem; display: flex; flex-direction: column; gap: 1rem; border-top: 1px solid var(--border); }
.sidebar-footer button { 
    background: transparent; border: none; color: var(--text-muted); cursor: pointer; text-align: left; font-weight: 500; transition: color 0.3s;
}
.sidebar-footer button:hover { color: var(--text-main); }

/* Main Content Area */
.main-content { flex: 1; display: flex; flex-direction: column; width: calc(100% - 260px); }
.topbar { 
    background: transparent; 
    padding: 1.5rem 2.5rem; 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
}
.user-info span { 
    padding: 0.5rem 1rem; 
    background: var(--card-bg); 
    border: 1px solid var(--card-border); 
    border-radius: 20px; 
    font-size: 0.85rem; 
    font-weight: 600; 
}
.content-area { padding: 0 2.5rem 2.5rem 2.5rem; flex: 1; overflow-y: auto; }
.page-section { display: none; animation: fadeIn 0.5s ease forwards; }
.page-section.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* Dashboard Stats (Floating Cards) */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.5rem; }
.stat-card { text-align: center; padding: 2rem 1.5rem; }
.stat-card p { 
    font-size: 2.5rem; 
    font-weight: 700; 
    background: var(--primary-gradient); 
    -webkit-background-clip: text; 
    -webkit-text-fill-color: transparent; 
    margin-top: 0.5rem;
}
.chart-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.5rem; }

/* Premium Tables */
.table-responsive { overflow-x: auto; border-radius: 12px; }
.data-table { width: 100%; border-collapse: collapse; text-align: left; white-space: nowrap; }
.data-table th, .data-table td { padding: 1.2rem 1rem; border-bottom: 1px solid var(--border); }
.data-table th { color: var(--text-muted); font-weight: 600; text-transform: uppercase; font-size: 0.8rem; letter-spacing: 0.5px; }
.data-table tbody tr { transition: background 0.2s ease; }
.data-table tbody tr:hover { background: rgba(255, 255, 255, 0.02); }
.status-badge { padding: 0.35rem 0.75rem; border-radius: 8px; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.5px; text-transform: uppercase; }
.status-New { background: rgba(59, 130, 246, 0.1); color: #3B82F6; border: 1px solid rgba(59, 130, 246, 0.2); }
.status-Interested { background: rgba(245, 158, 11, 0.1); color: #F59E0B; border: 1px solid rgba(245, 158, 11, 0.2); }
.status-Converted { background: rgba(16, 185, 129, 0.1); color: #10B981; border: 1px solid rgba(16, 185, 129, 0.2); }

/* "On Hold" - Premium Purple */
.status-Details-Sent { 
    background: rgba(168, 85, 247, 0.1); 
    color: #A855F7;     
    border: 1px solid rgba(168, 85, 247, 0.2); 
}

/* "Follow-up" - Electric Cyan (Currently missing a specific color in your CSS!) */
.status-Follow-up { 
    background: rgba(6, 182, 212, 0.1); 
    color: #06B6D4; 
    border: 1px solid rgba(6, 182, 212, 0.2); 
}

/* "Not Interested" - Soft Crimson */
.status-NotInterested { 
    background: rgba(239, 68, 68, 0.1); 
    color: #EF4444; 
    border: 1px solid rgba(239, 68, 68, 0.2); 
}

/* "Not Interested" - Soft Crimson */
.status-Demo-Attended { 
    background: rgba(68, 199, 239, 0.1); 
    color: #4494ef; 
    border: 1px solid rgba(68, 171, 239, 0.2); 
}

/* Overlays & Modals (Cinematic Feel) */
.overlay, .modal, .loader-overlay { 
    position: fixed; inset: 0; 
    background: rgba(0, 0, 0, 0.6); 
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: none; justify-content: center; align-items: center; z-index: 1000; 
}
.overlay.active, .modal.active, .loader-overlay.active { display: flex; animation: fadeIn 0.3s ease; }
.login-box, .modal-content { width: 100%; max-width: 450px; transform: scale(0.95); animation: scaleUp 0.3s ease forwards; }
@keyframes scaleUp { to { transform: scale(1); } }
.login-box h2 { text-align: center; margin-bottom: 1.5rem; font-size: 2.2rem; }
.login-box form { display: flex; flex-direction: column; gap: 1.2rem; }

/* Custom Loader (Viva Tech Ring) */
.spinner { 
    border: 3px solid rgba(255,255,255,0.1); 
    border-top: 3px solid var(--primary); 
    border-radius: 50%; width: 50px; height: 50px; 
    animation: spin 1s cubic-bezier(0.68, -0.55, 0.265, 1.55) infinite; 
}
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

/* Modern Toast Notification */
.toast { 
    visibility: hidden; 
    min-width: 300px; 
    background: var(--card-bg); 
    backdrop-filter: blur(10px);
    border: 1px solid var(--card-border);
    color: var(--text-main); 
    font-weight: 600;
    text-align: center; 
    border-radius: 12px; 
    padding: 1rem; 
    position: fixed; 
    z-index: 3000; 
    right: 30px; 
    bottom: 30px; 
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    transform: translateY(20px);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}
.toast.show { 
    visibility: visible; 
    transform: translateY(0);
    opacity: 1;
}

/* Responsive Rules */
.mobile-only { display: none; background: transparent; border: none; font-size: 1.5rem; color: var(--text-main); cursor: pointer; }
.filters-card { display: flex; gap: 1rem; flex-wrap: wrap; }
.filters-card > * { flex: 1; }

@media (max-width: 768px) {
    .mobile-only { display: block; }
    .sidebar { position: fixed; left: -260px; height: 100vh; box-shadow: 20px 0 30px rgba(0,0,0,0.5); }
    .sidebar.open { left: 0; }
    .main-content { width: 100%; }
    .content-area { padding: 1rem; }
    .topbar { padding: 1rem; }
}


/* ==========================================
   PREMIUM NOTES TOOLTIP
   ========================================== */
.note-cell {
    max-width: 150px; /* Keeps the column from getting too wide */
}

.note-tooltip {
    position: relative;
    cursor: help;
    display: inline-block;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--text-muted);
    font-weight: 500;
}

/* The floating glass card */
.note-tooltip::after {
    content: attr(data-note);
    position: absolute;
    bottom: 130%;
    left: 50%;
    transform: translateX(-50%) scale(0.95);
    background: var(--card-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--card-border);
    color: var(--text-main);
    padding: 1rem;
    border-radius: 12px;
    font-size: 0.85rem;
    line-height: 1.4;
    white-space: normal;
    min-width: 250px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.25);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1); /* Bouncy fade in */
    z-index: 1000;
    pointer-events: none;
}

.note-tooltip:hover::after {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) scale(1);
}

.note-empty {
    color: var(--border);
    font-style: italic;
}
/* ==========================================
   PREMIUM NOTES TOOLTIP (UPGRADED)
   ========================================== */
.note-cell {
    max-width: 150px; 
}

.note-tooltip {
    cursor: help;
    display: inline-block;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--text-muted);
    font-weight: 500;
}

/* The New Global Floating Glass Card */
.glass-tooltip {
    position: fixed; /* Fixed to the screen, completely immune to table overflow */
    background: var(--card-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--card-border);
    color: var(--text-main);
    padding: 1rem;
    border-radius: 12px;
    font-size: 0.85rem;
    line-height: 1.4;
    white-space: normal;
    min-width: 200px;
    max-width: 350px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.3);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, transform 0.2s ease;
    z-index: 9999; /* Forces it above everything */
    pointer-events: none;
    transform: translate(-50%, calc(-100% - 5px));
}

.glass-tooltip.show {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, calc(-100% - 15px)); /* Floats up smoothly */
}

.note-empty {
    color: var(--border);
    font-style: italic;
}




/* ==========================================
   FILE UPLOAD & IMAGE PREVIEW STYLING
   ========================================== */
.file-upload-wrapper {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.file-input {
    display: none; /* Hide default ugly input */
}

.file-label {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    border: 1px dashed var(--primary);
    background: rgba(79, 70, 229, 0.05);
}

.file-label:hover {
    background: rgba(79, 70, 229, 0.1);
}

.photo-preview-grid {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 15px;
}

.preview-img-container {
    position: relative;
    width: 70px;
    height: 70px;
    border-radius: 10px;
    border: 2px solid var(--border);
    padding: 2px;
    background: var(--card-bg);
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    animation: scaleUp 0.3s ease;
}

.preview-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 6px;
}

.remove-img {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #EF4444;
    color: white;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    border: 2px solid var(--bg-color);
    font-size: 14px;
    font-weight: bold;
    transition: transform 0.2s;
}

.remove-img:hover {
    transform: scale(1.1);
}








/* ==========================================
   ULTRA PREMIUM PROSPECT REPORT MODAL (FULLSCREEN RESPONSIVE)
   ========================================== */
.modal-landscape {
    width: 96vw !important;       /* Expands to 96% of screen width */
    max-width: 1500px !important; /* Cap for ultra-wide monitors */
    height: 94vh !important;      /* Expands to 94% of screen height */
    display: flex; 
    flex-direction: column; 
    padding: 2rem !important;
    overflow: hidden;             /* Locks the outer window from scrolling */
}

.report-header { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    border-bottom: 2px solid var(--border); 
    padding-bottom: 1rem; 
    margin-bottom: 1.5rem; 
    flex-shrink: 0; /* Locks the header at the top */
}

.report-layout-landscape {
    display: grid;
    grid-template-columns: 35% calc(65% - 1.5rem); 
    gap: 1.5rem;
    flex-grow: 1; 
    min-height: 0; /* MAGIC CSS TRICK: Allows internal scrolling inside grid/flex */
}

/* This makes the left and right columns scroll independently 
   if a prospect has a massive amount of notes or photos 
*/
.report-column {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    overflow-y: auto;     /* Internal column scrolling */
    overflow-x: hidden;
    padding-right: 12px;  /* Space for the scrollbar */
}

/* Custom Ultra-Thin Scrollbar for the data columns */
.report-column::-webkit-scrollbar { width: 5px; }
.report-column::-webkit-scrollbar-track { background: transparent; }
.report-column::-webkit-scrollbar-thumb { background: var(--border); border-radius: 10px; }
.report-column::-webkit-scrollbar-thumb:hover { background: var(--primary); }

.flex-grow-section {
    flex-grow: 1; 
}

.report-section { 
    background: rgba(79, 70, 229, 0.03); 
    padding: 1.5rem; 
    border-radius: 16px; 
    border: 1px solid rgba(79, 70, 229, 0.1); 
    box-shadow: inset 0 2px 10px rgba(0,0,0,0.02);
}

.report-section h3 { 
    font-size: 0.95rem; 
    color: var(--primary); 
    text-transform: uppercase; 
    letter-spacing: 1px; 
    margin-bottom: 1.2rem; 
    border-bottom: 1px dashed var(--primary); 
    padding-bottom: 0.5rem; 
    display: flex;
    align-items: center;
    gap: 8px;
}

.data-group { margin-bottom: 1rem; }
.data-label { 
    font-size: 0.75rem; 
    color: var(--text-muted); 
    font-weight: 700; 
    text-transform: uppercase; 
    letter-spacing: 0.5px;
}
.data-value { 
    font-size: 1.05rem; 
    font-weight: 500; 
    color: var(--text-main); 
    margin-top: 2px;
}

.report-photos { 
    display: flex; 
    gap: 15px; 
    flex-wrap: wrap; 
}

.report-photo-thumb { 
    width: 100px; 
    height: 100px; 
    object-fit: cover; 
    border-radius: 12px; 
    border: 2px solid var(--border); 
    transition: transform 0.3s ease, box-shadow 0.3s ease; 
    cursor: pointer; 
}

.report-photo-thumb:hover { 
    transform: translateY(-5px); 
    box-shadow: 0 10px 20px rgba(0,0,0,0.15);
}

.modal-actions {
    flex-shrink: 0; /* Locks the close button to the bottom */
    margin-top: 1.5rem !important;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

/* Auto-adjust for smaller laptop screens and mobile */
@media (max-width: 950px) {
    .report-layout-landscape {
        grid-template-columns: 1fr; /* Stacks data vertically */
    }
    .modal-landscape {
        width: 100vw !important;
        height: 100vh !important;
        border-radius: 0;
        padding: 1.5rem !important;
    }
}





/* ==========================================
   ULTRA PREMIUM DASHBOARD & BENTO GRID
   ========================================== */
.dashboard-header-premium {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.dash-date-badge {
    background: var(--card-bg);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border);
    padding: 0.6rem 1.2rem;
    border-radius: 30px;
    font-weight: 600;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.premium-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
}

.premium-stat-card {
    background: var(--card-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--card-border);
    padding: 1.8rem 1.5rem;
    border-radius: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.premium-stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px -10px rgba(0, 0, 0, 0.15);
}

.stat-info h2 {
    font-size: 2.2rem;
    margin-top: 5px;
    color: var(--text-main);
    background: none;
    -webkit-text-fill-color: var(--text-main);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 14px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.8rem;
    color: white;
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

/* Gradient Icon Themes */
.icon-blue { background: linear-gradient(135deg, #3B82F6 0%, #2563EB 100%); }
.icon-purple { background: linear-gradient(135deg, #8B5CF6 0%, #6D28D9 100%); }
.icon-green { background: linear-gradient(135deg, #10B981 0%, #059669 100%); }
.icon-orange { background: linear-gradient(135deg, #F59E0B 0%, #D97706 100%); }

/* Bento Box Layout */
.dashboard-bento-grid {
    display: grid;
    grid-template-columns: 1fr 1fr; /* Two columns side-by-side */
    gap: 1.5rem;
}

.bento-item {
    display: flex;
    flex-direction: column;
}

.bento-full-width {
    grid-column: span 2; /* Forces table to stretch across the bottom */
}

.bento-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.bento-header h3 {
    margin: 0;
    font-size: 1.1rem;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 10px;
}

.chart-wrapper {
    position: relative;
    height: 300px;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Mobile Responsiveness Auto-Stacking */
@media (max-width: 900px) {
    .dashboard-bento-grid {
        grid-template-columns: 1fr; /* Stacks charts vertically */
    }
    .bento-full-width {
        grid-column: span 1;
    }
    .premium-stat-card {
        padding: 1.5rem;
    }
}









/* ==========================================
   ULTRA PREMIUM ANALYTICS GRID
   ========================================== */
.analytics-bento-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.chart-wrapper-large {
    position: relative;
    height: 350px;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Premium Progress Bar for Conversion Rates */
.progress-bar-bg {
    background: rgba(79, 70, 229, 0.1);
    border-radius: 10px;
    height: 8px;
    width: 100%;
    overflow: hidden;
    margin-top: 5px;
}

.progress-bar-fill {
    background: var(--primary-gradient);
    height: 100%;
    border-radius: 10px;
    transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
}

@media (max-width: 900px) {
    .analytics-bento-grid {
        grid-template-columns: 1fr;
    }
    .chart-wrapper-large {
        height: 250px; /* Shorter on mobile */
    }
}








/* ==========================================
   ULTRA PREMIUM EDIT MODAL (LANDSCAPE RESPONSIVE)
   ========================================== */
.modal-landscape-edit {
    width: 96vw !important;       
    max-width: 1500px !important; 
    height: 94vh !important;      
    display: flex; 
    flex-direction: column; 
    padding: 2rem !important;
    overflow: hidden;             
}

/* Forces the form element itself to stretch and fill the screen */
#update-lead-form {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    min-height: 0;
}

.edit-layout-landscape {
    display: grid;
    grid-template-columns: 55% calc(45% - 1.5rem); 
    gap: 1.5rem;
    flex-grow: 1; 
    min-height: 0; 
}

.edit-column {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    overflow-y: auto;     
    overflow-x: hidden;
    padding-right: 12px;  
}

/* Custom Scrollbar for Edit Columns */
.edit-column::-webkit-scrollbar { width: 5px; }
.edit-column::-webkit-scrollbar-track { background: transparent; }
.edit-column::-webkit-scrollbar-thumb { background: var(--border); border-radius: 10px; }
.edit-column::-webkit-scrollbar-thumb:hover { background: var(--primary); }

/* Auto-adjust for smaller laptop screens and mobile */
@media (max-width: 950px) {
    .edit-layout-landscape {
        grid-template-columns: 1fr; /* Stacks data vertically */
    }
    .modal-landscape-edit {
        width: 100vw !important;
        height: 100vh !important;
        border-radius: 0;
        padding: 1.5rem !important;
    }
}









/* ==========================================
   CUSTOM MODAL COLORS
   ========================================== */

/* 1. Change the main background of BOTH windows */
#view-modal .modal-content, 
#update-modal .modal-content {
    background: #ffffff; /* Change this to your preferred hex code */
    backdrop-filter: none; /* Removes the blur */
    border: 2px solid var(--primary); /* Gives it a colored border */
}

/* Dark Mode Overrides for the windows */
[data-theme="dark"] #view-modal .modal-content, 
[data-theme="dark"] #update-modal .modal-content {
    background: #151d2b; /* A deep solid slate color */
    border-color: var(--border);
}


/* Change the inner blocks in the View Report */
.report-section {
    background: #F1F5F9; /* A light solid gray */
    border: 1px solid #CBD5E1; /* A slightly darker gray border */
}

/* Change the inner blocks in the Edit Window (Photos/Notes area) */
.edit-column .form-group[style*="background"] {
    background: #F1F5F9 !important;
    border-color: #CBD5E1 !important;
}

/* Dark Mode Overrides for the inner sections */
[data-theme="dark"] .report-section,
[data-theme="dark"] .edit-column .form-group[style*="background"] {
    background: #0b101d !important; /* Extremely dark blue/black */
    border-color: rgba(255, 255, 255, 0.1) !important;
}





/* Change the Title text color */
.report-header h2 {
    background: none; /* Removes the gradient */
    -webkit-text-fill-color: initial;
    color: #333333; /* Your custom color */
}

/* Dark Mode text color */
[data-theme="dark"] .report-header h2 {
    color: #ffffff;
}









/* ==========================================
   ULTRA PREMIUM MOBILE RESPONSIVENESS PATCH
   ========================================== */

@media (max-width: 768px) {
    /* 1. General Layout & Breathing Room */
    .content-area { 
        padding: 1rem !important; 
    }
    .card, .premium-stat-card, .report-section { 
        padding: 1.2rem !important; 
    }
    
    /* 2. Topbar & Header Adjustments */
    .topbar { 
        padding: 1rem !important; 
    }
    .dashboard-header-premium {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.8rem;
    }
    .dash-date-badge { 
        width: 100%; 
        justify-content: center; 
    }

    /* 3. Typography Scaling */
    h1 { font-size: 1.6rem !important; }
    h2 { font-size: 1.3rem !important; }
    .stat-info h2 { font-size: 1.8rem !important; }

    /* 4. Stats Grid (Force vertical stack on phones) */
    .premium-stats-grid {
        grid-template-columns: 1fr !important;
        gap: 1rem;
    }

    /* 5. Bento Grids (Stacking Charts & Tables) */
    .dashboard-bento-grid, 
    .analytics-bento-grid,
    .form-grid {
        display: flex !important;
        flex-direction: column !important;
        gap: 1rem !important;
    }
    .bento-full-width { 
        grid-column: span 1 !important; 
    }

    /* 6. Chart Sizing (Prevent them from taking up the whole screen) */
    .chart-wrapper { 
        height: 250px !important; 
    }
    .chart-wrapper-large { 
        height: 250px !important; 
    }

    /* 7. Swipeable Tables */
    .table-responsive {
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
        border-radius: 8px;
        padding-bottom: 5px; /* Room for the scrollbar */
    }
    .data-table th, .data-table td {
        padding: 0.8rem 0.6rem !important;
        font-size: 0.85rem;
        white-space: nowrap; /* Prevents text from squishing */
    }

    /* 8. Filters on the 'All Prospects' tab */
    .filters-card {
        flex-direction: column;
    }
    .filters-card > * {
        width: 100%;
        flex: none;
    }
    
    /* 9. Make the Add/Refresh buttons full width for easy tapping */
    .btn {
        width: 100%;
        text-align: center;
        justify-content: center;
        padding: 0.8rem !important;
    }
    
    /* Keep action buttons in tables small */
    .data-table .btn-sm {
        width: auto !important;
        padding: 0.4rem 0.8rem !important;
    }
    
    /* Modal buttons flex row adjustment */
    .modal-actions {
        flex-direction: column;
        gap: 10px;
    }
    .modal-actions .btn {
        width: 100%;
        margin: 0 !important;
    }
}










/* ==========================================
   PREMIUM IMAGE LIGHTBOX
   ========================================== */
#lightbox-modal {
    z-index: 9999; /* Forces it to the absolute top of the screen */
    background: rgba(15, 23, 42, 0.85); /* Deep slate backdrop */
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.lightbox-content {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    animation: scaleUp 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

#lightbox-img {
    max-width: 100%;
    max-height: 90vh;
    border-radius: 12px;
    box-shadow: 0 15px 50px rgba(0,0,0,0.5);
    object-fit: contain;
}

.close-lightbox {
    position: absolute;
    top: -40px;
    right: 0;
    color: white;
    font-size: 2.5rem;
    font-weight: 300;
    cursor: pointer;
    transition: color 0.2s, transform 0.2s;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

.close-lightbox:hover {
    color: var(--primary);
    transform: scale(1.1);
}

/* ==========================================
   LIGHTBOX GALLERY NAVIGATION
   ========================================== */
.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(15, 23, 42, 0.6);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.3s ease;
    z-index: 10000;
}

.lightbox-nav:hover {
    background: var(--primary);
    box-shadow: 0 0 15px var(--glow);
    transform: translateY(-50%) scale(1.1);
}

.lightbox-nav.prev { left: -70px; }
.lightbox-nav.next { right: -70px; }

/* Hide nav buttons if the prospect only has 1 image */
.lightbox-nav.hidden { display: none !important; }

/* Mobile adjustments so the buttons stay on screen */
@media (max-width: 768px) {
    .lightbox-nav.prev { left: 10px; }
    .lightbox-nav.next { right: 10px; }
}








/* ==========================================
   MULTI-SELECT CHECKBOX DROPDOWN
   ========================================== */
.multi-select {
    position: relative;
    flex: 1;
    min-width: 200px;
}

.select-box {
    padding: 0.75rem 1rem;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-main);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    user-select: none;
}

.select-box:hover {
    border-color: var(--primary);
}

.select-list {
    position: absolute;
    top: calc(100% + 5px);
    left: 0;
    width: 100%;
    background: var(--card-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border);
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    max-height: 280px;
    overflow-y: auto;
    display: none; /* Hidden by default */
    flex-direction: column;
    z-index: 2000;
    padding: 0.5rem;
}

.select-list.active {
    display: flex;
    animation: fadeIn 0.2s ease;
}

.select-list label {
    padding: 0.6rem 0.8rem;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-main);
    transition: background 0.2s;
}

.select-list label:hover {
    background: rgba(79, 70, 229, 0.1);
}

.select-list input[type="checkbox"] {
    accent-color: var(--primary);
    width: 16px;
    height: 16px;
    cursor: pointer;
    margin: 0;
}

/* Custom Scrollbar for Dropdown */
.select-list::-webkit-scrollbar { width: 5px; }
.select-list::-webkit-scrollbar-thumb { background: var(--border); border-radius: 10px; }









/* ==========================================
   MULTI-SELECT VISIBILITY FIX
   ========================================== */
.select-list {
    background: #ffffff !important; /* Forces a solid white background */
    backdrop-filter: none !important; /* Removes the glass blur */
    -webkit-backdrop-filter: none !important;
    z-index: 9999 !important; /* Forces it to float above all table headers */
    box-shadow: 0 15px 40px rgba(0,0,0,0.2) !important; /* Stronger shadow for depth */
}

/* Ensure the text is perfectly dark and readable */
.select-list label {
    color: var(--text-main) !important;
    opacity: 1 !important;
}

/* Dark Mode override for the solid background */
[data-theme="dark"] .select-list {
    background: #0f172a !important; /* Solid deep obsidian */
    border: 1px solid rgba(255,255,255,0.1) !important;
}











/* ==========================================
   MULTI-SELECT Z-INDEX & VISIBILITY FIX
   ========================================== */

/* 1. Force the cards holding dropdowns to sit ABOVE the data tables */
.filters-card, 
#add-lead .card,
#update-modal .modal-content {
    position: relative;
    z-index: 9999 !important; 
}

/* 2. Ensure the dropdown background is completely solid and readable */
.select-list {
    background: #ffffff !important; 
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    box-shadow: 0 15px 50px rgba(0,0,0,0.3) !important;
    border: 1px solid #E2E8F0 !important;
}

/* 3. Lock in the text color so it doesn't fade */
.select-list label {
    color: #0F172A !important;
    opacity: 1 !important;
}

/* 4. Perfect Dark Mode overrides */
[data-theme="dark"] .select-list {
    background: #0f172a !important; 
    border: 1px solid rgba(255,255,255,0.2) !important;
}
[data-theme="dark"] .select-list label {
    color: #F8FAFC !important;
}