:root {
    /* Color Palette */
    --bg-dark: #0f172a;
    --surface-dark: rgba(30, 41, 59, 0.6);
    --surface-border: rgba(255, 255, 255, 0.1);
    
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    
    --accent-purple: #8b5cf6;
    --accent-purple-glow: rgba(139, 92, 246, 0.5);
    
    --accent-blue: #06b6d4;
    --accent-blue-glow: rgba(6, 182, 212, 0.5);

    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;

    /* Typography */
    --font-main: 'Inter', sans-serif;
    --font-heading: 'Outfit', sans-serif;

    /* Effects */
    --shadow-glass: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    --radius-lg: 16px;
    --border-glass: 1px solid rgba(255, 255, 255, 0.08);
}

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

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    font-family: var(--font-main);
    overflow-x: hidden;
    position: relative;
    min-height: 100vh;
}

/* Background Gradients */
.bg-shape {
    position: fixed;
    border-radius: 50%;
    filter: blur(120px);
    z-index: -1;
    opacity: 0.4;
}

.shadow-blue {
    top: -10%;
    left: -10%;
    width: 600px;
    height: 600px;
    background: var(--accent-blue);
}

.shadow-purple {
    bottom: -10%;
    right: -10%;
    width: 500px;
    height: 500px;
    background: var(--accent-purple);
}

/* Base Glassmorphism Class */
.glass-panel {
    background: var(--surface-dark);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: var(--border-glass);
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: var(--shadow-glass);
}

/* Layout */
.app-container {
    display: flex;
    height: 100vh;
    width: 100%;
}

/* Sidebar */
.sidebar {
    width: 260px;
    height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 24px;
    border-right: var(--border-glass);
}

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

.logo i {
    font-size: 32px;
    color: var(--accent-blue);
    text-shadow: 0 0 15px var(--accent-blue-glow);
}

.logo h2 {
    font-family: var(--font-heading);
    font-size: 22px;
    font-weight: 700;
    background: linear-gradient(to right, #fff, #94a3b8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-menu {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-grow: 1;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 12px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.nav-item i {
    font-size: 20px;
}

.nav-item:hover, .nav-item.active {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

.nav-item.active {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.1), rgba(6, 182, 212, 0.1));
    border-left: 3px solid var(--accent-purple);
}

/* User Profile */
.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: auto;
    padding-top: 24px;
    border-top: var(--border-glass);
}

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

.user-details h4 {
    font-size: 14px;
    margin-bottom: 2px;
}

.user-details p {
    font-size: 12px;
    color: var(--text-secondary);
}

/* Main Content Area */
.main-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

/* Topbar */
.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 40px;
}

.search-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    border-radius: 30px;
    width: 350px;
}

.search-bar input {
    background: transparent;
    border: none;
    color: var(--text-primary);
    width: 100%;
    outline: none;
    font-family: var(--font-main);
}

.search-bar input::placeholder {
    color: var(--text-secondary);
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 12px;
    font-family: var(--font-main);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-purple), #6d28d9);
    color: white;
    box-shadow: 0 4px 15px var(--accent-purple-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--accent-purple-glow);
}

.btn-outline {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    border: var(--border-glass);
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.1);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 13px;
    border-radius: 8px;
}

/* Dashboard Content */
.dashboard-content {
    padding: 0 40px 40px;
}

.welcome-banner {
    margin-bottom: 32px;
}

.welcome-banner h1 {
    font-family: var(--font-heading);
    font-size: 28px;
    margin-bottom: 8px;
}

.welcome-banner p {
    color: var(--text-secondary);
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-bottom: 32px;
}

.stat-card {
    padding: 24px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    gap: 20px;
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.stat-icon.purple {
    background: rgba(139, 92, 246, 0.15);
    color: var(--accent-purple);
    border: 1px solid rgba(139, 92, 246, 0.3);
}

.stat-icon.blue {
    background: rgba(6, 182, 212, 0.15);
    color: var(--accent-blue);
    border: 1px solid rgba(6, 182, 212, 0.3);
}

.stat-icon.green {
    background: rgba(16, 185, 129, 0.15);
    color: var(--success);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.stat-info h3 {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 500;
}

.stat-number {
    font-family: var(--font-heading);
    font-size: 32px;
    margin: 4px 0;
}

.trend {
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.trend.positive {
    color: var(--success);
}

/* Table Section */
.table-container {
    border-radius: var(--radius-lg);
    padding: 24px;
}

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

.table-header h2 {
    font-size: 18px;
    font-family: var(--font-heading);
}

.table-responsive {
    overflow-x: auto;
}

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

.leads-table th {
    text-align: left;
    padding: 16px;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: var(--border-glass);
}

.leads-table td {
    padding: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    font-size: 14px;
}

.leads-table tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}

.contact-info div {
    margin-bottom: 4px;
}

.contact-info .email {
    color: var(--text-secondary);
    font-size: 12px;
}

/* Badges */
.badge {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.badge.whatsapp {
    background: rgba(16, 185, 129, 0.2);
    color: #34d399;
}

.badge.email {
    background: rgba(6, 182, 212, 0.2);
    color: #67e8f9;
}

.badge.call {
    background: rgba(139, 92, 246, 0.2);
    color: #c4b5fd;
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 1000;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.modal {
    width: 100%;
    max-width: 450px;
    border-radius: var(--radius-lg);
    padding: 24px;
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

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

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

.btn-close {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 24px;
    cursor: pointer;
}

.btn-close:hover {
    color: white;
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    color: var(--text-secondary);
}

.form-group input {
    width: 100%;
    padding: 12px 16px;
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: white;
    font-family: inherit;
}

.form-group input:focus {
    outline: none;
    border-color: var(--accent-purple);
    box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.2);
}

.w-100 { width: 100%; }
.mt-3 { margin-top: 16px; }

/* Views Toggle */
.view-section {
    display: none;
    animation: fadeIn 0.3s ease;
}

.view-section.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
/* --- Security Lock Screen --- */
.login-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: radial-gradient(circle at top right, rgba(29, 21, 57, 0.95), rgba(15, 23, 42, 0.98));
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
    backdrop-filter: blur(10px);
}

.login-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.login-modal {
    width: 100%;
    max-width: 420px;
    padding: 40px;
}
