:root {
    --bg-main: #0b0f17;
    --bg-card: #151c28;
    --bg-card-hover: #1e293b;
    --accent-pink: #ec4899;
    --accent-purple: #8b5cf6;
    --accent-purple-light: #a29bfe;
    --accent-green: #10b981;
    --accent-yellow: #f59e0b;
    --accent-red: #ef4444;
    --accent-blue: #38bdf8;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --border-color: rgba(255, 255, 255, 0.08);
    --glass-bg: rgba(21, 28, 40, 0.75);
    --glass-border: rgba(255, 255, 255, 0.1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Inter', 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
}

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    min-height: 100vh;
    padding: 1.25rem;
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(236, 72, 153, 0.07) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(139, 92, 246, 0.07) 0%, transparent 40%);
}

.container {
    max-width: 1440px;
    margin: 0 auto;
}

/* Header */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.logo-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--accent-pink), var(--accent-purple));
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    box-shadow: 0 4px 20px rgba(236, 72, 153, 0.35);
}

.logo-text h1 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(to right, #ffffff, #cbd5e1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.logo-text p {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

/* Buttons */
.btn-primary {
    background: linear-gradient(135deg, var(--accent-pink), var(--accent-purple));
    color: #fff;
    border: none;
    padding: 0.6rem 1.1rem;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.88rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
    box-shadow: 0 4px 15px rgba(236, 72, 153, 0.25);
}

.btn-primary:hover {
    opacity: 0.92;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(236, 72, 153, 0.35);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-main);
    border: 1px solid var(--border-color);
    padding: 0.6rem 1rem;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.88rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.2);
}

.btn-danger {
    background: rgba(239, 68, 68, 0.15);
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, 0.3);
    padding: 0.6rem 0.9rem;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.88rem;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-danger:hover {
    background: rgba(239, 68, 68, 0.3);
}

.btn-sm {
    padding: 0.35rem 0.65rem;
    font-size: 0.78rem;
    border-radius: 6px;
}

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

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 1.1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: transform 0.2s, box-shadow 0.2s;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.stat-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.stat-icon.pink { background: rgba(236, 72, 153, 0.15); color: var(--accent-pink); }
.stat-icon.purple { background: rgba(139, 92, 246, 0.15); color: var(--accent-purple); }
.stat-icon.green { background: rgba(16, 185, 129, 0.15); color: var(--accent-green); }
.stat-icon.yellow { background: rgba(245, 158, 11, 0.15); color: var(--accent-yellow); }
.stat-icon.blue { background: rgba(56, 189, 248, 0.15); color: var(--accent-blue); }

.stat-info h3 {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 0.15rem;
    font-family: 'Outfit', sans-serif;
}

.stat-info p {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Glass Card */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
}

/* Section Title */
.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.panel-header h2 {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.panel-header p {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.2rem;
}

/* Funnel Stepper */
.funnel-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 0.85rem;
}

.funnel-step-card {
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 1rem 0.85rem;
    position: relative;
    text-align: center;
    transition: all 0.2s;
}

.funnel-step-card.final-stage {
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.35);
}

.funnel-step-title {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
}

.funnel-step-val {
    font-size: 1.6rem;
    font-weight: 700;
    font-family: 'Outfit', sans-serif;
    color: var(--text-main);
}

.badge-conv {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 0.2rem 0.5rem;
    border-radius: 6px;
    margin-top: 0.4rem;
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
}

.badge-drop {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 0.2rem 0.5rem;
    border-radius: 6px;
    margin-top: 0.4rem;
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
}

/* Alert Banner */
.bottleneck-banner {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.15), rgba(245, 158, 11, 0.1));
    border: 1px solid rgba(239, 68, 68, 0.35);
    border-radius: 14px;
    padding: 1rem 1.25rem;
    margin-bottom: 1.25rem;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.bottleneck-icon {
    font-size: 1.5rem;
    color: #f59e0b;
    padding-top: 0.1rem;
}

.bottleneck-content h4 {
    font-size: 0.98rem;
    font-weight: 700;
    color: #fca5a5;
    margin-bottom: 0.25rem;
}

.bottleneck-content p {
    font-size: 0.85rem;
    color: #cbd5e1;
    line-height: 1.45;
}

.bottleneck-recommendation {
    margin-top: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: rgba(0, 0, 0, 0.35);
    border-radius: 8px;
    font-size: 0.82rem;
    color: #fbbf24;
    border-left: 3px solid #f59e0b;
}

/* Factor Analysis Grid */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.skill-card {
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1rem;
    transition: border-color 0.2s;
}

.skill-card:hover {
    border-color: rgba(255, 255, 255, 0.2);
}

.skill-card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.6rem;
}

.skill-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #ffffff;
}

.skill-lift-badge {
    background: rgba(139, 92, 246, 0.2);
    color: #c4b5fd;
    border: 1px solid rgba(139, 92, 246, 0.4);
    padding: 0.2rem 0.5rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
}

.skill-desc {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}

.skill-rates {
    display: flex;
    justify-content: space-between;
    background: rgba(0, 0, 0, 0.3);
    padding: 0.6rem 0.8rem;
    border-radius: 8px;
    font-size: 0.8rem;
}

.skill-rates .rate-col {
    text-align: center;
}

.rate-num {
    font-size: 1rem;
    font-weight: 700;
    margin-top: 0.1rem;
}

/* Two Columns for Charts */
.charts-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
    margin-bottom: 1.5rem;
}

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

.chart-box {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 1.25rem;
    position: relative;
}

/* Contacts Table & Kanban */
.table-responsive {
    overflow-x: auto;
}

table.crm-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.86rem;
    text-align: left;
}

table.crm-table th {
    padding: 0.75rem 1rem;
    color: var(--text-muted);
    font-weight: 600;
    border-bottom: 1px solid var(--border-color);
    background: rgba(0, 0, 0, 0.2);
}

table.crm-table td {
    padding: 0.85rem 1rem;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
}

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

.badge-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.2rem 0.45rem;
    border-radius: 6px;
    font-size: 0.72rem;
    font-weight: 600;
    margin: 0.1rem;
}

.badge-tag.baritone { background: rgba(236, 72, 153, 0.2); color: #f472b6; border: 1px solid rgba(236, 72, 153, 0.3); }
.badge-tag.pause { background: rgba(139, 92, 246, 0.2); color: #a78bfa; border: 1px solid rgba(139, 92, 246, 0.3); }
.badge-tag.look { background: rgba(16, 185, 129, 0.2); color: #34d399; border: 1px solid rgba(16, 185, 129, 0.3); }
.badge-tag.body { background: rgba(56, 189, 248, 0.2); color: #7dd3fc; border: 1px solid rgba(56, 189, 248, 0.3); }
.badge-tag.tempo { background: rgba(245, 158, 11, 0.2); color: #fbbf24; border: 1px solid rgba(245, 158, 11, 0.3); }
.badge-tag.lead { background: rgba(168, 85, 247, 0.2); color: #c084fc; border: 1px solid rgba(168, 85, 247, 0.3); }

.contact-name-link {
    color: #fff;
    font-size: 0.92rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: color 0.15s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}
.contact-name-link:hover {
    color: var(--accent-blue);
    text-decoration: underline;
}

.stage-pill {
    padding: 0.3rem 0.65rem;
    border-radius: 20px;
    font-size: 0.76rem;
    font-weight: 700;
    display: inline-block;
}

.stage-pill.approach { background: rgba(148, 163, 184, 0.2); color: #cbd5e1; }
.stage-pill.phone { background: rgba(56, 189, 248, 0.2); color: #38bdf8; }
.stage-pill.invite { background: rgba(245, 158, 11, 0.2); color: #f59e0b; }
.stage-pill.date1 { background: rgba(139, 92, 246, 0.2); color: #c084fc; }
.stage-pill.date2 { background: rgba(236, 72, 153, 0.2); color: #f472b6; }
.stage-pill.relationship { background: rgba(16, 185, 129, 0.2); color: #10b981; }
.stage-pill.dropped { background: rgba(239, 68, 68, 0.2); color: #f87171; text-decoration: line-through; }

/* Filter Tabs */
.filter-bar {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    align-items: center;
    margin-bottom: 1rem;
}

.filter-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    padding: 0.4rem 0.8rem;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.filter-btn.active, .filter-btn:hover {
    background: rgba(139, 92, 246, 0.2);
    border-color: var(--accent-purple);
    color: #fff;
}

/* Modal */
.modal-backdrop {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 1rem;
}

.modal-backdrop.open {
    display: flex;
}

.modal-box {
    background: #141a26;
    border: 1px solid var(--glass-border);
    border-radius: 18px;
    width: 100%;
    max-width: 540px;
    padding: 1.5rem;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
    max-height: 90vh;
    overflow-y: auto;
}

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

.modal-header h3 {
    font-size: 1.2rem;
    font-weight: 700;
}

.modal-close {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.3rem;
    cursor: pointer;
}

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

.form-group label {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.35rem;
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 0.65rem 0.85rem;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-main);
    font-size: 0.88rem;
    outline: none;
    transition: border-color 0.2s;
}

.form-control:focus {
    border-color: var(--accent-purple);
}

.checkbox-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
}

.checkbox-card {
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.55rem 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    cursor: pointer;
    font-size: 0.82rem;
}

.checkbox-card input[type="checkbox"] {
    accent-color: var(--accent-purple);
    width: 16px;
    height: 16px;
}
