/* ─────────────────────────────────────────────────────────────────
   MF Auction Tracker — auction.css  v20260328b
   eBay marketplace theme — white cards on dark shell
───────────────────────────────────────────────────────────────── */

:root {
  /* Shell — charcoal dark (NOT navy) */
  --bg:           #1c1c1c;
  --bg-mid:       #242424;
  --bg-card:      #ffffff;
  --bg-card-alt:  #f5f5f5;
  --bg-input:     #ffffff;
  --border:       #e0e0e0;
  --border-soft:  #ececec;
  --border-dark:  #2e2e2e;

  /* Text — dark on white cards, light on dark shell */
  --text:         #111111;
  --text-muted:   #555555;
  --text-subtle:  #999999;
  --text-on-dark: #f0f0f0;
  --text-on-dark-muted: #aaaaaa;

  /* eBay signature palette */
  --ebay-blue:        #3665f3;
  --ebay-blue-dark:   #2355e0;
  --ebay-blue-lt:     #5b84ff;
  --ebay-blue-soft:   rgba(54,101,243,0.10);
  --ebay-blue-glow:   rgba(54,101,243,0.30);
  --ebay-red:         #e53238;
  --ebay-red-dark:    #c0272c;
  --ebay-red-soft:    rgba(229,50,56,0.10);
  --ebay-yellow:      #f5af02;
  --ebay-yellow-soft: rgba(245,175,2,0.12);
  --ebay-green:       #86b817;
  --ebay-green-dark:  #6a9412;
  --ebay-green-soft:  rgba(134,184,23,0.12);

  /* Utility */
  --orange:       #e56c00;
  --orange-soft:  rgba(229,108,0,0.10);
  --purple:       #7b4fcf;
  --purple-soft:  rgba(123,79,207,0.10);

  /* Shadows — heavier for white cards on dark bg */
  --shadow:       0 2px 16px rgba(0,0,0,0.18);
  --shadow-hover: 0 6px 28px rgba(0,0,0,0.26);
  --shadow-dark:  0 4px 24px rgba(0,0,0,0.55);

  --radius:       8px;
  --radius-lg:    12px;
  --sidebar-w:    220px;
  --header-h:     60px;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; }
body {
  font-family: 'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background:
    radial-gradient(circle at 15% 12%, rgba(54,101,243,0.26), transparent 24%),
    radial-gradient(circle at 82% 10%, rgba(229,50,56,0.22), transparent 22%),
    radial-gradient(circle at 78% 72%, rgba(245,175,2,0.18), transparent 20%),
    radial-gradient(circle at 10% 80%, rgba(134,184,23,0.14), transparent 18%),
    linear-gradient(180deg, #121212 0%, #1b1b1b 42%, #232323 100%);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
}
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: linear-gradient(180deg, rgba(255,255,255,0.65), transparent 85%);
}
a { color: var(--ebay-blue); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font-family: inherit; cursor: pointer; border: none; outline: none; }
input, select, textarea { font-family: inherit; outline: none; }
img { max-width: 100%; }

/* ── Layout ── */
.layout {
  display: flex;
  min-height: 100vh;
}

/* ═══════════════════════════════════════
   SIDEBAR — dark panel, eBay blue accent
═══════════════════════════════════════ */
.sidebar {
  width: var(--sidebar-w);
  background: #111111;
  border-right: 1px solid #000;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  z-index: 100;
  transition: transform 0.25s ease;
}

.sidebar-brand {
  padding: 18px 16px 14px;
  border-bottom: 1px solid #2a2a2a;
  display: flex;
  align-items: center;
  gap: 10px;
  background:
    linear-gradient(135deg, rgba(54,101,243,0.15), rgba(229,50,56,0.08) 45%, rgba(245,175,2,0.1));
}

.sidebar-brand .brand-icon {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  background:
    conic-gradient(from 200deg, var(--ebay-red), var(--ebay-blue), var(--ebay-yellow), var(--ebay-green), var(--ebay-red));
  box-shadow: 0 12px 24px rgba(0,0,0,0.3);
}
.sidebar-brand .brand-icon::before {
  content: '';
  position: absolute;
  inset: 1px;
  border-radius: 13px;
  background:
    radial-gradient(circle at 28% 30%, rgba(255,255,255,0.35), transparent 38%),
    linear-gradient(155deg, rgba(255,255,255,0.12), rgba(0,0,0,0.08));
}
.sidebar-brand .brand-glyph {
  position: relative;
  z-index: 1;
  font-size: 1.45rem;
  font-weight: 900;
  color: #fff6df;
  text-shadow: 0 5px 12px rgba(0,0,0,0.28);
  transform: translateX(1px) rotate(-8deg);
}

.sidebar-brand .brand-text {
  display: flex;
  flex-direction: column;
}

.sidebar-brand .brand-name {
  font-size: 0.9rem;
  font-weight: 900;
  color: #ffffff;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.sidebar-brand .brand-sub {
  font-size: 0.65rem;
  color: #888;
  font-weight: 600;
}

.sidebar-brand .brand-ebay {
  font-size: 0.58rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  color: #555;
  margin-top: 1px;
}
.sidebar-brand .brand-ebay span { color: var(--ebay-blue-lt); }

.sidebar-nav {
  flex: 1;
  padding: 10px 0;
  overflow-y: auto;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  color: #888;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
  border-left: 3px solid transparent;
  user-select: none;
}

.nav-item:hover {
  background: #1a1a1a;
  color: #ddd;
}

.nav-item.active {
  background: rgba(54,101,243,0.12);
  color: var(--ebay-blue-lt);
  border-left-color: var(--ebay-blue);
}

.nav-item .nav-icon {
  font-size: 1.05rem;
  width: 20px;
  text-align: center;
  flex-shrink: 0;
}

.nav-badge {
  margin-left: auto;
  background: var(--ebay-red);
  color: #fff;
  font-size: 0.62rem;
  font-weight: 800;
  border-radius: 999px;
  padding: 1px 6px;
  min-width: 18px;
  text-align: center;
}

.sidebar-footer {
  padding: 12px 16px;
  border-top: 1px solid #222;
  font-size: 0.68rem;
  color: #444;
  font-weight: 600;
}

/* ═══════════════════════════════════════
   MAIN CONTENT AREA
═══════════════════════════════════════ */
.main {
  margin-left: var(--sidebar-w);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: var(--bg);
}

/* ── Top bar — dark strip ── */
.topbar {
  height: var(--header-h);
  background:
    linear-gradient(90deg, rgba(54,101,243,0.18), transparent 18%, transparent 82%, rgba(229,50,56,0.16)),
    #111111;
  border-bottom: 1px solid #000;
  display: flex;
  align-items: center;
  padding: 0 20px;
  gap: 12px;
  position: sticky;
  top: 0;
  z-index: 50;
}

.topbar-hamburger {
  display: none;
  background: none;
  border: none;
  color: #888;
  font-size: 1.3rem;
  padding: 4px 6px;
  border-radius: 6px;
  transition: background 0.12s;
}
.topbar-hamburger:hover { background: #1a1a1a; }

.topbar-title {
  font-size: 1rem;
  font-weight: 900;
  color: #fff;
  flex: 1;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.topbar-status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  color: #888;
  font-weight: 700;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #444;
}
.status-dot.live { background: var(--ebay-green); animation: pulse 2s infinite; }
.status-dot.pending { background: var(--ebay-yellow); }

/* Live auction badge in topbar */
.topbar-live-badge {
  display: flex;
  align-items: center;
  gap: 5px;
  background: linear-gradient(135deg, rgba(229,50,56,0.17), rgba(245,175,2,0.14));
  border: 1px solid rgba(245,175,2,0.35);
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 0.65rem;
  font-weight: 900;
  color: #ff6b70;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.topbar-live-badge .live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ebay-red);
  animation: pulse 1.2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.35; }
}

/* ── Page sections ── */
.page {
  display: none;
  padding: 24px 24px 48px;
  flex: 1;
}
.page.active { display: block; }

.page-header {
  margin-bottom: 22px;
}

.page-title {
  font-size: 1.55rem;
  font-weight: 900;
  color: var(--text-on-dark);
  display: flex;
  align-items: center;
  gap: 10px;
  letter-spacing: -0.02em;
}

.page-subtitle {
  font-size: 0.86rem;
  color: var(--text-on-dark-muted);
  margin-top: 4px;
  font-weight: 600;
  max-width: 760px;
}

.market-strip {
  display: flex;
  gap: 10px;
  padding: 12px 24px 0;
  flex-wrap: wrap;
}

.market-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  backdrop-filter: blur(8px);
}
.market-chip::before {
  content: '•';
  font-size: 1rem;
}
.market-chip.blue { background: rgba(54,101,243,0.16); color: #8fb0ff; border: 1px solid rgba(54,101,243,0.35); }
.market-chip.red { background: rgba(229,50,56,0.15); color: #ff8e92; border: 1px solid rgba(229,50,56,0.35); }
.market-chip.yellow { background: rgba(245,175,2,0.15); color: #ffd56e; border: 1px solid rgba(245,175,2,0.35); }
.market-chip.green { background: rgba(134,184,23,0.15); color: #c9eb72; border: 1px solid rgba(134,184,23,0.35); }

.auction-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(260px, 0.9fr);
  gap: 20px;
  margin-bottom: 22px;
  padding: 24px 26px;
  border-radius: 26px;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 80% 20%, rgba(245,175,2,0.26), transparent 28%),
    radial-gradient(circle at 10% 85%, rgba(134,184,23,0.18), transparent 24%),
    linear-gradient(135deg, rgba(54,101,243,0.22), rgba(17,17,17,0.4) 38%, rgba(229,50,56,0.18));
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 22px 54px rgba(0,0,0,0.34);
}
.auction-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(120deg, transparent 20%, rgba(255,255,255,0.08) 40%, transparent 55%);
  transform: translateX(-100%);
  animation: hero-sheen 9s linear infinite;
}
@keyframes hero-sheen {
  to { transform: translateX(140%); }
}
.auction-hero-copy {
  position: relative;
  z-index: 1;
}
.auction-eyebrow {
  display: inline-flex;
  align-items: center;
  padding: 7px 12px;
  border-radius: 999px;
  margin-bottom: 14px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.15);
  color: #dce7ff;
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.09em;
}
.auction-hero h2 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  line-height: 1.02;
  color: #fff;
  margin-bottom: 12px;
  max-width: 9ch;
}
.auction-hero p {
  max-width: 560px;
  color: rgba(255,255,255,0.84);
  font-size: 0.98rem;
  line-height: 1.65;
}
.auction-hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 18px;
}
.auction-hero-board {
  position: relative;
  z-index: 1;
  align-self: stretch;
  border-radius: 22px;
  padding: 18px;
  background:
    linear-gradient(160deg, rgba(255,255,255,0.16), rgba(255,255,255,0.04)),
    rgba(10,10,10,0.58);
  border: 1px solid rgba(255,255,255,0.12);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 220px;
}
.hero-burst {
  align-self: flex-start;
  padding: 7px 12px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--ebay-red), #ff6b35);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  box-shadow: 0 12px 24px rgba(229,50,56,0.28);
}
.hero-price {
  font-size: clamp(2rem, 5vw, 3.4rem);
  line-height: 1;
  color: #fff;
  font-weight: 900;
  letter-spacing: -0.05em;
  margin-top: 22px;
}
.hero-meta {
  color: #f9c14a;
  font-size: 0.9rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 8px;
}
.hero-marquee {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}
.hero-marquee span {
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.88);
  font-size: 0.74rem;
  font-weight: 800;
}

/* ═══════════════════════════════════════
   CARDS — WHITE on dark shell (the big change)
═══════════════════════════════════════ */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 22px;
  box-shadow: var(--shadow);
  position: relative;
}

.card::before {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 5px;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  background: linear-gradient(90deg, var(--ebay-red), var(--ebay-blue), var(--ebay-yellow), var(--ebay-green));
  opacity: 0.9;
}

.card-title {
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 10px;
}

/* ═══════════════════════════════════════
   DASHBOARD STATS — white tiles
═══════════════════════════════════════ */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 22px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-top: 4px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: box-shadow 0.15s, transform 0.15s;
  box-shadow: var(--shadow);
}

.stat-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}

/* Colored top borders per eBay palette */
.stat-card.ebay-blue  { border-top-color: var(--ebay-blue); }
.stat-card.ebay-red   { border-top-color: var(--ebay-red); }
.stat-card:not(.ebay-blue):not(.ebay-red):nth-child(2) { border-top-color: var(--ebay-yellow); }
.stat-card:not(.ebay-blue):not(.ebay-red):nth-child(3) { border-top-color: var(--ebay-green); }

.stat-label {
  font-size: 0.7rem;
  font-weight: 800;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.stat-value {
  font-size: 2.1rem;
  font-weight: 900;
  color: var(--text);
  line-height: 1;
}

.stat-value.ebay-blue   { color: var(--ebay-blue); }
.stat-value.ebay-red    { color: var(--ebay-red); }
.stat-value.ebay-yellow { color: var(--ebay-yellow); }
.stat-value.ebay-green  { color: var(--ebay-green); }
.stat-value.amber       { color: var(--ebay-blue); }   /* remap amber → blue */
.stat-value.green       { color: var(--ebay-green); }
.stat-value.red         { color: var(--ebay-red); }

.stat-sub {
  font-size: 0.7rem;
  color: var(--text-subtle);
  font-weight: 600;
}

/* ── Dashboard 2-col ── */
.dash-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

/* ── Activity feed ── */
.activity-list {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.activity-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--border-soft);
}
.activity-item:last-child { border-bottom: none; }
.activity-note {
  margin-top: 4px;
  font-size: 0.77rem;
  line-height: 1.45;
  color: var(--text-muted);
}
.skip-audit-item .activity-icon {
  background: rgba(229,50,56,0.12);
  border: 1px solid rgba(229,50,56,0.16);
}

.activity-icon {
  width: 30px;
  height: 30px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.88rem;
  flex-shrink: 0;
}

.activity-icon.amber  { background: var(--ebay-blue-soft); }
.activity-icon.green  { background: var(--ebay-green-soft); }
.activity-icon.red    { background: var(--ebay-red-soft); }
.activity-icon.blue   { background: var(--ebay-blue-soft); }
.activity-icon.orange { background: var(--orange-soft); }

.activity-body { flex: 1; min-width: 0; }
.activity-title { font-size: 0.8rem; font-weight: 700; color: var(--text); }
.activity-meta  { font-size: 0.7rem; color: var(--text-muted); margin-top: 2px; }

/* ── Section header row ── */
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.section-head h2 {
  font-size: 1rem;
  font-weight: 900;
  color: var(--text);
}

/* ═══════════════════════════════════════
   BUTTONS
═══════════════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  border-radius: 24px;   /* eBay-style pill buttons */
  font-size: 0.83rem;
  font-weight: 800;
  transition: background 0.12s, box-shadow 0.12s, transform 0.1s;
  cursor: pointer;
  border: none;
  white-space: nowrap;
}
.btn:hover  { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

/* eBay blue BID NOW */
.btn-bid {
  background: var(--ebay-blue);
  color: #fff;
  font-size: 0.86rem;
  font-weight: 900;
  letter-spacing: 0.03em;
  box-shadow: 0 2px 10px var(--ebay-blue-glow);
}
.btn-bid:hover {
  background: var(--ebay-blue-dark);
  box-shadow: 0 4px 16px var(--ebay-blue-glow);
}

/* Outline watch button */
.btn-watchit {
  background: transparent;
  color: var(--ebay-blue);
  border: 2px solid var(--ebay-blue);
  border-radius: 24px;
  padding: 6px 16px;
  font-weight: 800;
  font-size: 0.83rem;
}
.btn-watchit:hover {
  background: var(--ebay-blue);
  color: #fff;
}

.btn-primary {
  background: var(--ebay-blue);
  color: #fff;
  box-shadow: 0 2px 10px var(--ebay-blue-glow);
}

.btn-secondary {
  background: #f0f0f0;
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-secondary:hover { background: #e5e5e5; }

.btn-ghost {
  background: transparent;
  color: var(--ebay-blue);
  padding: 6px 12px;
  font-weight: 700;
}
.btn-ghost:hover { background: var(--ebay-blue-soft); }

.btn-danger {
  background: var(--ebay-red-soft);
  color: var(--ebay-red);
  border: 1px solid rgba(229,50,56,0.25);
}
.btn-kill-switch-dashboard,
.btn-kill-switch-dashboard-off {
  min-width: 220px;
  min-height: 48px;
  border-radius: 12px;
  font-size: 0.86rem;
  font-weight: 900;
  letter-spacing: 0.02em;
  box-shadow: 0 10px 24px rgba(0,0,0,0.18);
}
.btn-kill-switch-dashboard {
  background: linear-gradient(135deg, #ff6b6f, #e53238);
  color: #fff;
}
.btn-kill-switch-dashboard-off {
  background: linear-gradient(135deg, #3d8dff, #2355e0);
  color: #fff;
}

.btn-sm {
  padding: 5px 12px;
  font-size: 0.74rem;
}

.btn-icon {
  width: 32px;
  height: 32px;
  padding: 0;
  justify-content: center;
  border-radius: 8px;
  font-size: 0.9rem;
}

/* ═══════════════════════════════════════
   FORMS / INPUTS — white bg
═══════════════════════════════════════ */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.form-label {
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.form-control {
  background: var(--bg-input);
  border: 1px solid #ccc;
  border-radius: 6px;
  color: var(--text);
  padding: 9px 13px;
  font-size: 0.88rem;
  font-weight: 600;
  transition: border-color 0.12s, box-shadow 0.12s;
  width: 100%;
}
.form-control:focus {
  border-color: var(--ebay-blue);
  box-shadow: 0 0 0 3px var(--ebay-blue-soft);
}
.form-control::placeholder { color: #bbb; }
select.form-control { cursor: pointer; background: #fff; }

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.form-row-3 {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 14px;
}

/* ── Toggle switch — blue ── */
.toggle-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
}
.toggle {
  position: relative;
  width: 38px;
  height: 21px;
  flex-shrink: 0;
}
.toggle input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}
.toggle-track {
  position: absolute;
  inset: 0;
  background: #ddd;
  border-radius: 999px;
  transition: background 0.18s;
  cursor: pointer;
}
.toggle input:checked + .toggle-track { background: var(--ebay-blue); }
.toggle-track::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 15px;
  height: 15px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.18s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.25);
}
.toggle input:checked + .toggle-track::after { transform: translateX(17px); }
.toggle-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
}

/* ═══════════════════════════════════════
   SEARCH PAGE — eBay search bar hero
═══════════════════════════════════════ */
.ebay-search-wrap {
  background: #ffffff;
  border: 1px solid var(--border);
  border-top: 4px solid var(--ebay-blue);
  border-radius: var(--radius-lg);
  padding: 22px 24px;
  margin-bottom: 18px;
  box-shadow: var(--shadow);
}

.ebay-logo-text {
  font-size: 1.8rem;
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1;
  margin-bottom: 14px;
}
.ebay-logo-text .e    { color: #e53238; }
.ebay-logo-text .b    { color: #0064d2; }
.ebay-logo-text .a    { color: #f5af02; }
.ebay-logo-text .y    { color: #86b817; }
.ebay-logo-text .rest { color: #888; font-size: 0.8rem; font-weight: 700; vertical-align: middle; margin-left: 5px; }

.search-bar {
  display: flex;
  gap: 10px;
  margin-bottom: 22px;
}
.search-input-wrap {
  flex: 1;
  position: relative;
}
.search-input-wrap .search-icon {
  position: absolute;
  left: 13px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1rem;
  color: #aaa;
  pointer-events: none;
}
.search-input {
  padding-left: 38px;
  border-radius: 24px !important;
  border: 2px solid #ccc !important;
  font-size: 0.95rem;
}
.search-input:focus {
  border-color: var(--ebay-blue) !important;
}

.search-notice {
  background:
    linear-gradient(135deg, rgba(245,175,2,0.12), rgba(54,101,243,0.06)),
    #fffbe6;
  border: 1px solid rgba(245,175,2,0.4);
  border-radius: 16px;
  padding: 16px 20px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.search-notice .notice-icon { font-size: 1.4rem; flex-shrink: 0; margin-top: 2px; }
.search-notice .notice-title {
  font-size: 0.88rem;
  font-weight: 800;
  color: #7a5c00;
  margin-bottom: 4px;
}
.search-notice .notice-body {
  font-size: 0.8rem;
  color: #7a5c00;
  line-height: 1.6;
}
.search-notice .notice-body a { color: var(--ebay-blue); font-weight: 700; }

/* Category pills */
.search-category-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.category-pill {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 999px;
  padding: 5px 14px;
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.12s;
}
.category-pill:hover,
.category-pill.active {
  background: linear-gradient(135deg, rgba(54,101,243,0.95), rgba(35,85,224,0.92));
  border-color: var(--ebay-blue);
  color: #fff;
  transform: translateY(-1px);
}

/* ═══════════════════════════════════════
   WATCHLIST — white cards
═══════════════════════════════════════ */
.watchlist-add-form {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 22px;
  margin-bottom: 22px;
  box-shadow: var(--shadow);
}
.watchlist-add-form .form-title {
  font-size: 0.9rem;
  font-weight: 900;
  color: var(--text);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.watchlist-add-form .form-actions {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}
.watchlist-add-form .toggles-row {
  display: flex;
  gap: 24px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.watchlist-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.watchlist-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 4px solid transparent;
  border-radius: var(--radius-lg);
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: border-color 0.15s, box-shadow 0.15s;
  box-shadow: var(--shadow);
}
.watchlist-item:hover {
  border-left-color: var(--ebay-blue);
  box-shadow: var(--shadow-hover);
}
.watchlist-item.inactive { opacity: 0.5; }

.watchlist-info { flex: 1; min-width: 0; }
.watchlist-query {
  font-size: 0.92rem;
  font-weight: 800;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.watchlist-meta {
  display: flex;
  gap: 12px;
  margin-top: 5px;
  flex-wrap: wrap;
}
.watchlist-meta-item {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
}
.watchlist-meta-item.amber { color: var(--ebay-blue); }
.watchlist-meta-item.green { color: var(--ebay-green-dark); }

.field-note {
  margin-top: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
}

.watchlist-badges {
  display: flex;
  gap: 6px;
  margin-top: 6px;
  flex-wrap: wrap;
}
.watchlist-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}
.watchlist-inline-toggles {
  margin-top: 12px;
}
.schedule-panel {
  margin-top: 14px;
}
.history-item {
  border-left-color: var(--amber);
}

/* ═══════════════════════════════════════
   ITEM CARDS — eBay listing tiles (white)
   Marketplace grid: tighter, 3-4 cols
═══════════════════════════════════════ */
.items-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 14px;
}

.item-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.15s, transform 0.15s;
  cursor: pointer;
  box-shadow: 0 18px 34px rgba(0,0,0,0.16);
  position: relative;
}
.item-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 24px 42px rgba(0,0,0,0.24);
  border-color: var(--ebay-blue);
}

/* eBay listing image area */
.item-image {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  background:
    radial-gradient(circle at 20% 20%, rgba(54,101,243,0.14), transparent 26%),
    radial-gradient(circle at 80% 18%, rgba(229,50,56,0.1), transparent 22%),
    linear-gradient(180deg, #fafafa, #f0f0f0);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.8rem;
  color: #ccc;
  flex-shrink: 0;
  border-bottom: 1px solid var(--border-soft);
}
.item-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.item-body {
  padding: 14px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  flex: 1;
}

.item-title {
  font-size: 0.84rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* eBay-style big blue price */
.item-price-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}
.item-price {
  font-size: 1.3rem;
  font-weight: 900;
  color: var(--ebay-blue);
  letter-spacing: -0.01em;
}
.item-bids {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-weight: 700;
}

.item-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  padding-top: 6px;
  border-top: 1px solid var(--border-soft);
}

.item-time {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-muted);
}
.item-time.urgent { color: var(--ebay-red); }
.item-time.soon   { color: var(--orange); }

.item-max-bid {
  font-size: 0.7rem;
  color: var(--text-subtle);
  font-weight: 600;
}

/* Item status bar */
.item-card .item-status-bar {
  padding: 6px 12px;
  background: linear-gradient(180deg, #fafafa, #f4f4f4);
  border-top: 1px solid var(--border-soft);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

/* Won card highlight */
.item-card.won-card {
  border-color: var(--ebay-green);
  box-shadow: 0 0 0 1px rgba(134,184,23,0.3), var(--shadow);
}
.item-card.won-card .item-image::after {
  content: '🏆 WON';
  position: absolute;
  top: 8px;
  right: 8px;
  background: var(--ebay-green);
  color: #fff;
  font-size: 0.62rem;
  font-weight: 900;
  padding: 3px 8px;
  border-radius: 6px;
  letter-spacing: 0.08em;
}

/* ── Auction countdown ── */
.countdown {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: 'Courier New', monospace;
  font-weight: 900;
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  padding: 3px 9px;
  border-radius: 999px;
  background: #f5f5f5;
  border: 1px solid var(--border);
  color: var(--text-muted);
}
.countdown.hot    { color: #7a5c00; border-color: #ffe58f; background: #fffbe6; }
.countdown.urgent { color: var(--ebay-red-dark); border-color: rgba(229,50,56,0.4); background: var(--ebay-red-soft); animation: cd-pulse 1s infinite; }
.countdown.soon   { color: var(--orange); border-color: rgba(229,108,0,0.35); background: var(--orange-soft); }

@keyframes cd-pulse {
  0%,100% { opacity: 1; }
  50%      { opacity: 0.55; }
}

/* ── HOT badge ── */
.badge-hot {
  background: linear-gradient(135deg, var(--ebay-red), #ff6b35);
  color: #fff;
  font-size: 0.62rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 999px;
  animation: hot-pulse 2s infinite;
}
@keyframes hot-pulse {
  0%,100% { box-shadow: 0 0 0 0 rgba(229,50,56,0.45); }
  50%      { box-shadow: 0 0 0 5px rgba(229,50,56,0); }
}

/* ── Going/Gone overlay ── */
.going-banner {
  position: absolute;
  top: 8px;
  left: 8px;
  background: var(--ebay-red);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 5px;
  pointer-events: none;
}
.going-banner.gone { background: #999; }

/* ── Bid paddle ── */
.bid-paddle {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  background: #fff;
  border: 2px solid var(--ebay-blue);
  border-radius: 16px;
  padding: 10px 16px;
  min-width: 90px;
  background:
    linear-gradient(160deg, rgba(54,101,243,0.08), rgba(54,101,243,0.02)),
    #f8fbff;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.85), 0 6px 16px rgba(54,101,243,0.18);
}
.bid-paddle .paddle-label {
  font-size: 0.6rem;
  font-weight: 800;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.bid-paddle .paddle-price {
  font-size: 1.3rem;
  font-weight: 900;
  color: var(--ebay-blue);
  line-height: 1.2;
  text-shadow: 0 2px 14px rgba(54,101,243,0.12);
}
.bid-paddle .paddle-bids {
  font-size: 0.63rem;
  color: var(--text-muted);
  font-weight: 700;
  margin-top: 2px;
}

/* ── Snipe dot ── */
.snipe-dot {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.68rem;
  font-weight: 800;
  color: var(--ebay-blue);
  padding: 5px 9px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(54,101,243,0.12), rgba(54,101,243,0.05));
  border: 1px solid rgba(54,101,243,0.16);
}
.snipe-dot::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ebay-blue);
  animation: pulse 1.5s infinite;
}

/* ── Section title ── */
.auction-section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.05rem;
  font-weight: 900;
  color: var(--text-on-dark);
  padding-bottom: 12px;
  border-bottom: 2px solid transparent;
  border-image: linear-gradient(90deg, var(--ebay-blue), var(--ebay-red), transparent) 1;
  margin-bottom: 18px;
}

/* ── eBay search page branding ── */
.ebay-search-wrap {
  background: #ffffff;
  border: 1px solid var(--border);
  border-top: 4px solid var(--ebay-blue);
  border-radius: var(--radius-lg);
  padding: 22px 24px;
  margin-bottom: 18px;
  box-shadow: var(--shadow);
}

/* ═══════════════════════════════════════
   STATUS BADGES
═══════════════════════════════════════ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 0.66rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.badge-watching  { background: var(--ebay-blue-soft);  color: var(--ebay-blue);  border: 1px solid rgba(54,101,243,0.25); }
.badge-bidding   { background: var(--ebay-yellow-soft); color: #7a5c00;           border: 1px solid rgba(245,175,2,0.35); }
.badge-winning   { background: var(--ebay-green-soft);  color: var(--ebay-green-dark); border: 1px solid rgba(134,184,23,0.3); }
.badge-won       { background: var(--ebay-green-soft);  color: var(--ebay-green-dark); border: 1px solid rgba(134,184,23,0.3); }
.badge-lost      { background: var(--ebay-red-soft);   color: var(--ebay-red-dark);  border: 1px solid rgba(229,50,56,0.25); }
.badge-ended     { background: #f0f0f0;                color: #888;                  border: 1px solid #ddd; }
.badge-outbid    { background: var(--ebay-red-soft);   color: var(--ebay-red-dark);  border: 1px solid rgba(229,50,56,0.25); }
.badge-pending   { background: var(--orange-soft);     color: var(--orange);         border: 1px solid rgba(229,108,0,0.25); }
.badge-new       { background: var(--ebay-blue-soft);  color: var(--ebay-blue);      border: 1px solid rgba(54,101,243,0.25); }

/* Bid history specific */
.badge-winning.bid-result { background: var(--ebay-blue-soft); color: var(--ebay-blue); border-color: rgba(54,101,243,0.3); }
.badge-outbid.bid-result  { background: var(--ebay-red-soft);  color: var(--ebay-red);  border-color: rgba(229,50,56,0.3); }

/* ═══════════════════════════════════════
   BID HISTORY TABLE
═══════════════════════════════════════ */
.bid-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}
.bid-table th {
  text-align: left;
  padding: 10px 14px;
  font-size: 0.7rem;
  font-weight: 800;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  border-bottom: 2px solid var(--border);
  white-space: nowrap;
  background: #fafafa;
}
.bid-table td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--border-soft);
  color: var(--text);
  font-weight: 600;
  vertical-align: middle;
}
.bid-table tr:last-child td { border-bottom: none; }
.bid-table tr:hover td { background: #f8f9ff; }

.bid-amount {
  font-weight: 900;
  color: var(--ebay-blue);
  font-size: 0.95rem;
}

/* ═══════════════════════════════════════
   ALERTS
═══════════════════════════════════════ */
.alerts-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.alert-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 18px;
  background: var(--bg-card);
  border-radius: var(--radius);
  border-left: 3px solid transparent;
  cursor: pointer;
  transition: box-shadow 0.12s;
  box-shadow: var(--shadow);
}
.alert-item:hover { box-shadow: var(--shadow-hover); }
.alert-item.unread { border-left-color: var(--ebay-blue); }
.alert-item.unread .alert-title { font-weight: 800; }

.alert-item.type-price_drop  { border-left-color: var(--ebay-green); }
.alert-item.type-ending_soon { border-left-color: var(--orange); }
.alert-item.type-new_match   { border-left-color: var(--ebay-blue); }
.alert-item.type-outbid      { border-left-color: var(--ebay-red); }
.alert-item.type-won         { border-left-color: var(--ebay-green); }

.alert-icon {
  font-size: 1.3rem;
  flex-shrink: 0;
  margin-top: 1px;
  width: 26px;
  text-align: center;
}
.alert-body { flex: 1; min-width: 0; }
.alert-title { font-size: 0.84rem; font-weight: 700; color: var(--text); }
.alert-msg   { font-size: 0.77rem; color: var(--text-muted); margin-top: 3px; line-height: 1.5; }
.alert-time  { font-size: 0.68rem; color: var(--text-subtle); margin-top: 4px; font-weight: 700; }

.alert-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ebay-blue);
  flex-shrink: 0;
  margin-top: 6px;
}
.alert-dot.hidden { visibility: hidden; }

.alerts-actions {
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
}

/* ═══════════════════════════════════════
   SETTINGS
═══════════════════════════════════════ */
.settings-sections {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.settings-section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.settings-section-head {
  padding: 14px 20px;
  border-bottom: 1px solid var(--border-soft);
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fafafa;
}
.settings-section-icon { font-size: 1.05rem; }
.settings-section-title {
  font-size: 0.88rem;
  font-weight: 900;
  color: var(--text);
}
.settings-section-sub {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 600;
  margin-left: auto;
}

.settings-body {
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.settings-row {
  display: flex;
  align-items: center;
  gap: 14px;
}
.settings-row .settings-row-info { flex: 1; min-width: 0; }
.settings-row-label { font-size: 0.84rem; font-weight: 800; color: var(--text); }
.settings-row-sub   { font-size: 0.73rem; color: var(--text-muted); font-weight: 600; margin-top: 2px; }

.api-key-group {
  display: flex;
  gap: 10px;
}
.api-key-group .form-control { flex: 1; font-family: monospace; letter-spacing: 0.02em; }

.bid-timing-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.bid-timing-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color 0.12s, background 0.12s;
  background: #fff;
}
.bid-timing-option:hover { border-color: var(--ebay-blue); background: var(--ebay-blue-soft); }
.bid-timing-option.selected {
  border-color: var(--ebay-blue);
  background: var(--ebay-blue-soft);
}
.bid-timing-option input[type="radio"] { accent-color: var(--ebay-blue); }
.bid-timing-option .option-text { flex: 1; }
.bid-timing-option .option-label { font-size: 0.84rem; font-weight: 800; color: var(--text); }
.bid-timing-option .option-sub   { font-size: 0.72rem; color: var(--text-muted); margin-top: 2px; }

/* ═══════════════════════════════════════
   EMPTY STATES
═══════════════════════════════════════ */
.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-muted);
}
.empty-state .empty-icon {
  font-size: 2.8rem;
  margin-bottom: 14px;
  opacity: 0.4;
}
.empty-state .empty-title {
  font-size: 0.98rem;
  font-weight: 800;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.empty-state .empty-sub {
  font-size: 0.8rem;
  line-height: 1.6;
  max-width: 300px;
  margin: 0 auto 16px;
}

/* ── Filter bar ── */
.filter-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  flex-wrap: wrap;
  align-items: center;
}
.filter-bar .filter-label {
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--text-on-dark-muted);
  text-transform: uppercase;
}

/* ── Overlay / backdrop ── */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.65);
  z-index: 99;
}

/* ── Tooltip ── */
[data-tooltip] { position: relative; }
[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  background: #111;
  color: #eee;
  border: 1px solid #333;
  border-radius: 5px;
  padding: 4px 8px;
  font-size: 0.7rem;
  font-weight: 700;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s;
  z-index: 200;
}
[data-tooltip]:hover::after { opacity: 1; }

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #ccc; border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: #aaa; }

/* ═══════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════ */
@media (max-width: 1200px) {
  .items-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
}

@media (max-width: 1024px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .dash-grid  { grid-template-columns: 1fr; }
  .auction-hero { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .sidebar-overlay.visible { display: block; }
  .main { margin-left: 0; }
  .topbar-hamburger { display: flex; }
  .page { padding: 16px 14px 48px; }
  .market-strip { padding: 10px 14px 0; }
  .auction-hero { padding: 20px 18px; border-radius: 20px; }
  .auction-hero h2 { max-width: 100%; }
  .form-row   { grid-template-columns: 1fr; }
  .form-row-3 { grid-template-columns: 1fr 1fr; }
  .watchlist-item { flex-wrap: wrap; }
  .bid-table { font-size: 0.78rem; }
  .bid-table th, .bid-table td { padding: 8px 10px; }
  .items-grid { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
}

@media (max-width: 480px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .stats-grid .stat-value { font-size: 1.6rem; }
  .items-grid { grid-template-columns: 1fr 1fr; }
  .market-chip { font-size: 0.66rem; padding: 7px 11px; }
  .auction-hero-board { min-height: 0; }
  .form-row-3 { grid-template-columns: 1fr; }
  .watchlist-add-form { padding: 16px 14px; }
  .watchlist-add-form .form-actions { flex-direction: column; }
  .watchlist-add-form .form-actions .btn { width: 100%; }
  .watchlist-query { white-space: normal; }
  .watchlist-actions { width: 100%; justify-content: flex-end; }
  .topbar { gap: 8px; }
  .topbar-title { font-size: 1rem; }
  .topbar-live-badge { margin-left: auto; }
  .form-control { font-size: 16px; }
  .bid-table thead { display: none; }
  .bid-table tr { display: block; border-bottom: 1px solid var(--border); padding: 8px 0; }
  .bid-table td {
    display: flex;
    justify-content: space-between;
    padding: 4px 12px;
    border-bottom: none;
  }
  .bid-table td::before {
    content: attr(data-label);
    font-size: 0.68rem;
    font-weight: 800;
    color: var(--text-muted);
    text-transform: uppercase;
  }
}

/* ─── Kill Switch Banner ─────────────────────────────────────── */
.kill-switch-banner {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--ebay-red);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 10px 20px;
  font-size: 0.85rem;
  font-weight: 800;
  text-align: center;
  flex-wrap: wrap;
}
.ks-banner-link { color: #fff; text-decoration: underline; }
.kill-switch-banner + .layout { border-top: 2px solid var(--ebay-red); }

/* Kill switch dashboard badge */
.killswitch-dash-badge {
  background: rgba(229,0,0,0.12);
  border: 1px solid var(--ebay-red);
  border-radius: 10px;
  color: var(--ebay-red);
  padding: 10px 16px;
  font-size: 0.85rem;
  font-weight: 800;
  margin-bottom: 16px;
  cursor: pointer;
  text-align: center;
}

/* ─── Emergency Controls Section ────────────────────────────── */
.dashboard-killswitch {
  margin-bottom: 20px;
  padding: 18px 20px;
  border-radius: 16px;
  border: 1px solid rgba(229,50,56,0.2);
  background: linear-gradient(135deg, rgba(33,33,33,0.92), rgba(20,20,20,0.96));
  color: #fff;
  box-shadow: 0 18px 34px rgba(0,0,0,0.28);
}
.dashboard-killswitch.armed {
  border-color: rgba(229,50,56,0.34);
  box-shadow: 0 18px 34px rgba(229,50,56,0.12);
}
.dashboard-killswitch.stopped {
  border-color: rgba(54,101,243,0.4);
  box-shadow: 0 18px 34px rgba(54,101,243,0.15);
}
.dashboard-killswitch-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.dashboard-killswitch-head h2 {
  font-size: 1.2rem;
  font-weight: 900;
  color: #fff;
}
.dashboard-killswitch-eyebrow {
  margin-bottom: 5px;
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #ffb6b8;
}
.dashboard-killswitch-body {
  margin-top: 12px;
  font-size: 0.92rem;
  line-height: 1.5;
  color: rgba(255,255,255,0.86);
  max-width: 860px;
}
.dashboard-killswitch-rule {
  margin-top: 12px;
  display: inline-flex;
  align-items: center;
  padding: 7px 11px;
  border-radius: 999px;
  background: rgba(229,50,56,0.16);
  border: 1px solid rgba(229,50,56,0.28);
  color: #ffd8d9;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.03em;
}

.settings-section-emergency {
  border: 1px solid rgba(229,0,0,0.3);
  background: rgba(229,0,0,0.04);
}
.settings-section-emergency .settings-section-head { background: rgba(229,0,0,0.06); }
.settings-section-guide {
  border-color: rgba(54,101,243,0.2);
}
.settings-section-guide .settings-section-head {
  background: linear-gradient(90deg, rgba(54,101,243,0.08), rgba(245,175,2,0.04));
}
.settings-guide-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.settings-guide-card {
  border: 1px solid rgba(54,101,243,0.15);
  border-radius: 12px;
  padding: 14px 15px;
  background: linear-gradient(180deg, rgba(54,101,243,0.06), rgba(255,255,255,0.92));
}

.ks-status-row { margin-bottom: 12px; }
.ks-status {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 900;
  letter-spacing: 0.02em;
}
.ks-status.active   { background: rgba(0,128,0,0.12); color: var(--ebay-green); border: 1px solid rgba(0,128,0,0.25); }
.ks-status.disabled { background: rgba(229,0,0,0.12); color: var(--ebay-red);   border: 1px solid rgba(229,0,0,0.3); }

.btn-kill-switch {
  width: 100%;
  padding: 16px;
  font-size: 1rem;
  font-weight: 900;
  background: var(--ebay-red);
  color: #fff;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  letter-spacing: 0.02em;
  transition: background 0.2s, transform 0.1s;
}
.btn-kill-switch:hover  { background: #c00; transform: scale(1.01); }
.btn-kill-switch:active { transform: scale(0.99); }

.btn-kill-switch-off {
  width: 100%;
  padding: 16px;
  font-size: 1rem;
  font-weight: 900;
  background: var(--ebay-green);
  color: #fff;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  letter-spacing: 0.02em;
  transition: background 0.2s, transform 0.1s;
}
.btn-kill-switch-off:hover { background: #007a00; }

.settings-note {
  margin-top: 10px;
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ─── Spend Progress Bars ────────────────────────────────────── */
.spend-row {
  margin-bottom: 12px;
}
.spend-row:last-child { margin-bottom: 0; }
.spend-label  { font-size: 0.78rem; font-weight: 800; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 4px; }
.spend-info   { display: flex; align-items: baseline; gap: 4px; margin-bottom: 5px; }
.spend-value  { font-size: 1rem; font-weight: 900; color: var(--text); }
.spend-limit  { font-size: 0.78rem; color: var(--text-muted); }
.spend-bar-track { height: 6px; background: var(--border); border-radius: 99px; overflow: hidden; }
.spend-bar-fill  { height: 100%; border-radius: 99px; transition: width 0.4s ease; }

/* ─── Condition Grid ─────────────────────────────────────────── */
.condition-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}
.condition-check {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}
.condition-check:hover { border-color: var(--ebay-blue); background: var(--ebay-blue-soft); }
.condition-check input[type="checkbox"] { accent-color: var(--ebay-blue); width: 16px; height: 16px; }
.condition-label { font-size: 0.8rem; font-weight: 700; }

/* ─── Listing Type Options ───────────────────────────────────── */
.listing-type-options { display: flex; flex-direction: column; gap: 8px; margin-bottom: 4px; }
.listing-type-option {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}
.listing-type-option:hover { border-color: var(--ebay-blue); background: var(--ebay-blue-soft); }
.listing-type-option input[type="radio"] { accent-color: var(--ebay-blue); margin-top: 2px; }

/* ─── Snipe Settings Panel (watchlist add form) ──────────────── */
.snipe-settings-panel {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px 16px 14px;
  margin: 14px 0;
  background: linear-gradient(180deg, #f8f8f8, #f3f3f3);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.65);
  position: relative;
}
.snipe-settings-panel::before {
  content: attr(data-panel);
  position: absolute;
  top: 10px;
  right: 12px;
  font-size: 0.62rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(17,17,17,0.38);
}
.panel-budget {
  border-color: rgba(54,101,243,0.25);
  background: linear-gradient(180deg, rgba(54,101,243,0.08), rgba(54,101,243,0.03));
}
.panel-rules {
  border-color: rgba(229,50,56,0.24);
  background: linear-gradient(180deg, rgba(229,50,56,0.08), rgba(229,50,56,0.03));
}
.panel-schedule {
  border-color: rgba(245,175,2,0.34);
  background: linear-gradient(180deg, rgba(245,175,2,0.1), rgba(245,175,2,0.04));
}
.panel-snipe {
  border-color: rgba(123,79,207,0.22);
  background: linear-gradient(180deg, rgba(123,79,207,0.08), rgba(123,79,207,0.03));
}
.panel-execution {
  border-color: rgba(134,184,23,0.28);
  background: linear-gradient(180deg, rgba(134,184,23,0.09), rgba(134,184,23,0.04));
}
.snipe-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  flex-wrap: wrap;
  gap: 8px;
}
.panel-default-note {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(255,255,255,0.7);
  border: 1px dashed rgba(17,17,17,0.12);
}

/* ─── Per-item inline snipe editor ──────────────────────────── */
.badge-snipe {
  background: rgba(0,100,210,0.1);
  color: var(--ebay-blue-lt);
  border: 1px solid rgba(0,100,210,0.2);
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 8px;
  max-width: 320px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.item-snipe-edit {
  border-top: 1px solid var(--border);
  margin-top: 12px;
  padding-top: 14px;
  width: 100%;
}
.item-rule-edit {
  background: linear-gradient(180deg, rgba(0, 100, 210, 0.05), rgba(255,255,255,0));
}
.watchlist-edit-section {
  margin: 14px 0;
  padding: 14px;
  border-radius: 12px;
  border: 1px solid var(--border-soft);
  background: rgba(255,255,255,0.82);
}
.section-filters {
  border-color: rgba(229,50,56,0.2);
  background: linear-gradient(180deg, rgba(229,50,56,0.06), rgba(255,255,255,0.96));
}
.section-timing {
  border-color: rgba(123,79,207,0.18);
  background: linear-gradient(180deg, rgba(123,79,207,0.06), rgba(255,255,255,0.96));
}
.section-execution {
  margin-top: 12px;
  border-color: rgba(134,184,23,0.2);
  background: linear-gradient(180deg, rgba(134,184,23,0.06), rgba(255,255,255,0.96));
}
.snipe-edit-header {
  font-size: 0.8rem;
  font-weight: 900;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 12px;
}
.snipe-edit-actions { display: flex; gap: 8px; margin-top: 12px; }

/* ─── Mobile responsive additions ───────────────────────────── */
@media (max-width: 640px) {
  .condition-grid { grid-template-columns: repeat(2, 1fr); }
  .snipe-panel-header { flex-direction: column; align-items: flex-start; }
  .kill-switch-banner { font-size: 0.78rem; padding: 8px 14px; }
  .btn-kill-switch, .btn-kill-switch-off { font-size: 0.9rem; padding: 14px; }
  .dashboard-killswitch-head { flex-direction: column; align-items: stretch; }
  .btn-kill-switch-dashboard,
  .btn-kill-switch-dashboard-off { width: 100%; }
  .watchlist-item { align-items: flex-start; }
  .watchlist-actions { flex-wrap: wrap; }
  .settings-guide-grid { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .condition-grid { grid-template-columns: 1fr 1fr; }
}

/* ─── Value Bid — v1.2 ───────────────────────────────────────── */

/* Badge variants */
.badge-value-bid {
  background: rgba(0,180,100,0.12);
  color: #00b464;
  border: 1px solid rgba(0,180,100,0.3);
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 9px;
  cursor: pointer;
  max-width: 340px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.badge-ghost {
  background: var(--bg-card-alt);
  color: var(--text-muted);
  border: 1px dashed var(--border);
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 9px;
  cursor: pointer;
}

/* Value-edit panel (reuses snipe-edit base) */
.item-value-edit {
  background: rgba(0,180,100,0.04);
  border-top: 1px solid rgba(0,180,100,0.2);
}

/* Auto-calculated max bid display */
.value-max-display {
  margin: 10px 0 4px;
  padding: 9px 13px;
  background: var(--bg-card-alt);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.82rem;
  color: var(--text-muted);
}
.value-max-display strong {
  color: var(--ebay-green);
  font-size: 1rem;
}
.api-source-note {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(0, 100, 210, 0.06);
  border: 1px solid rgba(0, 100, 210, 0.12);
}

/* Value bid panel on item cards */
.value-bid-panel {
  margin: 8px 0;
  padding: 10px 12px;
  background: var(--bg-card-alt);
  border-radius: 10px;
  border: 1px solid var(--border);
  font-size: 0.8rem;
}
.value-bid-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 5px;
  flex-wrap: wrap;
}
.vb-label { color: var(--text-muted); font-weight: 700; }
.vb-val   { font-weight: 900; color: var(--text); }
.vb-pct   {
  font-size: 0.72rem;
  font-weight: 800;
  background: var(--bg-page);
  padding: 1px 6px;
  border-radius: 6px;
  color: var(--text-muted);
}

/* BELOW / ABOVE VALUE badge */
.value-bid-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 900;
  padding: 3px 9px;
  border-radius: 6px;
  margin-bottom: 6px;
  letter-spacing: 0.02em;
}
.value-bid-badge.below-value {
  background: rgba(0,180,100,0.15);
  color: #00b464;
  border: 1px solid rgba(0,180,100,0.35);
}
.value-bid-badge.above-value {
  background: rgba(220,50,50,0.1);
  color: var(--ebay-red);
  border: 1px solid rgba(220,50,50,0.25);
}

/* Profit row */
.profit-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
  flex-wrap: wrap;
}
.vb-profit { font-weight: 900; }
.vb-profit.pos { color: var(--ebay-green); }
.vb-profit.neg { color: var(--ebay-red); }
.vb-roi { font-size: 0.72rem; font-weight: 700; color: var(--text-muted); }
.profit-breakdown { font-size: 0.72rem; color: var(--text-muted); margin-top: 3px; }

/* Guardrail check block */
.guardrail-check {
  margin-top: 8px;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-page);
  font-size: 0.75rem;
}
.guardrail-check.all-pass { border-color: rgba(0,180,100,0.3); }
.guardrail-check.has-block { border-color: rgba(220,50,50,0.3); }
.guardrail-header {
  font-weight: 800;
  margin-bottom: 5px;
  font-size: 0.76rem;
}
.guardrail-row { margin: 2px 0; }
.guardrail-row.pass { color: #00b464; }
.guardrail-row.fail { color: var(--ebay-red); font-weight: 700; }

.skip-audit-inline {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(229,50,56,0.2);
  background: rgba(229,50,56,0.06);
}
.skip-audit-inline-title {
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ebay-red);
  margin-bottom: 4px;
}
.skip-audit-inline-body {
  font-size: 0.8rem;
  line-height: 1.45;
  color: var(--text);
}

/* Value opportunities on dashboard */
.vb-badge-sm {
  font-size: 0.7rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 5px;
  white-space: nowrap;
}
.vb-badge-sm.below-value {
  background: rgba(0,180,100,0.15);
  color: #00b464;
}
.vb-badge-sm.above-value {
  background: rgba(220,50,50,0.1);
  color: var(--ebay-red);
}

