:root{--bg:#f6f7f9;--card:#fff;--ink:#14181f;--muted:#5d6675;--line:#e3e6eb;--accent:#ff9900;--accent-ink:#111;
--d0:#1a9850;--d2:#66bd63;--d3:#a6d96a;--d4:#fee08b;--d5:#fdae61;--d6:#d73027;--oos:#6b4c9a;--fail:#9aa1ab;--none:#d9dde3}
*{box-sizing:border-box}
body{margin:0;font:15px/1.45 -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;background:var(--bg);color:var(--ink)}
.top{padding:18px 20px 6px;max-width:1100px;margin:0 auto}
.brand{display:flex;align-items:center;gap:10px}
.logo{font-size:26px}
h1{font-size:24px;margin:0}
h2{font-size:17px;margin:0}
.sub{margin:4px 0 0;color:var(--muted)}
main{max-width:1100px;margin:0 auto;padding:10px 14px 40px}
.card{background:var(--card);border:1px solid var(--line);border-radius:14px;padding:14px 16px;margin:12px 0;box-shadow:0 1px 2px rgba(0,0,0,.03)}
label{font-weight:600;font-size:13px;color:var(--muted);display:block;margin-bottom:6px}
.row{display:flex;gap:8px}
input[type=password],#asins{flex:1;min-width:0;font:inherit;font-size:16px;padding:11px 12px;border:1px solid #c9ced6;border-radius:10px;background:#fff;color:var(--ink)}
input:focus-visible,button:focus-visible{outline:3px solid #2563eb;outline-offset:2px}
button{font:inherit;font-weight:600;border:0;border-radius:10px;padding:11px 18px;background:var(--accent);color:var(--accent-ink);cursor:pointer}
button:disabled{opacity:.5;cursor:default}
button.ghost{background:#eef0f3;color:var(--ink);padding:8px 12px;font-size:14px}
.opts{display:flex;justify-content:space-between;align-items:center;gap:10px;flex-wrap:wrap;margin-top:10px}
.chk{display:flex;align-items:center;gap:6px;font-weight:500;color:var(--ink);margin:0;font-size:14px}
.muted{color:var(--muted)}.small{font-size:12.5px}
.err{color:#b42318;min-height:1em;margin:8px 0 0}
.progress{display:flex;align-items:center;gap:10px;margin:4px 2px}
.bar{flex:1;height:8px;background:#e6e8ec;border-radius:9px;overflow:hidden}
.bar span{display:block;height:100%;width:0;background:var(--accent);transition:width .2s}
#progText{font-size:13px;color:var(--muted);white-space:nowrap}
.maphead{display:flex;justify-content:space-between;gap:10px;flex-wrap:wrap;align-items:center}
.tabs{display:flex;gap:6px;flex-wrap:wrap}
.tab{background:#eef0f3;color:var(--ink);padding:7px 11px;font-size:13px;border-radius:999px}
.tab.on{background:var(--ink);color:#fff}
.modes{display:flex;background:#eef0f3;border-radius:999px;padding:3px}
.mode{background:transparent;color:var(--ink);padding:6px 12px;font-size:13px;border-radius:999px}
.mode.on{background:#fff;box-shadow:0 1px 2px rgba(0,0,0,.12)}
.summary{margin:10px 2px 0;font-size:14px}
.mapwrap{width:100%;margin-top:6px}
#map{width:100%;height:auto;display:block}
#map path{stroke:#fff;stroke-width:1;cursor:pointer;transition:fill .25s}
#map path:hover,#map path.sel{stroke:#111;stroke-width:2}
#map rect.chip{stroke:#fff;stroke-width:1.5;cursor:pointer}
#map rect.chip.sel{stroke:#111;stroke-width:2}
.legend{display:flex;flex-wrap:wrap;gap:6px 12px;font-size:12.5px;color:var(--muted);margin-top:6px}
.legend i{display:inline-block;width:12px;height:12px;border-radius:3px;margin-right:5px;vertical-align:-1px}
.detail{margin-top:10px;padding:10px 12px;background:#f7f8fa;border-radius:10px;font-size:14px;min-height:44px}
.detail b{font-size:15px}
.detail .kv{display:grid;grid-template-columns:max-content 1fr;gap:2px 12px;margin-top:6px}
.tablehead{display:flex;justify-content:space-between;align-items:center;margin-bottom:8px}
.tablewrap{overflow:auto;-webkit-overflow-scrolling:touch;max-height:560px;border:1px solid var(--line);border-radius:10px}
table{border-collapse:collapse;width:100%;font-size:13.5px}
th,td{text-align:left;padding:7px 8px;border-bottom:1px solid var(--line);white-space:nowrap}
th{font-size:12px;color:var(--muted);font-weight:600;position:sticky;top:0;background:#fff}
td .pill{display:inline-block;padding:1px 7px;border-radius:999px;font-weight:600;font-size:12.5px}
.gate{max-width:420px}
@media (max-width:600px){h1{font-size:21px}.top{padding:14px 14px 2px}main{padding:6px 10px 30px}.card{padding:12px}.progress{flex-wrap:wrap}}

.retry{margin-top:6px;padding:5px 10px;font-size:13px}
#retryFailed{padding:5px 10px;font-size:13px}


#map path.varies{stroke:#111;stroke-width:1.6;stroke-dasharray:5 3}
#map path.varies.sel,#map path.varies:hover{stroke-width:2.4}
#map circle.vdot{display:none;fill:#fff;stroke:#111;stroke-width:2;pointer-events:none}
#map circle.vdot.on{display:block}
.lg-var{background:#fff!important;border:1.6px dashed #111}
.vtag{color:#111;font-weight:700;font-size:12.5px}
.thr{display:flex;gap:8px;align-items:center;flex-wrap:wrap;justify-content:flex-end}
.tablehead{gap:10px;flex-wrap:wrap}
tr.differ td{background:#fffbea}
.ztable{overflow:auto;-webkit-overflow-scrolling:touch;margin-top:8px;border:1px solid var(--line);border-radius:8px;background:#fff}
.ztable table{font-size:13px}
.ztable th{position:static}
.ztable td,.ztable th{padding:6px 8px}
#map path:focus{outline:none}
@media (max-width:600px){#map circle.vdot.on{display:none}#map path.varies{stroke-width:2.6;stroke-dasharray:7 4}}

/* day counts on the map (v10): white number with a dark outline, readable on every color */
#map text{pointer-events:none;text-anchor:middle;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;paint-order:stroke fill;stroke-linejoin:round}
#map text.ab{font-size:11px;font-weight:700;fill:#1b1f24;stroke:rgba(255,255,255,.75);stroke-width:2.5px}
#map text.dn{font-size:20px;font-weight:800;fill:#fff;stroke:#111;stroke-width:4px;letter-spacing:-.2px}
#map text.dn.long{font-size:17px}
#map text.cn{fill:#fff;stroke:#111;stroke-width:3.5px;font-weight:800}
#map text.cn .cab{font-size:13px;font-weight:700}
#map text.cn .cd{font-size:18px}
#map line.lead{stroke:#111;stroke-width:1;opacity:.55}
#map circle.ldot{fill:#111;opacity:.7;pointer-events:none}
/* phone: the map is ~0.36x scale, so labels are drawn much larger in map units */
#map.ph text.ab{font-size:19px;stroke-width:3px}
#map.ph text.ab:not(.bare){display:none}
#map.ph text.ab.bare{font-size:22px}
#map.ph text.dn{font-size:37px;stroke-width:7px}
#map.ph text.dn.long{font-size:28px;stroke-width:6px}
#map.ph text.cn{stroke-width:6px}
#map.ph text.cn .cab{font-size:24px}
#map.ph text.cn .cd{font-size:32px}
#map.ph line.lead{stroke-width:1.6}
@media (max-width:600px){.mapcard{padding:10px 6px}}

/* ---- Track ASINs tab ---- */
.viewtabs{display:flex;align-items:center;gap:6px;margin:4px 0 2px;flex-wrap:wrap}
.vt{background:#eef0f3;color:var(--ink);padding:9px 16px;font-size:15px;border-radius:999px}
.vt.on{background:var(--ink);color:#fff}
#whoami{margin-left:auto}
.trhead{display:flex;justify-content:space-between;align-items:baseline;gap:10px;flex-wrap:wrap}
.tin{flex:1;min-width:0;font:inherit;font-size:16px;padding:11px 12px;border:1px solid #c9ced6;border-radius:10px;background:#fff;color:var(--ink)}
.adminbar{display:flex;gap:10px;align-items:center;flex-wrap:wrap;margin-top:10px}
.inl{display:flex;align-items:center;gap:6px;margin:0;font-size:14px;color:var(--ink);font-weight:500}
select,input[type=date]{font:inherit;font-size:15px;padding:7px 9px;border:1px solid #c9ced6;border-radius:9px;background:#fff;color:var(--ink)}
.trlist{display:grid;grid-template-columns:repeat(auto-fill,minmax(320px,1fr));gap:10px}
.tri{display:flex;gap:12px;border:1px solid var(--line);border-radius:12px;padding:10px;cursor:pointer;background:#fff}
.tri.on{border-color:var(--accent);box-shadow:0 0 0 2px rgba(255,153,0,.25)}
.trimg{flex:0 0 64px;height:64px;display:flex;align-items:center;justify-content:center;font-size:28px;background:#fff;border-radius:8px;overflow:hidden}
.trimg img{max-width:100%;max-height:100%;object-fit:contain}
.trbody{flex:1;min-width:0;display:flex;flex-direction:column;gap:3px}
.trt{font-weight:600;font-size:14px;line-height:1.3;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.tra{display:flex;gap:6px;flex-wrap:wrap;margin-top:6px}
.tra .ghost{padding:7px 11px;font-size:13px}
.ghost.danger{color:#b42318}
.bar.sm{height:6px;flex:none;margin-top:4px}
.empty{padding:18px;border:1px dashed #c9ced6;border-radius:12px;text-align:center;color:var(--muted)}
.dhead{display:flex;gap:12px;align-items:center}
.dhead h2{font-size:16px;line-height:1.3}
.dctl{display:flex;gap:8px;flex-wrap:wrap;align-items:center;margin:12px 0 4px}
.rng .mode{padding:6px 10px}
#dash h3{font-size:15px;margin:18px 0 6px}
.chart{width:100%;height:auto;display:block}
.chart .gl{stroke:#e8eaee;stroke-width:1}
.chart .ax{font-size:11px;fill:#6b7280}
.chart .band{fill:rgba(255,153,0,.18);stroke:none}
.chart .avg{fill:none;stroke:#ff9900;stroke-width:2.5}
.chart .dot{fill:#fff;stroke:#c26e00;stroke-width:2}
.chart .dot.sel{fill:#c26e00}
.chart .hit{fill:transparent;cursor:pointer}
.legend2{display:flex;gap:14px;margin-top:4px}.legend2 i{display:inline-block;width:18px;height:10px;margin-right:5px;vertical-align:middle;border-radius:2px}
.lg-avg{background:#ff9900;height:3px!important}.lg-band{background:rgba(255,153,0,.25)}
.picker{display:flex;gap:12px;flex-wrap:wrap;margin-bottom:8px}
.hmap{width:100%;height:auto;display:block}
.hmap path{stroke:#fff;stroke-width:1}
.hmap path.worse{stroke:#b42318;stroke-width:3}
.hmap .dn{font-size:19px;font-weight:800;fill:#fff;stroke:#1d2430;stroke-width:3.2px;paint-order:stroke;text-anchor:middle}
.chips2{display:flex;flex-wrap:wrap;gap:5px;margin-top:6px}
.chip2{color:#fff;font-weight:700;font-size:13px;padding:4px 8px;border-radius:7px;text-shadow:0 0 2px #1d2430,0 0 2px #1d2430}
.chip2.worse{outline:2.5px solid #b42318}
.flags{background:#fef3f2;border:1px solid #fecdca;border-radius:10px;padding:8px 10px;font-size:13.5px;margin:6px 0}
.flag{display:inline-block;background:#fff;border:1px solid #fecdca;border-radius:6px;padding:1px 6px;margin:2px 2px 0 0;white-space:nowrap}
.ok{color:#067647}
.tt{width:100%;border-collapse:collapse;font-size:13.5px}
.tt th,.tt td{text-align:left;padding:7px 8px;border-bottom:1px solid var(--line);vertical-align:top}
.tt code{font-size:13px;background:#f2f4f7;padding:1px 5px;border-radius:5px}
.pill{font-size:11px;background:#eef0f3;border-radius:999px;padding:1px 7px;color:var(--muted)}
@media (max-width:600px){
  .trlist{grid-template-columns:1fr}
  .hmap .dn{font-size:30px;stroke-width:4.5px}
  #whoami{width:100%;margin-left:2px}
  #addUser{flex-wrap:wrap}
}
@media (max-width:600px){.chart .ax{font-size:19px}.chart .dot{stroke-width:3}}
.chart .wh{stroke:#c26e00;stroke-width:1.5;opacity:.7}
.chart{max-height:300px}
.hmap{max-width:780px;margin:0 auto}
#dash .mapwrap{max-width:780px}
.chip2{text-shadow:0 0 3px #111,0 0 3px #111,0 0 1px #111}
.tt td{white-space:normal}
@media (max-width:600px){.chart{max-height:none}}

/* ---- Track ASINs v13: slim rows, inline expand, search ---- */
.trsearch{position:relative;margin-top:10px}
.trsearch input{width:100%;font:inherit;font-size:16px;padding:11px 12px 11px 38px;border:1px solid #c9ced6;border-radius:12px;background:#fff;color:var(--ink);-webkit-appearance:none;appearance:none}
.trsico{position:absolute;left:12px;top:50%;transform:translateY(-50%);font-size:15px;opacity:.55;pointer-events:none}
.trhint{margin-top:8px;display:flex;flex-direction:column;gap:6px}
.trofr{display:flex;align-items:center;gap:10px;padding:8px 10px;border:1px dashed #c9ced6;border-radius:12px;background:#fffaf2}
.trofr img{width:36px;height:36px;object-fit:contain;border-radius:6px;background:#fff;flex:none}
.trofrt{flex:1;min-width:0;font-size:14px;line-height:1.3}
.trofrt .small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.trofr button{flex:none;padding:8px 12px;font-size:14px}
.trofr2{display:flex;align-items:center;gap:8px;flex-wrap:wrap;padding:0 2px}
.trofr2 .ghost{padding:6px 10px;font-size:13px}
.trrows{display:flex;flex-direction:column;border:1px solid var(--line);border-radius:12px;overflow:hidden;margin-top:4px}
.trr{border-top:1px solid var(--line);background:#fff}
.trr:first-child{border-top:0}
.trr.open{background:#fcfcfd}
.trrh{display:flex;align-items:center;gap:10px;width:100%;background:transparent;color:var(--ink);border-radius:0;padding:8px 10px;text-align:left;font-weight:400;min-height:52px}
.trrh:hover{background:#f7f8fa}
.trth{flex:0 0 36px;width:36px;height:36px;display:flex;align-items:center;justify-content:center;background:#fff;border-radius:6px;overflow:hidden;font-size:20px;border:1px solid #eef0f3}
.trth img{max-width:100%;max-height:100%;object-fit:contain}
.trid{flex:1;min-width:0;display:flex;flex-direction:column;line-height:1.25}
.trid b{font-size:14px;letter-spacing:.2px;font-variant-numeric:tabular-nums}
.trst{font-size:12px;color:var(--muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.travg{flex:none;font-size:13px;font-weight:700;min-width:44px;text-align:center;padding:3px 7px;border-radius:999px;color:#fff;background:var(--c,#9aa1ab);text-shadow:0 0 2px rgba(0,0,0,.45)}
.travg.none{background:#eef0f3;color:var(--muted);text-shadow:none}
.trrun{flex:none;font-size:12px;font-weight:600;color:#c26e00}
.trchev{flex:none;width:8px;height:8px;border-right:2px solid #9aa1ab;border-bottom:2px solid #9aa1ab;transform:rotate(45deg);margin:0 4px 4px 2px;transition:transform .15s}
.trrh[aria-expanded=true] .trchev{transform:rotate(-135deg);margin-bottom:-4px}
.trx{padding:2px 12px 12px}
.trfull{font-size:13.5px;font-weight:600;line-height:1.3;margin:2px 0 8px}
.trkv{display:grid;grid-template-columns:max-content 1fr;gap:4px 12px;margin:0;font-size:13.5px}
.trkv dt{color:var(--muted);font-size:12.5px;padding-top:1px}
.trkv dd{margin:0;min-width:0;overflow-wrap:anywhere}
.trkv a{color:#2563eb}
.btnlink{display:inline-block;text-decoration:none;border-radius:10px;font-weight:600;line-height:1.45}
.trdash{margin-top:10px;border-top:1px solid var(--line);padding-top:4px}
.trdash h3{font-size:15px;margin:16px 0 6px}
.dhead2{margin-top:6px}
.trsched{margin:10px 2px 0}
@media (max-width:600px){
  .trx{padding:2px 10px 12px}
  .trdash .dctl{gap:6px}
  .trdash .rng .mode{padding:6px 8px}
}
.trcard .err:empty{display:none}
.trrows:empty{display:none}

.extlink{margin-left:auto;color:var(--ink);text-decoration:none;border:1px solid var(--line);border-radius:8px;padding:5px 9px;background:#fff;font-weight:600}
.extlink:hover{border-color:var(--accent)}
.extlink+#whoami{margin-left:8px}
