/**
 * MZ Blood Bridge - High-Contrast Dark Mode Engine
 * Life-Saving Modernism: Slate Surfaces (#0a0f1d, #161f36), WCAG AAA Contrast (>= 7:1)
 */

body.dark-mode {
    background: var(--canvas-bg, #0A0F1D) !important;
    color: var(--text-primary, #F8FAFC) !important;
}

body.dark-mode .card,
body.dark-mode section,
body.dark-mode article,
body.dark-mode .post-card,
body.dark-mode .glass-card,
body.dark-mode .modal-content,
body.dark-mode .auth-card {
    background: var(--surface-card, #161F36) !important;
    color: var(--text-primary, #F8FAFC) !important;
    border-color: var(--border-subtle, #243049) !important;
}

body.dark-mode .navbar {
    background: var(--glass-surface-dense, rgba(22, 31, 54, 0.96)) !important;
    border-bottom: 1px solid var(--border-subtle, #243049) !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.45) !important;
}

body.dark-mode .bottom-nav {
    background: var(--glass-surface-dense, rgba(22, 31, 54, 0.96)) !important;
    border-top: 1px solid var(--border-subtle, #243049) !important;
}

body.dark-mode .site-footer {
    background: #0A0F1D !important;
    border-top-color: var(--border-subtle, #243049) !important;
    color: var(--text-secondary, #CBD5E1) !important;
}

body.dark-mode input[type="text"],
body.dark-mode input[type="email"],
body.dark-mode input[type="password"],
body.dark-mode input[type="tel"],
body.dark-mode input[type="date"],
body.dark-mode input[type="number"],
body.dark-mode input[type="file"],
body.dark-mode select,
body.dark-mode textarea,
body.dark-mode .form-input,
body.dark-mode .form-select,
body.dark-mode .form-textarea,
body.dark-mode .form-floating-input,
body.dark-mode .form-floating-select {
    background: #111827 !important;
    color: #F8FAFC !important;
    border-color: #374151 !important;
}

body.dark-mode input:focus,
body.dark-mode select:focus,
body.dark-mode textarea:focus,
body.dark-mode .form-input:focus,
body.dark-mode .form-select:focus,
body.dark-mode .form-textarea:focus,
body.dark-mode .form-floating-input:focus,
body.dark-mode .form-floating-select:focus {
    border-color: var(--crimson-500, #F43F5E) !important;
    box-shadow: 0 0 0 3px rgba(244, 63, 94, 0.25) !important;
}

body.dark-mode .blood-pill-badge {
    background: #1E293B !important;
    color: #F8FAFC !important;
    border-color: #334155 !important;
}

body.dark-mode .blood-pill-label:hover .blood-pill-badge {
    border-color: var(--crimson-400, #FB7185) !important;
    box-shadow: 0 6px 14px rgba(220, 38, 38, 0.3) !important;
}

body.dark-mode .blood-pill-label input[type="radio"]:checked + .blood-pill-badge {
    background: linear-gradient(135deg, var(--crimson-600, #DC2626), var(--crimson-800, #991B1B)) !important;
    color: #FFFFFF !important;
    border-color: var(--crimson-500, #F43F5E) !important;
    box-shadow: 0 8px 20px rgba(220, 38, 38, 0.45) !important;
}

body.dark-mode .nav-links a {
    color: #CBD5E1 !important;
}

body.dark-mode .nav-links a:hover {
    color: #F87171 !important;
}

body.dark-mode .nav-icon {
    color: #F8FAFC !important;
}

body.dark-mode a {
    color: #FCA5A5;
}

body.dark-mode a:hover {
    color: #FECDD3;
}

body.dark-mode .feature-box-card {
    background: #161F36 !important;
    border-color: #243049 !important;
}

body.dark-mode .feature-box-icon-wrap {
    background: #0A0F1D !important;
}

body.dark-mode .feature-box-title {
    color: #F8FAFC !important;
}

body.dark-mode .feature-box-desc {
    color: #94A3B8 !important;
}

body.dark-mode .feature-box-cta {
    color: #F87171 !important;
}

body.dark-mode .post-user-name {
    color: #F8FAFC !important;
}

body.dark-mode .post-meta {
    color: #94A3B8 !important;
}

body.dark-mode .emergency-post {
    border-color: rgba(220, 38, 38, 0.4) !important;
    background: #181c2f !important;
}

body.dark-mode .btn-outline {
    border-color: #475569 !important;
    color: #F8FAFC !important;
}

body.dark-mode .btn-outline:hover {
    background: #1E293B !important;
    border-color: #64748B !important;
}

body.dark-mode .action-btn {
    color: #CBD5E1 !important;
}

body.dark-mode .action-btn:hover {
    background: #1E293B !important;
}

body.dark-mode .stat-item {
    background: rgba(22, 31, 54, 0.85) !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
}

body.dark-mode .stat-number {
    color: #F8FAFC !important;
}

body.dark-mode .stat-label {
    color: #94A3B8 !important;
}

body.dark-mode .lang-pill {
    background: #161F36 !important;
    color: #F8FAFC !important;
    border-color: #334155 !important;
}

body.dark-mode .lang-pill:hover {
    border-color: #F87171 !important;
    color: #FCA5A5 !important;
}
