/* Sidebar nav item */
.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    color: #94a3b8;
}
.nav-item:hover { background: #334155; color: white; }
.nav-item.active { background: #3b82f6; color: white; }

/* KPI Card */
.kpi-card {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    border: 1px solid #334155;
    border-radius: 12px;
    padding: 20px;
    transition: transform 0.2s, box-shadow 0.2s;
}
.kpi-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}

/* Campaign card */
.campaign-card {
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 12px;
    padding: 20px;
    transition: all 0.2s;
}
.campaign-card:hover {
    border-color: #3b82f6;
    box-shadow: 0 4px 16px rgba(59, 130, 246, 0.2);
}

/* Status badges */
.badge { padding: 4px 10px; border-radius: 9999px; font-size: 12px; font-weight: 600; }
.badge-active { background: #10b981; color: white; }
.badge-paused { background: #f59e0b; color: #1e293b; }
.badge-draft { background: #64748b; color: white; }
.badge-ended { background: #ef4444; color: white; }

/* Progress bar */
.progress-bar {
    height: 6px;
    background: #334155;
    border-radius: 3px;
    overflow: hidden;
}
.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6);
    border-radius: 3px;
    transition: width 0.5s ease;
}

/* Activity feed item */
.activity-item {
    display: flex;
    gap: 12px;
    padding: 12px;
    border-radius: 8px;
    animation: slideIn 0.3s ease;
}
.activity-item:hover { background: #334155; }

/* Wizard steps */
.wizard-step {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
}
.wizard-step.active { background: #3b82f6; color: white; }
.wizard-step.completed { background: #10b981; color: white; }
.wizard-step.pending { background: #334155; color: #94a3b8; }

/* Form inputs */
.form-input {
    width: 100%;
    padding: 10px 14px;
    background: #0f172a;
    border: 1px solid #334155;
    border-radius: 8px;
    color: white;
    transition: border-color 0.2s;
}
.form-input:focus {
    outline: none;
    border-color: #3b82f6;
}
.form-input::placeholder { color: #64748b; }

/* Checkbox styling */
.checkbox-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border: 1px solid #334155;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}
.checkbox-item:hover { border-color: #3b82f6; }
.checkbox-item.selected { background: #3b82f6; border-color: #3b82f6; }

/* Toast notification */
.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    padding: 16px 24px;
    color: white;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.3);
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 1000;
}
.toast.show {
    transform: translateY(0);
    opacity: 1;
}

/* Toast types */
.toast-success {
    background: #10b981;
}
.toast-error {
    background: #ef4444;
}
.toast-warning {
    background: #f59e0b;
}
.toast-info {
    background: #3b82f6;
}

/* Chart container */
.chart-container {
    position: relative;
    height: 300px;
}

/* Funnel chart */
.funnel-bar {
    height: 40px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    padding: 0 16px;
    margin-bottom: 8px;
    color: white;
    font-weight: 600;
    transition: all 0.3s ease;
}

/* Loading overlay */
.loading-overlay {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    z-index: 10;
}

.loading-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid #334155;
    border-top-color: #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Export modal */
.export-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
}

.export-modal.hidden {
    display: none;
}

.export-modal-content {
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 12px;
    padding: 24px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
}

/* Metric button active state */
.metric-btn.active,
.metric-btn.bg-blue-600 {
    background: #3b82f6 !important;
}

/* Recipient tag */
.recipient-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #334155;
    padding: 6px 12px;
    border-radius: 9999px;
    font-size: 14px;
}

.recipient-tag button {
    color: #94a3b8;
    transition: color 0.2s;
    display: flex;
    align-items: center;
}

.recipient-tag button:hover {
    color: #ef4444;
}

/* Report template card */
.report-template-card {
    background: #334155;
    border: 2px solid transparent;
    border-radius: 12px;
    padding: 16px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: left;
    width: 100%;
}

.report-template-card:hover {
    background: #3d4f67;
    border-color: #3b82f6;
}

.report-template-card.selected {
    background: #3b82f6;
    border-color: #60a5fa;
}

/* Frequency button */
.frequency-btn {
    transition: all 0.2s;
}

/* ============================================
   PHASE 1-3: CAMPAIGN CONFIDENCE SYSTEM
   ============================================ */

/* Campaign Predictor Stars */
#campaign-predictor {
    animation: fadeIn 0.3s ease;
}

#campaign-predictor i[data-lucide="star"] {
    transition: all 0.2s ease;
}

#campaign-predictor .fill-yellow-400 {
    fill: #facc15;
    color: #facc15;
}

/* Template Cards */
.template-card {
    width: 100%;
    transition: all 0.2s ease;
}

.template-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
}

/* Quick Target Preset Chips */
.quick-preset-chip {
    white-space: nowrap;
    transition: all 0.2s ease;
}

.quick-preset-chip:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* Budget Runway Status */
#budget-runway {
    transition: all 0.3s ease;
}

/* Expected Deliveries Columns */
#expected-deliveries {
    min-height: 80px;
}

/* Health Checklist Items */
#health-checklist .space-y-2 > div {
    transition: all 0.2s ease;
}

#health-checklist .space-y-2 > div:hover {
    transform: translateX(4px);
}

/* Inline Benchmarks */
#inline-benchmarks {
    animation: fadeIn 0.3s ease;
}

/* Auto-suggest targeting banner */
#auto-suggest-targeting {
    animation: slideIn 0.3s ease;
}

/* Benchmark Bar */
.benchmark-bar {
    margin-bottom: 8px;
}

.benchmark-bar .h-2 {
    overflow: hidden;
    border-radius: 9999px;
}

/* Collapsible sections (for Phase 2.3) */
.collapsible-header {
    cursor: pointer;
    user-select: none;
    transition: background 0.2s ease;
}

.collapsible-header:hover {
    background: rgba(255, 255, 255, 0.05);
}

.collapsible-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, opacity 0.3s ease;
    opacity: 0;
}

.collapsible-content.expanded {
    max-height: 2000px;
    opacity: 1;
}

/* Tooltip styles */
.segment-tooltip,
.interest-tooltip {
    position: absolute;
    z-index: 50;
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 8px;
    padding: 8px 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    animation: tooltipFadeIn 0.2s ease;
    max-width: 200px;
}

.segment-tooltip::before,
.interest-tooltip::before {
    content: '';
    position: absolute;
    top: -6px;
    left: 50%;
    transform: translateX(-50%);
    border-width: 0 6px 6px 6px;
    border-style: solid;
    border-color: transparent transparent #334155 transparent;
}

/* Star rating fill animation */
@keyframes starFill {
    0% { transform: scale(0.8); opacity: 0.5; }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); opacity: 1; }
}

.star-animate {
    animation: starFill 0.3s ease forwards;
}

/* Insight card styles (for Phase 4) */
.insight-card {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 12px;
    padding: 16px;
    transition: all 0.2s ease;
}

.insight-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(59, 130, 246, 0.2);
}

.insight-card.warning {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.1) 0%, rgba(239, 68, 68, 0.1) 100%);
    border-color: rgba(245, 158, 11, 0.3);
}

.insight-card.success {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(34, 197, 94, 0.1) 100%);
    border-color: rgba(16, 185, 129, 0.3);
}
