/* theme + language toggles and dark mode for all screens (loaded after each page's own CSS) */
.ui-b { border: 0; border-radius: 99px; min-width: 38px; height: 34px; padding: 0 10px; background: rgba(127,127,127,.18); color: inherit; font-weight: 800; font-size: .85rem; cursor: pointer; }
.ui-b:hover { background: rgba(127,127,127,.32); }
#uiSlot, .uislot { display: inline-flex; gap: 6px; align-items: center; }

/* ---------- DARK ---------- */
html[data-theme="dark"] { color-scheme: dark; --bg: #121212; --card: #1a1a1a; --ink: #ececec; --muted: #a3a3a3; --line: #2e2e2e; }
html[data-theme="dark"] body { background: #121212; color: #ececec; }
html[data-theme="dark"] a { color: #ff8a50; }
html[data-theme="dark"] input, html[data-theme="dark"] select, html[data-theme="dark"] textarea { background: #222; color: #ececec; border-color: #3a3a3a; }
html[data-theme="dark"] ::placeholder { color: #808080; }
html[data-theme="dark"] .card, html[data-theme="dark"] .sheet, html[data-theme="dark"] .login-box { background: #1a1a1a; color: #ececec; border-color: #2e2e2e; }
html[data-theme="dark"] .badge, html[data-theme="dark"] .thumb, html[data-theme="dark"] .dish img, html[data-theme="dark"] .dish .ph { background: #2a2a2a; color: #ddd; }
html[data-theme="dark"] .btn.ghost { background: transparent; }
html[data-theme="dark"] .order.bad, html[data-theme="dark"] .rev.low { background: #2a1616; }
html[data-theme="dark"] table.t th, html[data-theme="dark"] table.t td { border-color: #2e2e2e; }
html[data-theme="dark"] .state-open { background: #14391f; color: #6fe39a; } html[data-theme="dark"] .state-closed { background: #3d1a17; color: #ff9d94; }
html[data-theme="dark"] .empty, html[data-theme="dark"] .spin, html[data-theme="dark"] .muted { color: #a3a3a3; }
html[data-theme="dark"] #banner, html[data-theme="dark"] [style*="background:#fff7e0"], html[data-theme="dark"] [style*="background: #fff7e0"] { background: #33290f !important; color: #f3dd9b; border-color: #8a6a00; }
html[data-theme="dark"] hr { border-color: #2e2e2e !important; }

/* admin */
html[data-theme="dark"] body.adm { --bg: #121212; --line: #2e2e2e; --side: #0d0d0d; --side2: #1c1c1c; background: #121212; color: #d8d8d8; }
html[data-theme="dark"] .adm .top, html[data-theme="dark"] .adm .card, html[data-theme="dark"] .adm .mcard { background: #1a1a1a; }
html[data-theme="dark"] .adm .top .nm, html[data-theme="dark"] .adm .ph h2, html[data-theme="dark"] .adm .card h3, html[data-theme="dark"] .adm .mcat > .mhd h3, html[data-theme="dark"] .adm .mcard .bd b { color: #f2f2f2; }
html[data-theme="dark"] .adm .burger { background: #2a2a2a; color: #ddd; }
html[data-theme="dark"] .adm table.t th { background: #202020; color: #9a9a9a; }
html[data-theme="dark"] .adm .mcard .im { background-color: #262626; }
html[data-theme="dark"] .adm .mcard .im .av { background: #1a1a1a; color: #ddd; }
html[data-theme="dark"] .adm .pill.on { background: rgba(10,207,151,.18); color: #4ee59c; } html[data-theme="dark"] .adm .pill.off { background: rgba(250,92,124,.18); color: #ff8a9d; }
html[data-theme="dark"] .adm .stat { box-shadow: none; }

/* terminal + driver */
html[data-theme="dark"] .th, html[data-theme="dark"] .bnav, html[data-theme="dark"] .top, html[data-theme="dark"] .nav { background: #0d0d0d; }
html[data-theme="dark"] .sq { background: #1e1e1e; }
html[data-theme="dark"] .subtabs button { background: #1a1a1a; border-color: #2e2e2e; color: #ddd; }
html[data-theme="dark"] .subtabs button.on { background: var(--brand); color: #fff; border-color: var(--brand); }
html[data-theme="dark"] .ono, html[data-theme="dark"] .task .ono { color: #fff; }
html[data-theme="dark"] .nbox { background: #3a2f0a; border-color: #b58900; color: #ffe08a; }
html[data-theme="dark"] .actbar { background: linear-gradient(transparent, #121212 35%); } html[data-theme="dark"] .actbar small { color: #aaa; }
html[data-theme="dark"] .task { background: #1a1a1a; box-shadow: none; }
html[data-theme="dark"] .task .addr { color: #ddd; }
html[data-theme="dark"] .acts a { background: #262626; color: #eee; }
html[data-theme="dark"] .cod.cash { background: #3a2c0b; color: #ffd37a; } html[data-theme="dark"] .cod.card { background: #12331d; color: #7ee3a0; }
html[data-theme="dark"] .alert { background: #3a2f0a; color: #ffe08a; }
html[data-theme="dark"] .dinp { background: #222; color: #eee; border-color: #3a3a3a; }
html[data-theme="dark"] .mi { border-color: #2e2e2e; }
html[data-theme="dark"] .av { background: #1e1e1e; }

/* storefront */
html[data-theme="dark"] body.shop, html[data-theme="dark"] body { --shop-bg: #121212; }
html[data-theme="dark"] body #wrapper, html[data-theme="dark"] .main-content, html[data-theme="dark"] section, html[data-theme="dark"] .section { background-color: transparent; }
html[data-theme="dark"] h1, html[data-theme="dark"] h2, html[data-theme="dark"] h3, html[data-theme="dark"] h4, html[data-theme="dark"] h5, html[data-theme="dark"] h6, html[data-theme="dark"] .heading-section .title { color: #f2f2f2; }
html[data-theme="dark"] .product-item .inner, html[data-theme="dark"] .product-item { background: #1a1a1a; }
html[data-theme="dark"] .product-item .content, html[data-theme="dark"] .product-item .content a, html[data-theme="dark"] .product-item .content .title, html[data-theme="dark"] .product-item .content p { color: #ececec; }
html[data-theme="dark"] .product-item-style2, html[data-theme="dark"] .product-item-style2, html[data-theme="dark"] .about-box, html[data-theme="dark"] .hours-list, html[data-theme="dark"] .location-box, html[data-theme="dark"] .about-inner.style1 .item, html[data-theme="dark"] .crd, html[data-theme="dark"] .sh { background: #1a1a1a; color: #ececec; border-color: #2e2e2e; }
html[data-theme="dark"] .cat-tabs button { background: #1a1a1a; color: #ececec; }
html[data-theme="dark"] .cat-tabs button.on { background: #f5a81c; color: #fff; }
html[data-theme="dark"] .cat-tabs button:hover { background: #2a2a2a; }
html[data-theme="dark"] .product-item .image .ph { background: #262626; }
html[data-theme="dark"] .fld input, html[data-theme="dark"] .fld select, html[data-theme="dark"] .fld textarea { background: #222; color: #eee; border-color: #3a3a3a; }
html[data-theme="dark"] .sbtn.ghost, html[data-theme="dark"] .qtyc button, html[data-theme="dark"] .cart-q button { background: #1a1a1a; }
html[data-theme="dark"] .cart .content, html[data-theme="dark"] .cart .content * { color: #ececec; }
html[data-theme="dark"] .cart .content { background: #1a1a1a; }
html[data-theme="dark"] .paused-bar { background: #33201d; color: #ffb3a8; }
html[data-theme="dark"] .track-btn { background: #1a1a1a !important; color: #ff8a8a !important; }
html[data-theme="dark"] .open-pill { background: #1a1a1a; color: #ececec; }

/* ---------- English (LTR) layout fixes ---------- */
html[dir="ltr"] .adm .side { right: auto; left: 0; }
html[dir="ltr"] .adm .main { margin-right: 0; margin-left: 250px; }
html[dir="ltr"] .adm.collapsed .main { margin-left: 72px; margin-right: 0; }
html[dir="ltr"] .adm .stat .ic { left: auto; right: 14px; }
html[dir="ltr"] table.t th, html[dir="ltr"] table.t td { text-align: left; }
html[dir="ltr"] .rtl, html[dir="ltr"] .slider-page .slide-inner .content, html[dir="ltr"] .cart .content { direction: ltr; text-align: left; }
html[dir="ltr"] .switch span::after { right: auto; left: 3px; } html[dir="ltr"] .switch input:checked + span::after { right: auto; left: 23px; }
html[dir="ltr"] .close-x, html[dir="ltr"] .cx { float: right; }
html[dir="ltr"] .bd { margin-left: 0; margin-right: 10px; }
@media (max-width: 991px) {
  html[dir="ltr"] .adm .side { transform: translateX(-100%); }
  html[dir="ltr"] .adm.open .side { transform: none; }
  html[dir="ltr"] .adm .main, html[dir="ltr"] .adm.collapsed .main { margin-left: 0; }
}
