/* IndoMarket UAE v2.7.0 — accessible dark mode
   The user preference is applied by assets/js/theme-toggle.js and saved locally in the browser. */
:root { color-scheme: light; }
html[data-theme="dark"] { color-scheme: dark; }

.theme-toggle {
  display:inline-grid;
  place-items:center;
  width:38px;
  height:38px;
  flex:0 0 auto;
  border:1px solid var(--line);
  border-radius:11px;
  background:#fffdf9;
  color:var(--brand);
  box-shadow:0 5px 15px rgba(8,46,71,.045);
  transition:background .18s ease,color .18s ease,border-color .18s ease,transform .18s ease;
}
.theme-toggle:hover { transform:translateY(-1px); border-color:#d6b493; background:#fff1df; color:var(--logo-red); }
.theme-toggle:focus-visible { outline:3px solid rgba(244,174,46,.48); outline-offset:2px; }
.theme-toggle svg { width:19px; height:19px; fill:none; stroke:currentColor; stroke-width:1.9; stroke-linecap:round; stroke-linejoin:round; }
.theme-toggle .theme-icon-sun { display:none; }
html[data-theme="dark"] .theme-toggle .theme-icon-moon { display:none; }
html[data-theme="dark"] .theme-toggle .theme-icon-sun { display:block; }

html[data-theme="dark"] {
  --ink:#eef4f7;
  --muted:#acbbc3;
  --line:#2a4150;
  --soft:#10212b;
  --surface:#08141c;
  --brand:#f4c36a;
  --brand-dark:#dca53c;
  --accent:#f4ae2e;
  --danger:#ff786b;
  --logo-red:#ff7667;
  --logo-green:#8dbc72;
  --logo-orange:#f6ab53;
  --logo-cream:#1b2b35;
  --shadow:0 18px 45px rgba(0,0,0,.34);
}

html[data-theme="dark"] body,
html[data-theme="dark"] .site-shell { background:#08141c; color:var(--ink); }
html[data-theme="dark"] .announcement { background:linear-gradient(100deg,#07151d 0%,#0b2634 70%,#542225 160%); color:#f5ead6; }
html[data-theme="dark"] .site-header { background:rgba(8,20,28,.96); border-bottom-color:#29414e; }
html[data-theme="dark"] .site-nav { background:#0a1821; border-top-color:#29414e; }
html[data-theme="dark"] .brand small { color:var(--accent); }
html[data-theme="dark"] .search-bar { background:#10212b; border-color:#355060; box-shadow:none; }
html[data-theme="dark"] .search-bar input { background:#10212b; color:#eef4f7; }
html[data-theme="dark"] .search-bar input::placeholder { color:#91a3ae; }
html[data-theme="dark"] .search-bar button { background:#f4c36a; color:#10212b; }
html[data-theme="dark"] .search-bar button:hover { background:#ff7667; color:#fff; }
html[data-theme="dark"] .language-switcher { background:#10212b; border-color:#355060; }
html[data-theme="dark"] .language-switcher a { color:#b8c4cb; }
html[data-theme="dark"] .language-switcher a:hover { color:#fff; background:#1b3340; }
html[data-theme="dark"] .language-switcher a.active { background:#ff7667; color:#fff; }
html[data-theme="dark"] .theme-toggle { background:#10212b; border-color:#355060; color:#f4c36a; box-shadow:none; }
html[data-theme="dark"] .theme-toggle:hover { background:#1b3340; border-color:#f4c36a; color:#fff; }
html[data-theme="dark"] .utility-link { color:#eef4f7; }
html[data-theme="dark"] .utility-link:hover { color:#f4c36a; }
html[data-theme="dark"] .nav-row>a,
html[data-theme="dark"] .category-menu summary { color:#c2cdd2; }
html[data-theme="dark"] .nav-row>a.active,
html[data-theme="dark"] .nav-row>a:hover,
html[data-theme="dark"] .category-menu summary:hover { color:#f4c36a; box-shadow:inset 0 -3px 0 #ff7667; }
html[data-theme="dark"] .category-popover { background:#10212b; border-color:#355060; box-shadow:0 18px 45px rgba(0,0,0,.42); }
html[data-theme="dark"] .category-popover a:hover { background:#1a3440; color:#f4c36a; }

html[data-theme="dark"] .hero,
html[data-theme="dark"] .page-hero,
html[data-theme="dark"] .faq-page-hero { background:linear-gradient(145deg,#0d2632 0%,#0a1821 56%,#312723 120%); }
html[data-theme="dark"] .hero-text,
html[data-theme="dark"] .hero-points,
html[data-theme="dark"] .page-hero p:not(.eyebrow),
html[data-theme="dark"] .listing-meta,
html[data-theme="dark"] .breadcrumb,
html[data-theme="dark"] .hero-card-small small { color:var(--muted); }
html[data-theme="dark"] .eyebrow { color:#f4c36a; }
html[data-theme="dark"] .button-primary { background:#f4c36a; color:#10212b; box-shadow:none; }
html[data-theme="dark"] .button-primary:hover { background:#ff7667; color:#fff; }
html[data-theme="dark"] .button-outline,
html[data-theme="dark"] .button-ghost { background:#10212b; border-color:#355060; color:#f4c36a; }
html[data-theme="dark"] .button-outline:hover,
html[data-theme="dark"] .button-ghost:hover { background:#1b3340; border-color:#f4c36a; color:#fff; }
html[data-theme="dark"] .button-danger { background:#bc3f3d; border-color:#bc3f3d; }
html[data-theme="dark"] .button-danger:hover { background:#dc5b54; }
html[data-theme="dark"] .hero-card,
html[data-theme="dark"] .hero-card-small { background:#122733; border-color:#29414e; }
html[data-theme="dark"] .hero-card-main { background:linear-gradient(145deg,#0a3149 0%,#0f4a5e 58%,#7a3030 145%); }
html[data-theme="dark"] .notice-banner { background:#2c2619; border-color:#806128; color:#f9d78a; }
html[data-theme="dark"] .section-soft { background:linear-gradient(180deg,#0e202a 0%,#0a1821 100%); }
html[data-theme="dark"] .category-card,
html[data-theme="dark"] .product-card,
html[data-theme="dark"] .customer-auth-card,
html[data-theme="dark"] .account-stats article,
html[data-theme="dark"] .faq-item,
html[data-theme="dark"] .empty-state,
html[data-theme="dark"] .auto-register-card { background:#10212b; border-color:#2f4958; box-shadow:none; }
html[data-theme="dark"] .category-card:hover,
html[data-theme="dark"] .product-card:hover { border-color:#f4c36a; box-shadow:0 14px 32px rgba(0,0,0,.26); }
html[data-theme="dark"] .category-icon,
html[data-theme="dark"] .mini-image { background:#193440; }
html[data-theme="dark"] .product-media { background:linear-gradient(135deg,#132d38,#1f2726); }
html[data-theme="dark"] .product-category,
html[data-theme="dark"] .product-price,
html[data-theme="dark"] .detail-price,
html[data-theme="dark"] .inline-link,
html[data-theme="dark"] .breadcrumb a { color:#f4c36a; }
html[data-theme="dark"] .product-price small,
html[data-theme="dark"] .detail-price small,
html[data-theme="dark"] .category-card small,
html[data-theme="dark"] .trust-grid p,
html[data-theme="dark"] .values-grid p,
html[data-theme="dark"] .empty-state p { color:var(--muted); }
html[data-theme="dark"] .featured-badge { background:#3b301a; color:#f9d88a; }
html[data-theme="dark"] .stock-ok { background:#1f3a2a; color:#a8d79d; }
html[data-theme="dark"] .stock-low { background:#3c3017; color:#f7d179; }
html[data-theme="dark"] .stock-out { background:#402025; color:#ffaca1; }
html[data-theme="dark"] .trust-grid,
html[data-theme="dark"] .trust-grid>div { border-color:#29414e; }
html[data-theme="dark"] .filter-pill { background:#10212b; border-color:#355060; color:#d5e0e5; }
html[data-theme="dark"] .filter-pill:hover,
html[data-theme="dark"] .filter-pill.active { background:#f4c36a; border-color:#f4c36a; color:#10212b; }
html[data-theme="dark"] .pawon-promo { background:linear-gradient(135deg,#203226,#10212b); border-color:#405a39; }
html[data-theme="dark"] .uae-delivery-strip { background:#2b281b; border-color:#6f5927; box-shadow:none; }
html[data-theme="dark"] .uae-delivery-strip p { color:#d2c6a6; }
html[data-theme="dark"] .faq-item summary:hover { color:#f4c36a; }
html[data-theme="dark"] .faq-item-icon { background:#173342; color:#f4c36a; }
html[data-theme="dark"] .faq-item[open] .faq-item-icon { background:#f4c36a; color:#10212b; }
html[data-theme="dark"] .faq-answer { border-top-color:#29414e; color:#c8d4d8; }
html[data-theme="dark"] .faq-help-card { background:linear-gradient(124deg,#102c36,#14231d); border-color:#355753; }

html[data-theme="dark"] input,
html[data-theme="dark"] textarea,
html[data-theme="dark"] select { background:#0e1d26; color:#edf4f6; border-color:#36515f !important; color-scheme:dark; }
html[data-theme="dark"] input::placeholder,
html[data-theme="dark"] textarea::placeholder { color:#8498a3; }
html[data-theme="dark"] input:focus,
html[data-theme="dark"] textarea:focus,
html[data-theme="dark"] select:focus { outline-color:#f4c36a !important; }
html[data-theme="dark"] .order-summary,
html[data-theme="dark"] .cart-item,
html[data-theme="dark"] .checkout-form,
html[data-theme="dark"] .payment-card,
html[data-theme="dark"] .success-card,
html[data-theme="dark"] .account-section,
html[data-theme="dark"] .tracking-card,
html[data-theme="dark"] .tracking-result,
html[data-theme="dark"] .content-card { background:#10212b; border-color:#2f4958; box-shadow:none; }
html[data-theme="dark"] .cart-item,
html[data-theme="dark"] .order-summary-row,
html[data-theme="dark"] .order-item-list>div,
html[data-theme="dark"] .order-detail-customer { border-color:#29414e; }
html[data-theme="dark"] .alert-success { background:#173827; color:#b6e0b0; border-color:#2f6341; }
html[data-theme="dark"] .alert-error { background:#3a2024; color:#ffb8ae; border-color:#754045; }
html[data-theme="dark"] .toast { background:#193c4f; }
html[data-theme="dark"] .toast-error { background:#8e3438; }

html[data-theme="dark"] .site-footer { background:linear-gradient(135deg,#06131b 0%,#092232 66%,#25171b 160%); color:#e9edf0; }
html[data-theme="dark"] .site-footer p,
html[data-theme="dark"] .footer-bottom { color:#aebfc7; }
html[data-theme="dark"] .site-footer a { color:#e8edf0; }
html[data-theme="dark"] .site-footer a:hover,
html[data-theme="dark"] .footer-partner-link { color:#f4c36a!important; }

/* Admin dashboard and management screens */
html[data-theme="dark"] .admin-body { background:#08141c; color:var(--ink); }
html[data-theme="dark"] .admin-sidebar { background:linear-gradient(180deg,#07151d 0%,#0a2535 80%,#27151a 150%); }
html[data-theme="dark"] .admin-sidebar nav a:hover,
html[data-theme="dark"] .admin-sidebar nav a.active { background:rgba(244,195,106,.14); box-shadow:inset 3px 0 0 #f4c36a; }
html[data-theme="dark"] .admin-topbar { border-bottom-color:#29414e; }
html[data-theme="dark"] .admin-panel,
html[data-theme="dark"] .admin-stat,
html[data-theme="dark"] .login-card { background:#10212b; border-color:#2f4958; box-shadow:0 12px 30px rgba(0,0,0,.22); }
html[data-theme="dark"] .admin-panel th { background:#142a35; color:#b8c6cd; }
html[data-theme="dark"] .admin-panel td,
html[data-theme="dark"] .admin-panel th,
html[data-theme="dark"] .low-stock-list li { border-color:#29414e; }
html[data-theme="dark"] .admin-panel td small,
html[data-theme="dark"] .admin-user,
html[data-theme="dark"] .admin-stat span,
html[data-theme="dark"] .admin-stat small,
html[data-theme="dark"] .admin-panel-head>div>p,
html[data-theme="dark"] .analytics-intro-card p:not(.eyebrow),
html[data-theme="dark"] .export-card p { color:var(--muted); }
html[data-theme="dark"] .admin-panel-head a,
html[data-theme="dark"] .admin-stat a,
html[data-theme="dark"] .row-actions a { color:#f4c36a; }
html[data-theme="dark"] .selected-row,
html[data-theme="dark"] .table-scroll tbody tr:has(.js-row-select:checked) { background:#193440; }
html[data-theme="dark"] .bulk-action-bar { background:#152e38; border-color:#355753; }
html[data-theme="dark"] .bulk-selection-summary { background:#203f35; color:#c2e5b5; }
html[data-theme="dark"] .analytics-intro-card,
html[data-theme="dark"] .export-backup-panel { background:linear-gradient(135deg,#172d3a,#281e1d); }
html[data-theme="dark"] .export-card,
html[data-theme="dark"] .visitor-privacy-card,
html[data-theme="dark"] .report-filter-card { background:#10212b; border-color:#2f4958; }
html[data-theme="dark"] .visitor-table code { background:#142a35; border-color:#355060; color:#f4c36a; }
html[data-theme="dark"] .status-baru { background:#3c3017; color:#f8d379; }
html[data-theme="dark"] .status-dikonfirmasi,
html[data-theme="dark"] .status-diproses { background:#193652; color:#a8cbef; }
html[data-theme="dark"] .status-dikirim { background:#302747; color:#cab7f6; }
html[data-theme="dark"] .status-selesai { background:#1f3a2a; color:#a8d79d; }
html[data-theme="dark"] .status-dibatalkan { background:#402025; color:#ffaca1; }
html[data-theme="dark"] .login-body { background:linear-gradient(145deg,#0d2632 0%,#08141c 54%,#2d2420 120%); }
html[data-theme="dark"] .login-card>p:not(.eyebrow) { color:var(--muted); }
html[data-theme="dark"] .admin-topbar .theme-toggle { background:#10212b; }
html[data-theme="dark"] .invoice-document { background:#10212b; border-color:#2f4958; color:var(--ink); box-shadow:0 18px 42px rgba(0,0,0,.3); }
html[data-theme="dark"] .invoice-header { border-bottom-color:#ff7667; }
html[data-theme="dark"] .invoice-item-table th,
html[data-theme="dark"] .invoice-item-table td { border-color:#29414e; }

@media(max-width:1180px){
  .site-header .theme-toggle { width:38px; height:38px; border-radius:11px; background:#f3f7f4; color:var(--brand); border:0; box-shadow:none; }
  html[data-theme="dark"] .site-header .theme-toggle { background:#10212b; color:#f4c36a; border:1px solid #355060; }
}
@media(max-width:640px){
  .site-header .theme-toggle { width:35px; height:35px; border-radius:10px; }
}
@media(max-width:450px){
  .site-header .theme-toggle { width:33px; height:33px; }
}
@media print{
  html[data-theme="dark"] body,
  html[data-theme="dark"] .invoice-document { background:#fff!important; color:#111!important; }
  html[data-theme="dark"] .invoice-document * { color:#111!important; border-color:#ddd!important; }
}

/* Layout details for the control across storefront and admin. */
.header-actions > .theme-toggle { flex:0 0 auto; }
.admin-topbar-actions .theme-toggle { width:34px; height:34px; border-radius:10px; }
.login-card-controls { display:flex; align-items:center; gap:8px; }
.login-card-top .login-card-controls .language-switcher { margin-top:2px; }
