/* --- Root Variables & Base Reset --- */
:root {
    --bg-color: #f0f4f8;
    --header-bg: #ffffff;
    --primary-blue: #3b66f5;
    --danger-red: #ef4444;
    --success-green: #059669;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --column-bg: #f8fafc;
    --card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --border-radius: 10px;
    --dropdown-bg: #ffffff;
    --dropdown-border: #cbd5e1;
    --dropdown-selected-bg: #eff6ff;
    --border-color: #cbd5e1;
    --bg-main: #f8fafc;
    --bg-card: #ffffff;
    --card-border: #e2e8f0;
}

html, body:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    height: 100%; margin: 0; overflow: hidden; 
    font-family: 'Inter', -apple-system, system-ui, sans-serif;
    background-color: var(--bg-color); color: var(--text-main); line-height: 1.5;
}

/* 🔒 LOGIN PAGE STYLES */
/* 🟢 MOBILE FIX: Used 100dvh instead of 100vh */
.login-wrapper:where(:not([data-ui="v2"], [data-ui="v2"] *)) { display: flex; align-items: center; justify-content: center; height: 100dvh; width: 100vw; background-color: var(--bg-color); position: absolute; top: 0; left: 0; z-index: 9999; }
.login-card:where(:not([data-ui="v2"], [data-ui="v2"] *)) { background: #ffffff; padding: 40px 50px; border-radius: 12px; box-shadow: 0 10px 25px rgba(0,0,0,0.05); text-align: center; width: 100%; max-width: 380px; }
.login-card img:where(:not([data-ui="v2"], [data-ui="v2"] *)), .login-logo-img:where(:not([data-ui="v2"], [data-ui="v2"] *)) { height: 64px !important; width: 64px !important; object-fit: contain; margin: 0 auto 20px auto; display: block; border-radius: 8px; }
.login-card h2:where(:not([data-ui="v2"], [data-ui="v2"] *)) { margin: 0 0 10px 0; color: var(--text-main); font-size: 22px; font-weight: 700; }
.login-card p:where(:not([data-ui="v2"], [data-ui="v2"] *)) { color: var(--text-muted); font-size: 14px; margin-bottom: 30px; }

/* --- Header & Navigation --- */
.main-header:where(:not([data-ui="v2"], [data-ui="v2"] *)) { background: var(--header-bg); padding: 0 24px; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid #e2e8f0; position: relative; z-index: 100; height: 60px; box-sizing: border-box; }
.logo-section:where(:not([data-ui="v2"], [data-ui="v2"] *)) { display: flex; align-items: center; gap: 20px; } 
.logo-section h1:where(:not([data-ui="v2"], [data-ui="v2"] *)) { font-size: 16px; margin: 0; font-weight: 700; color: #0f172a; padding-right: 20px; border-right: 1px solid #e2e8f0; height: 32px; display: flex; align-items: center; }
.logo-section img:where(:not([data-ui="v2"], [data-ui="v2"] *)), .header-logo-img:where(:not([data-ui="v2"], [data-ui="v2"] *)) { height: 24px !important; width: 24px !important; object-fit: contain; border-radius: 4px; }

.app-nav:where(:not([data-ui="v2"], [data-ui="v2"] *)) { display: flex; gap: 8px; }
.nav-tab:where(:not([data-ui="v2"], [data-ui="v2"] *)) { background: transparent; border: none; color: var(--text-muted); font-size: 13px; font-weight: 600; padding: 6px 12px; border-radius: 6px; cursor: pointer; transition: all 0.2s; }
.nav-tab:hover:where(:not([data-ui="v2"], [data-ui="v2"] *)) { background: #f1f5f9; color: var(--text-main); }
.nav-tab.active:where(:not([data-ui="v2"], [data-ui="v2"] *)) { background: var(--primary-blue); color: #fff; }

.header-actions:where(:not([data-ui="v2"], [data-ui="v2"] *)) { display: flex; align-items: center; gap: 15px; }
.user-info:where(:not([data-ui="v2"], [data-ui="v2"] *)) { display: flex; align-items: center; gap: 15px; border-left: 1px solid #cbd5e1; padding-left: 15px; }
.avatar:where(:not([data-ui="v2"], [data-ui="v2"] *)) { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; background: #e2e8f0; }
.logout-link:where(:not([data-ui="v2"], [data-ui="v2"] *)) { background: none; border: none; color: #ef4444; padding: 0; text-align: left; cursor: pointer; font-size: 10px; font-weight: 500; }
.admin-controls:where(:not([data-ui="v2"], [data-ui="v2"] *)) { display: flex; gap: 8px; align-items: center; }

/* --- Master Layout --- */
/* 🟢 MOBILE FIX: Used dvh instead of vh */
.board-container:where(:not([data-ui="v2"], [data-ui="v2"] *)), .dashboard-container:where(:not([data-ui="v2"], [data-ui="v2"] *)) { padding: 20px 30px; height: calc(100dvh - 64px - 34px); display: flex; flex-direction: column; box-sizing: border-box; } 
.board-header:where(:not([data-ui="v2"], [data-ui="v2"] *)) { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; flex-shrink: 0; }
.board-header h2:where(:not([data-ui="v2"], [data-ui="v2"] *)) { font-size: 22px; font-weight: 700; margin: 0; }
.header-tools:where(:not([data-ui="v2"], [data-ui="v2"] *)) { display: flex; align-items: center; gap: 20px; }
.search-input:where(:not([data-ui="v2"], [data-ui="v2"] *)) { padding: 8px 15px; border: 1px solid #cbd5e1; border-radius: 20px; font-size: 13px; width: 250px; transition: all 0.2s ease; outline: none; background: #fff; }
.search-input:focus:where(:not([data-ui="v2"], [data-ui="v2"] *)) { border-color: var(--primary-blue); box-shadow: 0 0 0 3px rgba(59, 102, 245, 0.1); }
.board-stats:where(:not([data-ui="v2"], [data-ui="v2"] *)) { font-size: 14px; color: var(--text-muted); font-weight: 500;}

.board:where(:not([data-ui="v2"], [data-ui="v2"] *)) { display: flex; gap: 20px; flex-grow: 1; overflow-x: auto; padding-bottom: 10px; align-items: stretch; }

/* --- Columns & List Scroll --- */
.column:where(:not([data-ui="v2"], [data-ui="v2"] *)) { background-color: var(--column-bg); border-radius: var(--border-radius); width: 320px; min-width: 320px; display: flex; flex-direction: column; max-height: 100%; border: 1px solid #e2e8f0; box-shadow: 0 4px 6px rgba(0,0,0,0.02); }
.column-header:where(:not([data-ui="v2"], [data-ui="v2"] *)) { padding: 12px 16px; flex-shrink: 0; border-bottom: 1px solid #f1f5f9; }
.column-header h3:where(:not([data-ui="v2"], [data-ui="v2"] *)) { margin: 0; font-size: 13px; font-weight: 700; color: #475569; text-transform: uppercase; letter-spacing: 0.5px; }

/* 🟢 MOBILE FIX: Added heavy padding-bottom to prevent truncation */
.card-list:where(:not([data-ui="v2"], [data-ui="v2"] *)) { padding: 10px; flex-grow: 1; overflow-y: auto; min-height: 0; padding-bottom: 40px; }
.card-list:where(:not([data-ui="v2"], [data-ui="v2"] *))::-webkit-scrollbar { width: 4px; }
.card-list:where(:not([data-ui="v2"], [data-ui="v2"] *))::-webkit-scrollbar-track { background: transparent; }
.card-list:where(:not([data-ui="v2"], [data-ui="v2"] *))::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 10px; }
.card-list::-webkit-scrollbar-thumb:hover:where(:not([data-ui="v2"], [data-ui="v2"] *)) { background: #94a3b8; }

/* --- Cards --- */
.card:where(:not([data-ui="v2"], [data-ui="v2"] *)) { background: #ffffff; border-radius: 6px; padding: 10px 12px; margin-bottom: 8px; box-shadow: var(--card-shadow); border-left: 4px solid var(--primary-blue); cursor: pointer; transition: transform 0.1s ease; border: 1px solid #e2e8f0; }
.card:hover:where(:not([data-ui="v2"], [data-ui="v2"] *)) { transform: translateY(-1px); box-shadow: 0 6px 12px -2px rgba(0, 0, 0, 0.1); }
/* Card Aging Dots */
.aging-dot:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 6px;
    vertical-align: middle;
}
.aging-dot.active:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    background-color: #10b981; /* Green */
}
.aging-dot.stagnant:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    background-color: #f59e0b; /* Amber */
}
.aging-dot.cold:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    background-color: #ef4444; /* Red */
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
    animation: pulse-red 2s infinite;
}

@keyframes pulse-red {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
    }
    70% {
        transform: scale(1);
        box-shadow: 0 0 0 5px rgba(239, 68, 68, 0);
    }
    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
    }
}
/* 🟢 MOBILE FIX: Visual feedback when the user successfully holds the card */
.sortable-drag:where(:not([data-ui="v2"], [data-ui="v2"] *)) { opacity: 0.9; transform: scale(1.02) rotate(1deg); box-shadow: 0 10px 20px rgba(0,0,0,0.1); cursor: grabbing; }

.card-header-row:where(:not([data-ui="v2"], [data-ui="v2"] *)) { display: flex; justify-content: space-between; align-items: center; margin-bottom: 2px; flex-wrap: wrap; gap: 5px;}
.card-title:where(:not([data-ui="v2"], [data-ui="v2"] *)) { font-weight: 800; font-size: 14px; color: #0f172a; margin: 0; }
.card-tags:where(:not([data-ui="v2"], [data-ui="v2"] *)) { display: flex; gap: 5px; align-items: center; }
.live-date-tag:where(:not([data-ui="v2"], [data-ui="v2"] *)) { font-size: 9px; background: #eff6ff; color: #1e40af; padding: 2px 6px; border-radius: 4px; font-weight: 700; border: 1px solid #dbeafe; }
.stuck-badge:where(:not([data-ui="v2"], [data-ui="v2"] *)) { font-size: 9px; padding: 2px 6px; border-radius: 4px; font-weight: 700; border: 1px solid transparent; }
.stuck-normal:where(:not([data-ui="v2"], [data-ui="v2"] *)) { background: #f1f5f9; color: #64748b; border-color: #e2e8f0; }
.stuck-danger:where(:not([data-ui="v2"], [data-ui="v2"] *)) { background: #fef2f2; color: #b91c1c; border-color: #fecaca; }
.card-code:where(:not([data-ui="v2"], [data-ui="v2"] *)) { font-size: 11px; color: var(--text-muted); margin-bottom: 8px; display: block; }
.card-metrics:where(:not([data-ui="v2"], [data-ui="v2"] *)) { background: #f8fafc; border: 1px solid #f1f5f9; border-radius: 4px; padding: 6px 8px; }
.metrics-table:where(:not([data-ui="v2"], [data-ui="v2"] *)) { width: 100%; border-collapse: collapse; font-size: 10px; }
.metrics-table th:where(:not([data-ui="v2"], [data-ui="v2"] *)) { text-align: right; color: var(--text-muted); padding-bottom: 2px; font-weight: 500; }
.metrics-table td:where(:not([data-ui="v2"], [data-ui="v2"] *)) { text-align: right; padding: 2px 0; color: var(--success-green); font-weight: 700; }
.metrics-table td:first-child:where(:not([data-ui="v2"], [data-ui="v2"] *)), .metrics-table th:first-child:where(:not([data-ui="v2"], [data-ui="v2"] *)) { text-align: left; color: var(--text-main); }
.trend-pill:where(:not([data-ui="v2"], [data-ui="v2"] *)) { font-size: 9px; padding: 0px 3px; border-radius: 3px; margin-left: 2px; font-weight: bold; }
.trend-up:where(:not([data-ui="v2"], [data-ui="v2"] *)) { background: #dcfce7; color: #166534; }
.trend-down:where(:not([data-ui="v2"], [data-ui="v2"] *)) { background: #fee2e2; color: #991b1b; }

/* --- Modals & Details --- */
.modal:where(:not([data-ui="v2"], [data-ui="v2"] *)) { display: none; position: fixed; z-index: 2000; left: 0; top: 0; width: 100%; height: 100%; background: rgba(15, 23, 42, 0.6); backdrop-filter: blur(4px); }
/* 🟢 MOBILE FIX: Used dvh instead of vh for modals */
.modal-content:where(:not([data-ui="v2"], [data-ui="v2"] *)) { background: #fff; margin: 20px auto; padding: 20px; border-radius: 12px; width: 450px; box-shadow: 0 20px 25px -5px rgba(0,0,0,0.2); position: relative; max-height: calc(100dvh - 40px); overflow-y: auto; }
.large-modal:where(:not([data-ui="v2"], [data-ui="v2"] *)) { width: 850px; max-width: 95vw; }

.modal-header:where(:not([data-ui="v2"], [data-ui="v2"] *)) { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid #f1f5f9; padding-bottom: 12px; margin-bottom: 15px; }
.header-title-group:where(:not([data-ui="v2"], [data-ui="v2"] *)) { flex: 1; min-width: 0; }
.header-churn-alert:where(:not([data-ui="v2"], [data-ui="v2"] *)) { display: flex; align-items: center; gap: 6px; background: #fef2f2; border: 1px solid #fecaca; padding: 6px 12px; border-radius: 6px; max-width: 50%; margin-right: 15px; }
.churn-badge:where(:not([data-ui="v2"], [data-ui="v2"] *)) { color: #b91c1c; font-size: 11px; font-weight: 800; text-transform: uppercase; white-space: nowrap; }
.churn-text:where(:not([data-ui="v2"], [data-ui="v2"] *)) { color: #991b1b; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.close-btn:where(:not([data-ui="v2"], [data-ui="v2"] *)) { background: none; border: none; font-size: 28px; color: #94a3b8; cursor: pointer; line-height: 1; }

.modal-body:where(:not([data-ui="v2"], [data-ui="v2"] *)) { display: flex; gap: 40px; }
.details-sidebar:where(:not([data-ui="v2"], [data-ui="v2"] *)) { flex: 1; border-right: 1px solid #f1f5f9; padding-right: 30px; }
.details-main:where(:not([data-ui="v2"], [data-ui="v2"] *)) { flex: 1.5; display: flex; flex-direction: column; }

.info-block-inline:where(:not([data-ui="v2"], [data-ui="v2"] *)) { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; font-size: 14px; }
.info-block-inline strong:where(:not([data-ui="v2"], [data-ui="v2"] *)) { min-width: 70px; color: var(--text-muted); font-size: 12px;}
.sidebar-actions:where(:not([data-ui="v2"], [data-ui="v2"] *)) { margin-top: 15px; display: flex; flex-direction: column; gap: 10px; }

.input-group:where(:not([data-ui="v2"], [data-ui="v2"] *)) { margin-bottom: 15px; width: 100%; }
.input-group label:where(:not([data-ui="v2"], [data-ui="v2"] *)) { display: block; font-size: 11px; font-weight: 700; color: var(--text-muted); margin-bottom: 6px; text-transform: uppercase; }
.input-row:where(:not([data-ui="v2"], [data-ui="v2"] *)) { display: flex; gap: 15px; }
.input-row .input-group:where(:not([data-ui="v2"], [data-ui="v2"] *)) { flex: 1; }
.input-group input:where(:not([data-ui="v2"], [data-ui="v2"] *)), .input-group select:where(:not([data-ui="v2"], [data-ui="v2"] *)), .input-group textarea:where(:not([data-ui="v2"], [data-ui="v2"] *)), .info-block-inline input:where(:not([data-ui="v2"], [data-ui="v2"] *)), .info-block-inline select:where(:not([data-ui="v2"], [data-ui="v2"] *)) { width: 100%; padding: 8px 12px; border: 1px solid #cbd5e1; border-radius: 6px; font-size: 13px; font-family: inherit; box-sizing: border-box; transition: border-color 0.2s; outline: none; color: var(--text-main); }
.input-group input:focus:where(:not([data-ui="v2"], [data-ui="v2"] *)), .input-group select:focus:where(:not([data-ui="v2"], [data-ui="v2"] *)), .input-group textarea:focus:where(:not([data-ui="v2"], [data-ui="v2"] *)), .info-block-inline input:focus:where(:not([data-ui="v2"], [data-ui="v2"] *)), .info-block-inline select:focus:where(:not([data-ui="v2"], [data-ui="v2"] *)) { border-color: var(--primary-blue); box-shadow: 0 0 0 3px rgba(59, 102, 245, 0.1); }

/* Readonly / Disabled inputs */
.readonly-input:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    background-color: #f1f5f9 !important;
    color: #64748b !important;
    cursor: not-allowed !important;
}
body.dark-mode .readonly-input:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    background-color: #1f2937 !important;
    color: #94a3b8 !important;
    border-color: #334155 !important;
}

/* --- Buttons --- */
.btn:where(:not([data-ui="v2"], [data-ui="v2"] *)) { border: none; border-radius: 6px; padding: 10px 20px; font-weight: 700; cursor: pointer; transition: all 0.2s; font-size: 14px; display: inline-flex; align-items: center; justify-content: center; white-space: nowrap; }
.btn-primary:where(:not([data-ui="v2"], [data-ui="v2"] *)) { background: var(--primary-blue); color: #fff; }
.btn-primary:hover:where(:not([data-ui="v2"], [data-ui="v2"] *)) { background: #2563eb; }
.btn-secondary:where(:not([data-ui="v2"], [data-ui="v2"] *)) { background: #f1f5f9; color: #475569; border: 1px solid #e2e8f0; }
.btn-secondary:hover:where(:not([data-ui="v2"], [data-ui="v2"] *)) { background: #e2e8f0; }
.btn-danger:where(:not([data-ui="v2"], [data-ui="v2"] *)) { background: #fff; color: var(--danger-red); border: 1px solid #fee2e2; }
.btn-danger:hover:where(:not([data-ui="v2"], [data-ui="v2"] *)) { background: var(--danger-red); color: #fff; }
.btn-full:where(:not([data-ui="v2"], [data-ui="v2"] *)) { width: 100%; }

/* --- Remarks / Audit Trail --- */
.feed:where(:not([data-ui="v2"], [data-ui="v2"] *)) { background: #f8fafc; border-radius: 8px; padding: 15px; height: 210px; overflow-y: auto; margin-bottom: 15px; border: 1px solid #f1f5f9; }
.comment-item:where(:not([data-ui="v2"], [data-ui="v2"] *)) { background: #fff; padding: 12px; border-radius: 8px; margin-bottom: 10px; box-shadow: 0 1px 2px rgba(0,0,0,0.05); font-size: 13px; border-left: 3px solid #cbd5e1; }
.comment-item small:where(:not([data-ui="v2"], [data-ui="v2"] *)) { display: block; color: var(--text-muted); margin-top: 6px; font-size: 10px; }
.comment-box:where(:not([data-ui="v2"], [data-ui="v2"] *)) { display: flex; flex-direction: column; gap: 10px; }
.comment-box textarea:where(:not([data-ui="v2"], [data-ui="v2"] *)) { width: 100%; height: 80px; padding: 12px; border: 1px solid #cbd5e1; border-radius: 8px; box-sizing: border-box; font-family: inherit; resize: none; outline: none; transition: border-color 0.2s;}
.comment-box textarea:focus:where(:not([data-ui="v2"], [data-ui="v2"] *)) { border-color: var(--primary-blue); }
.comment-item.system:where(:not([data-ui="v2"], [data-ui="v2"] *)) { background: #f1f5f9; color: #64748b; font-style: italic; border-left: 3px solid #94a3b8; }

/* --- Column Colors --- */
.col-testing:where(:not([data-ui="v2"], [data-ui="v2"] *)) { background-color: #fff7ed; border-color: #ffedd5; }
.col-testing .column-header:where(:not([data-ui="v2"], [data-ui="v2"] *)) { border-bottom-color: #ffedd5; }
.col-live:where(:not([data-ui="v2"], [data-ui="v2"] *)) { background-color: #f0fdf4; border-color: #dcfce7; }
.col-live .column-header:where(:not([data-ui="v2"], [data-ui="v2"] *)) { border-bottom-color: #dcfce7; }
.col-churned:where(:not([data-ui="v2"], [data-ui="v2"] *)) { background-color: #fef2f2; border-color: #fee2e2; }
.col-churned .column-header:where(:not([data-ui="v2"], [data-ui="v2"] *)) { border-bottom-color: #fee2e2; }

/* =========================================================
   📊 ANALYTICS DASHBOARD STYLES
   ========================================================= */
.dashboard-container:where(:not([data-ui="v2"], [data-ui="v2"] *)) { overflow-y: auto; overflow-x: hidden; }
.stats-grid:where(:not([data-ui="v2"], [data-ui="v2"] *)) { display: grid; grid-template-columns: repeat(5, 1fr); gap: 20px; margin-bottom: 25px; }
.stat-card:where(:not([data-ui="v2"], [data-ui="v2"] *)) { background: #fff; padding: 20px; border-radius: 12px; border: 1px solid #e2e8f0; box-shadow: 0 2px 4px rgba(0,0,0,0.02); }
.stat-card h3:where(:not([data-ui="v2"], [data-ui="v2"] *)) { margin: 0 0 10px 0; font-size: 13px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; font-weight: 700;}
.stat-val:where(:not([data-ui="v2"], [data-ui="v2"] *)) { font-size: 32px; font-weight: 800; color: var(--text-main); line-height: 1; }

.charts-grid:where(:not([data-ui="v2"], [data-ui="v2"] *)) { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-bottom: 30px; }
.chart-card:where(:not([data-ui="v2"], [data-ui="v2"] *)) { background: #fff; padding: 20px; border-radius: 12px; border: 1px solid #e2e8f0; box-shadow: 0 2px 4px rgba(0,0,0,0.02); display: flex; flex-direction: column;}
.chart-card h3:where(:not([data-ui="v2"], [data-ui="v2"] *)) { margin: 0 0 15px 0; font-size: 15px; color: var(--text-main); font-weight: 700; border-bottom: 1px solid #f1f5f9; padding-bottom: 10px;}
.chart-wrapper:where(:not([data-ui="v2"], [data-ui="v2"] *)) { position: relative; height: 250px; width: 100%; flex-grow: 1; }

/* --- Leaderboard & Velocity --- */
.bottom-grid:where(:not([data-ui="v2"], [data-ui="v2"] *)) { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 30px; }
.leaderboard-container:where(:not([data-ui="v2"], [data-ui="v2"] *)) { display: flex; gap: 20px; flex-grow: 1; flex-direction: column; justify-content: center;}
.leaderboard-half:where(:not([data-ui="v2"], [data-ui="v2"] *)) { flex: 1; background: #f8fafc; padding: 15px; border-radius: 8px; border: 1px solid #f1f5f9; }
.leaderboard-half h4:where(:not([data-ui="v2"], [data-ui="v2"] *)) { margin: 0 0 10px 0; font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.5px;}
.text-success:where(:not([data-ui="v2"], [data-ui="v2"] *)) { color: #059669; }
.text-danger:where(:not([data-ui="v2"], [data-ui="v2"] *)) { color: #dc2626; }

.leaderboard-list:where(:not([data-ui="v2"], [data-ui="v2"] *)) { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.leaderboard-list li:where(:not([data-ui="v2"], [data-ui="v2"] *)) { display: flex; justify-content: space-between; font-size: 13px; background: #fff; padding: 8px 12px; border-radius: 6px; box-shadow: 0 1px 2px rgba(0,0,0,0.02); border: 1px solid #e2e8f0; align-items: center;}
.leaderboard-list li span.name:where(:not([data-ui="v2"], [data-ui="v2"] *)) { font-weight: 600; color: #0f172a; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 160px;}
.leaderboard-list li span.val:where(:not([data-ui="v2"], [data-ui="v2"] *)) { font-weight: 800; color: #475569; font-size: 12px;}

/* =========================================================
   🎰 REVENUE TICKER STYLES
   ========================================================= */
.ticker-bar:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    background: #0f172a;
    color: #fff;
    padding: 6px 30px;
    display: flex;
    justify-content: center;
    border-bottom: 1px solid #1e293b;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    z-index: 200;
    position: relative;
}
.ticker-content:where(:not([data-ui="v2"], [data-ui="v2"] *)) { display: flex; align-items: center; gap: 15px; }
.ticker-label:where(:not([data-ui="v2"], [data-ui="v2"] *)) { font-size: 11px; font-weight: 700; color: #94a3b8; letter-spacing: 1px; }
.ticker-value:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    font-family: 'Courier New', Courier, monospace; 
    font-size: 16px; font-weight: 800; color: #10b981; 
    text-shadow: 0 0 8px rgba(16, 185, 129, 0.4);
}

@media (max-width: 1024px) {
    .stats-grid:where(:not([data-ui="v2"], [data-ui="v2"] *)) { grid-template-columns: repeat(3, 1fr); }
    .charts-grid:where(:not([data-ui="v2"], [data-ui="v2"] *)) { grid-template-columns: 1fr; }
    .bottom-grid:where(:not([data-ui="v2"], [data-ui="v2"] *)) { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .main-header:where(:not([data-ui="v2"], [data-ui="v2"] *)) { padding: 10px 15px; flex-direction: column; align-items: flex-start; height: auto; gap: 15px; }
    .logo-section h1:where(:not([data-ui="v2"], [data-ui="v2"] *)) { font-size: 15px; border: none; padding: 0;}
    .app-nav:where(:not([data-ui="v2"], [data-ui="v2"] *)) { width: 100%; overflow-x: auto;}
    .header-actions:where(:not([data-ui="v2"], [data-ui="v2"] *)) { width: 100%; justify-content: space-between; }
    
    /* 🟢 MOBILE FIX: Used dvh */
    .board-container:where(:not([data-ui="v2"], [data-ui="v2"] *)), .dashboard-container:where(:not([data-ui="v2"], [data-ui="v2"] *)) { padding: 15px; height: calc(100dvh - 120px); }
    .login-card:where(:not([data-ui="v2"], [data-ui="v2"] *)) { width: 90%; padding: 30px 20px; }
    .modal-content:where(:not([data-ui="v2"], [data-ui="v2"] *)) { width: 90%; padding: 15px; margin: 20px auto; }
    .large-modal:where(:not([data-ui="v2"], [data-ui="v2"] *)) { width: 95%; }
    .modal-body:where(:not([data-ui="v2"], [data-ui="v2"] *)) { flex-direction: column; gap: 20px; }
    .details-sidebar:where(:not([data-ui="v2"], [data-ui="v2"] *)) { border-right: none; border-bottom: 1px solid #f1f5f9; padding-right: 0; padding-bottom: 20px; }
    .header-churn-alert:where(:not([data-ui="v2"], [data-ui="v2"] *)) { max-width: 100%; margin-right: 10px; flex-direction: column; align-items: flex-start; gap: 2px;}
    .stats-grid:where(:not([data-ui="v2"], [data-ui="v2"] *)) { grid-template-columns: repeat(2, 1fr); }
    .ticker-content:where(:not([data-ui="v2"], [data-ui="v2"] *)) { flex-direction: column; gap: 2px; }
    
    /* Mobile Kanban Snapping and Responsiveness */
    .board-header:where(:not([data-ui="v2"], [data-ui="v2"] *)) { flex-direction: column; align-items: stretch; gap: 10px; }
    .header-tools:where(:not([data-ui="v2"], [data-ui="v2"] *)) { flex-wrap: wrap; gap: 8px; width: 100%; justify-content: space-between; }
    .header-tools select:where(:not([data-ui="v2"], [data-ui="v2"] *)), .header-tools input:where(:not([data-ui="v2"], [data-ui="v2"] *)) { width: 100% !important; flex-grow: 1; }
    
    .board:where(:not([data-ui="v2"], [data-ui="v2"] *)) { scroll-snap-type: x mandatory; gap: 15px; padding-bottom: 20px; }
    .column:where(:not([data-ui="v2"], [data-ui="v2"] *)) { min-width: 85vw !important; max-width: 85vw !important; scroll-snap-align: center; }
    .board-container:where(:not([data-ui="v2"], [data-ui="v2"] *)) { height: calc(100dvh - 150px); }
}

/* --- Sales Column Colors --- */
.col-open-pipeline:where(:not([data-ui="v2"], [data-ui="v2"] *)) { background-color: #f0f7ff; border-color: #dbeafe; }
.col-open-pipeline .column-header:where(:not([data-ui="v2"], [data-ui="v2"] *)) { border-bottom-color: #dbeafe; }

/* Admin Approvals & Customizer Table Styling */
#approvalsTable th:where(:not([data-ui="v2"], [data-ui="v2"] *)), #approvalsTable td:where(:not([data-ui="v2"], [data-ui="v2"] *)), #definedFieldsTable th:where(:not([data-ui="v2"], [data-ui="v2"] *)), #definedFieldsTable td:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    border-bottom: 1px solid #e2e8f0;
}
#approvalsTable select:where(:not([data-ui="v2"], [data-ui="v2"] *)), #definedFieldsTable select:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    border-color: #cbd5e1;
    border-radius: 4px;
    outline: none;
    font-size: 12px;
}
#approvalsTable select:focus:where(:not([data-ui="v2"], [data-ui="v2"] *)), #definedFieldsTable select:focus:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    border-color: var(--primary-blue);
}
#approvalsTable tbody tr:hover:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    background-color: #f8fafc;
}

/* --- Clean Non-Metric Table Styling --- */
.clean-table:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    background: #ffffff;
}
.clean-table th:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    text-align: left;
    color: var(--text-muted);
    font-weight: 600;
    padding: 12px;
    background: #f8fafc;
    border-bottom: 2px solid #e2e8f0;
}
.clean-table td:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    text-align: left;
    padding: 12px;
    color: var(--text-main);
    border-bottom: 1px solid #e2e8f0;
}
.clean-table tbody tr:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    transition: background 0.15s ease;
}
.clean-table tbody tr:hover:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    background-color: #f8fafc;
}

/* --- MCP Activity Log --- */
.mcp-log-args-pre:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    margin: 6px 0 0 0;
    background: #f1f5f9;
    color: #1e293b;
    border: 1px solid #cbd5e1;
    padding: 8px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-family: monospace;
    white-space: pre-wrap;
    word-break: break-all;
    max-height: 180px;
    overflow-y: auto;
}
.mcp-log-args-summary:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    color: var(--text-muted);
    font-size: 11px;
    font-family: monospace;
    outline: none;
    cursor: pointer;
    user-select: none;
}
.mcp-log-args-summary:hover:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    color: var(--primary-blue);
}

/* --- Rich Text Placeholder Styling --- */
[contenteditable=true]:empty:before:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    content: attr(placeholder);
    color: #94a3b8;
    pointer-events: none;
    display: block;
}

/* --- Custom Searchable Dropdowns --- */
.searchable-select-wrapper:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    position: relative;
    width: 100%;
}
.searchable-select-input:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="%2364748b" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="11" cy="11" r="8"></circle><line x1="21" y1="21" x2="16.65" y2="16.65"></line></svg>');
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 14px;
    padding-right: 32px !important;
}
.searchable-select-list:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    border: 1px solid var(--dropdown-border);
    border-radius: 6px;
    background: var(--dropdown-bg);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}
.searchable-select-item:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    transition: background 0.15s ease, color 0.15s ease;
}

/* --- Custom Inline Error Banner --- */
.form-error-banner:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    display: none;
    align-items: flex-start;
    gap: 10px;
    background: #fff5f5;
    color: #c53030;
    border: 1px solid #feb2b2;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 20px;
    box-sizing: border-box;
    width: 100%;
    animation: banner-fade-in 0.2s ease-out;
}
.form-error-banner.visible:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    display: flex;
}
.form-error-banner svg:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    flex-shrink: 0;
    margin-top: 2px;
}

@keyframes banner-fade-in {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Toasts: migrated to the design system (ds/undrads-ui.css .toasts/.toast, ui-shell.css). */

@keyframes toast-slide-in {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- Invalid Field Highlight --- */
.invalid-field:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    border-color: var(--danger-red) !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15) !important;
}

/* --- Activity Grid --- */
.activity-grid:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}


/* --- Slide-out Communications Panel --- */
.communications-panel:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    position: fixed;
    top: 0;
    right: -420px; /* Hidden by default */
    width: 400px;
    height: 100vh;
    background: #ffffff;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.15);
    z-index: 2500;
    display: flex;
    flex-direction: column;
    transition: right 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-sizing: border-box;
    border-left: 1px solid #e2e8f0;
}
.communications-panel.open:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    right: 0;
}
.communications-panel-header:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    padding: 16px 20px;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8fafc;
}
.communications-panel-header h3:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: var(--text-main);
}
.close-panel-btn:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    background: none;
    border: none;
    font-size: 24px;
    color: #94a3b8;
    cursor: pointer;
    line-height: 1;
    padding: 4px;
    transition: color 0.15s ease;
}
.close-panel-btn:hover:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    color: #475569;
}
.communications-filter-bar:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    padding: 10px 20px;
    background: #f1f5f9;
    border-bottom: 1px solid #e2e8f0;
}
.communications-filter-bar select:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    width: 100%;
    padding: 6px 10px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    background: #ffffff;
    font-size: 13px;
    color: var(--text-main);
    outline: none;
}
.communications-list:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    flex: 1;
    overflow-y: auto;
    padding: 8px 10px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    background: #f8fafc;
}
.communications-footer:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    padding: 16px 20px;
    border-top: 1px solid #f1f5f9;
    background: #ffffff;
}
.log-outreach-toggle:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    text-align: center;
    padding: 10px;
    background: #eff6ff;
    color: var(--primary-blue);
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    border: 1px dashed var(--primary-blue);
    transition: background 0.15s ease;
    user-select: none;
}
.log-outreach-toggle:hover:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    background: #dbeafe;
}

/* --- Chat Bubbles styling --- */
.comm-message:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    display: flex;
    flex-direction: column;
    max-width: 85%;
    animation: message-fade-in 0.2s ease-out;
}
.comm-message.sent:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    align-self: flex-end;
    align-items: flex-end;
}
.comm-message.received:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    align-self: flex-start;
    align-items: flex-start;
}
.comm-bubble:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 12px;
    line-height: 1.35;
    word-break: break-word;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}
.comm-bubble-header:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 10px;
    margin-bottom: 4px;
    opacity: 0.8;
}
.comm-bubble-time:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    font-size: 9px;
}
.comm-subject:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    font-weight: 700;
    margin-bottom: 4px;
    font-size: 11px;
}
.comm-body-text:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    font-size: 12px;
    line-height: 1.35;
    white-space: pre-wrap;
}

/* Default / General Channel Colors */
.comm-message.sent .comm-bubble:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    background: var(--primary-blue);
    color: #ffffff;
    border-bottom-right-radius: 2px;
}
.comm-message.received .comm-bubble:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    background: #ffffff;
    color: var(--text-main);
    border-bottom-left-radius: 2px;
    border: 1px solid #e2e8f0;
}

/* LinkedIn Channels */
.comm-message.channel-linkedin-chat.sent .comm-bubble:where(:not([data-ui="v2"], [data-ui="v2"] *)),
.comm-message.channel-linkedin-message.sent .comm-bubble:where(:not([data-ui="v2"], [data-ui="v2"] *)),
.comm-message.channel-linkedin-inmail.sent .comm-bubble:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    background: #0a66c2;
    color: #ffffff;
}
.comm-message.channel-linkedin-chat.received .comm-bubble:where(:not([data-ui="v2"], [data-ui="v2"] *)),
.comm-message.channel-linkedin-message.received .comm-bubble:where(:not([data-ui="v2"], [data-ui="v2"] *)),
.comm-message.channel-linkedin-inmail.received .comm-bubble:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    background: #f0f7fe;
    color: #0c4a6e;
    border-color: #bae6fd;
}

/* Email Channel */
.comm-message.channel-email.sent .comm-bubble:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    background: #db2777; /* Rose / pink */
    color: #ffffff;
}
.comm-message.channel-email.received .comm-bubble:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    background: #fdf2f8;
    color: #9d174d;
    border-color: #fbcfe8;
}

/* Meeting Channel */
.comm-message.channel-meeting.sent .comm-bubble:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    background: #059669; /* Emerald green */
    color: #ffffff;
}
.comm-message.channel-meeting.received .comm-bubble:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    background: #f0fdf4;
    color: #065f46;
    border-color: #bbf7d0;
}

/* Phone Channel */
.comm-message.channel-phone.sent .comm-bubble:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    background: #d97706; /* Amber orange */
    color: #ffffff;
}
.comm-message.channel-phone.received .comm-bubble:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    background: #fffbeb;
    color: #92400e;
    border-color: #fef3c7;
}

/* Inline badges inside the bubble */
.comm-bubble .comm-channel-badge:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    font-size: 8px;
    padding: 1px 4px;
    border-radius: 3px;
    font-weight: 700;
    text-transform: uppercase;
}
.comm-message.sent .comm-bubble .comm-channel-badge:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
}
.comm-message.received .comm-bubble .comm-channel-badge:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    background: rgba(0, 0, 0, 0.05);
    color: inherit;
}

.comm-channel-badge:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    font-size: 10px;
    padding: 1px 5px;
    border-radius: 4px;
    font-weight: 600;
    text-transform: uppercase;
}
.badge-email:where(:not([data-ui="v2"], [data-ui="v2"] *)) { background: #fee2e2; color: #b91c1c; }
.badge-linkedin-message:where(:not([data-ui="v2"], [data-ui="v2"] *)) { background: #dbeafe; color: #1d4ed8; }
.badge-linkedin-chat:where(:not([data-ui="v2"], [data-ui="v2"] *)) { background: #dbeafe; color: #1d4ed8; }
.badge-linkedin-inmail:where(:not([data-ui="v2"], [data-ui="v2"] *)) { background: #f3e8ff; color: #6b21a8; }
.badge-phone:where(:not([data-ui="v2"], [data-ui="v2"] *)) { background: #fef3c7; color: #b45309; }
.badge-meeting:where(:not([data-ui="v2"], [data-ui="v2"] *)) { background: #dcfce7; color: #15803d; }

@keyframes message-fade-in {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- Communication Button on Card --- */
.card-comm-btn:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: none;
    border: none;
    color: #64748b;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    padding: 4px 6px;
    border-radius: 4px;
    transition: background 0.15s ease, color 0.15s ease;
}
.card-comm-btn:hover:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    background: #f1f5f9;
    color: var(--primary-blue);
}
.card-comm-btn svg:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    width: 14px;
    height: 14px;
}

/* Hybrid Email Preview & Summarization Styles */
.comm-email-preview:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    font-size: 12px;
    line-height: 1.35;
    opacity: 0.95;
}
.comm-email-summary:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    background: rgba(255, 255, 255, 0.15); /* Slightly semi-transparent white for sent */
    border: 1px dashed rgba(255, 255, 255, 0.3);
    padding: 8px 10px;
    border-radius: 4px;
    font-size: 11px;
    line-height: 1.4;
    margin-bottom: 6px;
}
.comm-message.received .comm-email-summary:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    background: #f0fdf4; /* Muted green background for received email summaries */
    color: #166534;
    border: 1px dashed #bbf7d0;
}
.comm-actions-row:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    margin-top: 6px;
    display: flex;
    gap: 12px;
}
.comm-action-link:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    font-size: 9.5px;
    font-weight: 700;
    cursor: pointer;
    text-transform: uppercase;
    text-decoration: underline;
    opacity: 0.8;
    transition: opacity 0.15s ease;
    user-select: none;
}
.comm-action-link:hover:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    opacity: 1;
}
.comm-message.sent .comm-action-link:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    color: #ffffff;
}
.comm-message.received .comm-action-link:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    color: var(--primary-blue);
}
.comm-loading-dots:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    animation: pulse 1.5s infinite;
}
@keyframes pulse {
    0% { opacity: 0.6; }
    50% { opacity: 1; }
    100% { opacity: 0.6; }
}

.masked-input {
    -webkit-text-security: disc !important;
    text-security: disc !important;
}
.masked-input.is-revealed {
    -webkit-text-security: none !important;
    text-security: none !important;
}

/* --- FAQ Styles --- */
.faq-section:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    margin-bottom: 30px;
}
.faq-section h3:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    font-size: 16px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 15px;
    border-bottom: 2px solid #f1f5f9;
    padding-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.faq-item:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    margin-bottom: 12px;
    overflow: hidden;
    transition: all 0.2s ease;
}
.faq-item:hover:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    border-color: var(--primary-blue);
    box-shadow: 0 4px 12px rgba(59, 102, 245, 0.04);
}
.faq-item summary:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    padding: 14px 20px;
    font-weight: 700;
    font-size: 14px;
    color: var(--text-main);
    cursor: pointer;
    user-select: none;
    outline: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.faq-item summary:where(:not([data-ui="v2"], [data-ui="v2"] *))::-webkit-details-marker {
    display: none;
}
.faq-item summary:where(:not([data-ui="v2"], [data-ui="v2"] *))::after {
    content: "➕";
    font-size: 12px;
    color: var(--text-muted);
    transition: transform 0.2s ease;
}
.faq-item[open] summary:where(:not([data-ui="v2"], [data-ui="v2"] *))::after {
    content: "➖";
}
.faq-item[open]:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    background: #ffffff;
    border-color: var(--primary-blue);
    box-shadow: 0 4px 12px rgba(59, 102, 245, 0.06);
}
.faq-answer:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    padding: 14px 20px 18px 20px;
    font-size: 13.5px;
    color: #334155;
    line-height: 1.6;
    border-top: 1px solid #f1f5f9;
    background: #ffffff;
}
.faq-answer ul:where(:not([data-ui="v2"], [data-ui="v2"] *)), .faq-answer ol:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    margin: 8px 0;
    padding-left: 20px;
}
.faq-answer li:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    margin-bottom: 6px;
}
.faq-answer code:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    background: #f1f5f9;
    color: #ef4444;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: SFMono-Regular, Consolas, Liberation Mono, Menlo, monospace;
    font-size: 12px;
}
.faq-btn:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--primary-blue);
    color: #fff !important;
    padding: 8px 16px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 700;
    font-size: 12px;
    margin-top: 10px;
    transition: background 0.15s ease;
    border: none;
    cursor: pointer;
}
.faq-btn:hover:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    background: #2563eb;
}

/* Theme Toggle Button Style */
.theme-toggle-btn:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    background: transparent;
    border: 1px solid #cbd5e1;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    margin-right: 8px;
    outline: none;
    user-select: none;
}
.theme-toggle-btn:hover:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    background: #f1f5f9;
    border-color: #94a3b8;
    transform: scale(1.05);
}

/* --- Dark Mode Variables & Overrides --- */
body.dark-mode:where(:not([data-ui="v2"], [data-ui="v2"] *)), html.dark-mode {
    --bg-color: #0b0f19;
    --header-bg: #111827;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --column-bg: #111827;
    --card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
    --dropdown-bg: #1e293b;
    --dropdown-border: #334155;
    --dropdown-selected-bg: #1e3a8a;
    --border-color: #334155;
    --bg-main: #0f172a;
    --bg-card: #1e293b;
    --card-border: #334155;
}

body.dark-mode:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    background-color: var(--bg-color);
    color: var(--text-main);
}

body.dark-mode .theme-toggle-btn:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    border-color: #334155;
    color: #f8fafc;
}
body.dark-mode .theme-toggle-btn:hover:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    background: #1e293b;
    border-color: #475569;
}

body.dark-mode .main-header:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    border-bottom: 1px solid #1e293b;
    background: var(--header-bg);
}

body.dark-mode .logo-section h1:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    color: #f8fafc;
    border-right: 1px solid #1e293b;
}

body.dark-mode .nav-tab:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    color: var(--text-muted);
}
body.dark-mode .nav-tab:hover:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    background: #1e293b;
    color: #f8fafc;
}
body.dark-mode .nav-tab.active:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    background: var(--primary-blue);
    color: #ffffff;
}

body.dark-mode .btn-secondary:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    background: #1e293b;
    border: 1px solid #334155;
    color: #f8fafc;
}
body.dark-mode .btn-secondary:hover:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    background: #334155;
}

body.dark-mode .btn-danger:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    background: #b91c1c;
    color: #ffffff;
    border: 1px solid #991b1b;
}
body.dark-mode .btn-danger:hover:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    background: #ef4444;
    color: #ffffff;
    border-color: #ef4444;
}

body.dark-mode .column:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    border: 1px solid #1e293b;
    background-color: var(--column-bg);
}

body.dark-mode .column-header:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    border-bottom: 1px solid #1e293b;
}
body.dark-mode .column-header h3:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    color: #94a3b8;
}

body.dark-mode .card-list:where(:not([data-ui="v2"], [data-ui="v2"] *))::-webkit-scrollbar-thumb {
    background: #334155;
}
body.dark-mode .card-list::-webkit-scrollbar-thumb:hover:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    background: #475569;
}

body.dark-mode .card:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    background: #1e293b;
    border: 1px solid #334155;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
body.dark-mode .card:hover:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    box-shadow: 0 6px 12px rgba(0,0,0,0.3);
    border-color: var(--primary-blue);
}

body.dark-mode .card-title:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    color: #f8fafc;
}

body.dark-mode .card-code:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    color: #94a3b8;
}

body.dark-mode .card-metrics:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    background: #111827;
    border: 1px solid #1e293b;
}

body.dark-mode .metrics-table td:first-child:where(:not([data-ui="v2"], [data-ui="v2"] *)), 
body.dark-mode .metrics-table th:first-child:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    color: #f8fafc;
}
body.dark-mode .metrics-table th:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    color: var(--text-muted);
}

body.dark-mode .search-input:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    background: #1e293b;
    border: 1px solid #334155;
    color: #f8fafc;
}
body.dark-mode .search-input:focus:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(59, 102, 245, 0.2);
}

body.dark-mode .modal-content:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    background: #1e293b;
    color: #f8fafc;
    box-shadow: 0 20px 25px -5px rgba(0,0,0,0.5);
}
body.dark-mode .modal-header:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    border-bottom: 1px solid #334155;
}
body.dark-mode .modal-header h3:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    color: #f8fafc;
}

body.dark-mode .login-card:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    background: #1e293b;
    color: #f8fafc;
    box-shadow: 0 10px 25px rgba(0,0,0,0.3);
}
body.dark-mode .login-card h2:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    color: #f8fafc;
}

/* Form controls in dark mode */
body.dark-mode input[type="text"]:where(:not([data-ui="v2"], [data-ui="v2"] *)),
body.dark-mode input[type="number"]:where(:not([data-ui="v2"], [data-ui="v2"] *)),
body.dark-mode input[type="email"]:where(:not([data-ui="v2"], [data-ui="v2"] *)),
body.dark-mode input[type="date"]:where(:not([data-ui="v2"], [data-ui="v2"] *)),
body.dark-mode input[type="datetime-local"]:where(:not([data-ui="v2"], [data-ui="v2"] *)),
body.dark-mode textarea:where(:not([data-ui="v2"], [data-ui="v2"] *)),
body.dark-mode select:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    background: #111827;
    border: 1px solid #334155;
    color: #f8fafc;
}
body.dark-mode input[type="text"]:focus:where(:not([data-ui="v2"], [data-ui="v2"] *)),
body.dark-mode input[type="number"]:focus:where(:not([data-ui="v2"], [data-ui="v2"] *)),
body.dark-mode input[type="email"]:focus:where(:not([data-ui="v2"], [data-ui="v2"] *)),
body.dark-mode input[type="date"]:focus:where(:not([data-ui="v2"], [data-ui="v2"] *)),
body.dark-mode textarea:focus:where(:not([data-ui="v2"], [data-ui="v2"] *)),
body.dark-mode select:focus:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    border-color: var(--primary-blue);
}

body.dark-mode label:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    color: #94a3b8;
}

body.dark-mode .clean-table:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    background: #111827;
}
body.dark-mode .clean-table th:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    background: #111827;
    color: #94a3b8;
    border-bottom: 2px solid #334155 !important;
}
body.dark-mode .clean-table td:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    color: #f8fafc;
}
body.dark-mode .clean-table tr:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    border-bottom: 1px solid #334155;
}
body.dark-mode .clean-table tr:hover td:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    background: #1e293b !important;
}

body.dark-mode #dirPanePubs:where(:not([data-ui="v2"], [data-ui="v2"] *)),
body.dark-mode #dirPanePocs:where(:not([data-ui="v2"], [data-ui="v2"] *)),
body.dark-mode #dirPaneLists:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    background: #111827 !important;
    border: 1px solid #334155 !important;
}

body.dark-mode .mcp-log-args-pre:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    background: #0f172a !important;
    color: #38bdf8 !important;
    border: 1px solid #334155 !important;
}
body.dark-mode .mcp-log-args-summary:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    color: #94a3b8;
}
body.dark-mode .mcp-log-args-summary:hover:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    color: #60a5fa;
}

/* FAQ elements in dark mode */
body.dark-mode .faq-item:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    background: #111827;
    border-color: #334155;
}
body.dark-mode .faq-item summary:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    color: #f8fafc;
}
body.dark-mode .faq-item[open]:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    background: #1e293b;
    border-color: var(--primary-blue);
}
body.dark-mode .faq-answer:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    background: #1e293b;
    color: #cbd5e1;
    border-top: 1px solid #334155;
}
body.dark-mode .faq-answer code:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    background: #111827;
}
body.dark-mode .faq-section h3:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    color: #f8fafc;
    border-bottom: 2px solid #334155;
}

/* Analytics blocks in dark mode */
body.dark-mode .activity-grid .stat-card:where(:not([data-ui="v2"], [data-ui="v2"] *)),
body.dark-mode .stats-grid .stat-card:where(:not([data-ui="v2"], [data-ui="v2"] *)),
body.dark-mode .chart-card:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    background: #1e293b;
    border-color: #334155;
    color: #f8fafc;
}
body.dark-mode .activity-grid .stat-card h3:where(:not([data-ui="v2"], [data-ui="v2"] *)),
body.dark-mode .stats-grid .stat-card h3:where(:not([data-ui="v2"], [data-ui="v2"] *)),
body.dark-mode .chart-card h3:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    color: #94a3b8;
}
body.dark-mode .stat-val:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    color: #f8fafc;
}

/* Communications history slide-over panel in dark mode */
body.dark-mode .communications-panel:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    background: #111827;
    border-left: 1px solid #334155;
}
body.dark-mode .communications-panel-header:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    border-bottom: 1px solid #334155;
    background: #1e293b;
}
body.dark-mode #commPanelTitle:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    color: #f8fafc;
}
body.dark-mode .communications-filter-bar:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    background: #1e293b;
    border-bottom: 1px solid #334155;
}
body.dark-mode .communications-filter-bar select:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    background: #111827;
    border: 1px solid #334155;
    color: #f8fafc;
}
body.dark-mode .communications-list:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    background: #0b0f19;
}
body.dark-mode .comm-message.received:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    background: #1e293b;
    color: #f8fafc;
}
body.dark-mode .comm-message.sent:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    background: var(--primary-blue);
    color: #ffffff;
}
body.dark-mode .comm-email-summary:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    background: rgba(0, 0, 0, 0.2);
    border-color: rgba(255, 255, 255, 0.15);
}
body.dark-mode .comm-message.received .comm-email-summary:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    background: #1e3a1e;
    color: #a7f3d0;
    border-color: #064e3b;
}
body.dark-mode .communications-footer:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    background: #1e293b;
    border-top: 1px solid #334155;
}
body.dark-mode #manualLogForm select:where(:not([data-ui="v2"], [data-ui="v2"] *)),
body.dark-mode #manualLogForm textarea:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    background: #111827;
    border: 1px solid #334155;
    color: #f8fafc;
}

/* User profile displays */
body.dark-mode #userEmailDisplay:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    color: #f8fafc !important;
}
body.dark-mode #remindersDropdown:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    background: #1e293b !important;
    border: 1px solid #334155 !important;
    color: #f8fafc !important;
}
body.dark-mode #remindersDropdown h4:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    border-bottom: 1px solid #334155 !important;
}

/* Custom fields area */
body.dark-mode .info-block-inline:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    border-bottom: 1px solid #334155;
}
body.dark-mode .info-block-inline strong:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    color: #94a3b8;
}

/* Customizer Column & Item Dark Mode Overrides */
body.dark-mode .customizer-col:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    background: #111827 !important;
    border-color: #334155 !important;
}
body.dark-mode .customizer-col h4:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    color: #f8fafc !important;
    border-bottom-color: var(--primary-blue) !important;
}
body.dark-mode .customizer-col .customizer-item:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    background: #1e293b !important;
    border: 1px solid #334155 !important;
}
body.dark-mode .customizer-col .customizer-item.required-field:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    border-left: 4px solid var(--danger-red) !important;
}
body.dark-mode .customizer-col .customizer-item:hover:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    border-color: var(--primary-blue) !important;
    box-shadow: 0 2px 5px rgba(59, 102, 245, 0.15) !important;
}
body.dark-mode .customizer-col .customizer-item span:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    color: #f8fafc !important;
}
body.dark-mode .customizer-col .sys-badge:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    background: #111827 !important;
    color: #94a3b8 !important;
    border-color: #334155 !important;
}
body.dark-mode .customizer-col div[style*="border-top"]:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    border-top-color: #334155 !important;
}

/* Comments Feed Dark Mode Overrides */
body.dark-mode .feed:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    background: #0f172a !important;
    border-color: #334155 !important;
}
body.dark-mode .comment-item:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    background: #1e293b !important;
    border-left-color: #475569 !important;
    color: #f8fafc !important;
}
body.dark-mode .comment-item small:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    color: #94a3b8 !important;
}
body.dark-mode .comment-item.system:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    background: #1e293b !important;
    border-left-color: #64748b !important;
    color: #94a3b8 !important;
}

/* Rich Text Editor Dark Mode Overrides */
body.dark-mode .editor-toolbar:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    background: #1e293b !important;
    border-color: #334155 !important;
}
body.dark-mode .toolbar-btn:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    background: #0f172a !important;
    border-color: #334155 !important;
    color: #f8fafc !important;
}
body.dark-mode .toolbar-btn:hover:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    background: #1e293b !important;
    border-color: var(--primary-blue) !important;
}
body.dark-mode #commentInputRich:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    background: #0f172a !important;
    color: #f8fafc !important;
    border-color: #334155 !important;
}

/* Reminders, Attachments & Snapshot Styles */
#snapshotContentArea:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}
.reminder-item:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #64748b;
}
.reminder-item-title:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    font-weight: bold;
    color: #334155;
}
.reminder-item-message:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    color: #64748b;
}
.reminder-item-meta:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    color: #64748b;
}
.attachment-item-uploading:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #64748b;
}
.attachment-item:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    color: #475569;
}
.snapshot-timeline-event:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    background: #fff;
    border-left: 3px solid var(--primary-blue);
}
.snapshot-timeline-event-text:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    color: #475569;
}

body.dark-mode #snapshotContentArea:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    background: #0b0f19 !important;
    border-color: #334155 !important;
}
body.dark-mode .reminder-item:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    background: #111827 !important;
    border-color: #334155 !important;
    color: #cbd5e1 !important;
}
body.dark-mode .reminder-item-title:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    color: #f8fafc !important;
}
body.dark-mode .reminder-item-message:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    color: #94a3b8 !important;
}
body.dark-mode .reminder-item-meta:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    color: #94a3b8 !important;
}
body.dark-mode .attachment-item-uploading:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    background: #111827 !important;
    border-color: #334155 !important;
    color: #94a3b8 !important;
}
body.dark-mode .attachment-item:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    background: #1e293b !important;
    border-color: #475569 !important;
    color: #cbd5e1 !important;
}
body.dark-mode .snapshot-timeline-event:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    background: #1e293b !important;
}
body.dark-mode .snapshot-timeline-event-text:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    color: #cbd5e1 !important;
}

/* Base styles for Bulk Action Bar */
#bulkActionBar:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    color: #0f172a;
}
#bulkSelectedCount:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    color: #0f172a;
}

/* Dark mode overrides for Bulk Action Bar & Toasts */

body.dark-mode #bulkActionBar:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    background: #1e293b !important;
    border-color: #334155 !important;
}
body.dark-mode #bulkSelectedCount:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    color: #f8fafc !important;
}
body.dark-mode #bulkActionBar div:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    background-color: #334155 !important;
}

/* Card Hover Glows */
.card.prod-applovin:hover:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    box-shadow: 0 0 12px 2px rgba(139, 92, 246, 0.25) !important;
    border-color: #8b5cf6 !important;
}
.card.prod-admob:hover:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    box-shadow: 0 0 12px 2px rgba(3, 105, 161, 0.25) !important;
    border-color: #0369a1 !important;
}
.card.prod-h5adx:hover:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    box-shadow: 0 0 12px 2px rgba(4, 120, 87, 0.25) !important;
    border-color: #047857 !important;
}
.card.prod-webadx:hover:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    box-shadow: 0 0 12px 2px rgba(15, 118, 110, 0.25) !important;
    border-color: #0f766e !important;
}
.card.prod-vaast:hover:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    box-shadow: 0 0 12px 2px rgba(67, 56, 202, 0.25) !important;
    border-color: #4338ca !important;
}
.card.prod-webhb:hover:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    box-shadow: 0 0 12px 2px rgba(190, 24, 93, 0.25) !important;
    border-color: #be185d !important;
}
.card.prod-unity:hover:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    box-shadow: 0 0 12px 2px rgba(194, 65, 12, 0.25) !important;
    border-color: #c2410c !important;
}
.card.prod-admost:hover:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    box-shadow: 0 0 12px 2px rgba(202, 138, 4, 0.25) !important;
    border-color: #ca8a04 !important;
}
.card.prod-topon:hover:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    box-shadow: 0 0 12px 2px rgba(234, 88, 12, 0.25) !important;
    border-color: #ea580c !important;
}

/* Scroll Navigation Dots */
.scroll-dots-container:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    padding: 10px 0;
    background: transparent;
    position: sticky;
    bottom: 5px;
    z-index: 100;
    pointer-events: none;
}
.scroll-dot:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #cbd5e1;
    border: none;
    cursor: pointer;
    padding: 0;
    pointer-events: auto;
    transition: all 0.2s ease;
}
.scroll-dot:hover:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    background: #94a3b8;
    transform: scale(1.2);
}
.scroll-dot.active:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    background: var(--primary-blue);
    width: 20px;
    border-radius: 4px;
}

body.dark-mode .scroll-dot:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    background: #475569;
}
body.dark-mode .scroll-dot:hover:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    background: #64748b;
}
body.dark-mode .scroll-dot.active:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    background: var(--primary-blue);
}

/* Drag and Drop Target Highlighting - Only on the active hover target! */
.card-list:has(.sortable-ghost):where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    border: 2px dashed var(--primary-blue) !important;
    background-color: rgba(59, 130, 246, 0.06) !important;
    border-radius: 8px;
    transition: all 0.2s ease;
}

body.dark-mode .card-list:has(.sortable-ghost):where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    border-color: var(--primary-blue) !important;
    background-color: rgba(59, 130, 246, 0.12) !important;
}

/* Styled Placeholder card itself */
.sortable-ghost:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    opacity: 0.45;
    border: 2px dashed var(--primary-blue) !important;
    background: transparent !important;
    box-shadow: none !important;
    border-radius: 8px;
}

/* Disable scroll snap during active drag to allow SortableJS auto-scroll to work */
body.dragging-active .board:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    scroll-snap-type: none !important;
}
body.dragging-active .column:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    scroll-snap-align: none !important;
}

/* Drag Fallback styling (card being dragged) */
.sortable-fallback:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    opacity: 0.95 !important;
    transform: rotate(2deg) scale(1.04) !important;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25) !important;
    z-index: 99999 !important;
    pointer-events: none !important;
    cursor: grabbing !important;
}

/* --- Slide-out Side Drawer --- */
.side-drawer:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    position: fixed;
    top: 0;
    right: -420px; /* Hidden by default */
    width: 400px;
    max-width: 90vw;
    height: 100%;
    background: var(--header-bg);
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.15);
    z-index: 3000; /* Higher than approvals modal (2000) */
    transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    border-left: 1px solid #cbd5e1;
}
.side-drawer.open:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    right: 0;
}
.drawer-header:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    padding: 20px;
    border-bottom: 1px solid #cbd5e1;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.drawer-header h3:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
}
.drawer-body:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    padding: 20px;
    overflow-y: auto;
    flex-grow: 1;
}

/* Timeline Style */
.timeline:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    position: relative;
    padding-left: 20px;
    border-left: 2px solid #cbd5e1;
    margin-left: 10px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.timeline-item:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    position: relative;
}
.timeline-item:where(:not([data-ui="v2"], [data-ui="v2"] *))::before {
    content: '';
    position: absolute;
    left: -27px;
    top: 4px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--primary-blue);
    border: 2px solid var(--header-bg);
    box-shadow: 0 0 0 2px rgba(59, 102, 245, 0.2);
}
.timeline-time:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 600;
    margin-bottom: 2px;
}
.timeline-desc:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-main);
}
.timeline-device:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 2px;
}

/* Clickable Link for Login Timestamp */
.login-timestamp-link:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    cursor: pointer;
    transition: color 0.15s ease;
    text-decoration: none !important;
}
.login-timestamp-link:hover:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    color: var(--primary-blue) !important;
    text-decoration: none !important;
}

/* Dark Mode Overrides */
body.dark-mode .side-drawer:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    background: #111827;
    border-left: 1px solid #334155;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.4);
}
body.dark-mode .drawer-header:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    border-bottom: 1px solid #334155;
}
body.dark-mode .timeline:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    border-left-color: #334155;
}
body.dark-mode .timeline-item:where(:not([data-ui="v2"], [data-ui="v2"] *))::before {
    border-color: #111827;
    box-shadow: 0 0 0 2px rgba(59, 102, 245, 0.4);
}

@media (max-width: 1300px) {
    .main-header:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
        padding: 0 12px;
    }
    .logo-section:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
        gap: 12px;
    }
    .logo-section h1:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
        font-size: 14px;
        padding-right: 12px;
    }
    .nav-tab:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
        padding: 6px 8px;
        font-size: 12px;
    }
    .header-actions:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
        gap: 8px;
    }
    .admin-controls:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
        gap: 4px;
    }
    .admin-controls .btn:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
        padding: 6px 10px;
        font-size: 12px;
    }
}

/* --- MCP Setup & Integration Styles --- */
.mcp-tabs:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    display: flex;
    gap: 8px;
    border-bottom: 1px solid #e2e8f0;
    margin-bottom: 12px;
    padding-bottom: 4px;
    transition: border-color 0.2s;
}
body.dark-mode .mcp-tabs:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    border-bottom-color: #334155;
}
.mcp-tab-btn:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    background: none;
    border: none;
    font-size: 13px;
    font-weight: 500;
    padding: 6px 12px;
    cursor: pointer;
    color: #64748b;
    border-bottom: 2px solid transparent;
    outline: none;
    transition: all 0.2s;
}
body.dark-mode .mcp-tab-btn:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    color: #94a3b8;
}
.mcp-tab-btn.active:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    font-weight: 600;
    color: var(--primary-blue);
    border-bottom-color: var(--primary-blue);
}
body.dark-mode .mcp-tab-btn.active:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    color: var(--primary-blue);
    border-bottom-color: var(--primary-blue);
}

.mcp-select:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    width: 100%;
    box-sizing: border-box;
    padding: 8px 12px;
    border-radius: 6px;
    outline: none;
    border: 1px solid #cbd5e1;
    background: #ffffff;
    color: #1e293b;
    font-size: 13px;
    transition: all 0.2s;
}
body.dark-mode .mcp-select:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    border-color: #334155;
    background: #1e293b;
    color: #f8fafc;
}
.mcp-select:focus:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(59, 102, 245, 0.1);
}

.mcp-setup-box:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 12px;
    color: #334155;
    transition: all 0.2s;
}
body.dark-mode .mcp-setup-box:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    background: #1e293b;
    border-color: #334155;
    color: #e2e8f0;
}

.mcp-setup-desc:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    margin: 0 0 10px 0;
    color: #475569;
    font-size: 12px;
}
body.dark-mode .mcp-setup-desc:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    color: #94a3b8;
}

.mcp-textarea:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    width: 100%;
    height: 110px;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-family: monospace;
    font-size: 11px;
    padding: 12px;
    box-sizing: border-box;
    resize: none;
    color: #334155;
    line-height: 1.4;
    outline: none;
    margin: 0;
    transition: all 0.2s;
}
body.dark-mode .mcp-textarea:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    background: #0f172a;
    border-color: #334155;
    color: #e2e8f0;
}

.mcp-btn-secondary:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    position: absolute;
    top: 8px;
    right: 8px;
    font-size: 11px;
    padding: 4px 8px;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    cursor: pointer;
    color: #475569;
    font-weight: 600;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
    transition: all 0.2s;
}
body.dark-mode .mcp-btn-secondary:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    background: #1e293b;
    border-color: #475569;
    color: #cbd5e1;
}
.mcp-btn-secondary:hover:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    background: #f1f5f9;
}
body.dark-mode .mcp-btn-secondary:hover:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    background: #334155;
}

.mcp-toggle-btn:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    padding: 6px 12px;
    font-size: 12px;
    border-radius: 6px;
    cursor: pointer;
    border: 1px solid #cbd5e1;
    background: #ffffff;
    color: #475569;
    font-weight: 500;
    outline: none;
    transition: all 0.2s;
}
body.dark-mode .mcp-toggle-btn:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    background: #1e293b;
    border-color: #334155;
    color: #cbd5e1;
}
.mcp-toggle-btn.active:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    border-color: var(--primary-blue);
    background: var(--primary-blue);
    color: #ffffff;
    font-weight: 600;
}
body.dark-mode .mcp-toggle-btn.active:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    border-color: var(--primary-blue);
    background: var(--primary-blue);
    color: #ffffff;
    font-weight: 600;
}

.mcp-method-bar:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
    border-bottom: 1px solid #f1f5f9;
    padding-bottom: 8px;
}
body.dark-mode .mcp-method-bar:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    border-bottom-color: #1e293b;
}

.mcp-code-path:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    background: #e2e8f0;
    padding: 2px 4px;
    border-radius: 4px;
    font-size: 10px;
    word-break: break-all;
    color: #1e293b;
}
body.dark-mode .mcp-code-path:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    background: #1e293b;
    color: #cbd5e1;
}

/* Campaign Validation Error Modal Styling */
#campaignValidationErrorsList:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}
body.dark-mode #campaignValidationErrorsList:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    background: #0f172a;
    border-color: #334155;
}

/* ==========================================================================
   Universal Dynamic Filter Bar & Enhanced Lead Cards
   ========================================================================== */

.universal-filter-container:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
    margin-bottom: 12px;
}

.filter-controls-row:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.filter-search-box:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    position: relative;
    display: flex;
    align-items: center;
}

.filter-search-box input:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    padding: 7px 14px 7px 32px;
    border: 1px solid #cbd5e1;
    border-radius: 20px;
    font-size: 13px;
    width: 230px;
    background: #ffffff;
    transition: all 0.2s ease;
    outline: none;
}

.filter-search-box input:focus:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(59, 102, 245, 0.12);
}

.filter-search-box .search-icon:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    position: absolute;
    left: 11px;
    font-size: 12px;
    color: #94a3b8;
    pointer-events: none;
}

.btn-add-filter:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #ffffff;
    border: 1px dashed #94a3b8;
    border-radius: 20px;
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 600;
    color: var(--primary-blue);
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-add-filter:hover:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    background: #eff6ff;
    border-color: var(--primary-blue);
    border-style: solid;
}

.filter-chips-row:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    min-height: 24px;
}

.filter-chip:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1e40af;
    border-radius: 16px;
    padding: 3px 10px;
    font-size: 12px;
    font-weight: 500;
    animation: fadeInChip 0.15s ease-out;
}

@keyframes fadeInChip {
    from { opacity: 0; transform: scale(0.92); }
    to { opacity: 1; transform: scale(1); }
}

.filter-chip .chip-remove:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    background: none;
    border: none;
    color: #3b82f6;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    padding: 0 2px;
    line-height: 1;
}

.filter-chip .chip-remove:hover:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    color: #ef4444;
}

.btn-clear-all-filters:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    background: none;
    border: none;
    color: #ef4444;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    padding: 2px 6px;
    text-decoration: underline;
}

.btn-clear-all-filters:hover:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    color: #b91c1c;
}

/* Add Filter Dropdown Popover */
.filter-dropdown-menu:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 1050;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    min-width: 220px;
    padding: 6px 0;
    margin-top: 4px;
}

.filter-dropdown-menu.show:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    display: block;
}

.filter-dropdown-item:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    padding: 8px 14px;
    font-size: 13px;
    color: #1e293b;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background 0.12s;
}

.filter-dropdown-item:hover:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    background: #f1f5f9;
    color: var(--primary-blue);
}

/* Secondary Filter Builder Popover */
.filter-builder-popover:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 1060;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    box-shadow: 0 12px 30px rgba(0,0,0,0.15);
    padding: 14px;
    min-width: 280px;
    margin-top: 4px;
}

.filter-builder-popover.show:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    display: block;
}

/* Enhanced Typography & Card Layout */
.card-clean-title:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    font-weight: 700;
    font-size: 15px;
    line-height: 1.3;
    color: #0f172a;
    margin-bottom: 3px;
    display: flex;
    align-items: center;
}

.card-clean-subtitle:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    font-size: 12px;
    font-weight: 500;
    color: #64748b;
    margin-bottom: 8px;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-value-row:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 6px;
    padding-top: 6px;
    border-top: 1px solid #f1f5f9;
}

.card-value-pill:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    font-size: 13px;
    font-weight: 700;
    color: #059669;
}

.card-close-pill:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    font-size: 11px;
    font-weight: 600;
    color: #475569;
    background: #f1f5f9;
    padding: 2px 7px;
    border-radius: 4px;
}

/* Contact: X ago via Channel row */
.card-contact-row:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: #64748b;
    margin: 7px 0;
    padding: 6px 0;
    border-top: 1px dashed #cbd5e1;
    border-bottom: 1px solid #e2e8f0;
    width: 100%;
}

.card-contact-row strong:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    color: #0f172a;
    font-weight: 700;
}

.card-contact-row .contact-channel:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    color: #2563eb;
    font-weight: 600;
}

.card-footer-clean:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 8px;
    padding-top: 6px;
    border-top: 1px solid #f8fafc;
}

.card-owner-name:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    font-size: 12px;
    font-weight: 600;
    color: #334155;
    display: flex;
    align-items: center;
    gap: 4px;
}

.card-activity-pill:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    font-size: 11px;
    font-weight: 500;
    color: #64748b;
}

.card-mgr-badge:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    font-size: 9px;
    background: #e0e7ff;
    color: #3730a3;
    padding: 1px 4px;
    border-radius: 3px;
    font-weight: 600;
}

/* Pulsing Coldness Indicators (7 / 14 Day Thresholds) */
.aging-dot.active:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    background-color: #10b981; /* Green <= 7 days */
}
.aging-dot.stagnant:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    background-color: #f59e0b; /* Yellow 7 - 14 days */
}
.aging-dot.cold:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    background-color: #ef4444; /* Red > 14 days */
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
    animation: pulse-red 2s infinite;
}

/* ==========================================================================
   Dark Mode Overrides for Universal Filter Bar & Clean Cards
   ========================================================================== */

/* Universal Filter Bar Dark Mode */
body.dark-mode .filter-search-box input:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    background: #1e293b;
    border: 1px solid #334155;
    color: #f8fafc;
}

body.dark-mode .filter-search-box input:where(:not([data-ui="v2"], [data-ui="v2"] *))::placeholder {
    color: #64748b;
}

body.dark-mode .filter-search-box .search-icon:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    color: #64748b;
}

body.dark-mode .btn-add-filter:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    background: #1e293b;
    border: 1px dashed #475569;
    color: #60a5fa;
}

body.dark-mode .btn-add-filter:hover:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    background: #334155;
    border-color: #60a5fa;
    border-style: solid;
    color: #93c5fd;
}

body.dark-mode .filter-chip:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    background: rgba(37, 99, 235, 0.2);
    border-color: #3b82f6;
    color: #bfdbfe;
}

body.dark-mode .filter-chip .chip-remove:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    color: #93c5fd;
}

body.dark-mode .filter-chip .chip-remove:hover:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    color: #f87171;
}

body.dark-mode .btn-clear-all-filters:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    color: #f87171;
}

body.dark-mode .btn-clear-all-filters:hover:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    color: #ef4444;
}

body.dark-mode .filter-dropdown-menu:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    background: #1e293b;
    border: 1px solid #334155;
    box-shadow: 0 10px 25px rgba(0,0,0,0.6);
}

body.dark-mode .filter-dropdown-item:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    color: #e2e8f0;
}

body.dark-mode .filter-dropdown-item:hover:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    background: #334155;
    color: #60a5fa;
}

body.dark-mode .filter-builder-popover:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    background: #1e293b;
    border: 1px solid #334155;
    box-shadow: 0 12px 30px rgba(0,0,0,0.7);
    color: #f8fafc;
}

body.dark-mode #filterBuilderTitle:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    color: #f8fafc !important;
}

body.dark-mode .filter-builder-popover label:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    color: #cbd5e1;
}

body.dark-mode .filter-builder-popover input:where(:not([data-ui="v2"], [data-ui="v2"] *)),
body.dark-mode .filter-builder-popover select:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    background: #0f172a;
    border: 1px solid #334155;
    color: #f8fafc;
}

/* Card Elements Dark Mode */
body.dark-mode .card-clean-title:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    color: #f8fafc;
}

body.dark-mode .card-clean-subtitle:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    color: #94a3b8;
}

body.dark-mode .card-value-row:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    border-top: 1px solid #334155;
}

body.dark-mode .card-value-pill:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    color: #34d399;
}

body.dark-mode .card-close-pill:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    color: #cbd5e1;
    background: #0f172a;
    border: 1px solid #334155;
}

body.dark-mode .card-contact-row:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    color: #94a3b8;
    border-top: 1px dashed #334155;
    border-bottom: 1px solid #334155;
}

body.dark-mode .card-contact-row strong:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    color: #f8fafc;
}

body.dark-mode .card-contact-row .contact-channel:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    color: #60a5fa;
}

body.dark-mode .card-footer-clean:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    border-top: 1px solid #334155;
}

body.dark-mode .card-owner-name:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    color: #e2e8f0;
}

body.dark-mode .card-owner-name span:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    color: #e2e8f0;
}

body.dark-mode .card-activity-pill:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    color: #94a3b8;
}

body.dark-mode .card-comm-btn:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    color: #94a3b8;
    border-color: #334155;
    background: #0f172a;
}

body.dark-mode .card-comm-btn:hover:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    color: #60a5fa;
    background: #1e293b;
    border-color: #60a5fa;
}

body.dark-mode .card-mgr-badge:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    background: #312e81;
    color: #c7d2fe;
}

body.dark-mode .card-onboarding-progress:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    border-top: 1px dashed #334155 !important;
}

body.dark-mode .card-onboarding-progress .progress-bar-bg:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    background: #334155 !important;
}

body.dark-mode .column-totals:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    color: #94a3b8 !important;
}

body.dark-mode .board-stats:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    color: #94a3b8 !important;
}

/* ========================================================
   Team Relationship Mapping & Warm Intro Styles
   ======================================================== */
.card-network-badge:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 600;
    color: #6d28d9;
    background: #f5f3ff;
    border: 1px solid #ddd6fe;
    border-radius: 6px;
    padding: 2px 7px;
    cursor: pointer;
    margin-top: 4px;
    transition: all 0.15s ease;
    width: fit-content;
}
.card-network-badge:hover:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    background: #ede9fe;
    border-color: #c4b5fd;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(109, 40, 217, 0.1);
}
body.dark-mode .card-network-badge:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    color: #c4b5fd;
    background: #2e1065;
    border-color: #5b21b6;
}
body.dark-mode .card-network-badge:hover:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    background: #3b0764;
    border-color: #7c3aed;
}

.dir-network-badge:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 10px;
    font-weight: 600;
    color: #6d28d9;
    background: #f5f3ff;
    border: 1px solid #ddd6fe;
    border-radius: 4px;
    padding: 2px 6px;
    cursor: pointer;
    margin-left: 6px;
    transition: all 0.15s ease;
    white-space: nowrap;
}
.dir-network-badge:hover:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    background: #ede9fe;
    border-color: #c4b5fd;
    box-shadow: 0 1px 3px rgba(109, 40, 217, 0.15);
}
body.dark-mode .dir-network-badge:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    color: #c4b5fd;
    background: #2e1065;
    border-color: #5b21b6;
}

.warm-intro-contact-card:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    background: var(--bg-surface-secondary, #ffffff);
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: 8px;
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    transition: all 0.15s ease;
}
.warm-intro-contact-card:hover:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    border-color: #cbd5e1;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}
body.dark-mode .warm-intro-contact-card:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    background: #1e293b;
    border-color: #334155;
}

.teammate-pill:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 12px;
    background: #e0e7ff;
    color: #3730a3;
    border: 1px solid #c7d2fe;
}
body.dark-mode .teammate-pill:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    background: #312e81;
    color: #c7d2fe;
    border-color: #4338ca;
}

.seniority-pill-founder:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    background: #dcfce7;
    color: #15803d;
    border: 1px solid #bbf7d0;
}
.seniority-pill-growth:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    background: #dbeafe;
    color: #1d4ed8;
    border: 1px solid #bfdbfe;
}
.seniority-pill-general:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    font-size: 10px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 4px;
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #e2e8f0;
}
body.dark-mode .seniority-pill-founder:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    background: #064e3b;
    color: #6ee7b7;
    border-color: #047857;
}
body.dark-mode .seniority-pill-growth:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    background: #1e3a8a;
    color: #93c5fd;
    border-color: #1d4ed8;
}
body.dark-mode .seniority-pill-general:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    background: #334155;
    color: #cbd5e1;
    border-color: #475569;
}

#linkedinDropZone.dragover:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    border-color: #2563eb !important;
    background: #eff6ff !important;
}
body.dark-mode #linkedinDropZone.dragover:where(:not([data-ui="v2"], [data-ui="v2"] *)) {
    background: #1e293b !important;
    border-color: #3b82f6 !important;
}


