:root {
  --bg: #f4f5f2; --panel: #ffffff; --ink: #1b2420; --muted: #6b7570; --line: #e3e6e1; --soft: #f0f2ee;
  --brand: #0f766e; --brand-ink: #ffffff; --brand-soft: #e2f1ef;
  --best: #dcf3e4; --best-ink: #136c37; --worst: #fbe3e1; --worst-ink: #a12a20;
  --in: #157a3e; --out: #b42318; --pre: #a15c00; --warn: #b26a00; --warn-bg: #fff4dd; --fail-bg: #fdecea;
  --up: #b42318; --down: #136c37;
  --r: 10px; --shadow: 0 1px 2px rgba(20,30,25,.06), 0 4px 14px rgba(20,30,25,.05);
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink);
  font: 14px/1.45 "Segoe UI", "Nirmala UI", "Hind Siliguri", system-ui, sans-serif; }
a { color: var(--brand); cursor: pointer; text-decoration: none; }
h1 { font-size: 22px; margin: 0 0 2px; letter-spacing: -.01em; }
h2 { font-size: 16px; margin: 0; }
h3 { font-size: 14px; margin: 0 0 8px; }
.muted { color: var(--muted); } .small { font-size: 12px; } .hidden { display: none !important; }
input, select, textarea { font: inherit; color: inherit; background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 7px 10px; outline: none; }
input:focus, select:focus, textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
label.f { display: block; font-size: 12px; color: var(--muted); margin: 10px 0 4px; font-weight: 600; }
label.f + input, label.f + select, label.f + textarea { width: 100%; }

.btn { font: inherit; font-weight: 600; border: 1px solid var(--line); background: #fff; color: var(--ink);
  border-radius: 8px; padding: 7px 14px; cursor: pointer; white-space: nowrap; }
.btn:hover { background: var(--soft); }
.btn.primary { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.big { padding: 9px 20px; font-size: 15px; }
.btn.sm { padding: 4px 10px; font-size: 12px; }
.btn.ghost { background: transparent; }
.btn.danger { color: var(--out); }
.btn:disabled { opacity: .5; cursor: default; }

.app { display: flex; min-height: 100vh; }
.side { width: 220px; background: #14211d; color: #dfe7e3; padding: 18px 12px; position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; flex-shrink: 0; }
.brand { display: flex; gap: 10px; align-items: center; padding: 0 8px 18px; }
.brand b { display: block; color: #fff; } .brand small { color: #8fa39b; font-size: 11px; }
.logo { width: 34px; height: 34px; border-radius: 9px; background: var(--brand); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 19px; }
#nav a { display: flex; gap: 10px; align-items: center; color: #c6d3cd; padding: 9px 10px; border-radius: 8px; margin-bottom: 2px; }
#nav a i { font-style: normal; width: 18px; text-align: center; opacity: .8; }
#nav a:hover { background: #1f302a; } #nav a.on { background: #24433b; color: #fff; }
.side-foot { margin-top: auto; font-size: 11px; color: #8fa39b; padding: 8px; }

.main { flex: 1; padding: 22px 26px 60px; min-width: 0; }
.head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 14px; flex-wrap: wrap; }
.head-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.legend { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; font-size: 12px; color: var(--muted); margin-bottom: 14px; }
.dot { display: inline-block; width: 11px; height: 11px; border-radius: 3px; vertical-align: -1px; margin-right: 5px; }
.dot.best { background: var(--best); border: 1px solid #9ad4ae; } .dot.worst { background: var(--worst); border: 1px solid #eab3ad; }
.tag { display: inline-block; font-size: 11px; font-weight: 600; padding: 1px 7px; border-radius: 99px; background: var(--soft); color: var(--muted); white-space: nowrap; }
.tag.in { background: #e3f4e9; color: var(--in); } .tag.out { background: #fde8e6; color: var(--out); }
.tag.pre { background: #fff1dc; color: var(--pre); } .tag.warn { background: var(--warn-bg); color: var(--warn); }
.tag.fail { background: var(--fail-bg); color: var(--out); }

.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); margin-bottom: 18px; }
.card-head { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.card-head .sp { flex: 1; }
.card-body { padding: 14px 16px; }
.empty { padding: 40px 20px; text-align: center; color: var(--muted); }

/* price table */
.tbl-wrap { overflow-x: auto; }
table.pt { border-collapse: separate; border-spacing: 0; width: 100%; font-size: 13px; }
table.pt th, table.pt td { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
table.pt thead th { background: #fafbf9; font-size: 12px; color: var(--muted); font-weight: 600; position: sticky; top: 0; white-space: nowrap; }
table.pt thead th a { color: var(--ink); }
table.pt td.vcol, table.pt th.vcol { position: sticky; left: 0; background: #fff; z-index: 1; min-width: 170px; font-weight: 600; border-right: 1px solid var(--line); }
table.pt thead th.vcol { background: #fafbf9; z-index: 2; }
table.pt tr:last-child td { border-bottom: 0; }
td.cell { min-width: 128px; }
td.cell.best { background: var(--best); } td.cell.worst { background: var(--worst); }
td.cell.warn { box-shadow: inset 3px 0 0 var(--warn); } td.cell.fail { background: var(--fail-bg); box-shadow: inset 3px 0 0 var(--out); }
.price { font-weight: 700; font-size: 14px; font-variant-numeric: tabular-nums; }
.reg { text-decoration: line-through; color: var(--muted); font-size: 11px; margin-left: 4px; }
.chg { font-size: 11px; font-weight: 600; margin-left: 4px; }
.chg.up { color: var(--up); } .chg.down { color: var(--down); }
.cmeta { display: flex; gap: 6px; align-items: center; margin-top: 3px; flex-wrap: wrap; }
.cmsg { font-size: 11px; color: var(--muted); margin-top: 3px; max-width: 200px; }
.na { color: #b5bcb8; }
td.sum { background: #fafbf9; min-width: 120px; }
.ourp { width: 100px; padding: 4px 6px; font-size: 13px; }
.diff.pos { color: var(--out); font-weight: 600; } .diff.neg { color: var(--in); font-weight: 600; }

/* run bar */
.runbar { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 12px 16px; margin-bottom: 16px; box-shadow: var(--shadow); }
.runbar-top { display: flex; gap: 12px; align-items: center; margin-bottom: 8px; }
.runbar-top #runCounts { flex: 1; font-size: 13px; color: var(--muted); }
.progress { height: 8px; background: var(--soft); border-radius: 99px; overflow: hidden; }
.progress div { height: 100%; width: 0; background: var(--brand); transition: width .4s; }
.runlog { max-height: 220px; overflow: auto; background: #14211d; color: #cfe0d8; padding: 10px; border-radius: 8px; font-size: 12px; margin: 10px 0 0; white-space: pre-wrap; }

/* products */
.split { display: grid; grid-template-columns: 280px 1fr; gap: 16px; align-items: start; }
.plist { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.plist .pcat { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); padding: 10px 14px 4px; background: #fafbf9; }
.plist .pi { padding: 10px 14px; border-top: 1px solid var(--line); cursor: pointer; }
.plist .pi:hover { background: var(--soft); } .plist .pi.on { background: var(--brand-soft); }
.plist .pi small { display: block; color: var(--muted); font-size: 12px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.vlist .vi { display: flex; gap: 8px; align-items: center; padding: 6px 0; border-bottom: 1px dashed var(--line); }
.vlist .vi input.lab { flex: 1; }
.llist .li { display: grid; grid-template-columns: 1fr auto; gap: 8px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.llist .li:last-child { border-bottom: 0; }
.url { font-size: 12px; color: var(--muted); word-break: break-all; }
.chips { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 4px; }
.chip { font-size: 11px; padding: 1px 7px; border-radius: 99px; background: var(--soft); border: 1px solid var(--line); }

/* modal */
.modal { position: fixed; inset: 0; background: rgba(15,25,20,.45); display: flex; align-items: flex-start; justify-content: center; padding: 40px 16px; overflow: auto; z-index: 50; }
.modal-card { background: #fff; border-radius: 14px; width: min(980px, 100%); padding: 20px 22px; box-shadow: 0 20px 60px rgba(0,0,0,.25); }
.modal-card.narrow { width: min(480px, 100%); }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.step { display: flex; gap: 10px; align-items: center; margin: 16px 0 8px; font-weight: 700; }
.step .n { width: 22px; height: 22px; border-radius: 50%; background: var(--brand); color: #fff; display: grid; place-items: center; font-size: 12px; }
.groups { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.group { border: 1px solid var(--line); border-radius: 8px; padding: 10px; }
.group h4 { margin: 0 0 6px; font-size: 13px; display: flex; justify-content: space-between; }
.group label { display: flex; gap: 6px; align-items: center; font-size: 13px; padding: 2px 0; }
.group label.dis { color: var(--muted); }
table.map { border-collapse: collapse; width: 100%; font-size: 13px; }
table.map th, table.map td { border-bottom: 1px solid var(--line); padding: 6px 8px; text-align: left; }
table.map th { background: #fafbf9; font-size: 12px; color: var(--muted); }
table.map select { padding: 4px 6px; max-width: 200px; }
.notice { background: var(--brand-soft); border-radius: 8px; padding: 10px 12px; font-size: 13px; }
.notice.warn { background: var(--warn-bg); }
.notice.err { background: var(--fail-bg); color: var(--out); }
.spinner { display: inline-block; width: 14px; height: 14px; border: 2px solid var(--line); border-top-color: var(--brand); border-radius: 50%; animation: spin .8s linear infinite; vertical-align: -2px; }
@keyframes spin { to { transform: rotate(360deg); } }

.toast { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); background: #14211d; color: #fff; padding: 10px 18px; border-radius: 10px; z-index: 60; font-size: 13px; box-shadow: var(--shadow); }
.toast.err { background: var(--out); }

/* history */
.chart { width: 100%; height: 340px; }
.chart text { font-size: 11px; fill: var(--muted); }
.lg { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; margin: 6px 0 0; }
.lg span { display: inline-flex; gap: 6px; align-items: center; }
.lg i { width: 14px; height: 3px; border-radius: 2px; display: inline-block; }
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-bottom: 14px; }
.stat { background: #fafbf9; border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; }
.stat b { display: block; font-size: 18px; font-variant-numeric: tabular-nums; }
.stat small { color: var(--muted); font-size: 12px; }

@media (max-width: 900px) {
  .app { flex-direction: column; }
  .side { width: 100%; height: auto; position: static; flex-direction: row; flex-wrap: wrap; padding: 10px; }
  .brand { padding: 0 8px; } #nav { display: flex; flex-wrap: wrap; } .side-foot { display: none; }
  .split { grid-template-columns: 1fr; } .main { padding: 16px; } .grid2 { grid-template-columns: 1fr; }
}
tr.grp td { background: var(--brand-soft); border-top: 2px solid var(--line); padding: 7px 10px; }
tr.grp td a b { font-size: 14px; }
.vfilter { width: 220px; padding: 5px 9px; font-size: 13px; }
.optrow { display: flex; gap: 4px; flex-wrap: wrap; }
/* price changed since the last check (stays until Reset) */
tr.changed td { background: #fbd3cf; }
tr.changed td.vcol { background: #fbd3cf; box-shadow: inset 4px 0 0 #d92d20; }
tr.changed td.cell.best { background: var(--best); } tr.changed td.cell.worst { background: var(--worst); }
.was { font-size: 11px; color: #a12a20; font-weight: 600; margin-top: 2px; }
.dot.chg { background: #fbd3cf; border: 1px solid #d92d20; }
.tag.chgtag { background: #d92d20; color: #fff; }
.btn.reset { border-color: #d92d20; color: #d92d20; }
.btn.reset:hover { background: #fdecea; }
.daychip { display: inline-flex; gap: 4px; align-items: center; border: 1px solid var(--line); border-radius: 99px; padding: 3px 10px; font-size: 13px; cursor: pointer; }
.pausebox { margin-bottom: 14px; }
.pausebox .pz { display: inline-block; margin: 2px 12px 2px 6px; }
/* tick variants and run only those */
.selcb { width: 16px; height: 16px; accent-color: var(--brand); cursor: pointer; vertical-align: -3px; margin: 0 6px 0 0; }
.card-head .selcb { margin-right: 2px; }
label.selrow { display: flex; gap: 2px; align-items: center; cursor: pointer; }
tr.picked td.vcol { box-shadow: inset 3px 0 0 var(--brand); }
tr.changed.picked td.vcol { box-shadow: inset 4px 0 0 #d92d20, inset 7px 0 0 var(--brand); }
.selbar { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 40; background: #14211d; color: #fff;
  border-radius: 12px; padding: 10px 12px 10px 18px; display: flex; gap: 12px; align-items: center; box-shadow: 0 10px 30px rgba(0,0,0,.25); }
.selbar .muted { color: #9fb3ab; }
.selbar .btn.ghost { color: #dfe7e3; border-color: #3a4d46; }
.selbar .btn.ghost:hover { background: #1f302a; }
.main { padding-bottom: 110px; }
/* password lock screen */
.lockscreen { position: fixed; inset: 0; z-index: 100; background: #14211d; display: grid; place-items: center; padding: 16px; }
.lockcard { background: #fff; border-radius: 16px; padding: 28px 26px; width: min(380px, 100%); text-align: center; box-shadow: 0 20px 60px rgba(0,0,0,.35); }
/* my site + import */
.tag.own { background: #fff3c4; color: #8a5a00; }
.needs { color: #b26a00; font-weight: 600; }
tr.muted td { color: var(--muted); }
/* find on other sites */
.sitegrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 4px 12px; }
.sitegrid label { display: flex; gap: 6px; align-items: center; font-size: 13px; padding: 3px 0; }
.sitegrid label .muted { margin-left: auto; }
.sitegrid label.dis { opacity: .5; }
.mcard { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin-top: 10px; }
.mrow { display: flex; gap: 8px; align-items: center; padding: 4px 0; font-size: 13px; cursor: pointer; }
.mrow .mname { flex: 1; }
.score { font-size: 11px; font-weight: 700; padding: 1px 6px; border-radius: 99px; min-width: 40px; text-align: center; }
.score.hi { background: #e3f4e9; color: var(--in); } .score.mid { background: var(--warn-bg); color: var(--warn); } .score.lo { background: var(--soft); color: var(--muted); }
.ownhint { background: #fff8e1; border: 1px solid #f3e2a9; border-radius: 8px; padding: 8px 10px; margin-top: 12px; font-size: 13px; }
.ownhint .chip { background: #fff; }
.group h4 { gap: 6px; }
.notvar { color: var(--out) !important; margin-left: 6px; }

/* =====================================================================
   Polish pass - same information and layout, calmer and tidier
   ===================================================================== */
:root { --bg: #f2f4f1; --line: #e1e6e2; --soft: #eef2ef; --muted: #66716b; --r: 12px;
  --shadow: 0 1px 2px rgba(20,35,28,.05); --lift: 0 2px 4px rgba(20,35,28,.05), 0 10px 28px rgba(20,35,28,.08); }
body { font-size: 14px; -webkit-font-smoothing: antialiased; }
h1 { font-size: 24px; font-weight: 700; letter-spacing: -.015em; }
.main { padding: 26px 32px 110px; max-width: 1480px; }
.head { margin-bottom: 18px; }
.head p.muted { margin: 2px 0 0; font-size: 13px; }
.price, .stat b, td.sum, .psum b { font-variant-numeric: tabular-nums; }

/* controls */
.btn { height: 34px; display: inline-flex; align-items: center; gap: 6px; padding: 0 14px; border-radius: 9px; transition: background .12s, border-color .12s; }
.btn.sm { height: 28px; padding: 0 10px; border-radius: 7px; }
.btn.big { height: 38px; padding: 0 18px; }
.btn.primary { box-shadow: 0 1px 0 rgba(0,0,0,.08) inset; }
.btn:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, .phead:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
input, select, textarea { border-radius: 9px; }
.head-actions input, .head-actions select { height: 34px; }

/* sidebar */
.side { width: 228px; padding: 20px 14px; background: #13201b; }
#nav a { padding: 9px 12px; margin-bottom: 3px; font-size: 14px; position: relative; }
#nav a.on { background: #1f3a32; }
#nav a.on::before { content: ""; position: absolute; left: -14px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: #5fd0bd; }
.side-foot { line-height: 1.6; border-top: 1px solid #22332c; padding-top: 12px; }

/* legend */
.legend { gap: 14px; margin-bottom: 16px; padding: 8px 12px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; }

/* product list on the Price Table: closed products read as a quiet list, the open one lifts */
#dashBody .pcard { margin-bottom: 0; border-radius: 0; box-shadow: none; border-bottom-width: 0; }
#dashBody .pcard:first-of-type, #dashBody .pausebox + .pcard { border-top-left-radius: var(--r); border-top-right-radius: var(--r); }
#dashBody .pcard:last-child { border-bottom-width: 1px; border-bottom-left-radius: var(--r); border-bottom-right-radius: var(--r); margin-bottom: 18px; }
#dashBody .pcard:not(.collapsed) { margin: 14px 0; border-radius: var(--r); border-bottom-width: 1px; box-shadow: var(--lift); border-color: #d3dcd6; }
#dashBody .pcard:not(.collapsed) + .pcard { border-top-left-radius: var(--r); border-top-right-radius: var(--r); }
#dashBody .pcard:has(+ .pcard:not(.collapsed)) { border-bottom-width: 1px; border-bottom-left-radius: var(--r); border-bottom-right-radius: var(--r); }
.card.collapsed .tbl-wrap, .card.collapsed .empty { display: none; }
.phead { cursor: pointer; user-select: none; min-height: 52px; padding: 10px 16px; gap: 10px; }
.card.collapsed .phead { border-bottom: 0; }
.card.collapsed .phead:hover { background: #f7faf8; }
.pcard:not(.collapsed) .phead { background: linear-gradient(#fbfcfb, #fff); }
.phead h2 { font-size: 15px; font-weight: 650; }
.chev { width: 20px; height: 20px; display: inline-grid; place-items: center; border-radius: 6px; color: var(--muted); font-size: 12px; background: var(--soft); flex-shrink: 0; }
.pcard:not(.collapsed) .chev { background: var(--brand-soft); color: var(--brand); }
.psum { font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.psum b { color: var(--ink); font-weight: 650; }
.phead .btn.ghost { color: var(--muted); }
.phead .btn.ghost:hover { color: var(--ink); }

/* price table */
table.pt th, table.pt td { padding: 9px 12px; }
table.pt thead th { font-size: 11.5px; letter-spacing: .01em; background: #f8faf8; border-bottom-color: #dfe5e1; }
table.pt tbody tr:not(.grp):hover td { background: #fafcfb; }
tr.grp td { background: #f4f8f6; border-top: 1px solid var(--line); box-shadow: inset 3px 0 0 #b9d8d1; }
tr.grp td a b { color: var(--ink); }
td.cell { min-width: 140px; }
.price { font-size: 14.5px; }
.cmsg { color: #7a847f; line-height: 1.4; }
.tag { padding: 2px 8px; }

/* cards elsewhere */
.card { border-radius: var(--r); }
.card-head { padding: 13px 18px; }
.card-body { padding: 16px 18px; }
.plist { border-radius: var(--r); }
.plist .pi { padding: 11px 16px; }
.plist .pi.on { background: var(--brand-soft); box-shadow: inset 3px 0 0 var(--brand); }
.modal-card { border-radius: 16px; padding: 22px 24px; }
.runbar { border-radius: var(--r); }
.notice { border-radius: 10px; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation-duration: .01ms !important; } }
@media (max-width: 900px) {
  .main { padding: 16px; }
  .psum { display: none; }
  #nav a.on::before { display: none; }
}
/* keep a closed product on one tidy line */
.phead { flex-wrap: nowrap; }
.phead h2 { white-space: nowrap; }
.phead > .tag, .phead > .btn, .phead > .selcb, .phead > input.vfilter { flex-shrink: 0; }
.phead .psum { flex: 1 1 0; min-width: 0; }
.phead .psum + .sp { flex: 0 0 0; }
.phead .btn.reset { height: 24px; padding: 0 8px; }
@media (max-width: 900px) { .phead { flex-wrap: wrap; } }


/* ---- account module: password / licence screens ---- */
.lockin { width: 100%; font-size: 16px; padding: 10px 12px; }
textarea.lockin { font-family: ui-monospace, Consolas, monospace; resize: vertical; }
.lockerr { color: var(--out); min-height: 20px; margin-top: 6px; }
.lockcard.wide { width: min(560px, 94vw); max-height: 92vh; overflow: auto; }
.lockcard .row { gap: 8px; }
.mcode { display: flex; align-items: center; gap: 8px; justify-content: space-between; background: #f3f6f5; border: 1px dashed #b9c6c3; border-radius: 8px; padding: 8px 10px; }
.mcode code { font-size: 16px; letter-spacing: 1px; font-weight: 600; user-select: all; }
.paybox { text-align: left; margin-top: 10px; padding: 10px 12px; border: 1px solid var(--line, #e3e8e7); border-radius: 8px; background: #fbfcfc; line-height: 1.7; }
.paybox code { font-size: 14px; font-weight: 600; user-select: all; }
.lockcard .tbl-wrap { text-align: left; }
.updbar { background: #fff7e6; border: 1px solid #f0d49a; color: #6b4a00; border-radius: 10px; padding: 8px 14px; margin-bottom: 14px; font-size: 14px; }
.updbar .btn.sm { margin-left: 6px; }

/* ---- v10: status chips, lowest price, difference to my price */
.chip-st { display: inline-block; font-size: 11px; font-weight: 600; padding: 2px 9px; border-radius: 99px; white-space: nowrap; border: 1px solid transparent; }
.chip-st.ok { background: #e3f4e9; color: #136c37; border-color: #bfe5cc; }
.chip-st.mute { background: #eef0ed; color: #5d6762; border-color: #dde1dc; }
.chip-st.sold { background: #fff6cc; color: #7a5b00; border-color: #f0dd8a; }
.chip-st.warn { background: var(--warn-bg); color: var(--warn); border-color: #f3d29a; }
.chip-st.bad { background: var(--fail-bg); color: var(--out); border-color: #f2c0ba; }
.chip-st.none { background: transparent; color: var(--muted); border-color: var(--line); }
.lowtag { display: inline-block; font-size: 10.5px; font-weight: 700; padding: 1px 6px; border-radius: 4px; background: #136c37; color: #fff; margin-left: 6px; vertical-align: 1px; }
td.cell.lowest { background: var(--best); box-shadow: inset 3px 0 0 #2f9e5a; }
tr.changed td.cell.lowest { background: var(--best); }
.vs { font-size: 11.5px; color: var(--muted); margin-top: 2px; white-space: nowrap; }
.vs.bad { color: #a12a20; font-weight: 600; } .vs.good { color: #136c37; }
.vs.inl { display: inline; margin-left: 4px; }
.price.lg { font-size: 13px; color: var(--muted); }
.vname { font-size: 12px; font-weight: 400; color: var(--muted); margin: 1px 0 0 22px; }
tr.grp.vg td { background: #eef6f3; }
.vgsum { margin-left: 10px; color: var(--muted); }
tr.flash td { animation: rowflash 2.2s ease-out; }
@keyframes rowflash { 0%, 40% { background: #fff1a8; } 100% { } }

.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: #fff; }
.seg button { font: inherit; font-size: 12px; font-weight: 600; border: 0; background: transparent; color: var(--muted); padding: 5px 11px; cursor: pointer; }
.seg button + button { border-left: 1px solid var(--line); }
.seg button.on { background: var(--brand); color: #fff; }
.seg.sm button { padding: 2px 9px; font-size: 11.5px; }

/* "what changed" and "needs attention" panels */
.dpanels { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 14px; margin-bottom: 18px; align-items: start; }
.dpanels .card { margin: 0; }
.dpanel .dp-head { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.dpanel .dp-head .sp { flex: 1; }
.dp-sum { display: flex; gap: 14px; padding: 8px 14px 2px; font-size: 12.5px; }
.dp-empty { padding: 14px; }
.dp-more { display: inline-block; padding: 4px 14px 10px; }
.onlychg { display: inline-flex; gap: 5px; align-items: center; cursor: pointer; color: var(--muted); }
.evlist { list-style: none; margin: 0; padding: 4px 6px 6px; }
.evlist li { display: flex; gap: 10px; align-items: baseline; padding: 6px 8px; border-radius: 7px; font-size: 13px; cursor: pointer; }
.evlist li:hover { background: var(--soft); }
.evd { font-weight: 700; white-space: nowrap; min-width: 82px; }
.evd.down { color: #136c37; } .evd.up { color: #a12a20; }
.evp { white-space: nowrap; color: var(--muted); font-size: 12px; }
.evp b { color: var(--ink); }
.evw { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.evt { white-space: nowrap; }
.prlist li { cursor: default; align-items: flex-start; flex-wrap: wrap; border-bottom: 1px solid var(--soft); border-radius: 0; }
.prlist li:last-child { border-bottom: 0; }
.prlist li:hover { background: transparent; }
.prlist .chip-st { min-width: 118px; text-align: center; }
.prlist .evw { white-space: normal; min-width: 180px; }
.prmsg { display: block; font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.pract { display: flex; gap: 4px; flex-shrink: 0; margin-left: auto; }
@media (max-width: 1250px) { .dpanels { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 700px) { .evlist li { flex-wrap: wrap; } .evw { white-space: normal; } .pract { width: 100%; } }

/* search results: picture + exact match; auto-match in the link editor */
.mthumb { width: 40px; height: 40px; object-fit: contain; border-radius: 6px; border: 1px solid var(--line); background: #fff; flex-shrink: 0; }
.mthumb.none { display: inline-block; background: var(--soft); border-style: dashed; }
.exact { font-size: 10.5px; font-weight: 700; color: #fff; background: #136c37; border-radius: 4px; padding: 1px 6px; margin-left: 6px; }
.mprice { font-weight: 600; white-space: nowrap; }
.automatch { border: 1px solid #bfe5cc; background: #f3fbf6; border-radius: 10px; padding: 10px 12px; margin-top: 12px; }
.automatch table { width: 100%; border-collapse: collapse; font-size: 13px; }
.automatch td { padding: 5px 6px; border-top: 1px solid #dcefe3; vertical-align: top; }
.automatch .sure { font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 99px; white-space: nowrap; }
.sure.hi { background: #e3f4e9; color: #136c37; } .sure.mid { background: var(--warn-bg); color: var(--warn); } .sure.no { background: var(--soft); color: var(--muted); }

/* "start the app?" at PC start - Schedule page */
.startcard .card-body { padding: 12px 16px; }
.startcard.warnc { border-color: #f3d29a; background: #fffaf0; }

/* v15: outside access card */
.remotecard .card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.rlink { display: flex; align-items: center; gap: 8px; justify-content: space-between; background: #eef6f2; border: 1px solid #bfe5cc; border-radius: 8px; padding: 8px 10px; }
.rlink code { font-size: 14px; font-weight: 600; user-select: all; overflow-wrap: anywhere; }
.rsteps { list-style: none; padding: 0; margin: 0 0 8px; }
.rsteps li { padding: 5px 0; line-height: 1.45; }
.rsteps li.rdone { color: var(--muted); }
/* phones (useful through the outside link): the menu goes full width on top, the footer (with Log out) stays */
@media (max-width: 900px) {
  .side { width: 100%; padding: 10px 12px; }
  #nav a { padding: 7px 10px; }
  .side-foot { display: block; width: 100%; margin-top: 6px; padding-top: 6px; font-size: 11px; }
  .rlink { flex-wrap: wrap; }
}
.rallow { background: #fff8e6; border: 1px solid #f0d58a; border-radius: 8px; padding: 10px 12px; color: var(--ink, #1d2622); }
.rallow .btn { text-decoration: none; }
/* v18: background "find on other sites" search, shown on every page */
.mpill { position: fixed; right: 18px; bottom: 18px; z-index: 60; display: flex; align-items: center; gap: 10px; max-width: 420px;
  background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--brand, #0f766e); border-radius: 10px; padding: 10px 12px;
  box-shadow: 0 6px 24px rgba(20, 33, 29, .18); font-size: 13px; }
.mpill .mpt { flex: 1; min-width: 0; line-height: 1.35; }
.mpill .mpt b { display: inline-block; max-width: 230px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; }
.busyline { color: var(--warn); }
.busyline a { margin-left: 6px; }
@media (max-width: 600px) { .mpill { left: 12px; right: 12px; max-width: none; } }
/* v19: Price Table opens with a category choice */
.catpick .card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.catgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; padding: 16px; }
.catcard { border: 1px solid var(--line); border-radius: 10px; padding: 14px 14px 12px; cursor: pointer; background: #fff;
  transition: border-color .15s, box-shadow .15s; }
.catcard:hover, .catcard:focus-visible { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); outline: none; }
.catcard.mut { background: #fafbf9; }
.catname { font-weight: 700; font-size: 16px; margin-bottom: 2px; }
.catchg { color: var(--out); font-weight: 600; }
.catsubs { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.chip-sub { border: 1px solid var(--line); background: var(--brand-soft); color: var(--brand); border-radius: 99px; padding: 3px 10px;
  font-size: 12px; cursor: pointer; font-family: inherit; }
.chip-sub:hover { border-color: var(--brand); }
/* v20: Products page filter */
.pfilter { display: grid; gap: 8px; padding: 12px 14px; border-bottom: 1px solid var(--line); background: #fafbf9; position: sticky; top: 0; z-index: 2; }
.pfilter select, .pfilter input[type=text], .pfilter #pfl_q { width: 100%; }
.pfneed { display: flex; align-items: center; gap: 6px; cursor: pointer; }
/* v22: default websites per category */
.catdef { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; background: var(--brand-soft); border-radius: 8px; padding: 8px 10px; margin: 6px 0 10px; }
.catdef-act { margin-left: auto; }
/* v23: time left in the run bar */
.runeta { margin: 0 10px 0 6px; color: var(--brand); font-weight: 500; white-space: nowrap; }
.runeta b { font-variant-numeric: tabular-nums; }
/* v25: rows under a group start further in, with a guide line; a small gap between groups */
table.pt tr.child td.vcol { padding-left: 46px; font-weight: 500; position: sticky; }
table.pt tr.child td.vcol::before { content: ""; position: absolute; left: 24px; top: 0; bottom: 0; width: 2px; background: #cfe3dd; }
table.pt tr.child td.vcol .lbl { display: block; min-width: 0; }
table.pt tr.child .vname { margin: 2px 0 0; }
table.pt tr.gap td { height: 14px; padding: 0; border: 0; background: #f6f8f7; }
table.pt tr.child label.selrow { align-items: flex-start; gap: 6px; }
table.pt tr.child label.selrow .selcb { margin-top: 3px; }
