/* PAX Product Helper - UI styles */
:root {
  --bg: #f5f6f8;
  --panel: #ffffff;
  --panel-2: #f9fafb;
  --ink: #0f172a;
  --ink-2: #334155;
  --muted: #64748b;
  --faint: #94a3b8;
  --line: #e4e7ec;
  --line-2: #eef0f3;
  --accent: #d7141a;
  --accent-2: #b50f14;
  --accent-soft: #fdecec;
  --accent-ink: #ffffff;
  --good: #15803d;  --good-soft: #e8f6ee;
  --warn: #b45309;  --warn-soft: #fdf3e2;
  --bad: #c2410c;   --bad-soft: #fdeee6;
  --info: #1d4ed8;  --info-soft: #e8efff;
  --muted-soft: #eef1f5;
  --shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 1px 3px rgba(16, 24, 40, .06);
  --shadow-lg: 0 12px 32px rgba(16, 24, 40, .14), 0 2px 6px rgba(16, 24, 40, .06);
  --radius: 12px;
  --radius-sm: 8px;
  --header-h: 60px;
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #0b0f16; --panel: #121822; --panel-2: #161d29; --ink: #e6ebf2; --ink-2: #c3ccd8; --muted: #8b97a8; --faint: #64708a;
  --line: #243041; --line-2: #1c2533; --accent: #ef4444; --accent-2: #f87171; --accent-soft: #3a1618;
  --good: #4ade80; --good-soft: #10291b; --warn: #fbbf24; --warn-soft: #2e2410; --bad: #fb923c; --bad-soft: #2f1a0e;
  --info: #7aa2ff; --info-soft: #152243; --muted-soft: #1b2331;
  --shadow: 0 1px 2px rgba(0,0,0,.4); --shadow-lg: 0 16px 40px rgba(0,0,0,.5);
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b0f16; --panel: #121822; --panel-2: #161d29; --ink: #e6ebf2; --ink-2: #c3ccd8; --muted: #8b97a8; --faint: #64708a;
    --line: #243041; --line-2: #1c2533; --accent: #ef4444; --accent-2: #f87171; --accent-soft: #3a1618;
    --good: #4ade80; --good-soft: #10291b; --warn: #fbbf24; --warn-soft: #2e2410; --bad: #fb923c; --bad-soft: #2f1a0e;
    --info: #7aa2ff; --info-soft: #152243; --muted-soft: #1b2331;
    --shadow: 0 1px 2px rgba(0,0,0,.4); --shadow-lg: 0 16px 40px rgba(0,0,0,.5);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--ink); font-family: var(--font); font-size: 14px; line-height: 1.45; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
img { max-width: 100%; }
::selection { background: var(--accent-soft); }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.mono { font-family: var(--mono); font-size: 12.5px; }
.nowrap { white-space: nowrap; }
.hidden { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

.boot { height: 100vh; display: grid; place-items: center; }
.spinner { width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--accent); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- buttons & inputs */
.btn { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--panel); color: var(--ink); cursor: pointer; font-weight: 500; white-space: nowrap; transition: background .12s, border-color .12s, box-shadow .12s; }
.btn:hover { border-color: #cfd5dd; background: var(--panel-2); }
.btn:focus-visible, .input:focus-visible, select:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { background: var(--accent-2); border-color: var(--accent-2); }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: var(--muted-soft); }
.btn.sm { height: 28px; padding: 0 9px; font-size: 13px; }
.btn.xs { height: 24px; padding: 0 7px; font-size: 12px; border-radius: 6px; }
.btn.danger { color: var(--bad); }
.btn.on { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn svg { width: 16px; height: 16px; flex: none; }
.input, select.input, textarea.input { height: 34px; padding: 0 10px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--panel); width: 100%; }
textarea.input { height: auto; padding: 8px 10px; min-height: 70px; }
.input::placeholder { color: var(--faint); }
label.field { display: grid; gap: 5px; font-size: 13px; color: var(--ink-2); font-weight: 500; }
.check { display: flex; align-items: center; gap: 8px; cursor: pointer; user-select: none; }
.check input { accent-color: var(--accent); width: 15px; height: 15px; margin: 0; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; background: var(--panel); }
.seg button { border: 0; background: transparent; height: 32px; padding: 0 11px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; color: var(--muted); }
.seg button.on { background: var(--muted-soft); color: var(--ink); font-weight: 600; }
.seg button svg { width: 16px; height: 16px; }

/* ---------- badges & chips */
.badge { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; background: var(--muted-soft); color: var(--ink-2); }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .85; }
.badge.plain::before { display: none; }
.badge.good { background: var(--good-soft); color: var(--good); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.bad { background: var(--bad-soft); color: var(--bad); }
.badge.info { background: var(--info-soft); color: var(--info); }
.badge.muted { background: var(--muted-soft); color: var(--muted); }
.badge.accent { background: var(--accent-soft); color: var(--accent); }
.chip { display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 8px; border-radius: 6px; border: 1px solid var(--line); font-size: 12px; color: var(--ink-2); background: var(--panel); white-space: nowrap; }
.chips { display: flex; flex-wrap: wrap; gap: 5px; }
.pill { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 6px 0 10px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: 12.5px; font-weight: 500; }
.pill button { border: 0; background: transparent; color: inherit; cursor: pointer; width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; padding: 0; }
.pill button:hover { background: rgba(215,20,26,.12); }
.kbd { font-family: var(--mono); font-size: 11px; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 4px; padding: 0 4px; color: var(--muted); background: var(--panel); }

/* ---------- layout */
.topbar { position: sticky; top: 0; z-index: 40; height: var(--header-h); display: flex; align-items: center; gap: 18px; padding: 0 20px; background: color-mix(in srgb, var(--panel) 88%, transparent); backdrop-filter: saturate(180%) blur(10px); -webkit-backdrop-filter: saturate(180%) blur(10px); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: -.01em; font-size: 15px; white-space: nowrap; }
.brand .logo { width: 30px; height: 30px; border-radius: 8px; background: var(--accent); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 13px; letter-spacing: .02em; }
.brand small { display: block; font-weight: 500; color: var(--muted); font-size: 11.5px; margin-top: -2px; }
.nav { display: flex; gap: 2px; }
.nav a { height: 34px; padding: 0 11px; display: inline-flex; align-items: center; gap: 6px; border-radius: var(--radius-sm); color: var(--muted); font-weight: 500; }
.nav a:hover { background: var(--muted-soft); color: var(--ink); }
.nav a.on { color: var(--ink); background: var(--muted-soft); font-weight: 600; }
.nav .count { min-width: 18px; height: 18px; border-radius: 9px; background: var(--accent); color: #fff; font-size: 11px; display: inline-grid; place-items: center; padding: 0 5px; font-weight: 700; }
.top-search { flex: 1; max-width: 520px; position: relative; }
.top-search .input { padding-left: 34px; height: 36px; background: var(--panel-2); }
.top-search svg { position: absolute; left: 10px; top: 10px; width: 16px; height: 16px; color: var(--faint); }
.top-search .kbd { position: absolute; right: 9px; top: 9px; }
.top-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--ink); color: var(--panel); display: grid; place-items: center; font-weight: 700; font-size: 12px; cursor: pointer; border: 0; }
.menu { position: absolute; right: 16px; top: calc(var(--header-h) - 6px); background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-lg); min-width: 220px; padding: 6px; z-index: 60; }
.menu .who { padding: 8px 10px 10px; border-bottom: 1px solid var(--line-2); margin-bottom: 6px; }
.menu button, .menu a { display: flex; width: 100%; align-items: center; gap: 8px; border: 0; background: transparent; padding: 8px 10px; border-radius: 6px; cursor: pointer; text-align: left; }
.menu button:hover, .menu a:hover { background: var(--muted-soft); }

.page { max-width: 1520px; margin: 0 auto; padding: 20px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 16px; flex-wrap: wrap; }
.page-head h1 { font-size: 22px; margin: 0; letter-spacing: -.02em; }
.page-head p { margin: 4px 0 0; color: var(--muted); }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.panel-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line-2); }
.panel-h h2, .panel-h h3 { margin: 0; font-size: 15px; }
.panel-b { padding: 16px; }

/* ---------- catalog */
.cat-tabs { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 2px; margin-bottom: 14px; scrollbar-width: thin; }
.cat-tab { flex: none; display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel); cursor: pointer; font-weight: 500; color: var(--ink-2); }
.cat-tab:hover { border-color: #cbd2db; }
.cat-tab .n { font-size: 12px; color: var(--muted); font-weight: 600; }
.cat-tab.on { background: var(--ink); color: var(--panel); border-color: var(--ink); }
.cat-tab.on .n { color: var(--panel); opacity: .7; }
.catalog { display: grid; grid-template-columns: 272px minmax(0, 1fr); gap: 20px; align-items: start; }
.sidebar { position: sticky; top: calc(var(--header-h) + 16px); max-height: calc(100vh - var(--header-h) - 32px); overflow: auto; padding-right: 2px; scrollbar-width: thin; }
.sidebar .panel { overflow: hidden; }
.side-sec { border-bottom: 1px solid var(--line-2); }
.side-sec:last-child { border-bottom: 0; }
.side-sec > button { width: 100%; display: flex; align-items: center; justify-content: space-between; border: 0; background: transparent; padding: 11px 14px; cursor: pointer; font-weight: 600; font-size: 13px; }
.side-sec > button .sel { color: var(--accent); font-size: 12px; font-weight: 600; margin-left: auto; margin-right: 8px; }
.side-sec > button svg { width: 14px; height: 14px; color: var(--faint); transition: transform .15s; }
.side-sec.closed > button svg { transform: rotate(-90deg); }
.side-sec.closed .side-body { display: none; }
.side-body { padding: 0 14px 12px; display: grid; gap: 2px; }
.facet-opt { display: flex; align-items: center; gap: 8px; padding: 4px 6px; margin: 0 -6px; border-radius: 6px; cursor: pointer; font-size: 13px; }
.facet-opt:hover { background: var(--muted-soft); }
.facet-opt input { accent-color: var(--accent); margin: 0; }
.facet-opt .lbl { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.facet-opt .n { color: var(--faint); font-size: 12px; font-variant-numeric: tabular-nums; }
.facet-opt.zero { opacity: .45; }
.more-link { border: 0; background: transparent; color: var(--accent); cursor: pointer; font-size: 12.5px; padding: 4px 0; text-align: left; }
.side-top { padding: 12px 14px; display: grid; gap: 10px; border-bottom: 1px solid var(--line-2); }
.spec-filter-row { display: grid; grid-template-columns: 1fr; gap: 6px; padding: 8px; border: 1px dashed var(--line); border-radius: 8px; margin-bottom: 6px; position: relative; }
.spec-filter-row .x { position: absolute; right: 4px; top: 4px; }

.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.toolbar .count { font-weight: 600; }
.toolbar .spacer { flex: 1; }
.active-pills { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.card { position: relative; display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: box-shadow .15s, transform .15s, border-color .15s; cursor: pointer; }
.card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); border-color: #d6dbe2; }
.card .img { height: 196px; background: linear-gradient(180deg, var(--panel-2), var(--panel)); display: grid; place-items: center; padding: 16px; border-bottom: 1px solid var(--line-2); position: relative; }
.card .img img { max-height: 164px; max-width: 100%; width: auto; height: auto; object-fit: contain; filter: drop-shadow(0 6px 10px rgba(0,0,0,.08)); }
.card .img .ph { font-size: 26px; font-weight: 800; color: var(--line); letter-spacing: -.02em; }
.card .status { position: absolute; left: 10px; top: 10px; }
.card .cmp { position: absolute; right: 8px; top: 8px; }
.card .body { padding: 12px 14px 14px; display: grid; gap: 8px; flex: 1; align-content: start; }
.card h3 { margin: 0; font-size: 15.5px; letter-spacing: -.01em; }
.card .sub { font-size: 12.5px; color: var(--muted); margin-top: 1px; }
.card .kv { display: grid; grid-template-columns: 74px 1fr; gap: 3px 8px; font-size: 12.5px; }
.card .kv dt { color: var(--muted); }
.card .kv dd { margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card .eol-line { font-size: 12px; padding: 6px 8px; border-radius: 6px; background: var(--warn-soft); color: var(--warn); }
.cmp-btn { width: 30px; height: 30px; border-radius: 8px; border: 1px solid var(--line); background: color-mix(in srgb, var(--panel) 92%, transparent); display: grid; place-items: center; cursor: pointer; color: var(--muted); }
.cmp-btn:hover { color: var(--ink); border-color: #c7ced8; }
.cmp-btn.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.cmp-btn svg { width: 16px; height: 16px; }

.table-wrap { overflow: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); max-height: calc(100vh - 220px); }
table.t { border-collapse: separate; border-spacing: 0; width: 100%; font-size: 13px; }
table.t th, table.t td { padding: 9px 12px; border-bottom: 1px solid var(--line-2); text-align: left; vertical-align: top; }
table.t th { position: sticky; top: 0; background: var(--panel-2); z-index: 2; font-weight: 600; color: var(--ink-2); font-size: 12.5px; white-space: nowrap; cursor: default; }
table.t th.sortable { cursor: pointer; }
table.t th.sortable:hover { color: var(--ink); }
table.t tbody tr:hover td { background: var(--panel-2); }
table.t td.name { font-weight: 600; white-space: nowrap; }
table.t td .cell { max-width: 280px; min-width: 90px; white-space: pre-line; }
table.t .first { position: sticky; left: 0; background: var(--panel); z-index: 1; }
table.t th.first { z-index: 3; background: var(--panel-2); }
table.t tbody tr:hover td.first { background: var(--panel-2); }
.thumb { width: 36px; height: 36px; object-fit: contain; border-radius: 6px; background: var(--panel-2); flex: none; }
.name-cell { display: flex; align-items: center; gap: 10px; }

.empty { padding: 60px 20px; text-align: center; color: var(--muted); }
.empty h3 { color: var(--ink); margin: 8px 0 4px; }

/* ---------- compare tray */
.tray { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 45; background: var(--ink); color: var(--panel); border-radius: 14px; box-shadow: var(--shadow-lg); padding: 8px 8px 8px 16px; display: flex; align-items: center; gap: 12px; max-width: calc(100vw - 32px); }
.tray .slots { display: flex; gap: 6px; }
.tray .slot { display: flex; align-items: center; gap: 6px; height: 34px; padding: 0 6px 0 10px; border-radius: 9px; background: rgba(255,255,255,.1); font-size: 13px; white-space: nowrap; }
.tray .slot button { border: 0; background: transparent; color: inherit; opacity: .7; cursor: pointer; }
.tray .slot.empty { border: 1px dashed rgba(255,255,255,.3); background: transparent; opacity: .6; padding: 0 12px; }
.tray .btn.primary { height: 34px; }
:root[data-theme="dark"] .tray { background: #e6ebf2; color: #0b0f16; }

/* ---------- product detail */
.crumbs { display: flex; align-items: center; gap: 6px; color: var(--muted); margin-bottom: 14px; font-size: 13px; }
.crumbs a:hover { color: var(--ink); }
.hero { display: grid; grid-template-columns: minmax(260px, 380px) minmax(0, 1fr); gap: 24px; }
.hero .shot { background: linear-gradient(180deg, var(--panel-2), var(--panel)); border: 1px solid var(--line); border-radius: var(--radius); aspect-ratio: 1 / 1; display: grid; place-items: center; padding: 28px; }
.hero .shot img { max-height: 320px; max-width: 100%; width: auto; object-fit: contain; filter: drop-shadow(0 12px 18px rgba(0,0,0,.12)); }
.hero h1 { margin: 6px 0 4px; font-size: 28px; letter-spacing: -.025em; }
.hero .lead { color: var(--ink-2); font-size: 14.5px; max-width: 760px; }
.hero .actions { display: flex; gap: 8px; flex-wrap: wrap; margin: 14px 0 4px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; margin-top: 16px; }
.tile { display: flex; gap: 11px; align-items: flex-start; border: 1px solid var(--line); border-radius: 12px; padding: 11px 12px; background: var(--panel); transition: border-color .15s, box-shadow .15s; }
.tile:hover { border-color: color-mix(in srgb, var(--tc) 45%, var(--line)); box-shadow: var(--shadow); }
.tile .ic { flex: none; width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; color: var(--tc); background: color-mix(in srgb, var(--tc) 13%, transparent); }
.tile .ic svg { width: 19px; height: 19px; }
.tile .tx { min-width: 0; }
.tile .k { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; font-weight: 600; }
.tile .v { margin-top: 2px; font-weight: 600; font-size: 13.5px; white-space: pre-line; overflow-wrap: anywhere; line-height: 1.35; }
.tone-red { --tc: #dc2626; } .tone-blue { --tc: #2563eb; } .tone-violet { --tc: #7c3aed; } .tone-green { --tc: #16a34a; }
.tone-teal { --tc: #0d9488; } .tone-amber { --tc: #d97706; } .tone-slate { --tc: #64748b; }
:root[data-theme="dark"] .tone-red { --tc: #f87171; } :root[data-theme="dark"] .tone-blue { --tc: #60a5fa; } :root[data-theme="dark"] .tone-violet { --tc: #a78bfa; }
:root[data-theme="dark"] .tone-green { --tc: #4ade80; } :root[data-theme="dark"] .tone-teal { --tc: #2dd4bf; } :root[data-theme="dark"] .tone-amber { --tc: #fbbf24; } :root[data-theme="dark"] .tone-slate { --tc: #94a3b8; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .tone-red { --tc: #f87171; } :root:not([data-theme="light"]) .tone-blue { --tc: #60a5fa; } :root:not([data-theme="light"]) .tone-violet { --tc: #a78bfa; } :root:not([data-theme="light"]) .tone-green { --tc: #4ade80; } :root:not([data-theme="light"]) .tone-teal { --tc: #2dd4bf; } :root:not([data-theme="light"]) .tone-amber { --tc: #fbbf24; } :root:not([data-theme="light"]) .tone-slate { --tc: #94a3b8; } }
.spec-group h3.gh { display: flex; align-items: center; gap: 8px; }
.spec-group h3.gh svg { width: 17px; height: 17px; color: var(--accent); }
.pn-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.pn { font-family: var(--mono); font-size: 12px; background: var(--muted-soft); border-radius: 6px; padding: 3px 7px; cursor: copy; border: 0; }
.pn:hover { background: var(--accent-soft); color: var(--accent); }
.features { margin: 10px 0 0; padding-left: 18px; color: var(--ink-2); columns: 2; column-gap: 28px; }
.features li { margin: 2px 0; break-inside: avoid; }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin: 26px 0 16px; overflow-x: auto; }
.tabs button { border: 0; background: transparent; padding: 10px 12px; cursor: pointer; color: var(--muted); font-weight: 500; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs button.on { color: var(--ink); border-bottom-color: var(--accent); font-weight: 600; }
.tabs button .n { font-size: 11.5px; color: var(--faint); margin-left: 3px; }

.spec-groups { columns: 3 380px; column-gap: 14px; }
.spec-groups > .panel { break-inside: avoid; margin-bottom: 14px; display: inline-block; width: 100%; }
.spec-group h3 { margin: 0; font-size: 13.5px; }
.spec-rows { display: grid; }
.spec-row { display: grid; grid-template-columns: 190px 1fr; gap: 12px; padding: 7px 16px; border-top: 1px solid var(--line-2); font-size: 13px; }
.spec-row:first-child { border-top: 0; }
.spec-row .k { color: var(--muted); }
.spec-row .v { white-space: pre-line; overflow-wrap: anywhere; }
.spec-row.none .v { color: var(--faint); }
.spec-row.tbd .v { color: var(--warn); }
mark { background: #fff1a8; color: inherit; border-radius: 2px; padding: 0 1px; }
:root[data-theme="dark"] mark { background: #5b4b00; }

/* timeline */
.milestones { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0; position: relative; margin: 8px 0 4px; }
.ms { padding: 26px 8px 0; position: relative; text-align: center; font-size: 12px; }
.ms::before { content: ""; position: absolute; left: 0; right: 0; top: 9px; height: 3px; background: var(--line); }
.ms:first-child::before { left: 50%; }
.ms:last-child::before { right: 50%; }
.ms .dot { position: absolute; top: 3px; left: 50%; transform: translateX(-50%); width: 15px; height: 15px; border-radius: 50%; background: var(--panel); border: 3px solid var(--line); z-index: 1; }
.ms.past .dot { background: var(--muted); border-color: var(--muted); }
.ms.past::before { background: var(--muted); }
.ms.next .dot { border-color: var(--warn); background: var(--warn-soft); box-shadow: 0 0 0 4px var(--warn-soft); }
.ms .d { font-weight: 700; font-size: 13px; }
.ms .l { color: var(--muted); line-height: 1.3; margin-top: 2px; }
.notice { padding: 10px 12px; border-radius: 8px; font-size: 13px; background: var(--info-soft); color: var(--info); }
.notice.warn { background: var(--warn-soft); color: var(--warn); }
.notice.bad { background: var(--bad-soft); color: var(--bad); }

/* compare */
.cmp-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; table-layout: fixed; }
.cmp-table th, .cmp-table td { padding: 9px 14px; border-bottom: 1px solid var(--line-2); vertical-align: top; text-align: left; }
.cmp-table td { white-space: pre-line; overflow-wrap: anywhere; }
.cmp-table thead th { position: sticky; top: var(--header-h); background: var(--panel); z-index: 3; border-bottom: 1px solid var(--line); vertical-align: bottom; }
.cmp-table th.k { width: 210px; color: var(--muted); font-weight: 500; }
.cmp-table tr.grp td { background: var(--panel-2); font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-2); padding-top: 12px; }
.cmp-table tr.diff td.v { background: color-mix(in srgb, var(--warn-soft) 65%, transparent); }
.cmp-head { display: grid; gap: 8px; justify-items: start; }
.cmp-head .img { width: 100%; height: 130px; display: grid; place-items: center; background: var(--panel-2); border-radius: 10px; padding: 10px; }
.cmp-head .img img { max-height: 110px; max-width: 100%; width: auto; object-fit: contain; }
.cmp-head h3 { margin: 0; font-size: 16px; }
.cmp-add { height: 100%; min-height: 190px; border: 2px dashed var(--line); border-radius: 12px; display: grid; place-items: center; color: var(--muted); padding: 14px; }

/* lifecycle gantt */
.gantt { position: relative; }
.g-row { display: grid; grid-template-columns: 220px 1fr; align-items: center; min-height: 38px; border-bottom: 1px solid var(--line-2); }
.g-row .g-name { padding: 6px 12px; font-weight: 600; font-size: 13px; display: flex; align-items: center; gap: 8px; min-width: 0; }
.g-row .g-name span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.g-track { position: relative; height: 38px; }
.g-seg { position: absolute; top: 12px; height: 14px; border-radius: 3px; }
.g-seg.s1 { background: #f2c14e; }
.g-seg.s2 { background: #e98b3a; }
.g-seg.s3 { background: #c9ced6; }
.g-seg.s0 { background: #7cc59a; }
:root[data-theme="dark"] .g-seg.s3 { background: #3a4556; }
.g-mark { position: absolute; top: 8px; width: 2px; height: 22px; background: var(--ink); opacity: .55; }
.g-today { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--accent); z-index: 2; }
.g-axis .g-today::after { content: "Today"; position: absolute; top: -18px; left: -16px; font-size: 11px; color: var(--accent); font-weight: 700; }
.g-axis { display: grid; grid-template-columns: 220px 1fr; position: sticky; top: var(--header-h); background: var(--panel); z-index: 3; border-bottom: 1px solid var(--line); }
.g-axis .ticks { position: relative; height: 34px; }
.g-axis .g-today { top: 22px; bottom: 0; }
.g-axis .tick { position: absolute; top: 10px; font-size: 11px; color: var(--muted); transform: translateX(-50%); white-space: nowrap; }
.g-grid { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--line-2); }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.legend i { display: inline-block; width: 14px; height: 10px; border-radius: 2px; margin-right: 5px; vertical-align: -1px; }

/* stats */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 16px; }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.stat .k { font-size: 12px; color: var(--muted); font-weight: 600; }
.stat .v { font-size: 26px; font-weight: 700; letter-spacing: -.02em; margin-top: 2px; font-variant-numeric: tabular-nums; }
.two-col { display: grid; grid-template-columns: 1.4fr 1fr; gap: 16px; }
.bars { display: flex; align-items: flex-end; gap: 3px; height: 120px; padding-top: 8px; }
.bars .b { flex: 1; max-width: 26px; background: var(--accent); opacity: .85; border-radius: 3px 3px 0 0; min-height: 2px; position: relative; }
.bars .b:hover { opacity: 1; }

/* login */
.login-wrap { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.login-art { background: radial-gradient(1200px 600px at 20% 10%, #3b0d10 0%, #14080a 45%, #07070a 100%); color: #fff; padding: 48px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.login-art h2 { font-size: 38px; letter-spacing: -.03em; line-height: 1.1; margin: 0 0 12px; max-width: 520px; }
.login-art p { color: rgba(255,255,255,.7); max-width: 460px; font-size: 15px; }
.login-art .grid-bg { position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px); background-size: 42px 42px; mask-image: linear-gradient(180deg, #000, transparent 85%); }
.login-art .glow { position: absolute; width: 420px; height: 420px; right: -120px; bottom: -120px; background: radial-gradient(circle, rgba(215,20,26,.55), transparent 65%); filter: blur(10px); }
.login-art > * { position: relative; }
.login-form { display: grid; place-items: center; padding: 32px; background: var(--panel); }
.login-card { width: 100%; max-width: 360px; display: grid; gap: 14px; }
.login-card h1 { margin: 0; font-size: 24px; letter-spacing: -.02em; }
.login-card .btn.primary { height: 40px; justify-content: center; }
.login-card .input { height: 40px; }
.err { color: var(--bad); font-size: 13px; min-height: 18px; }

/* modal & toast */
.modal-bg { position: fixed; inset: 0; background: rgba(10, 14, 22, .45); z-index: 80; display: grid; place-items: center; padding: 20px; animation: fade .12s; }
.modal { width: 100%; max-width: 460px; background: var(--panel); border-radius: 14px; box-shadow: var(--shadow-lg); border: 1px solid var(--line); animation: pop .14s; max-height: calc(100vh - 40px); overflow: auto; }
.modal.wide { max-width: 720px; }
.modal-h { padding: 16px 18px 6px; display: flex; justify-content: space-between; align-items: center; }
.modal-h h3 { margin: 0; font-size: 17px; }
.modal-b { padding: 10px 18px; display: grid; gap: 12px; }
.modal-f { padding: 12px 18px 16px; display: flex; justify-content: flex-end; gap: 8px; }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(6px) scale(.98); } }
#toast { position: fixed; bottom: 22px; right: 22px; z-index: 100; display: grid; gap: 8px; }
.toast { background: var(--ink); color: var(--panel); padding: 10px 14px; border-radius: 10px; box-shadow: var(--shadow-lg); font-size: 13px; animation: pop .15s; max-width: 380px; }
.toast.bad { background: var(--bad); color: #fff; }

/* search palette */
.palette { position: fixed; inset: 0; z-index: 90; background: rgba(10,14,22,.4); display: flex; justify-content: center; align-items: flex-start; padding-top: 12vh; }
.palette .box { width: 620px; max-width: calc(100vw - 32px); background: var(--panel); border-radius: 14px; box-shadow: var(--shadow-lg); overflow: hidden; border: 1px solid var(--line); }
.palette input { border: 0; outline: 0; width: 100%; padding: 16px 18px; font-size: 16px; background: transparent; border-bottom: 1px solid var(--line); }
.palette .res { max-height: 50vh; overflow: auto; padding: 6px; }
.palette .it { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 8px; cursor: pointer; }
.palette .it.on, .palette .it:hover { background: var(--muted-soft); }
.palette .it .t { font-weight: 600; }
.palette .it .s { font-size: 12px; color: var(--muted); }

.link { color: var(--accent); cursor: pointer; }
.link:hover { text-decoration: underline; }
.sep { height: 1px; background: var(--line-2); margin: 12px 0; }
.row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.small { font-size: 12.5px; }
.right { text-align: right; }
.tag-new { font-size: 10.5px; font-weight: 800; letter-spacing: .06em; color: var(--accent); }

@media (max-width: 1100px) {
  .catalog { grid-template-columns: 1fr; }
  .sidebar { position: static; max-height: none; }
  .sidebar.collapsed-mobile .side-sec, .sidebar.collapsed-mobile .side-top-more { display: none; }
  .hero { grid-template-columns: 1fr; }
  .hero .shot { max-width: 420px; }
  .two-col { grid-template-columns: 1fr; }
  .top-search { display: none; }
  #searchbtn { display: inline-flex !important; }
}
@media (max-width: 760px) {
  .page { padding: 14px; }
  .topbar { padding: 0 12px; gap: 10px; }
  .brand small { display: none; }
  .brand > div:last-child { display: none; }
  .nav { overflow-x: auto; scrollbar-width: none; flex: 1; min-width: 0; }
  .nav a { padding: 0 8px; font-size: 13px; }
  .top-right { margin-left: 0; }
  .login-wrap { grid-template-columns: 1fr; }
  .login-art { display: none; }
  .spec-groups { grid-template-columns: 1fr; }
  .spec-row { grid-template-columns: 130px 1fr; }
  .features { columns: 1; }
  .milestones { grid-template-columns: 1fr; }
  .ms { text-align: left; padding: 6px 0 6px 28px; }
  .ms::before { left: 8px !important; right: auto !important; width: 3px; top: 0; bottom: 0; height: auto; }
  .ms .dot { left: 9px; top: 9px; }
  .g-row, .g-axis { grid-template-columns: 120px 1fr; }
  .grid2 { grid-template-columns: 1fr; }
}
@media print {
  .topbar, .tray, .sidebar, .toolbar .btn, .no-print { display: none !important; }
  body { background: #fff; }
  .page { max-width: none; padding: 0; }
  .cmp-table thead th { position: static; }
}

/* brochure */
.bro .panel-h h3 svg { width: 18px; height: 18px; color: var(--accent); }
.bro .seg svg { width: 15px; height: 15px; }
.bro-pdf { display: block; width: 100%; height: calc(100vh - 150px); min-height: 560px; border: 0; background: #1e1f22; border-radius: 0 0 var(--radius) var(--radius); }
.bro-stage { position: relative; background: #0b0d12; display: grid; place-items: center; padding: 12px; }
.bro-stage img { max-width: 100%; max-height: calc(100vh - 260px); border-radius: 6px; box-shadow: 0 10px 40px rgba(0,0,0,.45); }
.bro-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(255,255,255,.12); color: #fff; font-size: 28px; line-height: 1; cursor: pointer; backdrop-filter: blur(6px); }
.bro-nav:hover { background: rgba(255,255,255,.25); }
.bro-nav.prev { left: 14px; } .bro-nav.next { right: 14px; }
.bro-count { position: absolute; right: 16px; bottom: 16px; font-size: 12px; color: #fff; background: rgba(0,0,0,.5); padding: 2px 8px; border-radius: 10px; }
.bro-thumbs { display: flex; gap: 8px; overflow-x: auto; padding: 10px 12px; background: var(--panel-2); border-top: 1px solid var(--line-2); border-radius: 0 0 var(--radius) var(--radius); }
.bro-thumbs button { flex: none; border: 2px solid transparent; border-radius: 6px; padding: 0; background: none; cursor: pointer; opacity: .7; }
.bro-thumbs button.on { border-color: var(--accent); opacity: 1; }
.bro-thumbs img { display: block; height: 62px; border-radius: 4px; }
.upd { display: inline-block; margin-left: 6px; padding: 0 6px; border-radius: 999px; font-size: 10.5px; font-weight: 700; line-height: 17px; background: var(--info-soft); color: var(--info); cursor: help; vertical-align: 1px; }

/* accessory pictures */
.acc-img { display: grid; place-items: center; width: 96px; height: 72px; padding: 4px; border: 1px solid var(--line); border-radius: 8px; background: #fff; cursor: zoom-in; position: relative; }
.acc-img img { max-width: 100%; max-height: 100%; object-fit: contain; }
.acc-img.none { cursor: default; font-size: 11px; color: var(--faint); background: var(--panel-2); border-style: dashed; }
.acc-img.big { width: 100%; height: 170px; border: 0; border-bottom: 1px solid var(--line-2); border-radius: 0; padding: 12px; }
.acc-img:hover:not(.none) { border-color: var(--accent); }
.acc-more { position: absolute; right: 4px; bottom: 4px; font-size: 10.5px; font-weight: 700; background: var(--ink); color: var(--panel); border-radius: 8px; padding: 0 5px; }
.acc-table td { vertical-align: middle; }
.acc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.acc-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.acc-card .acc-body { padding: 10px 12px 12px; display: grid; gap: 7px; }
.acc-desc { font-size: 13px; white-space: pre-line; }
.lightbox { position: fixed; inset: 0; z-index: 95; background: rgba(8, 10, 15, .82); display: grid; place-items: center; padding: 30px; animation: fade .12s; }
.lb-inner { background: #fff; border-radius: 12px; padding: 18px; max-width: min(900px, 92vw); display: grid; gap: 10px; justify-items: center; }
.lb-inner img { max-width: 100%; max-height: 72vh; object-fit: contain; }
.lb-cap { color: #334155; font-size: 13px; text-align: center; }
.lb-x { position: absolute; top: 18px; right: 18px; width: 38px; height: 38px; border-radius: 50%; border: 0; background: rgba(255,255,255,.15); color: #fff; cursor: pointer; display: grid; place-items: center; }
.lb-x svg { width: 16px; height: 16px; }
.acc-price { text-align: right; max-width: 45%; font-size: 13px; }
.lb-inner img { min-width: min(560px, 80vw); }

/* picture carousels */
.carousel { position: relative; width: 100%; height: 100%; display: grid; place-items: center; }
.cz-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--line); background: color-mix(in srgb, var(--panel) 92%, transparent); color: var(--ink); font-size: 20px; line-height: 1; cursor: pointer; opacity: 0; transition: opacity .15s; display: grid; place-items: center; padding: 0 0 2px; z-index: 2; box-shadow: var(--shadow); }
.cz-nav.prev { left: 2px; } .cz-nav.next { right: 2px; }
.card:hover .cz-nav, .hero-cz .cz-nav, .carousel:focus-within .cz-nav { opacity: 1; }
@media (hover: none) { .cz-nav { opacity: 1; } }
.cz-dots { position: absolute; bottom: -8px; left: 50%; transform: translateX(-50%); display: flex; gap: 4px; }
.cz-dots span { width: 6px; height: 6px; border-radius: 50%; background: var(--line); }
.cz-dots span.on { background: var(--accent); }
.hero-cz { position: relative; }
.hero-cz .cz-nav { width: 40px; height: 40px; font-size: 26px; }
.hero-cz .cz-nav.prev { left: 12px; } .hero-cz .cz-nav.next { right: 12px; }
.cz-count { position: absolute; right: 12px; bottom: 10px; font-size: 12px; color: var(--muted); background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 0 8px; }
.cz-thumbs { display: flex; gap: 8px; margin-top: 10px; overflow-x: auto; }
.cz-thumbs button { flex: none; width: 62px; height: 62px; border: 2px solid var(--line); border-radius: 8px; background: #fff; padding: 4px; cursor: pointer; display: grid; place-items: center; }
.cz-thumbs button.on { border-color: var(--accent); }
.cz-thumbs img { max-width: 100%; max-height: 100%; object-fit: contain; }

/* admin product editor */
.pe-wrap { display: grid; grid-template-columns: 290px minmax(0, 1fr); gap: 16px; align-items: start; }
.pe-list { position: sticky; top: calc(var(--header-h) + 12px); max-height: calc(100vh - var(--header-h) - 24px); overflow: auto; }
.pe-item { display: flex; align-items: center; gap: 10px; padding: 7px 12px; border-top: 1px solid var(--line-2); }
.pe-item:hover { background: var(--panel-2); }
.pe-item.on { background: var(--accent-soft); }
.pe-item .pe-n { display: grid; flex: 1; min-width: 0; }
.pe-item .pe-n b { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pe-item .pe-n span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pe-sec { margin-top: 14px; }
.pe-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.pe-imgs { display: flex; flex-wrap: wrap; gap: 12px; }
.pe-img { position: relative; width: 160px; border: 1px solid var(--line); border-radius: 10px; background: #fff; overflow: hidden; }
.pe-img.main { border: 2px solid var(--accent); }
.pe-img img { display: block; width: 100%; height: 130px; object-fit: contain; padding: 8px; }
.pe-main { position: absolute; left: 6px; top: 6px; background: var(--accent); color: #fff; font-size: 10.5px; font-weight: 700; border-radius: 8px; padding: 0 6px; }
.pe-img-tools { display: flex; gap: 4px; justify-content: center; padding: 6px; border-top: 1px solid var(--line-2); background: var(--panel-2); }
.pe-group { margin-bottom: 18px; }
.pe-group h4 { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; font-size: 13.5px; }
.pe-group h4 svg { width: 16px; height: 16px; color: var(--accent); }
.pe-row { display: grid; grid-template-columns: 210px minmax(0, 1fr) 190px; gap: 10px; align-items: start; padding: 5px 0; border-top: 1px solid var(--line-2); }
.pe-row label { padding-top: 7px; color: var(--muted); font-size: 13px; }
.pe-row textarea.input { min-height: 34px; resize: vertical; padding: 6px 10px; font-size: 13px; }
.pe-row.edited textarea.input { border-color: var(--warn); background: color-mix(in srgb, var(--warn-soft) 55%, var(--panel)); }
.pe-meta { padding-top: 5px; font-size: 12px; }
.pe-savebar { position: sticky; bottom: 0; margin-top: 14px; display: flex; justify-content: flex-end; align-items: center; gap: 12px; padding: 12px 16px; background: color-mix(in srgb, var(--panel) 94%, transparent); backdrop-filter: blur(8px); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-lg); z-index: 5; }
.upd.edited { background: var(--warn-soft); color: var(--warn); }
@media (max-width: 1100px) { .pe-wrap { grid-template-columns: 1fr; } .pe-list { position: static; max-height: 260px; } .pe-row { grid-template-columns: 1fr; } }
.hero-cz.carousel { height: auto; }
.hero > div:first-child { min-width: 0; }

/* category sections on "All products" */
.sec-jump { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }
.sec-jump a { font-size: 12.5px; padding: 4px 10px; border-radius: 999px; background: var(--muted-soft); color: var(--ink-2); }
.sec-jump a:hover { background: var(--accent-soft); color: var(--accent); }
.sec-jump a span { color: var(--faint); margin-left: 2px; }
.cat-sec { margin-top: 22px; scroll-margin-top: 80px; }
.cat-sec-h { display: flex; align-items: baseline; gap: 10px; padding-bottom: 8px; margin-bottom: 12px; border-bottom: 2px solid var(--line); }
.cat-sec-h h2 { margin: 0; font-size: 19px; letter-spacing: -.015em; position: relative; }
.cat-sec-h h2::before { content: ""; display: inline-block; width: 4px; height: 18px; border-radius: 2px; background: var(--accent); margin-right: 9px; vertical-align: -2px; }
.cat-sec-h .n { color: var(--muted); font-size: 13px; }
.cat-sec-h .link { margin-left: auto; }
table.t tr.grp-row td { background: var(--panel-2); position: sticky; left: 0; padding-top: 12px; border-bottom: 1px solid var(--line); }
table.t tbody tr.grp-row:hover td { background: var(--panel-2); }

/* PAX logo */
.brand-logo { height: 38px; width: auto; display: block; }
.brand-logo.dk { display: none; }
.brand-sep { width: 1px; height: 26px; background: var(--line); margin: 0 2px; }
:root[data-theme="dark"] .brand-logo.lt { display: none; }
:root[data-theme="dark"] .brand-logo.dk { display: block; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .brand-logo.lt { display: none; } :root:not([data-theme="light"]) .brand-logo.dk { display: block; } }
@media (max-width: 760px) { .brand-sep { display: none; } .brand-logo { height: 26px; } }

/* user invites */
.note-box { display: flex; gap: 8px; align-items: flex-start; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--muted-soft); color: var(--muted); }
.note-box svg { width: 16px; height: 16px; flex: none; margin-top: 1px; }
.cred-box { display: grid; grid-template-columns: 1.2fr 1fr .8fr; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--muted-soft); }
.cred-box .k { font-size: 11.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.cred-box .v { font-weight: 600; margin-top: 2px; display: flex; align-items: center; gap: 6px; word-break: break-all; }
.cred-box .v .btn svg { width: 13px; height: 13px; }
.modal textarea.input { height: auto; padding: 10px 12px; line-height: 1.5; font-family: inherit; resize: vertical; }
@media (max-width: 640px) { .cred-box { grid-template-columns: 1fr; } }
