html[data-bs-theme="dark"] {
    --app-body-bg: #0f1524;
    --app-surface: #1a2236;
    --app-surface-soft: #222b42;
    --app-border: rgba(255, 255, 255, 0.08);
    --app-border-strong: rgba(255, 255, 255, 0.12);
    --app-text: #e8ecf5;
    --app-muted: #94a3b8;
    --app-muted-soft: #64748b;
    --app-sidebar-bg: #151c2e;
    --app-sidebar-border: rgba(255, 255, 255, 0.06);
    --app-sidebar-text: #e8ecf5;
    --app-sidebar-muted: #94a3b8;
    --app-sidebar-accent: rgba(99, 102, 241, 0.18);
    --app-primary: var(--brand-primary, #5b7aff);
    --app-primary-strong: #818cf8;
    --app-secondary: var(--hr-secondary, #a78bfa);
    --app-shadow-sm: 0 10px 30px rgba(0, 0, 0, 0.25);
    --app-shadow-md: 0 18px 45px rgba(0, 0, 0, 0.35);
    --app-sidebar-shadow: 0 28px 50px rgba(0, 0, 0, 0.3);
    color-scheme: dark;
}

html[data-bs-theme="dark"] body.app-body--user {
    background:
        radial-gradient(circle at top right, rgba(16, 185, 129, 0.08), transparent 55%),
        radial-gradient(circle at bottom left, rgba(20, 184, 166, 0.1), transparent 60%),
        var(--app-body-bg);
}

html[data-bs-theme="dark"] body.app-body--user .app-aside {
    background: linear-gradient(180deg, #151c2e 0%, #111827 100%);
    border-inline-end-color: rgba(16, 185, 129, 0.15);
}

html[data-bs-theme="dark"] body.app-body--user .app-brand__logo {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.25), rgba(20, 184, 166, 0.2));
    color: #6ee7b7;
}

html[data-bs-theme="dark"] body.app-body--user .app-header {
    background: rgba(26, 34, 54, 0.92);
    border-bottom-color: rgba(255, 255, 255, 0.06);
}

html[data-bs-theme="dark"] body.app-body--user .app-user--profile {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.12), rgba(20, 184, 166, 0.08));
}

html[data-bs-theme="dark"] body.app-body--user .btn-light {
    background: var(--app-surface-soft);
    border-color: rgba(255, 255, 255, 0.08);
    color: var(--app-text);
}

html[data-bs-theme="dark"] body.app-body--user .btn-ghost {
    background: var(--app-surface-soft);
    border-color: rgba(255, 255, 255, 0.08);
    color: var(--app-text);
}

html[data-bs-theme="dark"] body.app-body--user .app-search {
    background: var(--app-surface-soft);
    border-color: rgba(255, 255, 255, 0.08);
}

html[data-bs-theme="dark"] body.app-body--user .app-card {
    border-color: rgba(255, 255, 255, 0.06);
}

html[data-bs-theme="dark"] body.app-body--user .profile-details-card,
html[data-bs-theme="dark"] body.app-body--user .profile-side-card,
html[data-bs-theme="dark"] body.app-body--user .profile-card {
    background: var(--app-surface);
}

html[data-bs-theme="dark"] body.app-body--user .table {
    --bs-table-bg: transparent;
    --bs-table-color: var(--app-text);
    --bs-table-border-color: rgba(255, 255, 255, 0.08);
}

.profile-theme-options {
    display: grid;
    gap: 0.75rem;
}

.profile-theme-option {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.9rem 1rem;
    border: 1px solid var(--app-border);
    border-radius: var(--app-radius-sm);
    background: var(--app-surface-soft);
    cursor: pointer;
    transition: var(--app-transition);
}

.profile-theme-option:hover,
.profile-theme-option:focus-within {
    border-color: rgba(16, 185, 129, 0.35);
    box-shadow: 0 10px 24px rgba(16, 185, 129, 0.12);
}

.profile-theme-option input {
    margin: 0;
    accent-color: var(--app-user-primary, #10b981);
}

.profile-theme-option__icon {
    width: 42px;
    height: 42px;
    border-radius: 0.85rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.profile-theme-option__icon--light {
    background: linear-gradient(135deg, #ffffff, #eef2ff);
    color: #4338ca;
    border: 1px solid rgba(15, 23, 42, 0.08);
}

.profile-theme-option__icon--dark {
    background: linear-gradient(135deg, #1a2236, #0f1524);
    color: #6ee7b7;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.profile-theme-option__content strong {
    display: block;
    font-size: 0.95rem;
}

.profile-theme-option__content span {
    display: block;
    color: var(--app-muted);
    font-size: 0.82rem;
    margin-top: 0.15rem;
}

/* ========================================
   Global box/card readability
   Applies across public pages and panels
   ======================================== */

.tech-card h3,
.consult-card h3,
.product-card h4,
.product-info h4,
.section-header h2,
.app-card h1,
.app-card h2,
.app-card h3,
.app-card h4,
.app-card h5,
.profile-card h3,
.profile-details-card h3,
.consult-panel__title {
    color: var(--text-main, var(--app-text));
}

.section-header h2,
.detail-title,
.app-greeting__title {
    font-weight: 800;
}

.content-card,
.purchase-card,
.test-card,
.consult-panel,
.app-card,
.metric-card {
    color: var(--text-main, var(--app-text));
}

html[data-bs-theme="dark"] .tech-card h3,
html[data-bs-theme="dark"] .consult-card h3,
html[data-bs-theme="dark"] .app-card h1,
html[data-bs-theme="dark"] .app-card h2,
html[data-bs-theme="dark"] .app-card h3,
html[data-bs-theme="dark"] .profile-card h3 {
    color: var(--app-text);
}

html[data-theme="dark"] .tech-card h3,
html[data-theme="dark"] .consult-card h3,
html[data-theme="dark"] .section-header h2 {
    color: var(--text-main);
}
