/* VibeDesk — сгенерировано tools/extract_css_palettes.py; править вручную / см. docs/UI_STYLES_AND_THEMES.md */

/* Минипрофиль (dropdown): невыбранные «светлые» кнопки на белом фоне */
body[data-color-palette="rising-sun"] .zen-user-dropdown-lg .dropdown-menu .btn-outline-light{
    color: var(--vd-text-strong) !important;
    border-color: #94a3b8 !important;
    background: #fff !important;
}

body[data-color-palette="rising-sun"] .zen-user-dropdown-lg .dropdown-menu .btn-outline-light:hover{
    background: var(--vd-accent-soft) !important;
    border-color: var(--vd-accent) !important;
    color: var(--vd-text-strong) !important;
}

/* Ctrl+K: Corporate minimal / Professional blue — светлая панель вместо «vibe»-фиолета */

body[data-color-palette="rising-sun"] .vd-cmdk{
    background: rgba(15, 23, 42, 0.45);
}

body[data-color-palette="rising-sun"] .vd-cmdk-panel{
    background: var(--vd-panel);
    border: 1px solid var(--vd-border-strong);
    box-shadow: var(--vd-shadow-lg);
}

body[data-color-palette="rising-sun"] .vd-cmdk-input-wrap{
    border-bottom-color: var(--vd-border-strong);
}

body[data-color-palette="rising-sun"] .vd-cmdk-input{
    background: var(--vd-panel-soft);
    border-color: var(--vd-border-strong);
    color: var(--vd-text);
}

body[data-color-palette="rising-sun"] .vd-cmdk-input:focus{
    border-color: var(--vd-accent) !important;
    box-shadow: 0 0 0 3px var(--vd-accent-soft) !important;
    background: #fff !important;
}

body[data-color-palette="rising-sun"] .vd-cmdk-input-wrap i.vd-cmdk-icon{
    color: var(--vd-text-muted);
}

body[data-color-palette="rising-sun"] .vd-cmdk-group-title{
    color: var(--vd-text-muted);
}

body[data-color-palette="rising-sun"] .vd-cmdk-item-icon{
    background: var(--vd-accent-soft);
    color: var(--vd-accent-strong);
}

body[data-color-palette="rising-sun"] .vd-cmdk-footer{
    border-top: 1px solid var(--vd-border-strong);
    background: var(--vd-panel-soft);
    color: var(--vd-text-muted);
}

body[data-color-palette="rising-sun"] .vd-cmdk-kbd{
    border-color: var(--vd-border-strong);
    background: var(--vd-panel);
    color: var(--vd-text-strong);
}

/* Corporate Minimal (light): стекло и заголовки как в blue, без «вайб»-фиолета */

body[data-color-palette="rising-sun"] .vd-glass-card:not(.vd-glass-card--guest-cta){
    background: rgba(236, 240, 247, 0.96) !important;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(27, 38, 59, 0.1) !important;
    box-shadow: var(--vd-shadow-md);
    color: var(--vd-text) !important;
}

body[data-color-palette="rising-sun"] .vd-glass:not(.vd-glass-card--guest-cta){
    background: rgba(234, 238, 245, 0.92) !important;
    border-color: var(--vd-border) !important;
}

body[data-color-palette="rising-sun"] .vd-text-gradient{
    background: linear-gradient(135deg, #db8636 0%, #a8652d 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Гостевая плашка на главной: тёмное стекло + светлый лид, заголовок — синий градиент палитры */

body[data-color-palette="rising-sun"] .vd-glass-card--guest-cta{
    background: linear-gradient(145deg, rgba(27, 38, 59, 0.9) 0%, rgba(15, 23, 42, 0.85) 100%) !important;
    border: 1px solid rgba(255, 255, 255, 0.14) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: var(--vd-shadow-lg), inset 0 1px 0 rgba(255, 255, 255, 0.06);
    color: #f8fafc !important;
}

body[data-color-palette="rising-sun"] .vd-glass-card--guest-cta .vd-guest-cta-lead{
    color: rgba(248, 250, 252, 0.94) !important;
}

body.zen-body:not(.auth-bg):not(.zen-guest)[data-color-palette="rising-sun"] .footer{
    background: #e1e6ee !important;
    border-top: 1px solid var(--vd-border-strong) !important;
    box-shadow: 0 -6px 24px rgba(15, 23, 42, 0.06);
}

/* Corporate Minimal / Blue: утилиты Bootstrap — контраст от фона через токены */

body[data-color-palette="rising-sun"] .main-wrapper .text-dark{
    color: var(--vd-text-strong) !important;
}

body[data-color-palette="rising-sun"] .main-wrapper .text-body{
    color: var(--vd-text) !important;
}

/* Corporate Minimal (light): футер — цвет сайдбара */

body.zen-body.auth-bg[data-color-palette="rising-sun"] .footer.footer--with-sidebar{
    background: var(--vd-chrome-bg) !important;
    border-top: 1px solid var(--vd-chrome-border) !important;
    color: var(--vd-chrome-text-muted) !important;
    box-shadow: 0 -4px 24px rgba(15, 23, 42, 0.12);
}

body.zen-body.auth-bg[data-color-palette="rising-sun"] .footer.footer--with-sidebar a{
    color: var(--vd-chrome-active-text) !important;
}

body[data-color-palette="rising-sun"] .footer .vd-chip-violet{
    background: var(--vd-chip-gray-bg) !important;
    color: var(--vd-chip-gray-text) !important;
    border: 1px solid var(--vd-chip-gray-border) !important;
}

body[data-color-palette="rising-sun"] .main-wrapper .tw-surface-card{
    border: 1px solid var(--vd-border-strong) !important;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.07), 0 8px 22px rgba(15, 23, 42, 0.07) !important;
    background: #e8ecf2 !important;
}

body[data-color-palette="rising-sun"] .main-wrapper .tw-surface-card .card-header{
    border-bottom-color: var(--vd-border-strong) !important;
    color: var(--vd-text-strong) !important;
    font-weight: 600;
}

body[data-color-palette="rising-sun"] .main-wrapper .tw-surface-card h1,
body[data-color-palette="rising-sun"] .main-wrapper .tw-surface-card h2,
body[data-color-palette="rising-sun"] .main-wrapper .tw-surface-card h3,
body[data-color-palette="rising-sun"] .main-wrapper .tw-surface-card h4,
body[data-color-palette="rising-sun"] .main-wrapper .tw-surface-card h5,
body[data-color-palette="rising-sun"] .main-wrapper .tw-surface-card .card-title{
    color: var(--vd-text-strong) !important;
}

body[data-color-palette="rising-sun"] .main-wrapper .tw-surface-card .form-label,
body[data-color-palette="rising-sun"] .main-wrapper .tw-surface-card .form-check-label{
    color: var(--vd-text-strong) !important;
    font-weight: 500;
}

body[data-color-palette="rising-sun"] .main-wrapper .tw-surface-card .form-control,
body[data-color-palette="rising-sun"] .main-wrapper .tw-surface-card .form-select,
body[data-color-palette="rising-sun"] .main-wrapper .tw-surface-card textarea{
    border-color: #cbd5e1 !important;
    background: #ffffff !important;
    color: var(--vd-text) !important;
}

body[data-color-palette="rising-sun"] .main-wrapper .tw-surface-card .form-control:focus,
body[data-color-palette="rising-sun"] .main-wrapper .tw-surface-card .form-select:focus,
body[data-color-palette="rising-sun"] .main-wrapper .tw-surface-card textarea:focus{
    border-color: var(--vd-accent) !important;
    box-shadow: 0 0 0 3px var(--vd-accent-soft) !important;
}

body[data-color-palette="rising-sun"] .main-wrapper .tw-surface-card .input-group-text{
    border-color: #cbd5e1 !important;
    background: var(--vd-panel-soft) !important;
    color: var(--vd-text-muted) !important;
}

body.zen-body[data-color-palette="rising-sun"] .main-wrapper .card:not(.bg-primary):not(.bg-success):not(.bg-danger):not(.bg-warning):not(.bg-info):not(.bg-dark):not(.vd-glass-card):not(.zen-auth-card){
    border: 1px solid var(--vd-border-strong) !important;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06), 0 6px 18px rgba(15, 23, 42, 0.06) !important;
}

body.zen-body[data-color-palette="rising-sun"] .main-wrapper .card-header:not(.zen-chat-panel-head){
    border-bottom-color: var(--vd-border-strong) !important;
}

body.zen-body[data-color-palette="rising-sun"] .main-wrapper .card-footer{
    border-top-color: var(--vd-border-strong) !important;
}

body.zen-body[data-color-palette="rising-sun"] .main-wrapper .form-control, body.zen-body[data-color-palette="rising-sun"] .main-wrapper .form-select, body.zen-body[data-color-palette="rising-sun"] .main-wrapper textarea, body.zen-body[data-color-palette="rising-sun"] .main-wrapper .input-group-text{
    border: 1px solid #cbd5e1 !important;
}

body.zen-body[data-color-palette="rising-sun"] .main-wrapper .form-control:focus, body.zen-body[data-color-palette="rising-sun"] .main-wrapper .form-select:focus, body.zen-body[data-color-palette="rising-sun"] .main-wrapper textarea:focus{
    border-color: var(--vd-accent) !important;
    box-shadow: 0 0 0 3px var(--vd-accent-soft) !important;
}

body.zen-body[data-color-palette="rising-sun"] .main-wrapper .list-group-item{
    border-color: var(--vd-border-strong) !important;
}

body.zen-body[data-color-palette="rising-sun"] .modal-content{
    border: 1px solid var(--vd-border-strong) !important;
}

body.zen-body[data-color-palette="rising-sun"] .modal-header, body.zen-body[data-color-palette="rising-sun"] .modal-footer{
    border-color: var(--vd-border-strong) !important;
}

body.zen-body[data-color-palette="rising-sun"] .dropdown-menu{
    border: 1px solid var(--vd-border-strong) !important;
}

body.zen-body[data-color-palette="rising-sun"] .main-wrapper .table{
    --bs-table-border-color: var(--vd-border-strong);
}

body.zen-body[data-color-palette="rising-sun"] .main-wrapper .table > :not(caption) > * > *{
    border-bottom-color: var(--vd-border-strong) !important;
}

/* Corporate light/blue: герой в карточке диспетчера/тикетов — белый текст; поля ввода остаются тёмными */

body[data-color-palette="rising-sun"] .main-wrapper .tw-surface-card.tw-toolbar-card .zen-desk-hero h1, body[data-color-palette="rising-sun"] .main-wrapper .tw-surface-card.tw-toolbar-card .zen-desk-hero h2, body[data-color-palette="rising-sun"] .main-wrapper .tw-surface-card.tw-toolbar-card .zen-desk-hero h3, body[data-color-palette="rising-sun"] .main-wrapper .tw-surface-card.tw-toolbar-card .zen-desk-hero h4, body[data-color-palette="rising-sun"] .main-wrapper .tw-surface-card.tw-toolbar-card .zen-desk-hero h5, body[data-color-palette="rising-sun"] .main-wrapper .tw-surface-card.tw-toolbar-card .zen-desk-hero p, body[data-color-palette="rising-sun"] .main-wrapper .tw-surface-card.tw-toolbar-card .zen-desk-hero .zen-desk-hero-label, body[data-color-palette="rising-sun"] .main-wrapper .tw-surface-card.tw-toolbar-card .tw-hero h1, body[data-color-palette="rising-sun"] .main-wrapper .tw-surface-card.tw-toolbar-card .tw-hero h2, body[data-color-palette="rising-sun"] .main-wrapper .tw-surface-card.tw-toolbar-card .tw-hero h3, body[data-color-palette="rising-sun"] .main-wrapper .tw-surface-card.tw-toolbar-card .tw-hero h4, body[data-color-palette="rising-sun"] .main-wrapper .tw-surface-card.tw-toolbar-card .tw-hero h5, body[data-color-palette="rising-sun"] .main-wrapper .tw-surface-card.tw-toolbar-card .tw-hero p, body[data-color-palette="rising-sun"] .main-wrapper .tw-surface-card.tw-toolbar-card .zen-ticket-hero h1, body[data-color-palette="rising-sun"] .main-wrapper .tw-surface-card.tw-toolbar-card .zen-ticket-hero h2, body[data-color-palette="rising-sun"] .main-wrapper .tw-surface-card.tw-toolbar-card .zen-ticket-hero h3, body[data-color-palette="rising-sun"] .main-wrapper .tw-surface-card.tw-toolbar-card .zen-ticket-hero h4, body[data-color-palette="rising-sun"] .main-wrapper .tw-surface-card.tw-toolbar-card .zen-ticket-hero h5, body[data-color-palette="rising-sun"] .main-wrapper .tw-surface-card.tw-toolbar-card .zen-ticket-hero p{
    color: #fff !important;
}

body[data-color-palette="rising-sun"] .main-wrapper .tw-surface-card.tw-toolbar-card .zen-desk-hero .form-check-label{
    color: rgba(255, 255, 255, 0.92) !important;
}

body[data-color-palette="rising-sun"] .main-wrapper .tw-surface-card.tw-toolbar-card .zen-desk-hero .form-control, body[data-color-palette="rising-sun"] .main-wrapper .tw-surface-card.tw-toolbar-card .zen-desk-hero .form-select{
    color: #0f172a !important;
    background-color: #fff !important;
}

body[data-color-palette="rising-sun"] .main-wrapper .tw-surface-card.tw-toolbar-card .zen-desk-hero .input-group-text{
    color: #475569 !important;
    background-color: #fff !important;
}

body.zen-body[data-color-palette="rising-sun"] .vd-topbar{
    background: #e3e7ee !important;
    border-bottom: 1px solid #c5cdd8 !important;
    box-shadow: 0 1px 0 rgba(15, 23, 42, 0.04);
}

/* Восходящее солнце — оранжевый chrome сайдбара (glass как sky-lake / Vibe Runner) */

body[data-color-palette="rising-sun"]{
    --vd-chrome-bg: #db8636;
    --vd-chrome-bg-soft: #e8a66a;
    --vd-chrome-flat: #db8636;
    --vd-chrome-gradient-135-from: color-mix(in srgb, var(--vd-chrome-bg) 90%, transparent);
    --vd-chrome-gradient-135-to: rgba(200, 130, 70, 0.88);
    --vd-chrome-sidebar-glass-from: rgba(219, 134, 54, 0.73);
    --vd-chrome-sidebar-glass-to: rgba(175, 105, 42, 0.70);
    --vd-chrome-panel-180-from: rgba(219, 134, 54, 0.94);
    --vd-chrome-panel-180-to: rgba(155, 95, 38, 0.92);
    --vd-chrome-shadow-rgb: 100, 60, 25;
    --vd-chrome-text: #ffffff;
    --vd-chrome-text-muted: rgba(255, 255, 255, 0.9);
    --vd-chrome-border: rgba(255, 255, 255, 0.1);
    --vd-chrome-active-bg: rgba(251, 191, 36, 0.28);
    --vd-chrome-active-text: #ffedd5;
    --vd-bg: #f5ebe0;
    --vd-bg-deep: #ede0d4;
    --vd-panel: #faf6f1;
    --vd-panel-strong: #ffffff;
    --vd-panel-soft: #f0e6d8;
    --vd-border: #d4c4b0;
    --vd-border-soft: #e8dcc8;
    --vd-border-strong: #a89888;
    --vd-accent: #db8636;
    --vd-accent-strong: #a8652d;
    --vd-accent-soft: rgba(219, 134, 54, 0.12);
    --vd-text: #0f172a;
    --vd-text-strong: #020617;
    --vd-text-muted: #475569;
    --vd-glass-card-from: rgba(255, 255, 255, 0.72);
    --vd-glass-card-to: rgba(255, 248, 240, 0.58);
    /* UI consistency — home / chat / profile (S4) */
    --vd-card-head-bg: transparent;
    --vd-card-head-fg: var(--vd-text);
    --vd-card-head-border: var(--vd-border-soft);
    --vd-stat-delta-up: var(--vd-chip-emerald-text, #047857);
    --vd-stat-delta-dn: var(--vd-chip-orange-text, #a8652d);
    --zen-msg-area-bg: linear-gradient(180deg, rgba(219, 134, 54, 0.35) 0%, rgba(175, 105, 42, 0.42) 55%, rgba(255, 251, 235, 0.55) 100%);
    --zen-msg-area-fg: var(--vd-chrome-text);
    --zen-msg-area-muted: var(--vd-chrome-text-muted);
    --zen-msg-area-empty-icon: #fbbf24;
    --zen-msg-composer-bg: linear-gradient(180deg, var(--vd-chrome-bg-soft) 0%, var(--vd-chrome-bg) 100%);
    --zen-msg-border: var(--vd-chrome-border);
    --zen-msg-row-active-bg: var(--vd-chrome-active-bg);
    --zen-msg-row-active-ring: rgba(251, 191, 36, 0.38);
    --zen-msg-panel-surface: rgba(219, 134, 54, 0.72);
    --zen-msg-panel-surface-soft: rgba(255, 255, 255, 0.08);
    --zen-msg-sidebar-bg: transparent;
    --zen-messenger-header-bg: linear-gradient(135deg, var(--vd-chrome-gradient-135-from) 0%, var(--vd-chrome-gradient-135-to) 100%);
    --zen-messenger-header-fg: #ffffff;
    --zen-messenger-header-muted: rgba(255, 255, 255, 0.78);
    --zen-messenger-header-border: var(--vd-chrome-border);
    --zen-msg-head-search-bg: rgba(255, 255, 255, 0.12);
    --zen-msg-head-search-fg: #ffffff;
    --zen-msg-head-search-muted: rgba(255, 255, 255, 0.65);
    --zen-msg-head-badge-bg: rgba(255, 255, 255, 0.16);
    --zen-msg-head-badge-fg: #ffffff;
    --zen-msg-sidebar-tab-fg: rgba(255, 255, 255, 0.78);
    --zen-msg-sidebar-tab-hover-fg: #ffffff;
    --zen-msg-sidebar-tab-hover-bg: rgba(255, 255, 255, 0.08);
    --zen-msg-sidebar-tab-active-fg: #ffffff;
    --zen-msg-sidebar-tab-active-bg: var(--vd-chrome-active-bg);
    --zen-msg-sidebar-tab-active-ring: rgba(251, 191, 36, 0.35);
    --zen-msg-bubble-mine-bg: linear-gradient(135deg, #db8636 0%, #a8652d 100%);
    --zen-msg-bubble-mine-fg: #ffffff;
    --zen-msg-bubble-mine-border: #a8652d;
    --zen-msg-bubble-other-bg: rgba(155, 95, 38, 0.92);
    --zen-msg-bubble-other-fg: var(--vd-chrome-text);
    --zen-msg-bubble-other-border: rgba(255, 255, 255, 0.12);
    --zen-msg-wallpaper-doodle-warm-base: linear-gradient(180deg, rgba(219, 134, 54, 0.88) 0%, rgba(255, 251, 235, 0.45) 100%);
    --zen-msg-wallpaper-doodle-mint-base: linear-gradient(180deg, rgba(219, 134, 54, 0.9) 0%, rgba(254, 215, 170, 0.35) 100%);
    --zen-msg-wallpaper-doodle-blue-base: linear-gradient(180deg, rgba(219, 134, 54, 0.92) 0%, rgba(175, 105, 42, 0.96) 100%);
    --zen-msg-wallpaper-doodle-light-base: linear-gradient(180deg, rgba(232, 166, 106, 0.9) 0%, rgba(175, 105, 42, 0.94) 100%);
    --zen-msg-wallpaper-doodle-slate-base: linear-gradient(180deg, rgba(175, 105, 42, 0.96) 0%, rgba(100, 60, 25, 0.98) 100%);
    --zen-msg-wallpaper-doodle-violet-base: linear-gradient(180deg, rgba(175, 105, 42, 0.5) 0%, rgba(100, 60, 25, 0.96) 100%);
    --vd-profile-panel-glass-bg: rgba(255, 255, 255, 0.58);
    --vd-profile-panel-glass-border: rgba(255, 255, 255, 0.42);
    --vd-profile-tabs-bar-bg: rgba(255, 255, 255, 0.48);
}

body[data-color-palette="rising-sun"] .vd-glass-card:not(.vd-glass-card--guest-cta){
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.58) 0%, rgba(245, 250, 255, 0.46) 100%) !important;
    backdrop-filter: blur(22px) saturate(1.06);
    -webkit-backdrop-filter: blur(22px) saturate(1.06);
    border: 1px solid rgba(255, 255, 255, 0.42) !important;
    box-shadow: 0 12px 36px rgba(36, 56, 82, 0.09), inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

body[data-color-palette="rising-sun"] .vd-glass:not(.vd-glass-card--guest-cta){
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.5) 0%, rgba(240, 247, 255, 0.4) 100%) !important;
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-color: rgba(255, 255, 255, 0.35) !important;
}

body[data-color-palette="rising-sun"] .vd-sidebar{
    background: linear-gradient(180deg, var(--vd-chrome-sidebar-glass-from) 0%, var(--vd-chrome-sidebar-glass-to) 100%) !important;
    color: #ffffff !important;
    border-right: 1px solid rgba(255, 255, 255, 0.12) !important;
    box-shadow: 4px 0 28px rgba(31, 41, 55, 0.12);
    backdrop-filter: blur(22px) saturate(1.12);
    -webkit-backdrop-filter: blur(22px) saturate(1.12);
}

body[data-color-palette="rising-sun"] .vd-side-brand-title,
body[data-color-palette="rising-sun"] .vd-side-brand-sub{
    color: #ffffff !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
}

/* Профиль: единый стиль в profile.css (как zen-desk-tools) */
/* --- scoped isolation (auto-split) --- */

/* Минипрофиль (dropdown): невыбранные «светлые» кнопки на белом фоне */

body[data-color-palette="rising-sun"] .zen-user-dropdown-lg .dropdown-menu .btn-outline-light{
    color: var(--vd-text-strong) !important;
    border-color: #94a3b8 !important;
    background: #fff !important;
}

body[data-color-palette="rising-sun"] .zen-user-dropdown-lg .dropdown-menu .btn-outline-light:hover{
    background: var(--vd-accent-soft) !important;
    border-color: var(--vd-accent) !important;
    color: var(--vd-text-strong) !important;
}

/* Ctrl+K: Corporate minimal / Professional blue — светлая панель вместо «vibe»-фиолета */

body[data-color-palette="rising-sun"] .vd-cmdk{
    background: rgba(15, 23, 42, 0.45);
}

body[data-color-palette="rising-sun"] .vd-cmdk-panel{
    background: var(--vd-panel);
    border: 1px solid var(--vd-border-strong);
    box-shadow: var(--vd-shadow-lg);
}

body[data-color-palette="rising-sun"] .vd-cmdk-input-wrap{
    border-bottom-color: var(--vd-border-strong);
}

body[data-color-palette="rising-sun"] .vd-cmdk-input{
    background: var(--vd-panel-soft);
    border-color: var(--vd-border-strong);
    color: var(--vd-text);
}

body[data-color-palette="rising-sun"] .vd-cmdk-input:focus{
    border-color: var(--vd-accent) !important;
    box-shadow: 0 0 0 3px var(--vd-accent-soft) !important;
    background: #fff !important;
}

body[data-color-palette="rising-sun"] .vd-cmdk-input-wrap i.vd-cmdk-icon{
    color: var(--vd-text-muted);
}

body[data-color-palette="rising-sun"] .vd-cmdk-group-title{
    color: var(--vd-text-muted);
}

body[data-color-palette="rising-sun"] .vd-cmdk-item-icon{
    background: var(--vd-accent-soft);
    color: var(--vd-accent-strong);
}

body[data-color-palette="rising-sun"] .vd-cmdk-footer{
    border-top: 1px solid var(--vd-border-strong);
    background: var(--vd-panel-soft);
    color: var(--vd-text-muted);
}

body[data-color-palette="rising-sun"] .vd-cmdk-kbd{
    border-color: var(--vd-border-strong);
    background: var(--vd-panel);
    color: var(--vd-text-strong);
}

/* Corporate Minimal (light): стекло и заголовки как в blue, без «вайб»-фиолета */

body[data-color-palette="rising-sun"] .vd-glass-card:not(.vd-glass-card--guest-cta){
    background: rgba(236, 240, 247, 0.96) !important;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(27, 38, 59, 0.1) !important;
    box-shadow: var(--vd-shadow-md);
    color: var(--vd-text) !important;
}

body[data-color-palette="rising-sun"] .vd-glass:not(.vd-glass-card--guest-cta){
    background: rgba(234, 238, 245, 0.92) !important;
    border-color: var(--vd-border) !important;
}

body[data-color-palette="rising-sun"] .vd-text-gradient{
    background: linear-gradient(135deg, #db8636 0%, #a8652d 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Гостевая плашка на главной: тёмное стекло + светлый лид, заголовок — синий градиент палитры */

body[data-color-palette="rising-sun"] .vd-glass-card--guest-cta{
    background: linear-gradient(145deg, rgba(27, 38, 59, 0.9) 0%, rgba(15, 23, 42, 0.85) 100%) !important;
    border: 1px solid rgba(255, 255, 255, 0.14) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: var(--vd-shadow-lg), inset 0 1px 0 rgba(255, 255, 255, 0.06);
    color: #f8fafc !important;
}

body[data-color-palette="rising-sun"] .vd-glass-card--guest-cta .vd-guest-cta-lead{
    color: rgba(248, 250, 252, 0.94) !important;
}

/* Corporate Minimal / Blue: утилиты Bootstrap — контраст от фона через токены */

body[data-color-palette="rising-sun"] .main-wrapper .text-dark{
    color: var(--vd-text-strong) !important;
}

body[data-color-palette="rising-sun"] .main-wrapper .text-body{
    color: var(--vd-text) !important;
}

body[data-color-palette="rising-sun"] .footer .vd-chip-violet{
    background: var(--vd-chip-gray-bg) !important;
    color: var(--vd-chip-gray-text) !important;
    border: 1px solid var(--vd-chip-gray-border) !important;
}

body[data-color-palette="rising-sun"] .main-wrapper .tw-surface-card{
    border: 1px solid var(--vd-border-strong) !important;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.07), 0 8px 22px rgba(15, 23, 42, 0.07) !important;
    background: #e8ecf2 !important;
}

body[data-color-palette="rising-sun"] .main-wrapper .tw-surface-card .card-header{
    border-bottom-color: var(--vd-border-strong) !important;
    color: var(--vd-text-strong) !important;
    font-weight: 600;
}

body[data-color-palette="rising-sun"] .main-wrapper .tw-surface-card h1, body[data-color-palette="rising-sun"] .main-wrapper .tw-surface-card h2, body[data-color-palette="rising-sun"] .main-wrapper .tw-surface-card h3, body[data-color-palette="rising-sun"] .main-wrapper .tw-surface-card h4, body[data-color-palette="rising-sun"] .main-wrapper .tw-surface-card h5, body[data-color-palette="rising-sun"] .main-wrapper .tw-surface-card .card-title{
    color: var(--vd-text-strong) !important;
}

body[data-color-palette="rising-sun"] .main-wrapper .tw-surface-card .form-label, body[data-color-palette="rising-sun"] .main-wrapper .tw-surface-card .form-check-label{
    color: var(--vd-text-strong) !important;
    font-weight: 500;
}

body[data-color-palette="rising-sun"] .main-wrapper .tw-surface-card .form-control, body[data-color-palette="rising-sun"] .main-wrapper .tw-surface-card .form-select, body[data-color-palette="rising-sun"] .main-wrapper .tw-surface-card textarea{
    border-color: #cbd5e1 !important;
    background: #ffffff !important;
    color: var(--vd-text) !important;
}

body[data-color-palette="rising-sun"] .main-wrapper .tw-surface-card .form-control:focus, body[data-color-palette="rising-sun"] .main-wrapper .tw-surface-card .form-select:focus, body[data-color-palette="rising-sun"] .main-wrapper .tw-surface-card textarea:focus{
    border-color: var(--vd-accent) !important;
    box-shadow: 0 0 0 3px var(--vd-accent-soft) !important;
}

body[data-color-palette="rising-sun"] .main-wrapper .tw-surface-card .input-group-text{
    border-color: #cbd5e1 !important;
    background: var(--vd-panel-soft) !important;
    color: var(--vd-text-muted) !important;
}

body[data-color-palette="rising-sun"] .main-wrapper .card:not(.bg-primary):not(.bg-success):not(.bg-danger):not(.bg-warning):not(.bg-info):not(.bg-dark):not(.vd-glass-card):not(.zen-auth-card){
    border: 1px solid var(--vd-border-strong) !important;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06), 0 6px 18px rgba(15, 23, 42, 0.06) !important;
}

body[data-color-palette="rising-sun"] .main-wrapper .card-header:not(.zen-chat-panel-head){
    border-bottom-color: var(--vd-border-strong) !important;
}

body[data-color-palette="rising-sun"] .main-wrapper .card-footer{
    border-top-color: var(--vd-border-strong) !important;
}

body[data-color-palette="rising-sun"] .main-wrapper .form-control, body[data-color-palette="rising-sun"] .main-wrapper .form-select, body[data-color-palette="rising-sun"] .main-wrapper textarea, body[data-color-palette="rising-sun"] .main-wrapper .input-group-text{
    border: 1px solid #cbd5e1 !important;
}

body[data-color-palette="rising-sun"] .main-wrapper .form-control:focus, body[data-color-palette="rising-sun"] .main-wrapper .form-select:focus, body[data-color-palette="rising-sun"] .main-wrapper textarea:focus{
    border-color: var(--vd-accent) !important;
    box-shadow: 0 0 0 3px var(--vd-accent-soft) !important;
}

body[data-color-palette="rising-sun"] .main-wrapper .list-group-item{
    border-color: var(--vd-border-strong) !important;
}

body[data-color-palette="rising-sun"] .modal-content{
    border: 1px solid var(--vd-border-strong) !important;
}

body[data-color-palette="rising-sun"] .modal-header, body[data-color-palette="rising-sun"] .modal-footer{
    border-color: var(--vd-border-strong) !important;
}

body[data-color-palette="rising-sun"] .dropdown-menu{
    border: 1px solid var(--vd-border-strong) !important;
}

body[data-color-palette="rising-sun"] .main-wrapper .table{
    --bs-table-border-color: var(--vd-border-strong);
}

body[data-color-palette="rising-sun"] .main-wrapper .table > :not(caption) > * > *{
    border-bottom-color: var(--vd-border-strong) !important;
}

/* Corporate light/blue: герой в карточке диспетчера/тикетов — белый текст; поля ввода остаются тёмными */

body[data-color-palette="rising-sun"] .main-wrapper .tw-surface-card.tw-toolbar-card .zen-desk-hero h1, body[data-color-palette="rising-sun"] .main-wrapper .tw-surface-card.tw-toolbar-card .zen-desk-hero h2, body[data-color-palette="rising-sun"] .main-wrapper .tw-surface-card.tw-toolbar-card .zen-desk-hero h3, body[data-color-palette="rising-sun"] .main-wrapper .tw-surface-card.tw-toolbar-card .zen-desk-hero h4, body[data-color-palette="rising-sun"] .main-wrapper .tw-surface-card.tw-toolbar-card .zen-desk-hero h5, body[data-color-palette="rising-sun"] .main-wrapper .tw-surface-card.tw-toolbar-card .zen-desk-hero p, body[data-color-palette="rising-sun"] .main-wrapper .tw-surface-card.tw-toolbar-card .zen-desk-hero .zen-desk-hero-label, body[data-color-palette="rising-sun"] .main-wrapper .tw-surface-card.tw-toolbar-card .tw-hero h1, body[data-color-palette="rising-sun"] .main-wrapper .tw-surface-card.tw-toolbar-card .tw-hero h2, body[data-color-palette="rising-sun"] .main-wrapper .tw-surface-card.tw-toolbar-card .tw-hero h3, body[data-color-palette="rising-sun"] .main-wrapper .tw-surface-card.tw-toolbar-card .tw-hero h4, body[data-color-palette="rising-sun"] .main-wrapper .tw-surface-card.tw-toolbar-card .tw-hero h5, body[data-color-palette="rising-sun"] .main-wrapper .tw-surface-card.tw-toolbar-card .tw-hero p, body[data-color-palette="rising-sun"] .main-wrapper .tw-surface-card.tw-toolbar-card .zen-ticket-hero h1, body[data-color-palette="rising-sun"] .main-wrapper .tw-surface-card.tw-toolbar-card .zen-ticket-hero h2, body[data-color-palette="rising-sun"] .main-wrapper .tw-surface-card.tw-toolbar-card .zen-ticket-hero h3, body[data-color-palette="rising-sun"] .main-wrapper .tw-surface-card.tw-toolbar-card .zen-ticket-hero h4, body[data-color-palette="rising-sun"] .main-wrapper .tw-surface-card.tw-toolbar-card .zen-ticket-hero h5, body[data-color-palette="rising-sun"] .main-wrapper .tw-surface-card.tw-toolbar-card .zen-ticket-hero p{
    color: #fff !important;
}

body[data-color-palette="rising-sun"] .main-wrapper .tw-surface-card.tw-toolbar-card .zen-desk-hero .form-check-label{
    color: rgba(255, 255, 255, 0.92) !important;
}

body[data-color-palette="rising-sun"] .main-wrapper .tw-surface-card.tw-toolbar-card .zen-desk-hero .form-control, body[data-color-palette="rising-sun"] .main-wrapper .tw-surface-card.tw-toolbar-card .zen-desk-hero .form-select{
    color: #0f172a !important;
    background-color: #fff !important;
}

body[data-color-palette="rising-sun"] .main-wrapper .tw-surface-card.tw-toolbar-card .zen-desk-hero .input-group-text{
    color: #475569 !important;
    background-color: #fff !important;
}

body[data-color-palette="rising-sun"] .vd-topbar{
    background: #e3e7ee !important;
    border-bottom: 1px solid #c5cdd8 !important;
    box-shadow: 0 1px 0 rgba(15, 23, 42, 0.04);
}

/* Messenger — Восходящее солнце: оранжевый chrome glass как vd-sidebar */
body[data-color-palette="rising-sun"] .zen-messenger-shell {
    border-color: rgba(255, 255, 255, 0.1) !important;
    box-shadow: 0 18px 42px rgba(100, 60, 25, 0.2);
}

body[data-color-palette="rising-sun"] .zen-messenger-shell .zen-messenger-unified-card {
    background: linear-gradient(180deg, var(--vd-chrome-sidebar-glass-from) 0%, var(--vd-chrome-sidebar-glass-to) 100%) !important;
    backdrop-filter: blur(22px) saturate(1.12);
    -webkit-backdrop-filter: blur(22px) saturate(1.12);
}

body[data-color-palette="rising-sun"] .zen-messenger-shell .zen-messenger-sidebar-col {
    border-right-color: rgba(255, 255, 255, 0.1) !important;
}

body[data-color-palette="rising-sun"] .zen-messenger-shell .zen-messenger-sidebar-footer,
body[data-color-palette="rising-sun"] .zen-messenger-shell #contactsList {
    background: transparent !important;
}

body[data-color-palette="rising-sun"] .zen-messenger-shell .zen-messenger-thread-header--light {
    border-bottom: 1px solid var(--vd-chrome-border) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08) !important;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

body[data-color-palette="rising-sun"] .zen-messenger-shell .zen-messenger-sidebar-title,
body[data-color-palette="rising-sun"] .zen-messenger-shell .zen-messenger-row-title,
body[data-color-palette="rising-sun"] .zen-messenger-shell .zen-messenger-thread-header--light .fw-bold,
body[data-color-palette="rising-sun"] .zen-messenger-shell .zen-messenger-thread-header--light .zen-messenger-thread-title,
body[data-color-palette="rising-sun"] .zen-messenger-shell .zen-messenger-thread-header--light .zen-messenger-thread-title-link {
    color: #ffffff !important;
    text-shadow: none !important;
}

body[data-color-palette="rising-sun"] .zen-messenger-shell .zen-messenger-tab {
    color: rgba(255, 255, 255, 0.78) !important;
}

body[data-color-palette="rising-sun"] .zen-messenger-shell .zen-messenger-tab:hover {
    color: #ffffff !important;
}

body[data-color-palette="rising-sun"] .zen-messenger-shell .zen-messenger-tab.is-active,
body[data-color-palette="rising-sun"] .zen-messenger-shell .zen-messenger-tab.is-active .zen-messenger-tab-count {
    color: #ffffff !important;
}

body[data-color-palette="rising-sun"] .zen-messenger-shell .zen-messenger-tab-count {
    opacity: 1 !important;
}

body[data-color-palette="rising-sun"] .zen-messenger-shell .zen-messenger-thread-header--light .zen-messenger-thread-subtitle,
body[data-color-palette="rising-sun"] .zen-messenger-shell .zen-messenger-thread-header--light .small,
body[data-color-palette="rising-sun"] .zen-messenger-shell .zen-messenger-conv-preview,
body[data-color-palette="rising-sun"] .zen-messenger-shell .zen-messenger-conv-time,
body[data-color-palette="rising-sun"] .zen-messenger-shell .zen-messenger-archive-link {
    color: rgba(255, 255, 255, 0.78) !important;
}

body[data-color-palette="rising-sun"] .zen-messenger-shell .zen-messenger-archive-link:hover {
    color: #ffffff !important;
}

body[data-color-palette="rising-sun"] .zen-messenger-shell .zen-messenger-thread-header--light i,
body[data-color-palette="rising-sun"] .zen-messenger-shell .zen-messenger-thread-header--light .bi,
body[data-color-palette="rising-sun"] .zen-messenger-shell .zen-messenger-sidebar-head i,
body[data-color-palette="rising-sun"] .zen-messenger-shell .zen-messenger-sidebar-head .bi {
    color: #ffffff !important;
}

body[data-color-palette="rising-sun"] .zen-messenger-shell .zen-messenger-thread-header--light .zen-messenger-header-action {
    color: #ffffff !important;
    border-color: rgba(255, 255, 255, 0.14) !important;
    background: rgba(255, 255, 255, 0.08) !important;
}

body[data-color-palette="rising-sun"] .zen-messenger-shell .zen-messenger-thread-header--light .zen-messenger-header-action:hover,
body[data-color-palette="rising-sun"] .zen-messenger-shell .zen-messenger-thread-header--light .zen-messenger-header-action:focus {
    color: #ffffff !important;
    background: rgba(255, 255, 255, 0.14) !important;
    border-color: rgba(255, 255, 255, 0.22) !important;
}

body[data-color-palette="rising-sun"] .zen-messenger-shell .zen-messenger-compose-btn {
    background: var(--vd-accent) !important;
    border-color: var(--vd-accent-strong) !important;
    color: #ffffff !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
}

body[data-color-palette="rising-sun"] .zen-messenger-shell .zen-messenger-compose-btn:hover,
body[data-color-palette="rising-sun"] .zen-messenger-shell .zen-messenger-compose-btn:focus {
    background: var(--vd-accent-strong) !important;
    color: #ffffff !important;
    border-color: color-mix(in srgb, var(--vd-accent-strong) 88%, #000) !important;
}

body[data-color-palette="rising-sun"] .zen-messenger-shell .zen-messenger-conv-card:hover:not(.is-active) {
    background: rgba(255, 255, 255, 0.08) !important;
}

body[data-color-palette="rising-sun"] .zen-messenger-shell .zen-messenger-conv-card.is-active {
    border-left: 3px solid #fbbf24;
}

body[data-color-palette="rising-sun"] .zen-messenger-shell .zen-messenger-conv-avatar {
    background: rgba(255, 255, 255, 0.1) !important;
    color: #ffedd5 !important;
    border-color: rgba(255, 255, 255, 0.16) !important;
}

body[data-color-palette="rising-sun"] .zen-messenger-shell .zen-messenger-conv-read {
    color: #fbbf24 !important;
}

body[data-color-palette="rising-sun"] .zen-messenger-shell .zen-messenger-thread-avatar-icon {
    background: rgba(255, 255, 255, 0.1) !important;
    color: #ffedd5 !important;
    border-color: rgba(255, 255, 255, 0.16) !important;
}

body[data-color-palette="rising-sun"] .zen-messenger-shell .zen-messenger-composer {
    background: linear-gradient(180deg, var(--vd-chrome-bg-soft) 0%, var(--vd-chrome-bg) 100%) !important;
    color: #ffffff !important;
    border-top-color: var(--vd-chrome-border) !important;
}

body[data-color-palette="rising-sun"] .zen-messenger-shell .zen-messenger-composer .form-control,
body[data-color-palette="rising-sun"] .zen-messenger-shell .zen-messenger-composer-attach {
    background: rgba(255, 255, 255, 0.12) !important;
    border-color: rgba(255, 255, 255, 0.14) !important;
    color: #ffffff !important;
}

body[data-color-palette="rising-sun"] .zen-messenger-shell .zen-messenger-composer .form-control::placeholder {
    color: rgba(255, 255, 255, 0.55) !important;
}

body[data-color-palette="rising-sun"] .zen-messenger-shell .zen-messenger-composer-attach,
body[data-color-palette="rising-sun"] .zen-messenger-shell .zen-messenger-composer-emoji {
    color: rgba(255, 255, 255, 0.78) !important;
}

body[data-color-palette="rising-sun"] .zen-messenger-shell .zen-messenger-composer-send.btn-primary {
    background: var(--vd-accent) !important;
    border-color: var(--vd-accent-strong) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 14px rgba(36, 56, 82, 0.28) !important;
}

body[data-color-palette="rising-sun"] .zen-messenger-shell .zen-messenger-composer-send.btn-primary:hover,
body[data-color-palette="rising-sun"] .zen-messenger-shell .zen-messenger-composer-send.btn-primary:focus {
    background: var(--vd-accent-strong) !important;
    border-color: color-mix(in srgb, var(--vd-accent-strong) 88%, #000) !important;
}

body[data-color-palette="rising-sun"] .zen-messenger-shell .zen-messenger-thread-header .btn-primary,
body[data-color-palette="rising-sun"] .zen-messenger-shell .zen-messenger-composer .btn-primary {
    background: var(--vd-accent) !important;
    border-color: var(--vd-accent-strong) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 14px rgba(36, 56, 82, 0.28) !important;
}

body[data-color-palette="rising-sun"] .zen-messenger-shell .zen-messenger-thread-header .btn-primary:hover,
body[data-color-palette="rising-sun"] .zen-messenger-shell .zen-messenger-thread-header .btn-primary:focus,
body[data-color-palette="rising-sun"] .zen-messenger-shell .zen-messenger-composer .btn-primary:hover,
body[data-color-palette="rising-sun"] .zen-messenger-shell .zen-messenger-composer .btn-primary:focus {
    background: var(--vd-accent-strong) !important;
    border-color: color-mix(in srgb, var(--vd-accent-strong) 88%, #000) !important;
}

body[data-color-palette="rising-sun"] .zen-messenger-shell .zen-messenger-ticket-routing {
    background: rgba(255, 255, 255, 0.06) !important;
    border-color: var(--vd-chrome-border) !important;
    color: rgba(255, 255, 255, 0.88) !important;
}

body[data-color-palette="rising-sun"] .zen-messenger-shell .zen-messenger-conv-action-btn {
    color: rgba(255, 255, 255, 0.55) !important;
}

body[data-color-palette="rising-sun"] .zen-messenger-shell .zen-messenger-conv-action-btn:hover {
    color: #ffffff !important;
}

body[data-color-palette="rising-sun"] .zen-messenger-shell .tw-avatar-fallback {
    color: #ffedd5 !important;
    background: rgba(255, 255, 255, 0.12) !important;
}

body[data-color-palette="rising-sun"] .zen-messenger-shell .zen-messenger-thread-title-link:hover {
    color: #ffedd5 !important;
}

/* Шапки мессенджера — chrome фон (перебивает vd-overrides .card-header) */
body.zen-body[data-color-palette="rising-sun"] .main-wrapper .zen-messenger-shell .zen-messenger-panel .card-header.zen-messenger-sidebar-head,
body.zen-body[data-color-palette="rising-sun"] .main-wrapper .zen-messenger-shell .zen-messenger-thread .card-header.zen-messenger-thread-header.zen-messenger-thread-header--light,
body.zen-body[data-color-palette="rising-sun"] .zen-messenger-shell .zen-messenger-panel .card-header.zen-messenger-sidebar-head,
body.zen-body[data-color-palette="rising-sun"] .zen-messenger-shell .zen-messenger-thread .card-header.zen-messenger-thread-header.zen-messenger-thread-header--light {
    background: linear-gradient(135deg, var(--vd-chrome-gradient-135-from) 0%, var(--vd-chrome-gradient-135-to) 100%) !important;
    background-color: transparent !important;
    border-bottom-color: var(--vd-chrome-border) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08) !important;
    backdrop-filter: blur(14px) !important;
    -webkit-backdrop-filter: blur(14px) !important;
}
