/* public/css/style.css — FETCH Market */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:        #F7F7F8;
  --white:     #FFFFFF;
  --border:    #EBEBEB;
  --border2:   #D8D8D8;
  --text:      #111111;
  --sub:       #555555;
  --muted:     #999999;
  --purple:    #6C47FF;
  --purple-l:  #EEE9FF;
  --purple-m:  #C4B3FF;
  --purple-d:  #5235CC;
  --green:     #12A150;
  --green-l:   #E3F6EC;
  --red:       #E5484D;
  --red-l:     #FFEAEA;
  --gold:      #B45309;
  --gold-l:    #FEF3C7;
  --blue:      #0062FF;
  --blue-l:    #EBF1FF;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.04);
  --shadow:    0 4px 16px rgba(0,0,0,0.08), 0 1px 4px rgba(0,0,0,0.04);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.10), 0 2px 8px rgba(0,0,0,0.05);
  --r:         12px;
  --r-sm:      8px;
  --r-lg:      16px;
  --r-xl:      20px;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
  min-height: 100vh;
}

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

.sidebar {
  width: 220px;
  min-width: 220px;
  background: var(--white);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  z-index: 100;
}

.main-area {
  margin-left: 220px;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ── SIDEBAR ── */
.logo {
  padding: 20px 18px 16px;
  border-bottom: 1px solid var(--border);
  display: block;
  text-decoration: none;
}
.logo-word {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--text);
}
.logo-word span { color: var(--purple); }
.logo-tag {
  font-size: 10px;
  color: var(--muted);
  margin-top: 2px;
  letter-spacing: 0.5px;
}

.nav { padding: 10px 10px; flex: 1; }
.nav-section { font-size: 10px; color: var(--muted); letter-spacing: 1px; text-transform: uppercase; padding: 14px 8px 6px; font-weight: 600; }

.nav-link {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
  border-radius: var(--r-sm);
  color: var(--sub);
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 500;
  transition: all 0.12s;
  cursor: pointer;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
}
.nav-link:hover { background: var(--bg); color: var(--text); }
.nav-link.active { background: var(--purple-l); color: var(--purple); }
.nav-link .ni { width: 18px; text-align: center; font-size: 15px; }
.nav-badge {
  margin-left: auto;
  background: var(--purple);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 20px;
}

.sidebar-user {
  padding: 12px 14px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
}
.user-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--purple-l);
  color: var(--purple);
  font-size: 12px;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.user-info { flex: 1; overflow: hidden; }
.user-name { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-balance { font-size: 11px; color: var(--green); font-weight: 500; }

/* ── TOPBAR ── */
.topbar {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 0 28px;
  height: 56px;
  display: flex;
  align-items: center;
  gap: 12px;
  position: sticky;
  top: 0;
  z-index: 50;
}
.topbar-title { font-size: 16px; font-weight: 700; flex: 1; }
.search-bar {
  flex: 1;
  max-width: 360px;
  position: relative;
}
.search-bar input {
  width: 100%;
  padding: 8px 14px 8px 36px;
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 13px;
  font-family: inherit;
  background: var(--bg);
  color: var(--text);
  transition: all 0.15s;
}
.search-bar input:focus { outline: none; border-color: var(--purple); background: var(--white); box-shadow: 0 0 0 3px var(--purple-l); }
.search-icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 14px; pointer-events: none; }

/* ── BUTTONS ── */
.btn {
  padding: 8px 18px;
  border-radius: var(--r-sm);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  font-family: inherit;
  transition: all 0.12s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  white-space: nowrap;
}
.btn-primary { background: var(--purple); color: #fff; }
.btn-primary:hover { background: var(--purple-d); transform: translateY(-1px); box-shadow: var(--shadow); }
.btn-secondary { background: var(--bg); color: var(--text); border: 1px solid var(--border2); }
.btn-secondary:hover { border-color: var(--text); }
.btn-success { background: var(--green); color: #fff; }
.btn-success:hover { background: #0e9144; }
.btn-ghost { background: transparent; color: var(--sub); border: 1px solid var(--border); }
.btn-ghost:hover { background: var(--bg); color: var(--text); }
.btn-lg { padding: 12px 28px; font-size: 15px; }
.btn-sm { padding: 5px 12px; font-size: 12px; }

/* ── PAGE CONTENT ── */
.content { padding: 28px; max-width: 1200px; }

/* ── CARDS ── */
.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
}
.card-pad { padding: 20px 22px; }

/* ── STATS ── */
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 24px; }
.stat-card { background: var(--white); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 18px 20px; box-shadow: var(--shadow-sm); }
.stat-label { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.8px; font-weight: 600; margin-bottom: 8px; }
.stat-value { font-size: 28px; font-weight: 800; letter-spacing: -0.5px; line-height: 1; }
.stat-value.purple { color: var(--purple); }
.stat-value.green  { color: var(--green); }
.stat-value.gold   { color: var(--gold); }
.stat-delta { font-size: 11px; color: var(--green); margin-top: 6px; font-weight: 500; }

/* ── HERO COMMAND BOX ── */
.command-hero {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 28px;
  margin-bottom: 24px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}
.command-hero::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--purple), #A78BFA, #6C47FF);
}
.command-label { font-size: 11px; color: var(--purple); letter-spacing: 1px; text-transform: uppercase; font-weight: 700; margin-bottom: 14px; }
.command-input-row { display: flex; gap: 12px; align-items: stretch; }
.command-textarea {
  flex: 1;
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: var(--r);
  padding: 14px 16px;
  font-size: 15px;
  font-family: inherit;
  color: var(--text);
  resize: none;
  height: 80px;
  line-height: 1.55;
  transition: all 0.15s;
}
.command-textarea::placeholder { color: var(--muted); }
.command-textarea:focus { outline: none; border-color: var(--purple); background: var(--white); box-shadow: 0 0 0 3px var(--purple-l); }
.command-btn {
  background: var(--purple);
  color: #fff;
  border: none;
  border-radius: var(--r);
  padding: 0 28px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  height: 80px;
  font-family: inherit;
  transition: all 0.12s;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-width: 110px;
}
.command-btn:hover { background: var(--purple-d); box-shadow: var(--shadow-lg); }
.command-btn .cmd-icon { font-size: 20px; }

.quick-pills { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.quick-pill {
  padding: 5px 14px;
  border-radius: 20px;
  border: 1px solid var(--border2);
  font-size: 12px;
  font-weight: 500;
  color: var(--sub);
  cursor: pointer;
  background: var(--white);
  font-family: inherit;
  transition: all 0.12s;
}
.quick-pill:hover { border-color: var(--purple); color: var(--purple); background: var(--purple-l); }

.how-steps { display: grid; grid-template-columns: repeat(4,1fr); gap: 10px; margin-top: 18px; }
.how-step { background: var(--bg); border-radius: var(--r-sm); padding: 12px 14px; }
.step-num { font-size: 10px; font-weight: 700; color: var(--purple); letter-spacing: 1px; margin-bottom: 6px; }
.step-text { font-size: 12px; color: var(--sub); line-height: 1.5; }

/* ── FLOATING PRODUCT CARDS (home hero) ── */
.floating-area {
  position: relative;
  min-height: 320px;
  margin-bottom: 28px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 14px;
}
.float-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s;
  text-decoration: none;
  color: inherit;
  display: block;
}
.float-card:hover { transform: translateY(-4px) rotate(-0.5deg); box-shadow: var(--shadow-lg); border-color: var(--purple-m); }
.float-card-img { width: 100%; aspect-ratio: 1; background: var(--bg); display: flex; align-items: center; justify-content: center; font-size: 52px; }
.float-card-body { padding: 10px 12px 12px; }
.float-card-title { font-size: 12px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 4px; }
.float-card-price { font-size: 15px; font-weight: 800; color: var(--text); }
.float-card-cond { font-size: 10px; color: var(--muted); margin-top: 2px; }

/* ── BROWSE PAGE ── */
.browse-layout { display: grid; grid-template-columns: 220px 1fr; gap: 20px; }

.filters-panel {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 18px;
  height: fit-content;
  position: sticky;
  top: 76px;
}
.filter-title { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.8px; color: var(--muted); margin-bottom: 12px; }
.filter-group { margin-bottom: 20px; }
.filter-group-label { font-size: 13px; font-weight: 600; margin-bottom: 8px; color: var(--text); }
.filter-option { display: flex; align-items: center; gap: 8px; padding: 5px 0; cursor: pointer; }
.filter-option input[type=checkbox] { accent-color: var(--purple); width: 15px; height: 15px; cursor: pointer; }
.filter-option label { font-size: 13px; color: var(--sub); cursor: pointer; flex: 1; }
.filter-option span { font-size: 11px; color: var(--muted); }
.price-range { display: flex; gap: 8px; align-items: center; margin-top: 6px; }
.price-input { flex: 1; padding: 7px 10px; border: 1px solid var(--border2); border-radius: var(--r-sm); font-size: 13px; font-family: inherit; color: var(--text); }
.price-input:focus { outline: none; border-color: var(--purple); }

.listing-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 16px; }
.listing-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  cursor: pointer;
  transition: all 0.18s;
  text-decoration: none;
  color: inherit;
  display: block;
  box-shadow: var(--shadow-sm);
}
.listing-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: var(--border2); }
.listing-img { width: 100%; aspect-ratio: 4/3; background: var(--bg); display: flex; align-items: center; justify-content: center; font-size: 60px; position: relative; }
.listing-badge { position: absolute; top: 10px; left: 10px; font-size: 10px; font-weight: 700; padding: 3px 9px; border-radius: 20px; }
.badge-new   { background: var(--blue-l); color: var(--blue); }
.badge-deal  { background: var(--green-l); color: var(--green); }
.badge-hot   { background: var(--red-l); color: var(--red); }
.badge-feat  { background: var(--purple-l); color: var(--purple); }
.listing-body { padding: 12px 14px 14px; }
.listing-title { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 3px; }
.listing-cond { font-size: 11px; color: var(--muted); margin-bottom: 10px; }
.listing-footer { display: flex; justify-content: space-between; align-items: flex-end; }
.listing-price { font-size: 20px; font-weight: 800; letter-spacing: -0.3px; }
.seller-info { text-align: right; }
.seller-stars { color: #F59E0B; font-size: 11px; }
.seller-name { font-size: 11px; color: var(--muted); }

/* ── HUNT STATUS ── */
.hunt-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 18px 20px;
  margin-bottom: 12px;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}
.hunt-card::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--purple); border-radius: 3px 0 0 3px; }
.hunt-card.purchased::before { background: var(--green); }
.hunt-card.paused::before { background: var(--muted); }
.hunt-card.error::before { background: var(--red); }
.hunt-card.no_match::before { background: var(--gold); }
.hunt-top { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 8px; }
.hunt-name { font-size: 15px; font-weight: 700; }
.hunt-params { font-size: 12px; color: var(--muted); margin-bottom: 10px; }
.progress-bar { height: 4px; background: var(--border); border-radius: 2px; margin-bottom: 8px; overflow: hidden; }
.progress-fill { height: 100%; border-radius: 2px; background: linear-gradient(90deg, var(--purple), #A78BFA); transition: width 0.5s; }
.progress-fill.green { background: var(--green); }
.hunt-foot { display: flex; justify-content: space-between; align-items: center; }
.hunt-step { font-size: 12px; color: var(--sub); }
.hunt-price { font-size: 18px; font-weight: 800; }

/* ── STATUS BADGES ── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
}
.badge-hunting     { background: var(--purple-l); color: var(--purple); }
.badge-purchased   { background: var(--green-l); color: var(--green); }
.badge-negotiating { background: #FEF3C7; color: #92400E; }
.badge-paused      { background: var(--bg); color: var(--muted); border: 1px solid var(--border2); }
.badge-error       { background: var(--red-l); color: var(--red); }
.badge-no_match    { background: var(--gold-l); color: var(--gold); }
.badge-active      { background: var(--green-l); color: var(--green); }
.badge-sold        { background: var(--border); color: var(--muted); }

/* ── AGENT LOG ── */
.agent-log {
  background: #FAFAFA;
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 14px 16px;
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 12px;
  line-height: 1.9;
  max-height: 320px;
  overflow-y: auto;
}
.agent-log::-webkit-scrollbar { width: 4px; }
.agent-log::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 2px; }
.log-row { display: flex; gap: 12px; }
.log-time { color: var(--muted); flex-shrink: 0; font-size: 11px; }
.log-msg.system    { color: var(--sub); }
.log-msg.search    { color: var(--blue); }
.log-msg.eval      { color: #92400E; }
.log-msg.negotiate { color: var(--purple); }
.log-msg.buy       { color: var(--green); font-weight: 600; }
.log-msg.ship      { color: var(--text); }
.log-msg.error     { color: var(--red); }
.log-cursor { display: inline-block; width: 7px; height: 12px; background: var(--purple); margin-left: 2px; vertical-align: middle; animation: blink 1s step-end infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* ── AGENT THINKING ── */
.thinking-box {
  background: var(--purple-l);
  border: 1px solid var(--purple-m);
  border-radius: var(--r-sm);
  padding: 12px 14px;
  margin-bottom: 14px;
}
.thinking-label { font-size: 10px; font-weight: 700; color: var(--purple); letter-spacing: 1px; text-transform: uppercase; margin-bottom: 6px; display: flex; align-items: center; gap: 6px; }
.spin { display: inline-block; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.thinking-text { font-size: 12px; color: #4C1D95; line-height: 1.65; font-family: 'SF Mono','Fira Code',monospace; }

/* ── ORDERS ── */
.order-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 18px;
  margin-bottom: 14px;
  display: flex;
  gap: 16px;
  align-items: flex-start;
  box-shadow: var(--shadow-sm);
}
.order-thumb { width: 56px; height: 56px; background: var(--bg); border-radius: var(--r-sm); display: flex; align-items: center; justify-content: center; font-size: 30px; flex-shrink: 0; }
.order-info { flex: 1; }
.order-name { font-size: 15px; font-weight: 600; margin-bottom: 3px; }
.order-meta { font-size: 12px; color: var(--muted); margin-bottom: 12px; }
.tracker { display: flex; align-items: center; }
.trk-step { display: flex; flex-direction: column; align-items: center; }
.trk-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--border2); flex-shrink: 0; }
.trk-dot.done { background: var(--green); }
.trk-dot.active { background: var(--purple); animation: pulse 1.5s ease-in-out infinite; }
@keyframes pulse { 0%,100%{transform:scale(1);opacity:1}50%{transform:scale(1.3);opacity:.7} }
.trk-label { font-size: 10px; color: var(--muted); margin-top: 4px; text-align: center; white-space: nowrap; }
.trk-label.done { color: var(--green); }
.trk-label.active { color: var(--purple); }
.trk-line { flex: 1; height: 2px; background: var(--border2); margin-bottom: 18px; }
.trk-line.done { background: var(--green); }
.order-right { text-align: right; flex-shrink: 0; min-width: 90px; }
.order-price { font-size: 22px; font-weight: 800; }
.order-saved { font-size: 11px; color: var(--green); font-weight: 500; margin-top: 2px; }
.order-eta { font-size: 11px; color: var(--muted); margin-top: 4px; }

/* ── SELL FORM ── */
.upload-zone {
  border: 2px dashed var(--border2);
  border-radius: var(--r-lg);
  padding: 48px 24px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  background: var(--white);
  margin-bottom: 16px;
}
.upload-zone:hover { border-color: var(--purple); background: var(--purple-l); }
.upload-zone.dragover { border-color: var(--purple); background: var(--purple-l); }
.upload-icon { font-size: 40px; margin-bottom: 12px; }
.upload-title { font-size: 16px; font-weight: 700; margin-bottom: 6px; }
.upload-sub { font-size: 13px; color: var(--muted); line-height: 1.5; }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group.full { grid-column: 1 / -1; }
.form-label { font-size: 12px; font-weight: 600; color: var(--sub); text-transform: uppercase; letter-spacing: 0.5px; }
.form-input, .form-select, .form-textarea {
  padding: 10px 13px;
  border: 1.5px solid var(--border);
  border-radius: var(--r-sm);
  font-size: 14px;
  font-family: inherit;
  color: var(--text);
  background: var(--white);
  transition: all 0.12s;
}
.form-input:focus, .form-select:focus, .form-textarea:focus { outline: none; border-color: var(--purple); box-shadow: 0 0 0 3px var(--purple-l); }
.form-textarea { resize: vertical; min-height: 100px; line-height: 1.55; }

/* ── AI PREVIEW ── */
.ai-preview {
  background: var(--white);
  border: 1.5px solid var(--purple-m);
  border-radius: var(--r-lg);
  padding: 20px;
  position: relative;
  box-shadow: 0 0 0 4px var(--purple-l);
}
.ai-preview-tag {
  position: absolute;
  top: -1px; right: 20px;
  background: var(--purple);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1px;
  padding: 4px 12px;
  border-radius: 0 0 8px 8px;
  text-transform: uppercase;
}
.ai-field { margin-bottom: 12px; }
.ai-field label { font-size: 10px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.8px; display: block; margin-bottom: 4px; }
.ai-field-val { font-size: 14px; color: var(--text); line-height: 1.5; }
.ai-price { font-size: 32px; font-weight: 800; color: var(--purple); letter-spacing: -0.5px; }
.price-compare { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; margin-top: 14px; }
.pc { background: var(--bg); border-radius: var(--r-sm); padding: 10px; text-align: center; }
.pc.highlight { background: var(--purple-l); border: 1px solid var(--purple-m); }
.pc-label { font-size: 10px; color: var(--muted); font-weight: 600; text-transform: uppercase; }
.pc-val { font-size: 16px; font-weight: 800; margin-top: 4px; }

/* ── API PAGE ── */
.api-hero {
  background: linear-gradient(135deg, #1A1A2E 0%, #16213E 50%, #0F3460 100%);
  border-radius: var(--r-xl);
  padding: 36px;
  margin-bottom: 24px;
  color: #fff;
  position: relative;
  overflow: hidden;
}
.api-hero::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: linear-gradient(90deg, var(--purple), #A78BFA, #60A5FA); }
.api-hero-title { font-size: 28px; font-weight: 800; margin-bottom: 10px; letter-spacing: -0.5px; }
.api-hero-sub { font-size: 15px; color: rgba(255,255,255,0.65); line-height: 1.65; max-width: 560px; }
.api-badges { display: flex; gap: 10px; margin-top: 20px; flex-wrap: wrap; }
.api-badge { padding: 7px 16px; background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.2); border-radius: 20px; font-size: 13px; color: rgba(255,255,255,0.8); display: flex; align-items: center; gap: 8px; }
.api-badge .chk { color: #4ADE80; }

.code-block { background: #0D1117; border-radius: var(--r); padding: 20px 22px; overflow-x: auto; margin-bottom: 16px; border: 1px solid #30363D; }
.code-block pre { font-family: 'SF Mono','Fira Code','Fira Mono',monospace; font-size: 13px; line-height: 1.75; color: #E6EDF3; white-space: pre; }
.k { color: #FF7B72; }
.s { color: #A5D6FF; }
.n { color: #79C0FF; }
.c { color: #8B949E; }
.fn { color: #D2A8FF; }

.endpoint-card { background: var(--white); border: 1px solid var(--border); border-radius: var(--r); padding: 16px 18px; margin-bottom: 12px; }
.endpoint-top { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.method { font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: 6px; font-family: monospace; }
.method-post { background: var(--green-l); color: var(--green); }
.method-get  { background: var(--blue-l); color: var(--blue); }
.endpoint-path { font-family: monospace; font-size: 14px; font-weight: 600; }
.endpoint-desc { font-size: 13px; color: var(--sub); }

/* ── FLOW ── */
.flow { display: grid; grid-template-columns: repeat(5,1fr); background: var(--white); border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; margin-bottom: 24px; }
.flow-step { padding: 18px 14px; text-align: center; border-right: 1px solid var(--border); position: relative; }
.flow-step:last-child { border-right: none; }
.flow-step::after { content: '→'; position: absolute; right: -8px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 14px; z-index: 1; }
.flow-step:last-child::after { display: none; }
.flow-icon { font-size: 24px; margin-bottom: 8px; }
.flow-label { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.8px; color: var(--muted); margin-bottom: 4px; }
.flow-desc { font-size: 12px; color: var(--sub); line-height: 1.4; }

/* ── MODALS ── */
.modal-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.4); z-index: 1000; align-items: center; justify-content: center; backdrop-filter: blur(2px); }
.modal-overlay.open { display: flex; }
.modal {
  background: var(--white);
  border-radius: var(--r-xl);
  padding: 32px;
  width: 500px;
  max-width: 92vw;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
  position: relative;
  overflow: hidden;
}
.modal::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: linear-gradient(90deg, var(--purple), #A78BFA); }
.modal-title { font-size: 20px; font-weight: 800; margin-bottom: 6px; }
.modal-sub { font-size: 14px; color: var(--muted); margin-bottom: 20px; }
.modal-log { font-family: monospace; font-size: 12px; line-height: 1.9; background: var(--bg); border-radius: var(--r-sm); padding: 14px 16px; min-height: 100px; max-height: 180px; overflow-y: auto; margin-bottom: 20px; }
.modal-actions { display: flex; gap: 10px; }

/* ── MISC ── */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.three-col { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }
.section-header { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 16px; }
.section-title { font-size: 18px; font-weight: 800; letter-spacing: -0.3px; }
.section-sub { font-size: 13px; color: var(--muted); margin-top: 3px; }
.divider { height: 1px; background: var(--border); margin: 22px 0; }
.empty-state { text-align: center; padding: 48px 24px; color: var(--muted); }
.empty-icon { font-size: 40px; margin-bottom: 12px; }
.empty-title { font-size: 16px; font-weight: 700; color: var(--sub); margin-bottom: 8px; }
.tag { display: inline-block; padding: 2px 10px; border-radius: 20px; font-size: 11px; font-weight: 600; }
.tag-condition-5 { background: var(--green-l); color: var(--green); }
.tag-condition-4 { background: var(--blue-l); color: var(--blue); }
.tag-condition-3 { background: var(--gold-l); color: var(--gold); }
.tag-condition-2 { background: #FEF3C7; color: #92400E; }
.tag-condition-1 { background: var(--red-l); color: var(--red); }
.flash { padding: 10px 14px; border-radius: var(--r-sm); font-size: 13px; font-weight: 500; margin-bottom: 16px; }
.flash-success { background: var(--green-l); color: var(--green); border: 1px solid #86EFAC; }
.flash-error   { background: var(--red-l); color: var(--red); border: 1px solid #FCA5A5; }
.flash-info    { background: var(--purple-l); color: var(--purple); border: 1px solid var(--purple-m); }

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  .sidebar { display: none; }
  .main-area { margin-left: 0; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .browse-layout { grid-template-columns: 1fr; }
  .how-steps { grid-template-columns: 1fr 1fr; }
}

/* ── ANIMATIONS ── */
.fade-in { animation: fadeIn 0.3s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

/* ── FETCH V3 VISUAL REDESIGN ─────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Sora:wght@500;600;700;800&display=swap');

:root {
  --bg: #0A0F1E;
  --bg-soft: #0F1629;
  --bg-muted: #141c33;
  --white: #F7F7FB;
  --text: #F3F4FF;
  --sub: #C4C9E8;
  --muted: #8D94BD;
  --border: rgba(168, 85, 247, 0.24);
  --border2: rgba(168, 85, 247, 0.4);
  --purple: #7C3AED;
  --purple-d: #5B21B6;
  --purple-l: rgba(124, 58, 237, 0.16);
  --green: #4ADE80;
  --green-l: rgba(74, 222, 128, 0.14);
  --red: #F87171;
  --red-l: rgba(248, 113, 113, 0.14);
  --gold: #FBBF24;
  --gold-l: rgba(251, 191, 36, 0.14);
  --blue: #60A5FA;
  --blue-l: rgba(96, 165, 250, 0.14);
  --glow: 0 0 0 1px rgba(168,85,247,.35), 0 14px 40px rgba(124,58,237,.22);
}

body {
  background: radial-gradient(1200px 700px at 10% -20%, rgba(124,58,237,.18), transparent 60%),
              radial-gradient(900px 600px at 90% 0%, rgba(59,130,246,.12), transparent 65%),
              var(--bg);
  color: var(--text);
}

.app-shell-home, .home-page .main-area { margin-left: 0; width: 100%; }
.home-page .main-area { min-height: 100vh; }
.content { max-width: 1280px; margin: 0 auto; }

.sidebar, .topbar, .card, .stat-card, .filters-panel, .listing-card, .order-card, .hunt-card, .endpoint-card, .flow, .modal {
  background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.01)), var(--bg-soft);
  border-color: var(--border);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04), 0 10px 34px rgba(0,0,0,.35);
}
.sidebar { background: #0B1224; }
.topbar { background: rgba(10,15,30,.92); backdrop-filter: blur(12px); }
.logo-word, .topbar-title, .section-title, h1, h2, h3 { font-family: 'Sora', 'Inter', sans-serif; color: var(--text); }
.logo-tag, .section-sub, .form-label, .stat-label { color: var(--muted); }
.nav-link { color: var(--sub); border: 1px solid transparent; }
.nav-link:hover { background: rgba(124,58,237,.12); color: #fff; border-color: var(--border); }
.nav-link.active { background: linear-gradient(90deg, rgba(124,58,237,.24), rgba(168,85,247,.16)); color: #fff; box-shadow: var(--glow); }

.btn {
  transition: all .22s ease;
}
.btn-primary, .btn-success, .command-btn {
  background: linear-gradient(90deg, #7C3AED, #A855F7);
  color: #fff;
  box-shadow: 0 8px 30px rgba(124,58,237,.35);
}
.btn-primary:hover, .btn-success:hover, .command-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 20px rgba(168,85,247,.35), 0 12px 30px rgba(124,58,237,.42);
}
.btn-ghost, .btn-secondary {
  background: rgba(255,255,255,.03);
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-ghost:hover, .btn-secondary:hover {
  border-color: rgba(168,85,247,.7);
  box-shadow: 0 0 0 3px rgba(168,85,247,.14);
}

.form-input, .form-select, .form-textarea, .search-bar input, .price-input, .command-textarea {
  background: rgba(10,15,30,.7);
  color: var(--text);
  border-color: rgba(168,85,247,.28);
}
.form-input:focus, .form-select:focus, .form-textarea:focus, .search-bar input:focus, .price-input:focus, .command-textarea:focus {
  box-shadow: 0 0 0 3px rgba(168,85,247,.2), 0 0 24px rgba(168,85,247,.24);
  border-color: rgba(168,85,247,.85);
  background: rgba(18,27,48,.9);
}

.home-hero {
  position: relative;
  min-height: 100vh;
  padding: 24px 34px 36px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
}
.hero-gradient {
  position: absolute;
  inset: -25%;
  background:
    radial-gradient(45% 55% at 25% 30%, rgba(168,85,247,.22), transparent 70%),
    radial-gradient(38% 48% at 78% 20%, rgba(99,102,241,.2), transparent 75%),
    radial-gradient(28% 45% at 70% 70%, rgba(59,130,246,.12), transparent 70%);
  animation: meshShift 18s ease-in-out infinite alternate;
}
@keyframes meshShift { from { transform: translate3d(0,0,0) scale(1); } to { transform: translate3d(-2%,2%,0) scale(1.06); } }
.hero-nav {
  position: absolute;
  top: 18px;
  left: 34px;
  right: 34px;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.hero-logo {
  text-decoration: none;
  font: 800 28px/1 'Sora', 'Inter', sans-serif;
  color: #fff;
  display: inline-flex;
  flex-direction: column;
  gap: 6px;
}
.hero-logo span { color: #A855F7; }
.hero-logo-sub {
  font: 600 10px/1.1 'Inter', sans-serif;
  letter-spacing: 1.1px;
  text-transform: uppercase;
  color: #B9C2EA;
}
.hero-nav-links { display: flex; gap: 26px; }
.hero-nav-links a {
  color: var(--sub);
  text-decoration: none;
  font-weight: 600;
}
.hero-nav-links a:hover { color: #fff; text-shadow: 0 0 18px rgba(168,85,247,.45); }
.hero-center {
  position: relative;
  z-index: 2;
  max-width: 920px;
  margin: 0 auto;
  text-align: center;
}
.hero-badge {
  display: inline-flex;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(168,85,247,.45);
  background: rgba(124,58,237,.16);
  color: #D8CCFF;
  font-size: 11px;
  letter-spacing: .9px;
  text-transform: uppercase;
  margin-bottom: 14px;
}
.hero-center h1 {
  font-size: clamp(42px, 8vw, 78px);
  line-height: 1.06;
  margin-bottom: 12px;
}
.hero-center p {
  color: var(--sub);
  font-size: clamp(17px, 2.5vw, 23px);
  margin-bottom: 24px;
}
.home-hero .command-hero {
  margin: 0 auto;
  max-width: 900px;
  background: rgba(15,22,41,.52);
  backdrop-filter: blur(18px);
  border: 1px solid rgba(168,85,247,.42);
}
.avatar-menu { position: relative; }
.avatar-summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
}
.avatar-summary::-webkit-details-marker { display: none; }
.avatar-dropdown {
  position: absolute;
  top: 42px;
  right: 0;
  width: 200px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(12,18,36,.96);
  backdrop-filter: blur(12px);
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.avatar-dropdown a {
  color: var(--sub);
  text-decoration: none;
  padding: 8px 10px;
  border-radius: 8px;
}
.avatar-dropdown a:hover { background: rgba(124,58,237,.2); color: #fff; }
.scroll-indicator {
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 24px;
  color: rgba(255,255,255,.66);
  animation: floatY 1.6s ease-in-out infinite;
}
@keyframes floatY { 50% { transform: translate(-50%, 6px); opacity: .7; } }

.home-listings {
  background: linear-gradient(180deg, rgba(10,15,30,0), rgba(10,15,30,.85) 10%, rgba(10,15,30,1));
  padding-bottom: 44px;
}
.listing-card:hover { border-color: rgba(168,85,247,.65); box-shadow: var(--glow); }
.listing-img, .float-card-img, .order-thumb { background: #101933; }
.seller-stars { color: #FBBF24; }

.seller-subnav {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.seller-subnav a {
  text-decoration: none;
  color: var(--sub);
  border: 1px solid var(--border);
  background: rgba(255,255,255,.02);
  border-radius: 999px;
  padding: 7px 12px;
}
.seller-subnav a.active, .seller-subnav a:hover {
  color: #fff;
  background: rgba(124,58,237,.24);
  box-shadow: 0 0 18px rgba(124,58,237,.28);
}

.flash-success, .flash-error, .flash-info {
  background: rgba(15,22,41,.75);
  border-color: var(--border2);
  color: var(--text);
}

@media (max-width: 960px) {
  .hero-nav { left: 14px; right: 14px; }
  .hero-nav-links { display: none; }
  .home-hero { padding: 20px 14px 30px; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
}

/* ── REFINEMENT PASS ───────────────────────────────────────────────────────── */
:root {
  --bg: #0D1B3E;
  --bg-soft: #11254F;
  --bg-muted: #163063;
  --border: rgba(168, 85, 247, 0.3);
  --border2: rgba(168, 85, 247, 0.5);
  --glow: 0 0 0 1px rgba(168,85,247,.4), 0 16px 42px rgba(124,58,237,.28);
}

body {
  background:
    radial-gradient(1000px 680px at 50% -15%, rgba(168,85,247,.2), transparent 62%),
    radial-gradient(900px 620px at 85% 8%, rgba(59,130,246,.18), transparent 70%),
    radial-gradient(800px 560px at 18% 22%, rgba(99,102,241,.13), transparent 72%),
    var(--bg);
}

.sidebar { background: #132B58; }
.topbar { background: rgba(16,33,72,.88); }
.card, .stat-card, .filters-panel, .listing-card, .order-card, .hunt-card, .endpoint-card, .flow, .modal {
  background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.02)), #0F2350;
}
.card-pad { padding: 24px 26px; }
.content { padding: 34px; }
.section-header { margin-bottom: 20px; }

.nav-link {
  position: relative;
  border-radius: 10px;
}
.nav-link.active {
  background: linear-gradient(92deg, rgba(124,58,237,.32), rgba(168,85,247,.14));
  box-shadow: 0 0 22px rgba(168,85,247,.22), inset 0 1px 0 rgba(255,255,255,.08);
}
.nav-link.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 6px;
  bottom: 6px;
  width: 3px;
  border-radius: 3px;
  background: linear-gradient(180deg, #7C3AED, #A855F7);
  box-shadow: 0 0 12px rgba(168,85,247,.65);
}

.sidebar-user-links {
  padding: 0 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.sidebar-text-link {
  color: var(--sub);
  text-decoration: none;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 13px;
  transition: all .2s ease;
}
.sidebar-text-link:hover {
  background: rgba(124,58,237,.2);
  color: #fff;
  text-shadow: 0 0 12px rgba(168,85,247,.45);
}

.hero-gradient {
  background:
    radial-gradient(42% 52% at 50% 44%, rgba(168,85,247,.28), transparent 70%),
    radial-gradient(36% 48% at 65% 28%, rgba(96,165,250,.22), transparent 75%),
    radial-gradient(30% 44% at 34% 24%, rgba(124,58,237,.2), transparent 74%),
    radial-gradient(30% 44% at 74% 70%, rgba(59,130,246,.16), transparent 72%);
  filter: saturate(1.08);
  animation: meshShift 14s ease-in-out infinite alternate;
}

.home-hero .command-hero {
  max-width: 980px;
  padding: 34px;
  background: rgba(20,34,73,.5);
  backdrop-filter: blur(22px) saturate(145%);
  border: 1px solid rgba(194,121,255,.44);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.14), 0 24px 60px rgba(15,10,40,.5), 0 0 36px rgba(124,58,237,.2);
}
.command-hero.command-hero-plain {
  background: transparent;
  border: none;
  box-shadow: none;
  backdrop-filter: none;
  padding: 0;
}
.command-hero.command-hero-plain::before { display: none; }
/* Keep homepage search area free-floating in both themes */
.home-hero .command-hero.command-hero-plain {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
}
.command-textarea { height: 46px; font-size: 15px; }
.command-btn { height: 46px; min-width: 150px; border-radius: 999px; padding: 0 24px; }
.command-textarea {
  background: rgba(20,34,73,.55);
  backdrop-filter: blur(14px) saturate(140%);
  border-radius: 999px;
  padding: 0 18px;
  line-height: 46px;
}
.command-input-row { align-items: center; gap: 10px; }
.quick-pill {
  border: 1px solid rgba(196,132,252,.38);
  color: #DCCBFF;
  background: rgba(124,58,237,.1);
}
.quick-pill:hover { border-color: rgba(196,132,252,.75); color: #fff; background: rgba(124,58,237,.2); }

.hero-logo-main {
  font: 800 28px/1 'Sora', 'Inter', sans-serif;
  color: #fff !important;
  letter-spacing: .4px;
}
.hero-logo-sub {
  color: #9AA2C9;
  margin-top: 2px;
}

.hero-center h1 {
  font-size: clamp(36px, 4.8vw, 58px);
  font-weight: 800;
  letter-spacing: -0.7px;
  white-space: nowrap;
}
.headline-ai {
  background: linear-gradient(90deg, #7C3AED, #C084FC);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.stat-label, .form-label, .command-label, .nav-section, .filter-title {
  letter-spacing: 1.1px;
}

.listing-card:hover {
  border-color: rgba(192,132,252,.75);
  box-shadow: 0 0 0 1px rgba(168,85,247,.45), 0 0 28px rgba(124,58,237,.32), 0 16px 38px rgba(0,0,0,.38);
}
.listing-price { font-size: 23px; letter-spacing: -0.4px; }
.condition-pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .6px;
  text-transform: uppercase;
  margin-right: 6px;
}
.condition-like-new, .condition-excellent {
  background: rgba(74,222,128,.18);
  color: #86EFAC;
  border: 1px solid rgba(74,222,128,.4);
}
.condition-good, .condition-very-good {
  background: rgba(250,204,21,.2);
  color: #FDE047;
  border: 1px solid rgba(250,204,21,.42);
}
.condition-fair {
  background: rgba(251,146,60,.2);
  color: #FDBA74;
  border: 1px solid rgba(251,146,60,.45);
}

/* Hunt timeline redesign */
.timeline-card .agent-log {
  background: transparent;
  border: 0;
  padding: 12px 14px 14px;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  max-height: 360px;
}
.timeline-row {
  display: grid;
  grid-template-columns: 12px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 11px 12px;
  border: 1px solid rgba(168,85,247,.16);
  border-radius: 10px;
  margin-bottom: 8px;
  background: rgba(255,255,255,.02);
}
.timeline-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #A855F7;
  box-shadow: 0 0 0 4px rgba(168,85,247,.15);
}
.timeline-dot.search, .timeline-dot.system, .timeline-dot.eval { background: #A855F7; }
.timeline-dot.negotiate { background: #FACC15; box-shadow: 0 0 0 4px rgba(250,204,21,.14); }
.timeline-dot.buy, .timeline-dot.ship { background: #4ADE80; box-shadow: 0 0 0 4px rgba(74,222,128,.14); }
.timeline-dot.error { background: #F87171; box-shadow: 0 0 0 4px rgba(248,113,113,.14); }
.timeline-msg {
  color: var(--text);
  font-size: 14px;
  line-height: 1.45;
}
.timeline-time {
  color: var(--muted);
  font-size: 11px;
  letter-spacing: .25px;
}
.agent-working-pill {
  display: inline-flex;
  align-items: center;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid rgba(168,85,247,.48);
  background: rgba(124,58,237,.18);
  color: #DEC9FF;
  font-size: 12px;
  font-weight: 600;
  margin: 0 0 10px;
  animation: pillPulse 1.6s ease-in-out infinite;
}
@keyframes pillPulse {
  0%,100% { box-shadow: 0 0 0 0 rgba(168,85,247,.22); }
  50% { box-shadow: 0 0 0 8px rgba(168,85,247,0); }
}

.theme-toggle {
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  height: 22px;
  min-width: 22px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 12px;
  padding: 0;
  opacity: .85;
}
.theme-toggle:hover { box-shadow: none; border-color: rgba(168,85,247,.65); opacity: 1; }
.hero-nav-actions { display: flex; align-items: center; gap: 10px; }

.theme-light {
  --bg: #F7F7F8;
  --bg-soft: #FFFFFF;
  --bg-muted: #EEF1F6;
  --text: #0A0F2E;
  --sub: #555555;
  --muted: #555555;
  --border: #E1E5EE;
  --border2: #C9CFDA;
}
.theme-light body,
body.theme-light {
  background: #F7F7F8;
  color: var(--text);
}
body.theme-light .sidebar {
  background: #FFFFFF;
  border-right: 1px solid #E1E5EE;
  box-shadow: none;
}
body.theme-light .topbar {
  background: #FFFFFF;
  border-bottom: 1px solid #E1E5EE;
  box-shadow: 0 2px 12px rgba(10, 15, 46, 0.06);
}
body.theme-light .card,
body.theme-light .stat-card,
body.theme-light .filters-panel,
body.theme-light .listing-card,
body.theme-light .order-card,
body.theme-light .hunt-card,
body.theme-light .modal,
body.theme-light .flow,
body.theme-light .endpoint-card {
  background: #FFFFFF;
  border-color: #E1E5EE;
  box-shadow: 0 4px 18px rgba(10, 15, 46, 0.05);
}
body.theme-light .hero-logo,
body.theme-light .hero-nav-links a,
body.theme-light .hero-center h1,
body.theme-light .topbar-title,
body.theme-light .logo-word,
body.theme-light .section-title,
body.theme-light .nav-link,
body.theme-light .sidebar-text-link,
body.theme-light .hero-center p,
body.theme-light .hero-badge,
body.theme-light .hero-logo-sub,
body.theme-light .logo-tag,
body.theme-light .section-sub,
body.theme-light .stat-label,
body.theme-light .filter-title,
body.theme-light .filter-option label,
body.theme-light .filter-option span,
body.theme-light .listing-cond,
body.theme-light .seller-name,
body.theme-light .order-meta,
body.theme-light .order-eta,
body.theme-light .trk-label,
body.theme-light .flow-label,
body.theme-light .flow-desc,
body.theme-light .endpoint-desc,
body.theme-light .empty-state,
body.theme-light .empty-title,
body.theme-light .upload-sub,
body.theme-light .form-label,
body.theme-light .ai-field label,
body.theme-light .modal-sub { text-shadow: none; color: #0A0F2E; }
body.theme-light .nav-link { color: #0A0F2E; }
body.theme-light .nav-link:hover { background: #F2F4F8; color: #0A0F2E; }
body.theme-light .nav-link.active {
  background: #EEE9FF;
  color: #6C47FF;
  box-shadow: none;
}
body.theme-light .sidebar-text-link:hover {
  background: #F2F4F8;
  color: #0A0F2E;
}
body.theme-light .hero-nav-links a { color: #0A0F2E; }
body.theme-light .hero-nav-links a:hover { color: #6C47FF; }
body.theme-light .hero-logo-main { color: #0A0F2E !important; }
body.theme-light .hero-logo-main .accent { color: #7C3AED; }
body.theme-light .hero-logo-sub { color: #555555; }
body.theme-light .theme-toggle {
  color: #0A0F2E;
  border-color: #C9CFDA;
  background: #FFFFFF;
}
body.theme-light .theme-toggle:hover { border-color: #7C3AED; }
body.theme-light .quick-pill {
  background: #EEF1F6;
  color: #0A0F2E;
  border-color: #C9CFDA;
}
body.theme-light .quick-pill:hover {
  background: #E3E8F5;
  color: #0A0F2E;
  border-color: #7C3AED;
}
body.theme-light .search-bar input,
body.theme-light .price-input,
body.theme-light .command-textarea,
body.theme-light .form-input,
body.theme-light .form-select,
body.theme-light .form-textarea,
body.theme-light .agent-log,
body.theme-light .modal-log {
  background: #FFFFFF;
  color: #0A0F2E;
  border-color: #C9CFDA;
}
body.theme-light .form-input::placeholder,
body.theme-light .form-textarea::placeholder,
body.theme-light .command-textarea::placeholder,
body.theme-light .search-bar input::placeholder {
  color: #555555;
}
body.theme-light .command-textarea,
body.theme-light .form-input,
body.theme-light .form-select,
body.theme-light .form-textarea,
body.theme-light .search-bar input,
body.theme-light .price-input {
  background: #FFFFFF;
  color: #0A0F2E;
  border-color: #C9CFDA;
}
body.theme-light .listing-img,
body.theme-light .float-card-img,
body.theme-light .order-thumb,
body.theme-light .pc {
  background: #EEF1F6;
}
body.theme-light .home-listings {
  background: #F7F7F8;
}
body.theme-light .home-hero {
  background-image: linear-gradient(rgba(255,255,255,0.45), rgba(255,255,255,0.45)), url('/images/hero-bg.jpg');
}
body.theme-light .hero-gradient { display: none; }
body.theme-light .hero-badge {
  background: rgba(255,255,255,0.92);
  border-color: #C9CFDA;
}
body.theme-light .home-hero .command-hero {
  background: rgba(255,255,255,0.92);
  border: 1px solid #E1E5EE;
  box-shadow: 0 8px 24px rgba(10, 15, 46, 0.08);
  backdrop-filter: none;
}
body.theme-light .hero-center h1,
body.theme-light .hero-center p,
body.theme-light .hero-badge,
body.theme-light .api-hero-sub,
body.theme-light .api-badge,
body.theme-light .stat-label,
body.theme-light .section-sub,
body.theme-light .listing-cond,
body.theme-light .seller-name,
body.theme-light .order-meta,
body.theme-light .order-eta,
body.theme-light .trk-label,
body.theme-light .flow-label,
body.theme-light .flow-desc,
body.theme-light .endpoint-desc,
body.theme-light .empty-state,
body.theme-light .upload-sub,
body.theme-light .form-label,
body.theme-light .ai-field label,
body.theme-light .modal-sub,
body.theme-light .logo-tag { color: #555555; }
body.theme-light .hero-center h1,
body.theme-light .logo-word,
body.theme-light .topbar-title,
body.theme-light .section-title,
body.theme-light .listing-title,
body.theme-light .order-name,
body.theme-light .hunt-name,
body.theme-light .modal-title,
body.theme-light .stat-value,
body.theme-light .endpoint-path,
body.theme-light .flow-step,
body.theme-light .timeline-msg,
body.theme-light .ai-field-val { color: #0A0F2E; }
body.theme-light .api-hero {
  background: #FFFFFF;
  color: #0A0F2E;
  border: 1px solid #E1E5EE;
}
body.theme-light .api-badge {
  background: #EEF1F6;
  border-color: #C9CFDA;
  color: #0A0F2E;
}
body.theme-light .scroll-indicator { color: #0A0F2E; }
body.theme-light .flash-success,
body.theme-light .flash-error,
body.theme-light .flash-info {
  background: #FFFFFF;
  color: #0A0F2E;
  border-color: #C9CFDA;
}

.home-hero {
  padding: 8px 26px 30px;
  background-image: linear-gradient(rgba(15,10,40,0.70), rgba(30,15,60,0.75)), url('/images/hero-bg.jpg');
  background-size: cover;
  background-position: center;
}
.hero-gradient { display: none; }
.hero-nav { top: 2px; left: 0; right: 20px; }
.hero-logo {
  gap: 4px;
  margin-left: 0;
  padding-left: 0;
}
.hero-logo-main {
  font-size: 40px;
  line-height: 1;
}
.hero-logo-main .accent { color: #A855F7; }
.hero-logo-sub { color: #B49AD8; }
.hero-center {
  max-width: 1180px;
  transform: translateY(14px);
}
.hero-center h1 {
  font-size: clamp(5rem, 8vw, 6rem);
  white-space: nowrap;
}
.home-hero .command-hero {
  max-width: 1100px;
  margin-top: 10px;
}
.command-input-row { gap: 14px; }
.command-textarea {
  height: 54px;
  line-height: 54px;
  font-size: 16px;
  flex: 1;
}
.command-btn {
  height: 54px;
  min-width: 180px;
}
.quick-pills { margin-top: 18px; gap: 10px; }
.theme-toggle {
  height: 20px;
  min-width: 20px;
  font-size: 11px;
}
@media (max-width: 960px) {
  .home-hero { padding: 8px 14px 30px; }
  .hero-nav { left: 0; right: 8px; }
  .hero-logo-main { font-size: 32px; }
  .hero-center h1 { white-space: normal; }
}

/* ── SIMPLE LIGHT MODE (body.light-mode) ──────────────────────────────────── */
body.light-mode {
  background: #F5F5F5 !important;
  color: #1a1a2e !important;
}
body.light-mode .main-area,
body.light-mode .home-listings {
  background: #F5F5F5 !important;
}
body.light-mode .sidebar {
  background: #FFFFFF !important;
  border-right: 1px solid #E3E3E3 !important;
  box-shadow: none !important;
}
body.light-mode .topbar {
  background: #FFFFFF !important;
  border-bottom: 1px solid #E3E3E3 !important;
  box-shadow: 0 2px 10px rgba(0,0,0,.06) !important;
}
body.light-mode .hero-nav-links a,
body.light-mode .nav-link,
body.light-mode .sidebar-text-link,
body.light-mode .logo-word,
body.light-mode .topbar-title,
body.light-mode .hero-center h1,
body.light-mode .hero-center p,
body.light-mode .hero-badge,
body.light-mode .section-title,
body.light-mode .listing-title,
body.light-mode .order-name,
body.light-mode .hunt-name,
body.light-mode .modal-title,
body.light-mode .stat-value,
body.light-mode .ai-field-val,
body.light-mode .endpoint-path,
body.light-mode .timeline-msg {
  color: #1a1a2e !important;
  text-shadow: none !important;
}
body.light-mode .hero-logo-main { color: #1a1a2e !important; }
body.light-mode .hero-logo-main .accent,
body.light-mode .logo-word span { color: #7C3AED !important; }
body.light-mode .hero-logo-sub,
body.light-mode .logo-tag,
body.light-mode .section-sub,
body.light-mode .stat-label,
body.light-mode .filter-title,
body.light-mode .filter-option label,
body.light-mode .filter-option span,
body.light-mode .listing-cond,
body.light-mode .seller-name,
body.light-mode .order-meta,
body.light-mode .order-eta,
body.light-mode .trk-label,
body.light-mode .flow-label,
body.light-mode .flow-desc,
body.light-mode .endpoint-desc,
body.light-mode .empty-state,
body.light-mode .upload-sub,
body.light-mode .form-label,
body.light-mode .modal-sub,
body.light-mode .ai-field label {
  color: #666666 !important;
}
body.light-mode .card,
body.light-mode .stat-card,
body.light-mode .filters-panel,
body.light-mode .listing-card,
body.light-mode .order-card,
body.light-mode .hunt-card,
body.light-mode .modal,
body.light-mode .flow,
body.light-mode .endpoint-card {
  background: #FFFFFF !important;
  border: 1px solid #E3E3E3 !important;
  box-shadow: 0 4px 16px rgba(0,0,0,.05) !important;
}
body.light-mode .search-bar input,
body.light-mode .form-input,
body.light-mode .form-select,
body.light-mode .form-textarea,
body.light-mode .price-input,
body.light-mode .command-textarea {
  background: #FFFFFF !important;
  color: #1a1a2e !important;
  border: 1px solid #BFBFBF !important;
}
body.light-mode .search-bar input::placeholder,
body.light-mode .form-input::placeholder,
body.light-mode .form-textarea::placeholder,
body.light-mode .command-textarea::placeholder {
  color: #666666 !important;
}
body.light-mode .quick-pill {
  background: #FFFFFF !important;
  color: #1a1a2e !important;
  border: 1px solid #B9B9C8 !important;
}
body.light-mode .quick-pill:hover {
  background: #F7F7FB !important;
  color: #1a1a2e !important;
  border-color: #9696A8 !important;
}
body.light-mode .listing-img,
body.light-mode .float-card-img,
body.light-mode .order-thumb,
body.light-mode .pc {
  background: #F0F0F0 !important;
}
body.light-mode .home-hero {
  background: linear-gradient(135deg, #F0EEFF 0%, #FAFAFA 40%, #EEE8FF 100%) !important;
  background-image: linear-gradient(135deg, #F0EEFF 0%, #FAFAFA 40%, #EEE8FF 100%) !important;
}
body.light-mode .hero-gradient {
  display: none !important;
}
body.light-mode .home-hero .command-hero {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
}
body.light-mode .hero-center h1 { color: #1a1a2e !important; }
body.light-mode .hero-center p { color: #444444 !important; }
body.light-mode .theme-toggle {
  color: #1a1a2e !important;
  border-color: #BFBFBF !important;
  background: #FFFFFF !important;
}
body.light-mode .theme-toggle:hover {
  border-color: #7C3AED !important;
}
