/* Covera Insurance CRM Styles */

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

:root {
    --primary-gold: #A6914E;
    --primary-green: #001718;
    --green-accent: #004548;
    --navy-dark: #001718;
    --navy-medium: #002A2C;
    --blue-accent: #004548;
    --blue-light: #006066;
    --green-success: #001718;
    --orange-warning: #F59E0B;
    --red-danger: #EF4444;
    --purple-accent: #8B5CF6;
    --bg-light: #F8FAFC;
    --bg-white: #FFFFFF;
    --text-dark: #0F172A;
    --text-muted: #64748B;
    --border-color: #E2E8F0;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.5;
}

/* ===== LOGIN PAGE ===== */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--navy-dark) 0%, var(--navy-medium) 100%);
    padding: 2rem;
}

.login-container {
    width: 100%;
    max-width: 450px;
}

.login-card {
    background: white;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    overflow: hidden;
}

.login-header {
    text-align: center;
    padding: 3rem 2rem 2rem;
    background: linear-gradient(135deg, var(--navy-dark) 0%, var(--navy-medium) 100%);
    color: white;
}

.login-logo {
    height: 180px;
    margin-bottom: 1.5rem;
}

.login-header h1 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: white;
}

.login-header p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9375rem;
}

.login-form {
    padding: 2rem;
}

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

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

.form-group label i {
    color: var(--blue-accent);
    margin-right: 0.5rem;
}

.form-group input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 0.9375rem;
    font-family: inherit;
    transition: all 0.2s;
}

.form-group input:focus {
    outline: none;
    border-color: var(--blue-accent);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--radius-md);
    font-size: 0.9375rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary {
    background: linear-gradient(135deg, var(--green-accent) 0%, var(--primary-green) 100%);
    color: white;
}

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

.btn-block {
    width: 100%;
}

.btn-loading {
    display: none;
}

.message {
    margin-top: 1rem;
    padding: 0.75rem;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    display: none;
}

.message.success {
    background: #D1FAE5;
    color: #065F46;
    border: 1px solid #6EE7B7;
}

.message.error {
    background: #FEE2E2;
    color: #991B1B;
    border: 1px solid #FCA5A5;
}

.login-footer {
    padding: 1.5rem 2rem;
    background: var(--bg-light);
    text-align: center;
    font-size: 0.8125rem;
    color: var(--text-muted);
}

/* ===== DASHBOARD PAGE ===== */
.dashboard-page {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 280px;
    background: linear-gradient(180deg, var(--navy-dark) 0%, var(--navy-medium) 100%);
    color: white;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
}

.sidebar-header {
    padding: 2rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.sidebar-logo {
    height: 140px;
}

.sidebar-header h2 {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--primary-gold);
}

.sidebar-nav {
    flex: 1;
    padding: 1.5rem 0;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1.5rem;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: all 0.2s;
    position: relative;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: white;
}

.nav-item.active {
    background: rgba(184, 168, 118, 0.2);
    color: var(--primary-gold);
    border-left: 3px solid var(--primary-gold);
}

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

.nav-item .badge {
    margin-left: auto;
    background: var(--red-danger);
    color: white;
    padding: 0.125rem 0.5rem;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 700;
}

.sidebar-footer {
    padding: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.admin-profile {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.admin-avatar {
    width: 48px;
    height: 48px;
    background: rgba(184, 168, 118, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-gold);
    font-size: 1.5rem;
}

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

.admin-info strong {
    display: block;
    font-weight: 600;
    font-size: 0.9375rem;
    color: white;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.admin-info small {
    font-size: 0.8125rem;
    color: rgba(255, 255, 255, 0.6);
}

.btn-logout {
    width: 100%;
    padding: 0.75rem;
    background: rgba(239, 68, 68, 0.1);
    color: #FCA5A5;
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.2s;
}

.btn-logout:hover {
    background: rgba(239, 68, 68, 0.2);
    color: white;
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: 280px;
    background: var(--bg-light);
}

.top-bar {
    background: white;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
}

.top-bar-left h1 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.25rem;
}

.top-bar-left p {
    font-size: 0.875rem;
    color: var(--text-muted);
}

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

.btn-icon {
    width: 40px;
    height: 40px;
    padding: 0;
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
}

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

.notification-icon {
    position: relative;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-light);
    border-radius: var(--radius-md);
    cursor: pointer;
}

.notification-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: var(--red-danger);
    color: white;
    font-size: 0.6875rem;
    font-weight: 700;
    padding: 0.125rem 0.375rem;
    border-radius: 10px;
}

/* Views */
.view {
    display: none;
    padding: 2rem;
}

.view.active {
    display: block;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    display: flex;
    gap: 1rem;
    transition: all 0.2s;
}

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

.stat-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.stat-icon.blue {
    background: rgba(74, 157, 111, 0.1);
    color: var(--green-accent);
}

.stat-icon.green {
    background: rgba(16, 185, 129, 0.1);
    color: var(--green-success);
}

.stat-icon.orange {
    background: rgba(245, 158, 11, 0.1);
    color: var(--orange-warning);
}

.stat-icon.purple {
    background: rgba(139, 92, 246, 0.1);
    color: var(--purple-accent);
}

.stat-content {
    flex: 1;
}

.stat-label {
    display: block;
    font-size: 0.875rem;
    color: var(--text-muted);
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.stat-value {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.stat-change {
    font-size: 0.8125rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.stat-change.positive {
    color: var(--green-success);
}

.stat-change.negative {
    color: var(--red-danger);
}

/* Activity Grid */
.activity-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    gap: 1.5rem;
}

.activity-card {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    overflow: hidden;
}

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

.card-header h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.8125rem;
    background: var(--bg-light);
    color: var(--blue-accent);
    border: 1px solid var(--border-color);
}

.btn-sm:hover {
    background: var(--blue-accent);
    color: white;
}

.card-body {
    padding: 1.5rem;
    max-height: 400px;
    overflow-y: auto;
}

/* Calls List */
.calls-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.call-item {
    padding: 1rem;
    background: var(--bg-light);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.2s;
}

.call-item:hover {
    background: #E0F2FE;
}

.call-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.call-icon.answered {
    background: rgba(16, 185, 129, 0.1);
    color: var(--green-success);
}

.call-icon.missed {
    background: rgba(239, 68, 68, 0.1);
    color: var(--red-danger);
}

.call-info {
    flex: 1;
}

.call-info strong {
    display: block;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.25rem;
}

.call-info small {
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.call-duration {
    font-weight: 600;
    color: var(--text-dark);
}

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

.btn-play {
    width: 36px;
    height: 36px;
    padding: 0;
    background: var(--blue-accent);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.btn-play:hover {
    background: var(--primary-green);
    transform: scale(1.1);
}

/* Clients List */
.clients-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.client-item {
    padding: 1rem;
    background: var(--bg-light);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    gap: 1rem;
    cursor: pointer;
    transition: all 0.2s;
}

.client-item:hover {
    background: #E0F2FE;
    transform: translateX(4px);
}

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

.client-info {
    flex: 1;
}

.client-info strong {
    display: block;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.25rem;
}

.client-info small {
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.badge {
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.badge.new {
    background: rgba(59, 130, 246, 0.1);
    color: var(--blue-accent);
}

.badge.contacted {
    background: rgba(245, 158, 11, 0.1);
    color: var(--orange-warning);
}

.badge.active {
    background: rgba(16, 185, 129, 0.1);
    color: var(--green-success);
}

.badge.success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--green-success);
}

/* View Header */
.view-header {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.search-box {
    flex: 1;
    min-width: 300px;
    position: relative;
}

.search-box i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.search-box input {
    width: 100%;
    padding: 0.875rem 1rem 0.875rem 3rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 0.9375rem;
    font-family: inherit;
    transition: all 0.2s;
}

.search-box input:focus {
    outline: none;
    border-color: var(--blue-accent);
}

.filter-group {
    display: flex;
    gap: 0.75rem;
}

.filter-select {
    padding: 0.875rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 0.9375rem;
    font-family: inherit;
    background: white;
    cursor: pointer;
}

/* Data Table */
.table-container {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    overflow: hidden;
}

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

.data-table thead {
    background: var(--bg-light);
}

.data-table th {
    padding: 1rem 1.5rem;
    text-align: left;
    font-weight: 700;
    font-size: 0.8125rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--border-color);
}

.data-table td {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.9375rem;
}

.data-table tbody tr {
    transition: all 0.2s;
}

.data-table tbody tr:hover {
    background: var(--bg-light);
}

.loading-cell {
    text-align: center;
    padding: 3rem !important;
    color: var(--text-muted);
}

.loading-spinner {
    text-align: center;
    padding: 2rem;
    color: var(--text-muted);
}

.client-name {
    font-weight: 600;
    color: var(--text-dark);
    display: block;
    margin-bottom: 0.25rem;
}

.client-email {
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.action-buttons {
    display: flex;
    gap: 0.5rem;
}

.btn-action {
    width: 32px;
    height: 32px;
    padding: 0;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.btn-action.view {
    background: rgba(59, 130, 246, 0.1);
    color: var(--blue-accent);
}

.btn-action.view:hover {
    background: var(--blue-accent);
    color: white;
}

.btn-action.email {
    background: rgba(139, 92, 246, 0.1);
    color: var(--purple-accent);
}

.btn-action.email:hover {
    background: var(--purple-accent);
    color: white;
}

.btn-action.call {
    background: rgba(16, 185, 129, 0.1);
    color: var(--green-success);
}

.btn-action.call:hover {
    background: var(--green-success);
    color: white;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: var(--radius-xl);
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.modal-large {
    max-width: 900px;
}

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

.modal-header h2,
.modal-header h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-dark);
}

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

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

.modal-body {
    padding: 2rem;
    overflow-y: auto;
}

/* Responsive */
@media (max-width: 1024px) {
    .sidebar {
        width: 240px;
    }

    .main-content {
        margin-left: 240px;
    }

    .activity-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s;
        width: 280px;
    }

    .sidebar.mobile-open {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
        padding: 0;
    }

    .stats-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .top-bar {
        padding: 1rem;
        flex-wrap: wrap;
    }

    .view {
        padding: 1rem;
    }

    .view-header {
        flex-direction: column;
        gap: 1rem;
    }

    .search-box {
        min-width: 100%;
        width: 100%;
    }

    .data-table {
        font-size: 0.875rem;
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .data-table th,
    .data-table td {
        padding: 0.5rem 0.75rem;
        white-space: nowrap;
    }

    .client-item,
    .call-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .modal {
        padding: 1rem;
    }

    .modal-content {
        max-width: 100%;
        margin: 0;
        max-height: 90vh;
        overflow-y: auto;
    }

    .modal-body {
        padding: 1rem;
    }

    .modal-body > div[style*="grid-template-columns"] {
        grid-template-columns: 1fr !important;
    }
}

@media (max-width: 480px) {
    .top-bar h1 {
        font-size: 1.25rem;
    }

    .stats-card {
        padding: 1rem;
    }

    .btn {
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
    }

    .action-buttons {
        flex-direction: column;
        gap: 0.5rem;
    }

    .btn-action {
        width: 100%;
    }
}

/* ============================================
   ANALYTICS PAGE STYLES
   ============================================ */

.analytics-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.analytics-header h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.analytics-header h2 i {
    color: var(--primary-gold);
}

.date-filter select {
    padding: 0.625rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: white;
    font-family: inherit;
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--text-dark);
    cursor: pointer;
    transition: all 0.2s;
}

.date-filter select:focus {
    outline: none;
    border-color: var(--primary-gold);
    box-shadow: 0 0 0 3px rgba(166, 145, 78, 0.1);
}

/* Analytics Summary Cards */
.analytics-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.summary-card {
    background: white;
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    display: flex;
    gap: 1rem;
    transition: all 0.2s;
}

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

.summary-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.summary-content {
    flex: 1;
}

.summary-content h4 {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.summary-number {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 0.25rem;
    line-height: 1;
}

.summary-change {
    display: inline-block;
    font-size: 0.8125rem;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
}

.summary-change.positive {
    background: rgba(16, 185, 129, 0.1);
    color: #10B981;
}

.summary-change.negative {
    background: rgba(239, 68, 68, 0.1);
    color: #EF4444;
}

.summary-label {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Analytics Grid */
.analytics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 1.5rem;
}

.analytics-grid .full-width {
    grid-column: 1 / -1;
}

.chart-card {
    background: white;
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.chart-card h3 {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.chart-card h3 i {
    color: var(--primary-gold);
    font-size: 1rem;
}

/* Source/Type Lists */
.sources-list,
.types-list {
    margin-top: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.source-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: var(--bg-light);
    border-radius: var(--radius-md);
}

.source-item span {
    color: var(--text-muted);
    font-size: 0.9375rem;
}

.source-item strong {
    color: var(--text-dark);
    font-weight: 600;
}

/* Funnel Container */
.funnel-container {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.funnel-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.funnel-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.funnel-label span {
    font-size: 0.9375rem;
    color: var(--text-muted);
}

.funnel-label strong {
    font-weight: 600;
    color: var(--text-dark);
}

.funnel-bar {
    width: 100%;
    height: 24px;
    background: var(--bg-light);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.funnel-bar-fill {
    height: 100%;
    border-radius: var(--radius-md);
    transition: width 0.5s ease;
}

/* Campaigns List */
.campaigns-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-height: 400px;
    overflow-y: auto;
}

.campaign-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-light);
    border-radius: var(--radius-md);
    transition: all 0.2s;
}

.campaign-item:hover {
    background: #E0F2FE;
    transform: translateX(4px);
}

.campaign-rank {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--primary-gold);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.875rem;
    flex-shrink: 0;
}

.campaign-info {
    flex: 1;
}

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

.campaign-meta {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.campaign-source,
.campaign-medium {
    font-size: 0.75rem;
    padding: 0.125rem 0.5rem;
    border-radius: var(--radius-sm);
    background: white;
    color: var(--text-muted);
}

.campaign-count {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-gold);
}

.loading-text,
.no-data {
    text-align: center;
    color: var(--text-muted);
    padding: 2rem;
    font-size: 0.9375rem;
}

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

    .analytics-summary {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
}

@media (max-width: 768px) {
    .analytics-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .analytics-summary {
        grid-template-columns: 1fr;
    }

    .summary-number {
        font-size: 1.75rem;
    }
}

/* ============================================
   NOTIFICATIONS DROPDOWN
   ============================================ */

.notifications-dropdown {
    position: absolute;
    top: 70px;
    right: 20px;
    width: 360px;
    max-height: 500px;
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    overflow: hidden;
}

.notifications-header {
    padding: 1rem 1.25rem;
    background: var(--bg-light);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.notifications-header h4 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0;
}

.btn-text {
    background: none;
    border: none;
    color: var(--primary-gold);
    font-size: 0.8125rem;
    font-weight: 600;
    cursor: pointer;
    padding: 0;
}

.btn-text:hover {
    text-decoration: underline;
}

.notifications-list {
    max-height: 420px;
    overflow-y: auto;
}

.notification-item {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: background 0.2s;
}

.notification-item:hover {
    background: var(--bg-light);
}

.notification-item.unread {
    background: #F0F9FF;
}

.notification-item.unread::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 24px;
    background: var(--primary-gold);
}

.notification-content {
    position: relative;
}

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

.notification-message {
    font-size: 0.875rem;
    color: var(--text-muted);
    line-height: 1.4;
}

.notification-time {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
}

.no-notifications {
    text-align: center;
    padding: 3rem 1.5rem;
    color: var(--text-muted);
    font-size: 0.9375rem;
}

@media (max-width: 768px) {
    .notifications-dropdown {
        right: 10px;
        width: calc(100vw - 20px);
        max-width: 360px;
    }
}

/* ===== PASSWORD CHANGE FORM ===== */
.password-change-form {
    max-width: 500px;
    margin-top: 1.5rem;
}

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

.password-change-form label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
    font-size: 0.9375rem;
}

.password-change-form input[type="password"] {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 0.9375rem;
    transition: all 0.2s;
}

.password-change-form input[type="password"]:focus {
    outline: none;
    border-color: var(--primary-gold);
    box-shadow: 0 0 0 3px rgba(166, 145, 78, 0.1);
}

.password-change-form .btn {
    margin-top: 1rem;
}
