/* ============================================================================
   Светлая тема HexSell: включается классом html.light (кнопка ☀️/🌙 в шапке).
   Перекрашивает тёмные цвета Tailwind и свои классы. Тёмная тема — custom.css.
   ============================================================================ */
html.light { --bg: #f6f5fb; color-scheme: light; }
html.light body { background: var(--bg); color: #1e1b2e; }
html.light .bg-blobs { opacity: .55; }

/* текст */
html.light .text-white, html.light .text-slate-50, html.light .text-slate-100 { color: #14121f; }
html.light .text-slate-200 { color: #27243a; }
html.light .text-slate-300 { color: #3b3852; }
html.light .text-slate-400 { color: #5b5873; }
html.light .text-slate-500, html.light .placeholder\:text-slate-500::placeholder { color: #7a7790; }
html.light .hover\:text-white:hover, html.light .hover\:text-slate-200:hover, html.light .hover\:text-slate-300:hover { color: #14121f; }
html.light .text-white\/15 { color: rgba(20, 18, 31, .18); }
html.light .text-violet-100, html.light .text-violet-200 { color: #5b21b6; }
html.light .text-violet-300, html.light .text-violet-300\/80, html.light .hover\:text-violet-200:hover { color: #6d28d9; }
html.light .text-emerald-200, html.light .text-emerald-300 { color: #047857; }
html.light .text-rose-100, html.light .text-rose-200, html.light .text-rose-300, html.light .hover\:text-rose-300:hover { color: #be123c; }
html.light .text-amber-100, html.light .text-amber-200, html.light .text-amber-300 { color: #92400e; }
html.light .text-sky-200 { color: #0369a1; }
html.light .text-pink-200, html.light .text-pink-300 { color: #be185d; }
html.light .text-grad { color: #7c3aed; }

/* фоны и рамки */
html.light .bg-white\/5, html.light .hover\:bg-white\/5:hover { background-color: rgba(20, 18, 31, .045); }
html.light .bg-white\/10 { background-color: rgba(20, 18, 31, .07); }
html.light .bg-white\/\[0\.03\] { background-color: rgba(20, 18, 31, .03); }
html.light .bg-black\/30 { background-color: rgba(20, 18, 31, .08); }
html.light .border-white\/5, html.light .divide-white\/5 > * + * { border-color: rgba(20, 18, 31, .07); }
html.light .border-white\/10 { border-color: rgba(20, 18, 31, .11); }
html.light .border-white\/15 { border-color: rgba(20, 18, 31, .16); }
html.light .bg-\[\#0b0b12\]\/85, html.light .bg-\[\#0b0b12\]\/70 { background-color: rgba(246, 245, 251, .88); }
html.light .bg-emerald-500\/10, html.light .bg-emerald-500\/15 { background-color: rgba(16, 185, 129, .12); }
html.light .bg-rose-500\/10 { background-color: rgba(244, 63, 94, .1); }
html.light .bg-amber-500\/10 { background-color: rgba(245, 158, 11, .13); }
html.light .bg-violet-500\/10, html.light .bg-violet-500\/15 { background-color: rgba(139, 92, 246, .1); }
html.light header, html.light footer { border-color: rgba(20, 18, 31, .07); }

/* свои компоненты */
html.light .glass { background: rgba(255, 255, 255, .82); border-color: rgba(20, 18, 31, .08); box-shadow: 0 1px 2px rgba(20, 18, 31, .04), 0 8px 24px -18px rgba(76, 29, 149, .25); }
html.light .btn-ghost { background: #fff; border-color: rgba(20, 18, 31, .14); color: #1e1b2e; }
html.light .btn-ghost:hover { background: #f1eefb; }
html.light .btn-reviews { background: #fff7e0; border-color: #f2c14e; color: #8a5a00; }
html.light .chip { border-color: rgba(20, 18, 31, .15); background: #fff; }
html.light .chip[aria-pressed="true"] { color: #fff; background: linear-gradient(135deg, var(--violet), var(--pink)); border-color: transparent; }
html.light .field { background: #fff; border-color: rgba(20, 18, 31, .16); color: #14121f; }
html.light .field::placeholder, html.light .chat-input::placeholder { color: #8b88a0; }
html.light select { color-scheme: light; }
html.light select option, html.light select optgroup { background-color: #fff; color: #14121f; }
html.light .tariff, html.light .grp, html.light .qty-box { border-color: rgba(20, 18, 31, .15); }
html.light .grp { color: #3b3852; }
html.light .grp[aria-selected="true"] { color: #14121f; }
html.light .qty-box button, html.light .qty-box input { color: #14121f; background: transparent; }
html.light .svc-tag { color: color-mix(in srgb, var(--c) 75%, #000); }
html.light .price-row { border-color: rgba(20, 18, 31, .07); }
html.light .price-row a, html.light .legal a, html.light .article > p a, html.light .article > ul a, html.light .prose-block a { color: #6d28d9; }
html.light .legal h2, html.light .article > h2, html.light .article > table th, html.light .article > p b, html.light .prose-block > h3, html.light .prose-block b { color: #14121f; }
html.light .legal p, html.light .legal ul, html.light .article > p, html.light .article > ul, html.light .article > ol, html.light .article > table, html.light .prose-block > p, html.light .prose-block > ul, html.light .prose-block > ol { color: #3b3852; }
html.light .article > table th, html.light .article > table td { border-color: rgba(20, 18, 31, .08); }
html.light .status-amber { background: rgba(245, 158, 11, .15); color: #92400e; }
html.light .status-violet { background: rgba(139, 92, 246, .13); color: #5b21b6; }
html.light .status-emerald { background: rgba(16, 185, 129, .13); color: #047857; }
html.light .status-slate { background: rgba(100, 116, 139, .13); color: #475569; }
html.light .status-rose { background: rgba(244, 63, 94, .12); color: #be123c; }
html.light .tbl th, html.light .tbl td { border-color: rgba(20, 18, 31, .07); }
html.light .tbl th { color: #6b6884; }
html.light .tag { background: rgba(139, 92, 246, .12); color: #5b21b6; }
html.light .tag.t-red { color: #be123c; } html.light .tag.t-gold { color: #92400e; }
html.light .wait-ok { color: #047857; } html.light .wait-warn { color: #b45309; } html.light .wait-bad { color: #be123c; }
html.light .tile.is-active { background: rgba(139, 92, 246, .08); }
html.light .tile.is-active span:last-child { color: #14121f; }
html.light .tile-cover { box-shadow: inset 0 0 0 1px rgba(20, 18, 31, .06); }
html.light .rate label { color: rgba(20, 18, 31, .15); }
html.light .rate label:hover, html.light .rate label:hover ~ label, html.light .rate input:checked ~ label { color: #f59e0b; }
html.light .msg-bot { background: rgba(20, 18, 31, .06); }

/* чаты */
html.light .chat-head, html.light .msgr-side, html.light .msgr-side-head, html.light .msgr-row { border-color: rgba(20, 18, 31, .07); }
html.light .msgr-row:hover { background: rgba(20, 18, 31, .03); }
html.light .msgr-row.is-active { background: rgba(139, 92, 246, .1); }
html.light .chat-back { color: #3b3852; }
html.light .chat-msg, html.light .admin-view .chat-msg.user { background: #fff; color: #1e1b2e; box-shadow: 0 0 0 1px rgba(20, 18, 31, .07); }
html.light .chat-msg.user, html.light .admin-view .chat-msg.admin { color: #fff; box-shadow: none; }
html.light .chat-day span, html.light .chat-dd, html.light .chat-order-card { background: rgba(20, 18, 31, .04); box-shadow: inset 0 0 0 1px rgba(20, 18, 31, .06); }
html.light .chat-sys, html.light .dd-l { color: #6b6884; }
html.light .dd-v, html.light .chat-dd-body { color: #14121f; }
html.light .chat-form { background: #fff; box-shadow: inset 0 0 0 1px rgba(20, 18, 31, .12); }
html.light .chat-input { color: #14121f; }
html.light .chat-icon { color: #6b6884; }
html.light .chat-icon:hover { background: rgba(20, 18, 31, .05); color: #14121f; }
html.light .chat-tpl-btn { background: rgba(20, 18, 31, .05); color: #3b3852; }
html.light .chat-ev .ev-title { color: #3b0764; }
html.light .chat-ev .ev-text { color: #4b5563; }
html.light .chat-ev.ev-done .ev-title, html.light .chat-order-status.st-done { color: #047857; }
html.light .chat-ev.ev-cancel .ev-title { color: #334155; }
html.light .chat-order-status.st-new, html.light .chat-order-status.st-review { color: #92400e; }
html.light .chat-order-status.st-canceled, html.light .chat-order-status.st-rejected { color: #475569; }
html.light .chat-sub.st-done { color: #047857; } html.light .chat-sub.st-new, html.light .chat-sub.st-review { color: #b45309; }
html.light .chat-del { background: #fff; border-color: rgba(20, 18, 31, .14); }
html.light .chat-stars a { color: #cbd5e1; }

/* переключатель темы */
.theme-btn { position: relative; width: 2.5rem; height: 2.5rem; padding: 0 !important; }
.theme-btn .t-sun { display: none; } html.light .theme-btn .t-sun { display: inline; } html.light .theme-btn .t-moon { display: none; }

/* вкладки на главной, метки выдачи, остатки, избранное */
html.light .home-tabs { background: #fff; border-color: rgba(20, 18, 31, .1); }
html.light .home-tab { color: #3b3852; }
html.light .home-tab:hover { color: #14121f; }
html.light .home-tab[aria-selected="true"] { color: #fff; }
html.light .deliv-label { color: #5b5873; }
html.light .deliv-auto { color: #047857; }
html.light .deliv-time { color: #7a7790; }
html.light .deliv-big { background: rgba(20, 18, 31, .05); }
html.light .deliv-big.deliv-auto { background: rgba(16, 185, 129, .12); }
html.light .stock-left { color: #92400e; background: rgba(245, 158, 11, .15); }
html.light .fav-btn { color: #5b5873; background: #fff; border-color: rgba(20, 18, 31, .15); }
html.light .fav-btn[aria-pressed="true"] { color: #db2777; border-color: rgba(219, 39, 119, .4); background: rgba(236, 72, 153, .08); }
html.light .thumb { background: color-mix(in srgb, var(--c, #8b5cf6) 18%, #fff); }
html.light .hist-search input { color: #14121f; background: #fff; border-color: rgba(20, 18, 31, .12); }
html.light .hist-search input::placeholder { color: #7a7790; }
html.light .hist-tab { color: #3b3852; background: #fff; border-color: rgba(20, 18, 31, .1); }
html.light .hist-tab:hover { color: #14121f; }
html.light .hist-tab[aria-current="true"] { color: #fff; }
html.light .hist-n { background: rgba(20, 18, 31, .08); }
html.light .hist-tab[aria-current="true"] .hist-n { background: rgba(255, 255, 255, .25); }
html.light .msgr-online { box-shadow: 0 0 0 2px #fff; }
html.light .msgr-row.is-support { background: linear-gradient(90deg, rgba(139, 92, 246, .12), rgba(236, 72, 153, .04)); }
html.light .msgr-row.is-unread:not(.is-active) { background-color: rgba(59, 130, 246, .07); }
html.light .hdr-search input, html.light .hdr-balance, html.light .hdr-user > summary { color: #14121f; background: #fff; border-color: rgba(20, 18, 31, .12); }
html.light .hdr-search input::placeholder { color: #7a7790; }
html.light .hdr-name { color: #14121f; }
html.light .hdr-lvl { color: #6d28d9; }
html.light .hdr-bar { background: rgba(20, 18, 31, .1); }
html.light .hdr-menu { background: #fff; box-shadow: 0 20px 40px rgba(20, 18, 31, .15); }
html.light .hdr-menu a, html.light .hdr-menu button { color: #14121f; }
html.light .hdr-menu a:hover, html.light .hdr-menu button:hover { background: rgba(20, 18, 31, .05); }
html.light .hdr-menu form { border-color: rgba(20, 18, 31, .08); }
html.light .hdr-menu.glass { background: #fff; border-color: rgba(20, 18, 31, .1); }
html.light .prof-icon-btn { color: #3b3852; background: #fff; border-color: rgba(20, 18, 31, .12); }
html.light .prof-chip, html.light .prof-row { background: rgba(20, 18, 31, .03); border-color: rgba(20, 18, 31, .08); }
html.light .prof-stat { background: rgba(255, 255, 255, .7); border-color: rgba(20, 18, 31, .08); }
html.light .prof-ref { background-image: radial-gradient(circle at 85% 0%, rgba(139, 92, 246, .18), transparent 55%), radial-gradient(circle at 0% 100%, rgba(236, 72, 153, .1), transparent 50%); }
html.light .tgl-qr-wrap { background: rgba(20, 18, 31, .03); border-color: rgba(20, 18, 31, .08); }
html.light .opt-img-row { border-color: rgba(20, 18, 31, .1); }

/* программа лояльности (fix40) */
html.light .loy-head { background: linear-gradient(135deg, rgba(139, 92, 246, .12), rgba(236, 72, 153, .07)); border-color: rgba(139, 92, 246, .25); }
html.light .loy-task { background: rgba(255, 255, 255, .75); border-color: rgba(20, 18, 31, .08); }
html.light .loy-task.is-done { background: rgba(16, 185, 129, .08); border-color: rgba(5, 150, 105, .35); }
html.light .loy-badge { color: #9d174d; background: rgba(236, 72, 153, .14); }
html.light .coupon-card { background: rgba(255, 255, 255, .7); border-color: rgba(219, 39, 119, .3); }
html.light .coupon-card.is-on { background: rgba(16, 185, 129, .08); border-color: rgba(5, 150, 105, .45); }
html.light .coupon-pill { color: #9d174d; background: rgba(236, 72, 153, .07); border-color: rgba(219, 39, 119, .35); }
html.light .coupon-pill.is-on { color: #047857; background: rgba(16, 185, 129, .08); border-color: rgba(5, 150, 105, .45); }

/* компактный кабинет (fix41) */
html.light .acc-stat { background: rgba(255, 255, 255, .75); border-color: rgba(20, 18, 31, .1); }
html.light .opt-card { border-color: rgba(20, 18, 31, .12); background: rgba(255, 255, 255, .6); }
html.light .opt-card:has(:checked) { border-color: #8b5cf6; background: rgba(139, 92, 246, .1); }
html.light .opt-name { color: #14121f; }
html.light .mv-btns button { color: #3b3852; background: rgba(255, 255, 255, .8); border-color: rgba(20, 18, 31, .15); }
html.light .brand-hex { background-image: linear-gradient(90deg, #7c3aed, #db2777); }
html.light .brand-sell { color: #0f172a; }
html.light .off-note { color: #92400e; background: rgba(245, 158, 11, .1); border-color: rgba(217, 119, 6, .3); }
html.light .loy-num { color: #3b3852; }
html.light .rv-bonus { color: #9d174d; background: rgba(236, 72, 153, .08); border-color: rgba(219, 39, 119, .3); }

/* спокойная палитра (fix48) */
html.light .chip[aria-pressed="true"] { background: var(--accent); }
html.light .msgr-row.is-support { background: rgba(139, 92, 246, .1); }
html.light .prof-ref { background-image: none; }
html.light .loy-head { background: rgba(139, 92, 246, .08); }
html.light .brand-hex { background: none; color: #7c3aed; }
html.light .hdr-bar > span, html.light .loy-bar { background: #7c3aed; }
html.light .loy-task.is-done .loy-bar { background: #10b981; }
html.light .scope-chip { background: rgba(255, 255, 255, .8); border-color: rgba(20, 18, 31, .12); }

/* коды (fix64) */
html.light .code-box { background: #f0fdf4; box-shadow: inset 0 0 0 1.5px #34d399; }
html.light .code-box code { color: #064e3b; }
html.light .chat-ev.ev-code .ev-title { color: #047857; }
html.light .code-panel { background: linear-gradient(135deg, #ecfdf5, #f8fafc); box-shadow: inset 0 0 0 1px #6ee7b7; }

/* порядок товаров (fix66) */
html.light .hp-item { background: #fff; box-shadow: inset 0 0 0 1px rgba(20,18,31,.1); }
html.light .hp-name { color: #1e1b2e; }
html.light .hp-ghost { background: #fff; }
