@font-face {
  font-family: Arad;
  src: url("./fonts/AradVF.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light dark;
  --navy: #112337;
  --blue: #204ce5;
  --aqua: #66ccc6;
  --rose: #febfca;
  --paper: var(--tg-theme-bg-color, #f4f7fa);
  --surface: color-mix(in srgb, var(--tg-theme-secondary-bg-color, #fff) 82%, transparent);
  --surface-solid: var(--tg-theme-secondary-bg-color, #fff);
  --ink: var(--tg-theme-text-color, #112337);
  --muted: var(--tg-theme-hint-color, #5f6f7e);
  --link: var(--tg-theme-link-color, #204ce5);
  --button: var(--tg-theme-button-color, #112337);
  --button-text: var(--tg-theme-button-text-color, #fff);
  /* The source logo is a white transparent PNG; recolor it to the light-theme
     button/navy tone so it remains legible on the glass header. */
  --brand-logo-filter: brightness(0) saturate(100%) invert(11%) sepia(21%) saturate(1348%) hue-rotate(174deg) brightness(90%) contrast(95%);
  --line: color-mix(in srgb, var(--ink) 13%, transparent);
  --success: #18735f;
  --danger: #b3263b;
  --shadow: 0 16px 48px rgb(17 35 55 / 10%);
  --radius: 18px;
  --safe-top: var(--tg-safe-area-inset-top, env(safe-area-inset-top, 0px));
  --safe-bottom: var(--tg-safe-area-inset-bottom, env(safe-area-inset-bottom, 0px));
  --content-safe-top: var(--tg-content-safe-area-inset-top, 0px);
  font-family: Arad, Arial, sans-serif;
  color: var(--ink);
}

* { box-sizing: border-box; }
html { min-width: 300px; scroll-behavior: smooth; }
body {
  min-height: 100dvh;
  margin: 0;
  padding: calc(12px + var(--safe-top) + var(--content-safe-top)) max(14px, env(safe-area-inset-right)) calc(96px + var(--safe-bottom));
  overflow-x: hidden;
  overscroll-behavior-y: contain;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.65;
}
body::before {
  position: fixed;
  inset: 0;
  z-index: -2;
  content: "";
  pointer-events: none;
  background:
    radial-gradient(circle at 2% 0%, rgb(102 204 198 / 22%), transparent 28rem),
    radial-gradient(circle at 98% 22%, rgb(254 191 202 / 20%), transparent 24rem);
}
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { touch-action: manipulation; }
a { color: var(--link); }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip { position: fixed; top: -80px; right: 16px; z-index: 30; padding: 10px 14px; border-radius: 10px; background: var(--navy); color: #fff; }
.skip:focus { top: 10px; }

.glass, .glass-lite {
  border: 1px solid color-mix(in srgb, #fff 70%, var(--line));
  background: var(--surface);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 68%), var(--shadow);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
}
.glass-lite { box-shadow: inset 0 1px 0 rgb(255 255 255 / 60%), 0 8px 24px rgb(17 35 55 / 6%); }
.topbar, main { width: min(1120px, 100%); margin-inline: auto; }
.theme-toggle { display: inline-grid; width: 44px; min-width: 44px; height: 44px; min-height: 44px; margin-inline-start: auto; place-items: center; padding: 0; border: 1px solid var(--line); border-radius: 10px; background: transparent; color: var(--ink); cursor: pointer; transition: background 180ms ease, color 180ms ease, border-color 180ms ease; }
.theme-toggle svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
.theme-toggle:hover, .theme-toggle:focus-visible { border-color: var(--aqua); background: color-mix(in srgb, var(--aqua) 16%, transparent); outline: none; }
.theme-toggle:active { background: color-mix(in srgb, var(--aqua) 25%, transparent); }
.topbar {
  position: sticky;
  top: calc(8px + var(--safe-top) + var(--content-safe-top));
  z-index: 8;
  display: flex;
  min-height: 60px;
  padding: 8px 12px;
  align-items: center;
  justify-content: space-between;
  direction: ltr;
  border-radius: 16px;
}
.topbar img { width: 125px; height: 44px; object-fit: contain; filter: var(--brand-logo-filter); opacity: 1; transition: filter 180ms ease; }
.topbar > div { display: grid; direction: rtl; text-align: right; }
.connection { color: var(--success); font-size: .78rem; }
.user-chip { max-width: 46vw; overflow: hidden; font-size: .9rem; text-overflow: ellipsis; white-space: nowrap; }

.preview-note { width: min(1120px, 100%); margin: 0 auto 10px; padding: 9px 13px; border-radius: 12px; background: var(--navy); color: #fff; font-size: .84rem; text-align: center; }
.hero {
  display: grid;
  min-height: 210px;
  margin: 14px 0 28px;
  padding: clamp(24px, 5vw, 48px);
  align-content: space-between;
  gap: 24px;
  overflow: hidden;
  border-radius: 26px;
}
.brand-mark, .admin-label { margin: 0 0 6px; color: var(--blue); font-family: Arial, sans-serif; font-size: .72rem; font-weight: 800; letter-spacing: .14em; }
.hero h1 { max-width: 15ch; margin: 0; font-size: clamp(1.9rem, 6vw, 3.8rem); line-height: 1.14; letter-spacing: -.025em; }
.hero-copy > p:last-child { max-width: 42ch; margin: 12px 0 0; color: var(--muted); }
.brand-strip, .active-filters { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.brand-strip::-webkit-scrollbar, .active-filters::-webkit-scrollbar { display: none; }
.brand-pill, .active-pill { flex: 0 0 auto; min-height: 36px; padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); background: color-mix(in srgb, var(--surface-solid) 74%, transparent); font-size: .8rem; }

.view { margin-top: 24px; }
.section-head, .admin-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.section-head h2, .admin-heading h2 { margin: 0; font-size: clamp(1.35rem, 4vw, 2rem); line-height: 1.25; }
.section-head p, .admin-heading p { margin: 5px 0 0; color: var(--muted); font-size: .9rem; }
.count { flex: 0 0 auto; color: var(--muted); font-size: .85rem; font-weight: 700; }
.catalog-tools, .admin-tools { display: grid; gap: 12px; padding: 14px; border-radius: var(--radius); }
.field { display: grid; gap: 5px; color: var(--muted); font-size: .8rem; font-weight: 700; }
input, select, textarea {
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
  outline: 0;
  background: var(--surface-solid);
  color: var(--ink);
}
textarea { resize: vertical; }
input::placeholder, textarea::placeholder { color: color-mix(in srgb, var(--muted) 82%, transparent); opacity: 1; }
input:focus, select:focus, textarea:focus, button:focus-visible, a:focus-visible { outline: 3px solid color-mix(in srgb, var(--blue) 42%, transparent); outline-offset: 2px; }
.filter-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.filter-actions, .check-row, .bulk-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.check { display: flex; min-height: 44px; align-items: center; gap: 8px; color: var(--ink); font-size: .86rem; cursor: pointer; }
.check input { width: 20px; min-height: 20px; accent-color: var(--blue); }
.text-button { min-height: 44px; padding: 8px 6px; border: 0; background: transparent; color: var(--link); font-weight: 750; cursor: pointer; }
.active-filters { min-height: 40px; margin: 10px 0 2px; }
.active-pill { border-color: color-mix(in srgb, var(--blue) 35%, var(--line)); color: var(--blue); }

.products { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 14px; }
.product {
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 250px;
  padding: 0;
  overflow: hidden;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-solid);
  color: var(--ink);
  box-shadow: 0 8px 25px rgb(17 35 55 / 7%);
  text-align: right;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease;
}
.product:active, .button:active, .nav-button:active { transform: scale(.98); }
.product-image, .image-empty { width: 100%; height: 145px; object-fit: contain; background: linear-gradient(145deg, #edf7f7, #eef2fb); }
.image-empty { display: grid; place-items: center; color: #59707a; font-size: .75rem; }
.image-empty::after { content: "تصویر در دست بررسی"; }
.product-copy { display: grid; flex: 1; gap: 5px; padding: 12px; }
.product small, .detail-meta, .metric span, .muted { color: var(--muted); }
.product strong { overflow: hidden; font-size: .9rem; line-height: 1.5; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.price, .detail-price { margin-top: auto; color: var(--success); font-size: .82rem; font-weight: 800; }
.status { display: inline-flex; width: fit-content; padding: 3px 7px; border-radius: 7px; background: color-mix(in srgb, var(--rose) 36%, transparent); color: color-mix(in srgb, var(--danger) 80%, var(--ink)); font-size: .7rem; }
.favorite-mark { position: absolute; top: 8px; left: 8px; display: grid; width: 34px; height: 34px; place-items: center; border-radius: 50%; background: var(--surface-solid); color: var(--danger); box-shadow: 0 4px 14px rgb(17 35 55 / 12%); }
.button { display: inline-flex; min-height: 44px; padding: 9px 15px; align-items: center; justify-content: center; border: 1px solid transparent; border-radius: 11px; color: inherit; text-decoration: none; font-weight: 800; cursor: pointer; }
.button:disabled { opacity: .55; cursor: wait; }
.primary { background: var(--button); color: var(--button-text); }
.secondary { border-color: var(--line); background: var(--surface-solid); color: var(--ink); }
.tertiary { border-color: var(--line); background: transparent; color: var(--ink); }
.danger-button { border-color: color-mix(in srgb, var(--danger) 30%, transparent); color: var(--danger); }
.load-more { width: min(320px, 100%); margin: 18px auto 0; }
.empty, .error-state { grid-column: 1 / -1; padding: 34px 18px; border: 1px dashed var(--line); border-radius: var(--radius); color: var(--muted); text-align: center; }
.empty h3, .error-state h3 { margin: 0 0 6px; color: var(--ink); }
.skeleton { min-height: 250px; border-radius: var(--radius); background: linear-gradient(105deg, color-mix(in srgb, var(--line) 60%, transparent) 25%, color-mix(in srgb, var(--surface-solid) 90%, transparent) 40%, color-mix(in srgb, var(--line) 60%, transparent) 55%); background-size: 200% 100%; animation: shimmer 1.1s linear infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }

.segmented, .admin-nav { display: flex; gap: 6px; padding: 5px; overflow-x: auto; border: 1px solid var(--line); border-radius: 13px; background: var(--surface-solid); }
.segmented, .admin-nav { scrollbar-width: none; }
.segmented::-webkit-scrollbar, .admin-nav::-webkit-scrollbar { display: none; }
.segmented button, .admin-nav button { min-height: 42px; padding: 7px 13px; flex: 1 0 auto; border: 0; border-radius: 9px; background: transparent; color: var(--muted); font-weight: 750; cursor: pointer; }
.segmented button.active, .admin-nav button.active { background: var(--navy); color: #fff; }
.admin-heading { padding: 18px 0 4px; align-items: center; }
.admin-panel { margin-top: 14px; }
.metrics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.metric, .panel { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-solid); }
.metric { padding: 16px; }
.metric b { display: block; font-size: clamp(1.25rem, 5vw, 1.8rem); line-height: 1.2; }
.dashboard-grid { display: grid; gap: 12px; margin-top: 12px; }
.panel { padding: 16px; }
.panel h3 { margin: 0 0 14px; font-size: 1rem; }
.bars { display: grid; gap: 10px; }
.bar-row { display: grid; grid-template-columns: minmax(95px, 1fr) 2fr auto; gap: 8px; align-items: center; font-size: .8rem; }
.bar { height: 7px; overflow: hidden; border-radius: 999px; background: color-mix(in srgb, var(--line) 55%, transparent); }
.bar i { display: block; height: 100%; border-radius: inherit; background: var(--aqua); }
.trend { display: flex; min-height: 130px; align-items: end; gap: 7px; }
.trend-column { display: grid; height: 100%; flex: 1; align-content: end; gap: 5px; text-align: center; font-size: .68rem; color: var(--muted); }
.trend-column i { display: block; min-height: 4px; border-radius: 6px 6px 2px 2px; background: var(--blue); }
.health-number { font-size: 2rem; font-weight: 850; }
.event-list, .audit-list, .review-list { display: grid; gap: 9px; }
.event-row, .audit-row, .review-row { display: flex; min-height: 48px; padding: 10px 0; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line); }
.event-row:last-child, .audit-row:last-child, .review-row:last-child { border-bottom: 0; }
.admin-tools { grid-template-columns: 1fr 1fr; margin-bottom: 12px; }
.admin-tools .field:first-child { grid-column: 1 / -1; }
.admin-tools.compact .field { grid-column: auto; }
.bulk-actions { justify-content: flex-start; margin: 10px 0; }
.table-wrap { overflow: hidden; padding: 0; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 12px 10px; border-bottom: 1px solid var(--line); font-size: .82rem; text-align: right; }
th { color: var(--muted); font-size: .75rem; }
.row-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.row-actions button { min-height: 44px; padding: 7px 10px; border: 1px solid var(--line); border-radius: 9px; background: transparent; color: var(--ink); cursor: pointer; }
.user-cards { display: none; }
.access-badge { display: inline-flex; padding: 4px 8px; border-radius: 8px; background: color-mix(in srgb, var(--aqua) 24%, transparent); color: var(--success); font-size: .74rem; font-weight: 800; }
.access-badge.inactive { background: color-mix(in srgb, var(--rose) 30%, transparent); color: var(--danger); }
.pagination { display: flex; min-height: 52px; margin-top: 10px; align-items: center; justify-content: center; gap: 10px; }
.review-row { align-items: flex-start; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-solid); }
.audit-list { padding: 8px 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-solid); }
.audit-row { align-items: flex-start; }
.audit-row time { flex: 0 0 auto; color: var(--muted); font-size: .75rem; direction: ltr; }
.media-manager { display: grid; gap: 12px; padding: 14px; border: 1px solid var(--line); border-radius: 14px; }
.media-manager h3 { margin: 0; }
.media-manager form { padding: 0; }
.media-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.media-row:last-child { border-bottom: 0; }
.media-row p { margin: 4px 0; font-size: .8rem; }
.media-preview { display: block; width: 100%; max-height: min(68dvh, 620px); object-fit: contain; border-radius: 12px; background: var(--paper); }
#media-preview-content audio { width: 100%; }
#media-edit-form h4 { margin: 0; }
.spec-editor { display: grid; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; }
.spec-head, .spec-row { display: flex; align-items: end; gap: 8px; justify-content: space-between; }
.spec-row .field { flex: 1; }
.product-specs { display: grid; grid-template-columns: max-content 1fr; gap: 7px 14px; margin: 16px 0; font-size: .9rem; }
.product-specs dt { color: var(--muted); font-weight: 700; }.product-specs dd { margin: 0; }

.bottom-nav {
  position: fixed;
  right: max(12px, env(safe-area-inset-right));
  bottom: max(10px, var(--safe-bottom));
  left: max(12px, env(safe-area-inset-left));
  z-index: 12;
  display: flex;
  width: min(560px, calc(100% - 24px));
  margin-inline: auto;
  gap: 5px;
  padding: 6px;
  border-radius: 16px;
}
.nav-button { min-height: 46px; flex: 1; border: 0; border-radius: 10px; background: transparent; color: var(--muted); font-size: .78rem; font-weight: 800; cursor: pointer; }
.nav-button.active { background: var(--navy); color: #fff; }
.compare-tray { position: fixed; right: 50%; bottom: calc(76px + var(--safe-bottom)); z-index: 11; display: flex; width: min(430px, calc(100% - 28px)); padding: 7px 10px; align-items: center; gap: 8px; border-radius: 14px; transform: translateX(50%); }
.compare-tray span { flex: 1; font-size: .82rem; font-weight: 750; }

.dialog { width: min(680px, calc(100% - 24px)); max-height: calc(100dvh - var(--safe-top) - var(--safe-bottom) - 24px); padding: 0; overflow: auto; border: 0; border-radius: 22px; background: var(--surface-solid); color: var(--ink); box-shadow: 0 30px 100px rgb(17 35 55 / 32%); }
.dialog.wide { width: min(900px, calc(100% - 24px)); }
.dialog::backdrop { background: rgb(17 35 55 / 44%); backdrop-filter: blur(5px); }
.close { position: sticky; top: 10px; left: 10px; z-index: 3; float: left; width: 44px; height: 44px; margin: 10px; border: 1px solid var(--line); border-radius: 50%; background: var(--surface-solid); color: var(--ink); font-size: 1.5rem; cursor: pointer; }
.detail-layout { display: grid; clear: both; }
.detail-image, .detail-image-empty { width: 100%; height: clamp(220px, 48vw, 360px); object-fit: contain; background: linear-gradient(145deg, #edf7f7, #eef2fb); }
.detail-image-empty { display: grid; place-items: center; color: var(--muted); }
.detail-copy, form, .dialog-body { clear: both; padding: 22px; }
.detail-copy h2, form h2, .dialog-body h2 { margin: 0 0 12px; line-height: 1.35; }
.detail-copy > p { color: var(--muted); white-space: pre-line; }
.detail-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-top: 18px; }
.detail-source { margin-top: 14px; font-size: .8rem; color: var(--muted); }
form { display: grid; gap: 13px; }
.error-summary { padding: 10px 12px; border: 1px solid color-mix(in srgb, var(--danger) 38%, transparent); border-radius: 10px; background: color-mix(in srgb, var(--rose) 20%, transparent); color: var(--danger); font-size: .84rem; }
.compare-grid { display: grid; grid-template-columns: repeat(var(--compare-count, 2), minmax(0, 1fr)); gap: 1px; overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: var(--line); }
.compare-item { padding: 12px; background: var(--surface-solid); }
.compare-item h3 { font-size: .9rem; line-height: 1.45; }
.compare-item p { color: var(--muted); font-size: .8rem; }
.toast { position: fixed; right: 50%; bottom: calc(84px + var(--safe-bottom)); z-index: 40; max-width: min(90vw, 480px); padding: 11px 15px; border-radius: 11px; background: var(--navy); color: #fff; opacity: 0; pointer-events: none; transform: translate(50%, 14px); transition: opacity 180ms ease, transform 180ms ease; }
.toast.show { opacity: 1; transform: translate(50%, 0); }
.access-error { width: min(560px, 100%); margin: 16vh auto 0; padding: 28px; border-radius: var(--radius); background: var(--surface-solid); text-align: center; }

@media (hover: hover) { .product:hover { transform: translateY(-2px); box-shadow: 0 12px 32px rgb(17 35 55 / 12%); } }
@media (min-width: 700px) {
  .hero { grid-template-columns: 1.2fr .8fr; align-items: end; }
  .brand-strip { align-content: end; justify-content: flex-end; flex-wrap: wrap; }
  .products { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
  .filter-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .metrics { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .dashboard-grid { grid-template-columns: 1fr 1fr; }
  .admin-tools { grid-template-columns: minmax(220px, 1.5fr) repeat(4, minmax(125px, 1fr)); align-items: end; }
  .admin-tools .field:first-child { grid-column: auto; }
  .admin-tools.compact { grid-template-columns: 2fr 1fr; }
  .detail-layout { grid-template-columns: .9fr 1.1fr; }
}
@media (max-width: 699px) {
  .hero { min-height: 185px; padding: 24px 20px; }
  .hero h1 { font-size: clamp(1.8rem, 9vw, 2.5rem); }
  .admin-heading { align-items: flex-start; flex-direction: column; }
  .admin-heading .button { width: 100%; }
  table { display: none; }
  .user-cards { display: grid; gap: 10px; padding: 10px; }
  .user-card { display: grid; gap: 7px; padding: 13px; border: 1px solid var(--line); border-radius: 13px; }
  .user-card-head { display: flex; justify-content: space-between; gap: 10px; }
  .user-card dl { display: grid; grid-template-columns: auto 1fr; gap: 5px 10px; margin: 0; font-size: .8rem; }
  .user-card dt { color: var(--muted); }
  .user-card dd { margin: 0; }
  .row-actions button { flex: 1; }
  .media-row { align-items: stretch; flex-direction: column; }
  .media-row .row-actions { width: 100%; }
  .detail-actions { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
@media (prefers-reduced-transparency: reduce) {
  .glass, .glass-lite { border-color: var(--line); background: var(--surface-solid); box-shadow: 0 6px 20px rgb(17 35 55 / 8%); backdrop-filter: none; -webkit-backdrop-filter: none; }
}
@media (prefers-color-scheme: dark) {
  :root { --paper: var(--tg-theme-bg-color, #101b29); --surface: color-mix(in srgb, var(--tg-theme-secondary-bg-color, #17283a) 88%, transparent); --surface-solid: var(--tg-theme-secondary-bg-color, #17283a); --ink: var(--tg-theme-text-color, #eff5fa); --muted: var(--tg-theme-hint-color, #b8c5d1); --line: color-mix(in srgb, var(--ink) 17%, transparent); --button: var(--tg-theme-button-color, #e8f2f7); --button-text: var(--tg-theme-button-text-color, #112337); --brand-logo-filter: none; --shadow: 0 16px 48px rgb(0 0 0 / 24%); }
  body::before { background: radial-gradient(circle at 2% 0%, rgb(49 133 130 / 25%), transparent 28rem), radial-gradient(circle at 98% 22%, rgb(140 75 92 / 20%), transparent 24rem); }
  .glass, .glass-lite { border-color: rgb(255 255 255 / 13%); box-shadow: inset 0 1px 0 rgb(255 255 255 / 12%), var(--shadow); }
  .product-image, .image-empty, .detail-image, .detail-image-empty { background: linear-gradient(145deg, #192f3d, #1b2942); }
  .segmented button.active, .admin-nav button.active, .nav-button.active { background: #e8f2f7; color: #112337; }
  .preview-note, .toast { background: #e8f2f7; color: #112337; }
}

/* A manual choice overrides the system preference; no choice keeps system behavior. */
:root[data-theme="light"] { color-scheme: light; --paper: #f4f7fa; --surface: color-mix(in srgb, #fff 82%, transparent); --surface-solid: #fff; --ink: #112337; --muted: #5f6f7e; --link: #204ce5; --button: #112337; --button-text: #fff; --brand-logo-filter: brightness(0) saturate(100%) invert(11%) sepia(21%) saturate(1348%) hue-rotate(174deg) brightness(90%) contrast(95%); --line: color-mix(in srgb, #112337 13%, transparent); --shadow: 0 16px 48px rgb(17 35 55 / 10%); }
:root[data-theme="dark"] { color-scheme: dark; --paper: #101b29; --surface: color-mix(in srgb, #17283a 88%, transparent); --surface-solid: #17283a; --ink: #eff5fa; --muted: #b8c5d1; --link: #66ccc6; --button: #e8f2f7; --button-text: #112337; --brand-logo-filter: none; --line: color-mix(in srgb, #eff5fa 17%, transparent); --shadow: 0 16px 48px rgb(0 0 0 / 24%); }
:root[data-theme="light"] body::before { background: radial-gradient(circle at 2% 0%, rgb(76 174 167 / 18%), transparent 28rem), radial-gradient(circle at 98% 22%, rgb(226 182 126 / 18%), transparent 24rem); }
:root[data-theme="light"] .glass, :root[data-theme="light"] .glass-lite { border-color: var(--line); box-shadow: var(--shadow); }
:root[data-theme="light"] .product-image, :root[data-theme="light"] .image-empty, :root[data-theme="light"] .detail-image, :root[data-theme="light"] .detail-image-empty { background: linear-gradient(145deg, #eaf0f5, #d8e4ec); }
:root[data-theme="light"] .segmented button.active, :root[data-theme="light"] .admin-nav button.active, :root[data-theme="light"] .nav-button.active { background: #112337; color: #fff; }
:root[data-theme="light"] .preview-note, :root[data-theme="light"] .toast { background: #112337; color: #fff; }
