/* C1 split from site.css — see docs/PLAN_changes3_v1.md */

/* Персональная тема (Account / Theme) — влияет на карточки в рабочей области */
body.zen-user-theme-dark {
    --zen-glass-bg: rgba(32, 36, 44, 0.92);
    --zen-glass-border: rgba(255, 255, 255, 0.08);
}

body.zen-user-theme-dark .main-wrapper .card:not(.bg-primary):not(.bg-success):not(.bg-danger):not(.bg-warning):not(.bg-info),
body.zen-user-theme-dark .main-wrapper .list-group-item {
    background-color: rgba(38, 42, 51, 0.94) !important;
    color: #e8eaed;
    border-color: rgba(255, 255, 255, 0.08) !important;
}

body.zen-user-theme-dark .main-wrapper .card-header,
body.zen-user-theme-dark .main-wrapper .card-footer:not(.zen-messenger-composer) {
    background-color: rgba(28, 31, 38, 0.95) !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
    color: #e8eaed;
}

body.zen-user-theme-dark .main-wrapper .text-muted,
body.zen-user-theme-dark .main-wrapper .form-text {
    color: #9aa0a6 !important;
}

body.zen-user-theme-dark .main-wrapper .form-control,
body.zen-user-theme-dark .main-wrapper .form-select {
    background-color: rgba(48, 52, 62, 0.95);
    border-color: rgba(255, 255, 255, 0.12);
    color: #e8eaed;
}

body.zen-user-theme-light {
    --zen-glass-bg: rgba(255, 255, 255, 0.94);
    --zen-glass-border: rgba(26, 29, 35, 0.12);
}

body.zen-user-theme-light .main-wrapper .card:not(.bg-primary):not(.bg-success):not(.bg-danger):not(.bg-warning):not(.bg-info),
body.zen-user-theme-light .main-wrapper .list-group-item {
    background-color: rgba(255, 255, 255, 0.97) !important;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

/* Полное применение темы к chrome (navbar/sidebar/footer), кнопки не трогаем */
body.zen-user-theme-dark .navbar,
body.zen-user-theme-dark .sidebar,
body.zen-user-theme-dark .footer {
    background-color: rgba(18, 20, 25, 0.95) !important;
    border-color: rgba(255, 255, 255, 0.10) !important;
}
body.zen-user-theme-dark .navbar-brand,
body.zen-user-theme-dark .nav-link-wavy,
body.zen-user-theme-dark .nav-link,
body.zen-user-theme-dark .sidebar-link,
body.zen-user-theme-dark .footer,
body.zen-user-theme-dark .footer .text-light {
    color: #f4f6fa !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.65) !important;
}

body.zen-user-theme-light .navbar,
body.zen-user-theme-light .sidebar,
body.zen-user-theme-light .footer {
    background-color: rgba(248, 251, 255, 0.94) !important;
    border-color: rgba(17, 24, 39, 0.12) !important;
}
body.zen-user-theme-light .navbar-brand,
body.zen-user-theme-light .nav-link-wavy,
body.zen-user-theme-light .nav-link,
body.zen-user-theme-light .sidebar-link,
body.zen-user-theme-light .footer,
body.zen-user-theme-light .footer .text-light {
    color: #0f172a !important;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.75) !important;
}
body.zen-user-theme-light .sidebar-toggle-btn {
    color: #0f172a;
    border-right-color: rgba(17, 24, 39, 0.14);
}

/* Тема «как в системе» (prefers-color-scheme) */
@media (prefers-color-scheme: dark) {
    body.zen-user-theme-system {
        --zen-glass-bg: rgba(32, 36, 44, 0.92);
        --zen-glass-border: rgba(255, 255, 255, 0.08);
    }
    body.zen-user-theme-system .main-wrapper .card:not(.bg-primary):not(.bg-success):not(.bg-danger):not(.bg-warning):not(.bg-info),
    body.zen-user-theme-system .main-wrapper .list-group-item {
        background-color: rgba(38, 42, 51, 0.94) !important;
        color: #e8eaed;
        border-color: rgba(255, 255, 255, 0.08) !important;
    }
    body.zen-user-theme-system .main-wrapper .card-header,
    body.zen-user-theme-system .main-wrapper .card-footer:not(.zen-messenger-composer) {
        background-color: rgba(28, 31, 38, 0.95) !important;
        border-color: rgba(255, 255, 255, 0.08) !important;
        color: #e8eaed;
    }
    body.zen-user-theme-system .main-wrapper .text-muted,
    body.zen-user-theme-system .main-wrapper .form-text {
        color: #9aa0a6 !important;
    }
    body.zen-user-theme-system .main-wrapper .form-control,
    body.zen-user-theme-system .main-wrapper .form-select {
        background-color: rgba(48, 52, 62, 0.95);
        border-color: rgba(255, 255, 255, 0.12);
        color: #e8eaed;
    }
}

@media (prefers-color-scheme: light) {
    body.zen-user-theme-system {
        --zen-glass-bg: rgba(255, 255, 255, 0.94);
        --zen-glass-border: rgba(26, 29, 35, 0.12);
    }
    body.zen-user-theme-system .main-wrapper .card:not(.bg-primary):not(.bg-success):not(.bg-danger):not(.bg-warning):not(.bg-info),
    body.zen-user-theme-system .main-wrapper .list-group-item {
        background-color: rgba(255, 255, 255, 0.97) !important;
        box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    }
}

/* Тема «Системная» из настроек приложения (не от ОС) */
body.zen-user-theme-system-app[data-zen-system="dark"] {
    --zen-glass-bg: rgba(32, 36, 44, 0.92);
    --zen-glass-border: rgba(255, 255, 255, 0.08);
}
body.zen-user-theme-system-app[data-zen-system="dark"] .main-wrapper .card:not(.bg-primary):not(.bg-success):not(.bg-danger):not(.bg-warning):not(.bg-info),
body.zen-user-theme-system-app[data-zen-system="dark"] .main-wrapper .list-group-item {
    background-color: rgba(38, 42, 51, 0.94) !important;
    color: #e8eaed;
    border-color: rgba(255, 255, 255, 0.08) !important;
}
body.zen-user-theme-system-app[data-zen-system="dark"] .main-wrapper .card-header,
body.zen-user-theme-system-app[data-zen-system="dark"] .main-wrapper .card-footer:not(.zen-messenger-composer) {
    background-color: rgba(28, 31, 38, 0.95) !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
    color: #e8eaed;
}
body.zen-user-theme-system-app[data-zen-system="dark"] .main-wrapper .text-muted,
body.zen-user-theme-system-app[data-zen-system="dark"] .main-wrapper .form-text {
    color: #9aa0a6 !important;
}
body.zen-user-theme-system-app[data-zen-system="dark"] .main-wrapper .form-control,
body.zen-user-theme-system-app[data-zen-system="dark"] .main-wrapper .form-select {
    background-color: rgba(48, 52, 62, 0.95);
    border-color: rgba(255, 255, 255, 0.12);
    color: #e8eaed;
}

body.zen-user-theme-system-app[data-zen-system="light"] {
    --zen-glass-bg: rgba(255, 255, 255, 0.94);
    --zen-glass-border: rgba(26, 29, 35, 0.12);
}
body.zen-user-theme-system-app[data-zen-system="light"] .main-wrapper .card:not(.bg-primary):not(.bg-success):not(.bg-danger):not(.bg-warning):not(.bg-info),
body.zen-user-theme-system-app[data-zen-system="light"] .main-wrapper .list-group-item {
    background-color: rgba(255, 255, 255, 0.97) !important;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

body.zen-user-theme-system-app[data-zen-system="dark"] .navbar,
body.zen-user-theme-system-app[data-zen-system="dark"] .sidebar,
body.zen-user-theme-system-app[data-zen-system="dark"] .footer {
    background-color: rgba(18, 20, 25, 0.95) !important;
    border-color: rgba(255, 255, 255, 0.10) !important;
}
body.zen-user-theme-system-app[data-zen-system="dark"] .navbar-brand,
body.zen-user-theme-system-app[data-zen-system="dark"] .nav-link-wavy,
body.zen-user-theme-system-app[data-zen-system="dark"] .nav-link,
body.zen-user-theme-system-app[data-zen-system="dark"] .sidebar-link,
body.zen-user-theme-system-app[data-zen-system="dark"] .footer,
body.zen-user-theme-system-app[data-zen-system="dark"] .footer .text-light {
    color: #f4f6fa !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.65) !important;
}

body.zen-user-theme-system-app[data-zen-system="light"] .navbar,
body.zen-user-theme-system-app[data-zen-system="light"] .sidebar,
body.zen-user-theme-system-app[data-zen-system="light"] .footer {
    background-color: rgba(248, 251, 255, 0.94) !important;
    border-color: rgba(17, 24, 39, 0.12) !important;
}
body.zen-user-theme-system-app[data-zen-system="light"] .navbar-brand,
body.zen-user-theme-system-app[data-zen-system="light"] .nav-link-wavy,
body.zen-user-theme-system-app[data-zen-system="light"] .nav-link,
body.zen-user-theme-system-app[data-zen-system="light"] .sidebar-link,
body.zen-user-theme-system-app[data-zen-system="light"] .footer,
body.zen-user-theme-system-app[data-zen-system="light"] .footer .text-light {
    color: #0f172a !important;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.75) !important;
}
body.zen-user-theme-system-app[data-zen-system="light"] .sidebar-toggle-btn {
    color: #0f172a;
    border-right-color: rgba(17, 24, 39, 0.14);
}

/* Вкладки профиля — без светлой/тёмной подложки текста (читаемо на обоях) */
body.zen-user-theme-light .vd-profile-tabs--underline .nav-link,
body.zen-user-theme-dark .vd-profile-tabs--underline .nav-link,
body.zen-user-theme-system-app[data-zen-system="light"] .vd-profile-tabs--underline .nav-link,
body.zen-user-theme-system-app[data-zen-system="dark"] .vd-profile-tabs--underline .nav-link {
    text-shadow: none !important;
    filter: none !important;
}
