:root {
  --bg: #05070a;
  --bg-soft: #080c11;
  --surface: #0d141b;
  --surface-2: #121c25;
  --surface-3: #192531;
  --border: #20303d;
  --border-soft: #16232e;
  --text: #f0f6fc;
  --muted: #95a5b5;
  --muted-2: #62727f;
  --accent: #d6ff5f;
  --accent-2: #5eead4;
  --accent-3: #b69cff;
  --accent-ink: #0a0d07;
  --danger: #ff6b7a;
  --warn: #fbbf24;
  --ok: #4ade80;
  --radius: 22px;
  --radius-sm: 15px;
  --shadow: 0 30px 90px rgba(0, 0, 0, .55);
  --font: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "Unbounded", "Manrope", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Consolas, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15.5px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image: radial-gradient(rgba(255, 255, 255, .045) 1px, transparent 1px);
  background-size: 26px 26px;
  mask-image: radial-gradient(65% 55% at 55% 0%, #000 0%, transparent 80%);
  opacity: .55;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(48rem 30rem at 8% -10%, rgba(214, 255, 95, .10), transparent 60%),
    radial-gradient(42rem 28rem at 100% 0%, rgba(94, 234, 212, .08), transparent 62%),
    radial-gradient(46rem 34rem at 50% 115%, rgba(182, 156, 255, .06), transparent 65%);
}

a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
img { display: block; max-width: 100%; }
::selection { background: rgba(214, 255, 95, .3); color: #fff; }

* { scrollbar-width: thin; scrollbar-color: #243544 transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #1d2b38; border-radius: 999px; border: 3px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: #2a3c4b; }

.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.danger { color: var(--danger) !important; }

.app, .login, .modal, .toast { position: relative; z-index: 1; }

/* ================================================================ shell */
.app { display: flex; min-height: 100vh; }

.sidebar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  flex-direction: column;
  gap: 28px;
  width: 252px;
  flex-shrink: 0;
  height: 100vh;
  padding: 24px 16px;
  background: linear-gradient(180deg, rgba(12, 18, 24, .92), rgba(6, 9, 13, .92));
  border-right: 1px solid var(--border-soft);
  backdrop-filter: blur(18px);
}

.brand { display: flex; align-items: center; gap: 11px; padding: 4px 8px; }
.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  border-radius: 11px;
  background: linear-gradient(135deg, #e7ff9a, #c6f24e 45%, #79f5c8);
  color: var(--accent-ink);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 18px;
  box-shadow: 0 0 26px rgba(214, 255, 95, .28), inset 0 1px 0 rgba(255, 255, 255, .5);
}
.brand-mark.large { width: 58px; height: 58px; font-size: 27px; border-radius: 17px; }
.brand-text { font-weight: 800; letter-spacing: .13em; font-size: 11.5px; }
.brand-text span { color: var(--accent); }

.sidenav { display: flex; flex-direction: column; gap: 5px; }
.sidenav a {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 11px;
  border-radius: 12px;
  color: var(--muted);
  font-size: 13.5px;
  font-weight: 600;
  transition: color .18s, background .18s, transform .18s;
}
.sidenav a:hover { color: var(--text); background: rgba(255, 255, 255, .035); }
.sidenav a.active {
  color: #fff;
  background: linear-gradient(90deg, rgba(214, 255, 95, .15), rgba(214, 255, 95, .02));
  box-shadow: inset 3px 0 0 var(--accent);
}
.nav-ico {
  display: grid;
  place-items: center;
  width: 27px;
  height: 27px;
  flex-shrink: 0;
  border-radius: 8px;
  background: rgba(255, 255, 255, .045);
  color: var(--muted-2);
  font-size: 14px;
  line-height: 1;
  transition: background .18s, color .18s;
}
.sidenav a:hover .nav-ico { color: var(--text); }
.sidenav a.active .nav-ico { background: var(--accent); color: var(--accent-ink); }
.nav-badge {
  margin-left: auto;
  min-width: 21px;
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 10.5px;
  font-weight: 800;
  text-align: center;
}

.sidebar-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.sidebar-foot .status-pill { font-size: 11px; padding: 7px 9px; }

.content { flex: 1; min-width: 0; }
#page { max-width: 1460px; margin: 0 auto; padding: 30px clamp(18px, 3.4vw, 46px) 100px; }
.page { animation: page-in .35s ease both; }
@keyframes page-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.mobilebar { display: none; }
.bottomnav { display: none; }

/* ============================================================== controls */
.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}
.page-head h1 {
  margin: 0 0 6px;
  font-family: var(--font-display);
  font-size: clamp(24px, 2.8vw, 32px);
  line-height: 1.08;
  letter-spacing: -.035em;
  font-weight: 700;
}
.page-head p { margin: 0; color: var(--muted); font-size: 13.5px; }
.page-head-actions { display: flex; gap: 9px; flex-shrink: 0; }

.panel {
  position: relative;
  margin-top: 18px;
  padding: 22px;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(19, 28, 37, .82), rgba(10, 15, 21, .82));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .025);
}
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 15px;
}
.panel-head h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: -.02em;
}
.panel h3.subhead { margin: 20px 0 9px; font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.chips-panel { margin-top: 18px; }
.controls-actions { display: flex; gap: 14px; }

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.status-pill .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--muted-2); box-shadow: 0 0 0 3px rgba(141, 154, 168, .1); }
.status-pill.online { color: var(--ok); border-color: rgba(74, 222, 128, .25); }
.status-pill.online .dot { background: var(--ok); box-shadow: 0 0 0 3px rgba(74, 222, 128, .14); }
.status-pill.offline { color: var(--danger); border-color: rgba(255, 107, 122, .25); }
.status-pill.offline .dot { background: var(--danger); box-shadow: 0 0 0 3px rgba(255, 107, 122, .14); }

.icon-btn {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: var(--surface);
  color: var(--muted);
  font-size: 15px;
  transition: color .18s, border-color .18s, transform .18s, background .18s;
}
.icon-btn:hover { color: var(--text); border-color: #32465a; transform: translateY(-1px); background: var(--surface-2); }
.icon-btn.active { color: var(--accent); border-color: rgba(214, 255, 95, .45); }

/* ================================================================= hero */
.hero-card {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: clamp(24px, 3.6vw, 40px);
  border: 1px solid rgba(214, 255, 95, .13);
  border-radius: 28px;
  background:
    radial-gradient(70% 130% at 0% 0%, rgba(214, 255, 95, .12), transparent 55%),
    radial-gradient(55% 110% at 100% 0%, rgba(94, 234, 212, .10), transparent 58%),
    linear-gradient(180deg, #0e1720, #080c11 72%);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, .045);
}
.hero-card::before {
  content: "";
  position: absolute;
  top: -190px;
  right: -110px;
  width: 430px;
  height: 430px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(214, 255, 95, .18), transparent 65%);
  filter: blur(18px);
  pointer-events: none;
}
.hero-card::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(rgba(255, 255, 255, .06) 1px, transparent 1px);
  background-size: 22px 22px;
  opacity: .28;
  mask-image: radial-gradient(60% 80% at 50% 0%, #000, transparent 78%);
}
.hero-copy { position: relative; z-index: 1; }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 6px 12px;
  border: 1px solid rgba(214, 255, 95, .22);
  border-radius: 999px;
  background: rgba(214, 255, 95, .06);
  color: var(--accent);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .11em;
  text-transform: uppercase;
}
.pulse {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 rgba(214, 255, 95, .55);
  animation: pulse 2.2s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(214, 255, 95, .5); }
  70% { box-shadow: 0 0 0 9px rgba(214, 255, 95, 0); }
  100% { box-shadow: 0 0 0 0 rgba(214, 255, 95, 0); }
}
.hero-copy h1 {
  max-width: 840px;
  margin: 16px 0 13px;
  font-family: var(--font-display);
  font-size: clamp(29px, 3.5vw, 43px);
  line-height: 1.06;
  letter-spacing: -.045em;
  font-weight: 700;
}
.hero-copy h1 span {
  background: linear-gradient(135deg, #e7ff9a 0%, #b8ff87 45%, #5eead4 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-copy p { max-width: 580px; margin: 0; color: var(--muted); font-size: 14.5px; }
.hero-stats { position: relative; z-index: 1; display: flex; gap: 9px; align-self: start; }
.hero-stats div {
  min-width: 86px;
  padding: 11px 13px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(255, 255, 255, .025);
  text-align: center;
  backdrop-filter: blur(8px);
}
.hero-stats b { display: block; font-family: var(--mono); font-size: 19px; color: var(--accent); line-height: 1.2; }
.hero-stats span { font-size: 9.5px; color: var(--muted-2); text-transform: uppercase; letter-spacing: .09em; }

/* =============================================================== search */
.searchbar {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  margin: 0;
  padding: 9px 9px 9px 14px;
  border: 1px solid rgba(214, 255, 95, .17);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(24, 36, 47, .95), rgba(11, 17, 24, .95));
  box-shadow: 0 18px 50px rgba(0, 0, 0, .42), inset 0 1px 0 rgba(255, 255, 255, .05);
  transition: border-color .2s, box-shadow .2s;
}
.searchbar:focus-within {
  border-color: rgba(214, 255, 95, .55);
  box-shadow: 0 0 0 4px rgba(214, 255, 95, .07), 0 24px 60px rgba(0, 0, 0, .5);
}
.search-icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  border-radius: 10px;
  background: rgba(214, 255, 95, .1);
  color: var(--accent);
  font-size: 20px;
  line-height: 1;
}
.searchbar input {
  flex: 1;
  min-width: 0;
  padding: 13px 2px;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 16.5px;
  font-weight: 500;
}
.searchbar input::placeholder { color: var(--muted-2); }
.searchbar input::-webkit-search-cancel-button { filter: invert(.6); }

.primary-btn, .searchbar button {
  border: 0;
  border-radius: 11px;
  background: linear-gradient(135deg, #e7ff9a, #c6f24e 55%, #9cf39a);
  color: var(--accent-ink);
  font-weight: 800;
  box-shadow: 0 12px 30px rgba(214, 255, 95, .16);
  transition: transform .18s, box-shadow .18s, filter .18s;
}
.primary-btn { padding: 11px 18px; font-size: 13.5px; }
.searchbar button { padding: 14px 28px; font-size: 15px; flex-shrink: 0; }
.primary-btn:hover, .searchbar button:hover { transform: translateY(-1px); box-shadow: 0 16px 38px rgba(214, 255, 95, .24); filter: brightness(1.03); }
.searchbar button:disabled { opacity: .55; cursor: wait; transform: none; box-shadow: none; }

.quick {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  color: var(--muted-2);
  font-size: 12px;
}
.quick button {
  padding: 6px 12px;
  border: 1px solid rgba(255, 255, 255, .07);
  border-radius: 999px;
  background: rgba(255, 255, 255, .025);
  color: var(--muted);
  font-size: 12px;
  transition: color .18s, border-color .18s, background .18s, transform .18s;
}
.quick button:hover { color: var(--accent); border-color: rgba(214, 255, 95, .35); background: rgba(214, 255, 95, .05); transform: translateY(-1px); }

.search-options { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 14px; margin-top: 2px; }
.search-options .check { padding: 0; font-size: 12px; color: var(--muted-2); }
.search-options .ghost-btn { padding: 8px 13px; font-size: 11.5px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 13px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 600;
  transition: color .15s, border-color .15s, background .15s, transform .15s, box-shadow .15s;
  user-select: none;
}
.chip:hover { color: var(--text); border-color: #32465a; transform: translateY(-1px); }
.chip.active {
  color: var(--text);
  border-color: rgba(214, 255, 95, .5);
  background: rgba(214, 255, 95, .10);
  box-shadow: 0 0 0 3px rgba(214, 255, 95, .035);
}
.chip.active .chip-dot { background: var(--accent) !important; box-shadow: 0 0 8px rgba(214, 255, 95, .5); }
.chip.active .chip-count { color: var(--accent); }
.chip .chip-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--muted-2); }
.chip .chip-count { font-family: var(--mono); font-size: 10.5px; color: var(--accent); }

.chip[data-platform="mercari"] .chip-dot { background: #ff5d5d; }
.chip[data-platform="bunjang"] .chip-dot { background: #ff9a4d; }
.chip[data-platform="vinted"] .chip-dot { background: #2dd4bf; }
.chip[data-platform="grailed"] .chip-dot { background: #d7e0e8; }
.chip[data-platform="yahoo"] .chip-dot { background: #b083ff; }
.chip[data-platform="daangn"] .chip-dot { background: #ff7a2f; }
.chip[data-platform="kurb"] .chip-dot { background: #45c8ff; }
.chip[data-platform="goofish"] .chip-dot { background: #ffe14d; }
.chip[data-platform="kufar"] .chip-dot { background: #4ade80; }
.chip[data-platform="olx"] .chip-dot { background: #a3e635; }
.chip[data-platform="ebay"] .chip-dot { background: #60a5fa; }
.chip[data-platform="depop"] .chip-dot { background: #f87171; }
.chip[data-platform="poshmark"] .chip-dot { background: #fb7185; }
.chip[data-platform="avito"] .chip-dot { background: #38bdf8; }

.chip[data-status="searching"] .chip-dot { animation: blink 1s infinite; }
.chip[data-status="ok"] .chip-dot { background: var(--ok) !important; }
.chip[data-status="error"] .chip-dot, .chip[data-status="timeout"] .chip-dot { background: var(--danger) !important; }
@keyframes blink { 50% { opacity: .25; } }

.filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 14px; margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--border-soft); }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 11.5px; color: var(--muted); }
.field > span:first-child { font-weight: 700; letter-spacing: .02em; }
.field.wide { width: 100%; }
.field input, .field select, .inline-form input, .inline-form select, .watch-note, .login-card input {
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-2);
  color: var(--text);
  outline: 0;
  font-size: 13.5px;
  transition: border-color .18s, box-shadow .18s;
}
.field input:focus, .field select:focus, .inline-form input:focus, .inline-form select:focus {
  border-color: rgba(214, 255, 95, .5);
  box-shadow: 0 0 0 3px rgba(214, 255, 95, .07);
}
.field input[type="number"] { width: 108px; }
.range { display: flex; align-items: center; gap: 8px; }
.range b { color: var(--muted-2); font-weight: 400; }
.field select { min-width: 188px; cursor: pointer; }
.field select option { background: var(--surface-2); }

.check { display: inline-flex; align-items: center; gap: 9px; color: var(--muted); font-size: 13px; cursor: pointer; }
.check input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 38px;
  height: 22px;
  flex-shrink: 0;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-3);
  position: relative;
  cursor: pointer;
  transition: background .18s, border-color .18s;
}
.check input[type="checkbox"]::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #8494a2;
  transition: transform .18s, background .18s;
}
.check input[type="checkbox"]:checked { background: var(--accent); border-color: var(--accent); }
.check input[type="checkbox"]:checked::after { transform: translateX(16px); background: var(--accent-ink); }

.ghost-btn {
  padding: 10px 16px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(255, 255, 255, .025);
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 600;
  transition: color .18s, border-color .18s, background .18s, transform .18s;
}
.ghost-btn:hover { color: var(--text); border-color: #32465a; background: rgba(255, 255, 255, .05); transform: translateY(-1px); }

.link-btn {
  padding: 0;
  border: 0;
  background: none;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  border-bottom: 1px dashed transparent;
  transition: color .18s, border-color .18s;
}
.link-btn:hover { color: var(--accent); border-bottom-color: rgba(214, 255, 95, .4); }

/* =============================================================== status */
.statusbar {
  margin-top: 16px;
  padding: 13px 18px;
  border: 1px solid var(--border-soft);
  border-radius: 14px;
  background: rgba(13, 19, 26, .72);
}
.status-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 20px; color: var(--muted); font-size: 12.5px; }
.timer { font-family: var(--mono); font-size: 11.5px; color: var(--muted-2); }
.progress { height: 4px; margin-top: 10px; border-radius: 999px; background: #0a1118; overflow: hidden; }
.progress > div { height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, var(--accent), var(--accent-2)); box-shadow: 0 0 16px rgba(214, 255, 95, .55); transition: width .35s ease; }

/* ============================================================== results */
.results-head { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; margin: 30px 0 15px; }
.results-head h2 { margin: 0; font-family: var(--font-display); font-size: clamp(18px, 2.2vw, 22px); letter-spacing: -.03em; font-weight: 600; }
#resultsCount { font-size: 12.5px; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 18px; }
.grid:empty { display: none; }

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--border-soft);
  border-radius: 16px;
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  cursor: pointer;
  transition: transform .24s ease, border-color .24s ease, box-shadow .24s ease;
  content-visibility: auto;
  contain-intrinsic-size: auto 380px;
  animation: card-in .4s ease both;
}
@keyframes card-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.card:hover { transform: translateY(-5px); border-color: rgba(214, 255, 95, .38); box-shadow: 0 26px 60px rgba(0, 0, 0, .5); }

.card-media { position: relative; aspect-ratio: 4 / 5; background: var(--surface-2); overflow: hidden; }
.card-media::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(180deg, transparent 55%, rgba(5, 7, 10, .78));
}
.card-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .65s cubic-bezier(.2, .7, .3, 1); }
.card:hover .card-media img { transform: scale(1.065); }
.card-media .placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: radial-gradient(70% 60% at 30% 20%, rgba(214, 255, 95, .10), transparent 60%), var(--surface-2);
  color: var(--muted-2);
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
}

.badge {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  padding: 5px 9px;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 8px;
  background: rgba(5, 7, 10, .72);
  backdrop-filter: blur(8px);
  color: var(--text);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .03em;
}
.badge[data-platform="mercari"] { color: #ff7b7b; }
.badge[data-platform="bunjang"] { color: #ffad70; }
.badge[data-platform="vinted"] { color: #4de3cf; }
.badge[data-platform="grailed"] { color: #e8eff6; }
.badge[data-platform="yahoo"] { color: #c49aff; }
.badge[data-platform="daangn"] { color: #ff9a5c; }
.badge[data-platform="kurb"] { color: #6ad6ff; }
.badge[data-platform="goofish"] { color: #ffe66b; }
.badge[data-platform="kufar"] { color: #6ee7a0; }
.badge[data-platform="olx"] { color: #b6ef56; }
.badge[data-platform="ebay"] { color: #7cb8ff; }
.badge[data-platform="depop"] { color: #ff8d8d; }
.badge[data-platform="poshmark"] { color: #ff8ea2; }
.badge[data-platform="avito"] { color: #5cc8ff; }

.price-tag {
  position: absolute;
  left: 10px;
  bottom: 10px;
  z-index: 2;
  padding: 7px 10px;
  border-radius: 9px;
  background: linear-gradient(135deg, #e7ff9a, #c6f24e);
  color: var(--accent-ink);
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 8px 22px rgba(0, 0, 0, .35);
}

.card-heart {
  position: absolute;
  top: 9px;
  right: 9px;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 50%;
  background: rgba(5, 7, 10, .66);
  backdrop-filter: blur(8px);
  color: var(--muted);
  font-size: 16px;
  opacity: .55;
  transition: opacity .18s, color .18s, border-color .18s, transform .18s, background .18s;
}
.card:hover .card-heart { opacity: 1; }
.card-heart:hover { color: var(--accent); border-color: rgba(214, 255, 95, .5); transform: scale(1.08); }
.card-heart.active { color: var(--accent); border-color: rgba(214, 255, 95, .55); background: rgba(214, 255, 95, .14); opacity: 1; }

.card-body { display: flex; flex-direction: column; gap: 8px; padding: 13px 14px 15px; }
.card-title {
  margin: 0;
  min-height: 2.72em;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.36;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-meta { display: flex; flex-wrap: wrap; gap: 5px; min-height: 18px; }
.tag {
  padding: 3px 7px;
  border-radius: 5px;
  background: rgba(255, 255, 255, .055);
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.card-footer { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-top: 2px; padding-top: 9px; border-top: 1px solid var(--border-soft); }
.card-price { font-family: var(--mono); font-size: 15px; font-weight: 700; color: var(--text); }
.card-original { color: var(--muted-2); font-family: var(--mono); font-size: 10.5px; }

.load-more { display: block; margin: 26px auto 0; padding: 12px 28px; }

.skeleton {
  border-radius: 16px;
  background: linear-gradient(100deg, var(--surface) 30%, var(--surface-2) 50%, var(--surface) 70%);
  background-size: 220% 100%;
  animation: shimmer 1.4s infinite linear;
  aspect-ratio: 4 / 5.7;
}
@keyframes shimmer { to { background-position: -220% 0; } }

.empty {
  max-width: 620px;
  margin: 24px auto 0;
  padding: 46px 24px;
  text-align: center;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  background: rgba(13, 19, 26, .5);
}
.empty-icon {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
  border-radius: 20px;
  border: 1px solid rgba(214, 255, 95, .22);
  background: rgba(214, 255, 95, .07);
  color: var(--accent);
  font-size: 26px;
}
.empty h3 { margin: 0 0 8px; font-family: var(--font-display); font-size: 18px; }
.empty p { margin: 0 auto 16px; max-width: 440px; color: var(--muted); font-size: 13.5px; }

.loading-block { display: flex; align-items: center; gap: 10px; padding: 30px 0; color: var(--muted); font-size: 13.5px; }
.spinner { display: inline-block; width: 16px; height: 16px; border: 2px solid var(--border); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.banner { padding: 12px 14px; border-radius: 10px; font-size: 13px; }
.banner.error { border: 1px solid rgba(255, 107, 122, .3); background: rgba(255, 107, 122, .08); color: var(--danger); }

/* ============================================================ item modal */
.modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(3, 5, 8, .74);
  backdrop-filter: blur(14px);
}
.modal.hidden { display: none; }
.modal-card {
  position: relative;
  width: min(540px, 100%);
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: linear-gradient(180deg, #101922, #0a0f15);
  box-shadow: var(--shadow);
  animation: pop .26s cubic-bezier(.2, .8, .3, 1) both;
}
@keyframes pop { from { opacity: 0; transform: translateY(14px) scale(.985); } to { opacity: 1; transform: none; } }
.modal-card h3 { margin: 0 0 10px; font-family: var(--font-display); font-size: 19px; }
.modal-card p { margin: 0 0 18px; font-size: 13px; }
.modal-close { position: absolute; top: 14px; right: 14px; width: 32px; height: 32px; font-size: 19px; line-height: 1; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }
.test-result { margin: 14px 0 0; font-size: 12.5px; min-height: 20px; }
.test-result.ok { color: var(--ok); }
.test-result.err { color: var(--danger); }

.item-card { width: min(1080px, 100%); max-height: 92vh; padding: 0; overflow: auto; }
.item-layout { display: grid; grid-template-columns: minmax(300px, 46%) 1fr; }
.item-media { position: relative; min-height: 100%; background: #070b0f; }
.item-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.item-media .placeholder { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted-2); font-family: var(--font-display); font-size: 44px; }
.item-info { padding: 28px; min-width: 0; }
.item-info h2 { margin: 10px 0 8px; font-family: var(--font-display); font-size: clamp(19px, 2.3vw, 25px); line-height: 1.18; letter-spacing: -.03em; }
.item-price { display: flex; align-items: baseline; gap: 10px; margin-bottom: 16px; font-family: var(--mono); font-size: 28px; font-weight: 700; color: var(--accent); }
.item-price span { font-size: 11.5px; color: var(--muted-2); font-weight: 500; }
.item-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.item-actions .primary-btn { padding: 11px 16px; font-size: 13px; }
.item-actions .ghost-btn { padding: 11px 14px; }
.item-details { margin: 14px 0 18px; }
.details { display: grid; grid-template-columns: 118px 1fr; gap: 7px 12px; margin: 0; font-size: 12.5px; }
.details dt { color: var(--muted-2); }
.details dd { margin: 0; }
.description { margin-top: 14px; padding: 14px; border: 1px solid var(--border-soft); border-radius: 10px; background: rgba(255, 255, 255, .02); color: var(--muted); font-size: 12.5px; white-space: pre-wrap; max-height: 220px; overflow: auto; }
.item-section { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--border-soft); }
.item-section h4 { margin: 0 0 10px; font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 8px; }
.photos a { display: block; aspect-ratio: 1; border-radius: 9px; overflow: hidden; background: var(--surface-2); border: 1px solid var(--border-soft); }
.photos img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.photos a:hover img { transform: scale(1.06); }
.inline-form { display: flex; gap: 8px; align-items: center; }
.inline-form input, .inline-form select { flex: 1; min-width: 0; }
.similar-list { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; }
.similar-row { display: grid; grid-template-columns: auto 1fr auto auto; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 9px; background: var(--surface-2); font-size: 12px; }
.similar-row:hover { background: var(--surface-3); }
.similar-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sim-score { color: var(--accent); font-family: var(--mono); font-size: 11px; }

/* ================================================================ watch */
.watch-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 14px; margin-top: 16px; }
.watch-card { display: flex; gap: 12px; padding: 12px; border: 1px solid var(--border-soft); border-radius: 14px; background: linear-gradient(180deg, var(--surface-2), var(--surface)); transition: border-color .18s, transform .18s; }
.watch-card:hover { border-color: rgba(214, 255, 95, .28); transform: translateY(-2px); }
.watch-media { position: relative; width: 94px; height: 118px; flex-shrink: 0; border-radius: 10px; overflow: hidden; background: var(--surface-2); }
.watch-media img { width: 100%; height: 100%; object-fit: cover; }
.watch-media .placeholder { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted-2); font-family: var(--font-display); font-weight: 700; }
.watch-body { min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.watch-body h3 { margin: 0; font-size: 12.5px; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.watch-price { font-family: var(--mono); font-size: 14px; font-weight: 700; }
.watch-note { width: 100%; padding: 6px 8px; font-size: 11.5px; }
.watch-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 2px; }
.watch-actions .link-btn { font-size: 11px; }

/* ============================================================ analytics */
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.kpi {
  position: relative;
  overflow: hidden;
  padding: 17px;
  border: 1px solid var(--border-soft);
  border-radius: 15px;
  background: radial-gradient(130% 110% at 0% 0%, rgba(214, 255, 95, .07), transparent 60%), var(--surface);
}
.kpi::before { content: ""; position: absolute; top: 0; left: 0; right: 40%; height: 2px; background: linear-gradient(90deg, var(--accent), transparent); }
.kpi span { display: block; color: var(--muted); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.kpi b {
  display: block;
  margin-top: 7px;
  font-family: var(--mono);
  font-size: 25px;
  line-height: 1.1;
  background: linear-gradient(180deg, #fff, #a9bac9);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.bar-row { display: grid; grid-template-columns: 118px 1fr 42px; gap: 10px; align-items: center; margin: 9px 0; font-size: 12px; }
.bar { height: 7px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--accent), var(--accent-2)); box-shadow: 0 0 14px rgba(214, 255, 95, .25); }
.bar-row b { text-align: right; font-family: var(--mono); font-size: 11.5px; }
.clip-text, .digest, .logs {
  margin: 0;
  padding: 13px;
  max-height: 280px;
  overflow: auto;
  border: 1px solid var(--border-soft);
  border-radius: 11px;
  background: #070c11;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1.65;
  white-space: pre-wrap;
}
.logs { max-height: 380px; }
.table { width: 100%; border-collapse: collapse; font-size: 12px; }
.table th { padding: 8px; color: var(--muted-2); text-align: left; font-weight: 700; font-size: 10.5px; text-transform: uppercase; letter-spacing: .06em; border-bottom: 1px solid var(--border); }
.table td { padding: 9px 8px; border-bottom: 1px solid var(--border-soft); }
.table tbody tr { transition: background .15s; }
.table tbody tr:hover { background: rgba(255, 255, 255, .022); }
.table tr:last-child td { border-bottom: 0; }
.deal-list { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; font-size: 12px; }
.deal-list li b { color: var(--accent); margin-right: 8px; }
.deal-list li em { display: block; color: var(--muted-2); font-style: normal; font-size: 11px; margin-top: 2px; }
.chart-box { margin-top: 12px; min-height: 180px; }
.chart { width: 100%; height: auto; }
.calc-result { margin-top: 14px; padding: 14px; border: 1px solid var(--border-soft); border-radius: 11px; background: rgba(255, 255, 255, .02); font-size: 13px; line-height: 1.75; }
.tag-list { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.export-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(128px, 1fr)); gap: 8px; }

/* ============================================================= settings */
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; align-items: end; }
.form-grid .check { padding: 3px 0; }
.field.compact input { width: 100%; }
.platform-settings { display: flex; flex-direction: column; gap: 8px; }
.platform-row {
  display: grid;
  grid-template-columns: 190px 100px 88px 88px minmax(180px, 1fr) auto;
  gap: 10px;
  align-items: end;
  padding: 12px;
  border: 1px solid var(--border-soft);
  border-radius: 13px;
  background: var(--surface);
  transition: border-color .18s;
}
.platform-row:hover { border-color: #2b3e4f; }
.platform-row .check { align-self: center; }
.platform-row small { color: var(--muted-2); font-weight: 400; }
.field.grow { flex: 1; }
.diag-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-bottom: 14px; }
.diag-grid > div { padding: 12px; border: 1px solid var(--border-soft); border-radius: 11px; background: var(--surface); }
.diag-grid span { display: block; font-size: 10.5px; text-transform: uppercase; letter-spacing: .06em; }
.diag-grid b { font-size: 13.5px; }

/* ================================================================ login */
.login {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 20px;
  background: radial-gradient(60% 60% at 50% 0%, rgba(214, 255, 95, .08), transparent 60%), rgba(3, 5, 8, .88);
  backdrop-filter: blur(14px);
}
.login-card {
  width: min(420px, 100%);
  padding: 32px;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: linear-gradient(180deg, #101922, #090e14);
  box-shadow: var(--shadow);
  text-align: center;
}
.login-card h1 { margin: 16px 0 8px; font-family: var(--font-display); font-size: 24px; letter-spacing: -.03em; }
.login-card p { color: var(--muted); font-size: 12.5px; }
.login-card input { width: 100%; margin: 14px 0 10px; padding: 12px 14px; }
.login-card .primary-btn { width: 100%; }
.login-card .link-btn { margin-top: 12px; }
.login-card code { color: var(--accent); font-family: var(--mono); font-size: 11px; }

.status-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--muted-2); display: inline-block; }
.status-dot.online { background: var(--ok); box-shadow: 0 0 0 3px rgba(74, 222, 128, .14); }
.status-dot.offline { background: var(--danger); box-shadow: 0 0 0 3px rgba(255, 107, 122, .14); }

/* ================================================================ toast */
.toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  z-index: 60;
  transform: translate(-50%, 18px);
  padding: 11px 18px;
  border: 1px solid rgba(214, 255, 95, .25);
  border-radius: 11px;
  background: #101922;
  color: var(--text);
  font-size: 13px;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s, transform .2s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ============================================================ responsive */
@media (max-width: 1180px) {
  .platform-row { grid-template-columns: 170px 90px 80px 80px minmax(150px, 1fr) auto; }
}

@media (max-width: 960px) {
  .sidebar { display: none; }
  .mobilebar {
    display: flex;
    align-items: center;
    gap: 12px;
    position: sticky;
    top: 0;
    z-index: 30;
    padding: 10px 16px;
    background: rgba(6, 9, 13, .84);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--border-soft);
  }
  .mobile-title { margin-left: 2px; font-family: var(--font-display); font-size: 13px; letter-spacing: -.02em; }
  #apiStatusMobile { margin-left: auto; }
  .bottomnav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 40;
    display: flex;
    justify-content: space-around;
    padding: 8px 6px calc(8px + env(safe-area-inset-bottom));
    background: rgba(7, 11, 15, .94);
    backdrop-filter: blur(18px);
    border-top: 1px solid var(--border-soft);
  }
  .bottomnav a { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 5px 9px; border-radius: 9px; color: var(--muted-2); font-size: 9.5px; font-weight: 700; }
  .bottomnav a span { font-size: 17px; line-height: 1; }
  .bottomnav a.active { color: var(--accent); background: rgba(214, 255, 95, .08); }
  #page { padding: 18px 14px 98px; }
  .page-head { flex-direction: column; align-items: flex-start; gap: 10px; }
  .page-head-actions { width: 100%; }
  .hero-card { grid-template-columns: 1fr; gap: 20px; padding: 22px; border-radius: 22px; }
  .hero-stats { width: 100%; }
  .hero-stats div { flex: 1; min-width: 0; }
  .hero-copy h1 { font-size: clamp(27px, 7.4vw, 38px); }
  .item-layout { grid-template-columns: 1fr; }
  .item-media { min-height: 280px; max-height: 380px; }
  .item-info { padding: 20px; }
  .two-col { grid-template-columns: 1fr; }
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .platform-row { grid-template-columns: 1fr 1fr; }
  .platform-row .field.grow { grid-column: 1 / -1; }
  .details { grid-template-columns: 96px 1fr; }
  .bar-row { grid-template-columns: 96px 1fr 38px; }
}

@media (max-width: 620px) {
  .hero-card { padding: 18px; }
  .hero-copy p { font-size: 13px; }
  .searchbar { padding-left: 10px; }
  .searchbar button { padding: 13px 16px; font-size: 14px; }
  .search-icon { width: 32px; height: 32px; font-size: 18px; }
  .results-head { margin-top: 24px; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .card-body { padding: 10px 11px 12px; }
  .card-title { font-size: 12px; }
  .badge { font-size: 9.5px; padding: 4px 7px; }
  .price-tag { font-size: 11px; padding: 5px 7px; }
  .card-heart { width: 28px; height: 28px; font-size: 14px; opacity: 1; }
  .kpi b { font-size: 21px; }
  .item-actions { gap: 6px; }
  .item-actions .primary-btn, .item-actions .ghost-btn { flex: 1; text-align: center; }
  .watch-grid { grid-template-columns: 1fr; }
}

@media (max-width: 380px) {
  .grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  html { scroll-behavior: auto; }
}
