/**
 * BettyBloom Dark Theme
 * Loaded on all pages. Applied when <html data-theme="dark">
 */

[data-theme="dark"] {
    --primary: #f06292;
    --primary-light: #ff7ab8;
    --primary-dark: #e91e8c;
    --primary-gradient: linear-gradient(135deg, #e91e8c, #9c27b0);
    --secondary: #ba68c8;
    --secondary-light: #ce93d8;
    --background: #0f0f1e;
    --surface: #1a1a2e;
    --surface-hover: #23233d;
    --text-primary: #f5f5f7;
    --text-secondary: #b8b8cc;
    --text-muted: #8888a0;
    --text-light: #666680;
    --border: #2d2d44;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 40px rgba(233, 30, 140, 0.2);
}

[data-theme="dark"] body {
    background: var(--background) !important;
    color: var(--text-primary);
}

/* Cards */
[data-theme="dark"] .section-card,
[data-theme="dark"] .card,
[data-theme="dark"] .entry-card,
[data-theme="dark"] .composer,
[data-theme="dark"] .data-card,
[data-theme="dark"] .form-card,
[data-theme="dark"] .warning-card {
    background: var(--surface) !important;
    border-color: var(--border) !important;
    color: var(--text-primary);
}

/* Inputs */
[data-theme="dark"] input,
[data-theme="dark"] textarea,
[data-theme="dark"] select,
[data-theme="dark"] .form-input,
[data-theme="dark"] .form-textarea,
[data-theme="dark"] .form-select,
[data-theme="dark"] .message-input {
    background: var(--surface) !important;
    color: var(--text-primary) !important;
    border-color: var(--border) !important;
}

[data-theme="dark"] input::placeholder,
[data-theme="dark"] textarea::placeholder {
    color: var(--text-muted);
}

/* Header */
[data-theme="dark"] .dashboard-header,
[data-theme="dark"] .page-header {
    background: var(--surface) !important;
    border-color: var(--border) !important;
}

[data-theme="dark"] .greeting,
[data-theme="dark"] .greeting-name,
[data-theme="dark"] h1,
[data-theme="dark"] h2,
[data-theme="dark"] h3,
[data-theme="dark"] h4 {
    color: var(--text-primary) !important;
}

[data-theme="dark"] .greeting-sub,
[data-theme="dark"] .section-title,
[data-theme="dark"] .phase-message {
    color: var(--text-secondary) !important;
}

/* Bottom nav */
[data-theme="dark"] .bottom-nav {
    background: var(--surface) !important;
    border-color: var(--border) !important;
}

[data-theme="dark"] .nav-item {
    color: var(--text-muted);
}

[data-theme="dark"] .nav-item.active {
    color: var(--primary);
}

/* Cycle cards - soften bright colors */
[data-theme="dark"] .overview-item:nth-child(1),
[data-theme="dark"] .overview-item:nth-child(2),
[data-theme="dark"] .overview-item:nth-child(3),
[data-theme="dark"] .overview-item:nth-child(4) {
    background: linear-gradient(135deg, #2a1a2a, #2a1a35) !important;
    border-color: rgba(240, 98, 146, 0.3) !important;
}

[data-theme="dark"] .checkin-card:nth-child(1),
[data-theme="dark"] .checkin-card:nth-child(2) {
    background: linear-gradient(135deg, #1e1a2e, #2a1e35) !important;
    border-color: rgba(240, 98, 146, 0.3) !important;
}

[data-theme="dark"] .upcoming-section,
[data-theme="dark"] .insights-card,
[data-theme="dark"] .learn-card {
    background: linear-gradient(135deg, #1e1a2e, #231a35) !important;
}

[data-theme="dark"] .upcoming-section .section-title,
[data-theme="dark"] .upcoming-value,
[data-theme="dark"] .learn-title {
    color: #d4a5d4 !important;
}

/* Support message blocks */
[data-theme="dark"] .support-msg.warm {
    background: linear-gradient(135deg, #2a1f1a, #3a2a1a) !important;
}
[data-theme="dark"] .support-msg.warm h4 { color: #f0a868 !important; }
[data-theme="dark"] .support-msg.warm p { color: #d4a078 !important; }

[data-theme="dark"] .support-msg.urgent {
    background: linear-gradient(135deg, #2a1a20, #3a1a2a) !important;
}
[data-theme="dark"] .support-msg.urgent h4 { color: #f06292 !important; }
[data-theme="dark"] .support-msg.urgent p { color: #d47a94 !important; }

[data-theme="dark"] .support-msg.info {
    background: linear-gradient(135deg, #1a2a1e, #1a2e25) !important;
}
[data-theme="dark"] .support-msg.info h4 { color: #68b878 !important; }
[data-theme="dark"] .support-msg.info p { color: #7ab87a !important; }

[data-theme="dark"] .support-msg.celebrate {
    background: linear-gradient(135deg, #2a1a2e, #2e1a35) !important;
}
[data-theme="dark"] .support-msg.celebrate h4 { color: #ba68c8 !important; }
[data-theme="dark"] .support-msg.celebrate p { color: #9a7ab0 !important; }

[data-theme="dark"] .support-msg.soft {
    background: #1a1a2e !important;
    border-color: #2d2d44 !important;
}
[data-theme="dark"] .support-msg.soft h4 { color: #b8b8cc !important; }
[data-theme="dark"] .support-msg.soft p { color: #8888a0 !important; }

/* Guide cards */
[data-theme="dark"] .guide-regular {
    background: linear-gradient(135deg, #2a2418, #2e2a1a) !important;
}
[data-theme="dark"] .guide-regular .guide-title,
[data-theme="dark"] .guide-regular .guide-message { color: #d4b878 !important; }

[data-theme="dark"] .guide-learning {
    background: linear-gradient(135deg, #1a203a, #1e2a4a) !important;
}
[data-theme="dark"] .guide-learning .guide-title,
[data-theme="dark"] .guide-learning .guide-message { color: #7ab0d4 !important; }

[data-theme="dark"] .guide-update_detected {
    background: linear-gradient(135deg, #2a1a2e, #2e1e35) !important;
}
[data-theme="dark"] .guide-update_detected .guide-title,
[data-theme="dark"] .guide-update_detected .guide-message { color: #ba68c8 !important; }

/* Late alert */
[data-theme="dark"] .late-alert {
    background: linear-gradient(135deg, #2a2010, #2e2618) !important;
}
[data-theme="dark"] .late-content strong,
[data-theme="dark"] .late-content p { color: #d4a868 !important; }

/* Confirm banner */
[data-theme="dark"] .confirm-banner {
    background: linear-gradient(135deg, #2a1a20, #3a1a2a) !important;
}
[data-theme="dark"] .confirm-text strong { color: #f06292 !important; }
[data-theme="dark"] .confirm-text p { color: #d47a94 !important; }

/* Phase message */
[data-theme="dark"] .phase-message { color: var(--text-secondary) !important; }

/* Modals */
[data-theme="dark"] .modal-sheet,
[data-theme="dark"] .bb-modal-box,
[data-theme="dark"] .day-modal-sheet {
    background: var(--surface) !important;
}

[data-theme="dark"] .modal-title,
[data-theme="dark"] .bb-modal-title,
[data-theme="dark"] .day-modal-title {
    color: var(--text-primary) !important;
}

[data-theme="dark"] .bb-modal-text,
[data-theme="dark"] .modal-text {
    color: var(--text-secondary) !important;
}

/* Settings rows */
[data-theme="dark"] .setting-row,
[data-theme="dark"] .link-item,
[data-theme="dark"] .info-row {
    border-color: var(--border) !important;
}

[data-theme="dark"] .link-item .icon {
    background: #23233d !important;
}

/* Profile hero */
[data-theme="dark"] .profile-hero {
    background: linear-gradient(135deg, #1e1a2e, #2a1a30) !important;
    border-color: rgba(240, 98, 146, 0.3) !important;
}

[data-theme="dark"] .profile-name { color: var(--text-primary); }
[data-theme="dark"] .profile-email { color: var(--text-secondary); }

/* Tabs */
[data-theme="dark"] .tabs {
    background: #0a0a14 !important;
}
[data-theme="dark"] .tab-btn {
    color: var(--text-secondary);
}
[data-theme="dark"] .tab-btn.active {
    background: var(--surface) !important;
    color: var(--primary);
}

/* Quick links */
[data-theme="dark"] .quick-link {
    background: var(--surface) !important;
    border-color: var(--border) !important;
}

/* Alerts */
[data-theme="dark"] .alert-success {
    background: #142a1e !important;
    color: #68d888 !important;
    border-color: #1a3a25 !important;
}
[data-theme="dark"] .alert-error {
    background: #2a1418 !important;
    color: #f07070 !important;
    border-color: #3a1a20 !important;
}

/* Switch inactive */
[data-theme="dark"] .slider,
[data-theme="dark"] .share-slider {
    background-color: #3a3a55 !important;
}

/* Splash / logos — keep colors */
[data-theme="dark"] .greeting-heart { color: #f06292; }