/* ==========================================================================
   BizBackerz Design System — eBay US Multi-Store Hunter & Lister
   Exact palette & typography from https://bizbackerz.com/
   ========================================================================== */

:root {
  --rw-night: #08090A;
  --rw-ink: #0D0E10;
  --rw-pine: #16181B;
  --rw-bone: #EEEEE8;
  --rw-fog: #DCDCD3;
  --rw-stone: #75766F;
  --rw-mut-dk: #A5A6A0;
  --rw-brass: #50A2AE;
  --rw-brass-hi: #7AD0DC;
  --rw-pink: #FF3E88;
  --rw-border: rgba(255, 255, 255, 0.09);
  --rw-border-hi: rgba(80, 162, 174, 0.45);

  --rw-font-dw: 'Funnel Display', system-ui, -apple-system, sans-serif;
  --rw-font-b: 'Funnel Sans', system-ui, -apple-system, sans-serif;
  --rw-font-m: 'Geist Mono', ui-monospace, SFMono-Regular, monospace;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --radius: 16px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-font-smoothing: antialiased; }

body.rw-body {
  margin: 0;
  font-family: var(--rw-font-b);
  font-size: 15px;
  line-height: 1.55;
  color: var(--rw-bone);
  background: var(--rw-night);
  min-height: 100vh;
  overflow-x: hidden;
}

.bz-ambient {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(circle at 82% 8%, rgba(80, 162, 174, 0.14) 0%, transparent 42%),
    radial-gradient(circle at 12% 88%, rgba(80, 162, 174, 0.08) 0%, transparent 38%);
}

.hidden { display: none !important; }
.w-full { width: 100%; }
.mt-12, .mt-14 { margin-top: 14px; }
.mt-24 { margin-top: 24px; }
.muted { color: var(--rw-mut-dk); margin: 4px 0 0; font-size: 14px; }
.muted-mono { color: var(--rw-mut-dk); font-size: 11px; }
code { font-family: var(--rw-font-m); font-size: 12px; color: var(--rw-brass-hi); }

/* BizBackerz Typography & Signature Accents */
.rw-mono {
  font-family: var(--rw-font-m);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.rw-eb {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--rw-font-m);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  padding: 5px 13px;
  border-radius: 999px;
  margin-bottom: 12px;
  border: 1px solid rgba(238, 238, 232, 0.22);
  color: var(--rw-bone);
}

.rw-hd {
  font-family: var(--rw-font-dw);
  font-size: clamp(28px, 3vw, 40px);
  font-weight: 600;
  line-height: 1.14;
  letter-spacing: -0.035em;
  margin: 0 0 8px;
  color: #FFFFFF;
}

.rw-hl {
  font-style: italic;
  font-weight: 400;
  display: inline-block;
  background: var(--rw-brass);
  color: #FFFFFF;
  padding: 0.02em 0.22em 0.1em;
  border-radius: 0.16em;
  line-height: 1.05;
}

.rw-pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--rw-brass);
  box-shadow: 0 0 0 4px rgba(80, 162, 174, 0.28);
  display: inline-block;
  flex-shrink: 0;
}

/* Animated Official BizBackerz Logo */
.bz-mark {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  flex-shrink: 0;
}
.bz-mark.bz-mark-lg {
  width: 54px;
  height: 54px;
}
.bz-ring-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}
.bz-orbit {
  transform-box: fill-box;
  transform-origin: center;
  animation: bzSpin 14s linear infinite;
}
.bz-logo:hover .bz-orbit,
.login-brand:hover .bz-orbit {
  animation-duration: 4s;
}
.bz-logo-tile {
  width: 74%;
  height: 74%;
  border-radius: 10px;
  background: #F5F5F2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 5px;
  box-shadow: 0 0 0 1px rgba(80, 162, 174, 0.35), 0 6px 18px rgba(80, 162, 174, 0.22);
  animation: bzBreathe 3.8s ease-in-out infinite;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.bz-mark.bz-mark-lg .bz-logo-tile {
  border-radius: 12px;
  padding: 6px;
}
.bz-logo-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.bz-logo:hover .bz-logo-tile,
.login-brand:hover .bz-logo-tile {
  box-shadow: 0 0 0 2px #50A2AE, 0 0 22px rgba(80, 162, 174, 0.65);
}

@keyframes bzSpin { to { transform: rotate(360deg); } }
@keyframes bzBreathe {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.06); }
}

.brand-wordmark {
  font-family: var(--rw-font-dw);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.03em;
  color: #FFFFFF;
}

.brand-pill {
  font-family: var(--rw-font-m);
  font-size: 10px;
  letter-spacing: 0.1em;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(80, 162, 174, 0.18);
  color: var(--rw-brass-hi);
  border: 1px solid rgba(80, 162, 174, 0.35);
}

/* Login */
.login-wrapper {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.login-card {
  width: 100%;
  max-width: 440px;
  background: linear-gradient(180deg, rgba(80, 162, 174, 0.12) 0%, var(--rw-pine) 42%);
  border: 1px solid var(--rw-border-hi);
  border-radius: 22px;
  padding: 34px;
  box-shadow: 0 30px 70px -28px rgba(80, 162, 174, 0.3);
}
.login-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; }
.login-hd {
  font-family: var(--rw-font-dw);
  font-size: 32px;
  font-weight: 600;
  letter-spacing: -0.035em;
  margin: 0 0 8px;
  color: #FFFFFF;
}
.login-card form { margin-top: 22px; display: flex; flex-direction: column; gap: 12px; }

/* Floating Top Navigation Header (BizBackerz Layout) */
.app-shell { position: relative; z-index: 2; min-height: 100vh; display: flex; flex-direction: column; }

.bz-header {
  position: sticky;
  top: 0;
  z-index: 30;
  padding: 14px 24px;
  background: rgba(8, 9, 10, 0.82);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--rw-border);
}
.bz-header-inner {
  max-width: 1380px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.bz-logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }

.nav-pills {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--rw-ink);
  border: 1px solid var(--rw-border);
  padding: 5px;
  border-radius: 999px;
}
.nav-btn {
  background: transparent;
  border: none;
  color: var(--rw-mut-dk);
  padding: 8px 16px;
  border-radius: 999px;
  cursor: pointer;
  font-family: var(--rw-font-b);
  font-size: 13.5px;
  font-weight: 500;
  transition: all 0.22s var(--ease);
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.nav-btn span {
  font-family: var(--rw-font-m);
  font-size: 10px;
  opacity: 0.7;
}
.nav-btn:hover { color: #FFFFFF; background: rgba(255, 255, 255, 0.05); }
.nav-btn.active {
  background: var(--rw-brass);
  color: #FFFFFF;
  box-shadow: 0 6px 20px -6px rgba(80, 162, 174, 0.65);
}
.nav-btn.active span { opacity: 1; }

.header-right { display: flex; align-items: center; gap: 10px; }
.live-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--rw-pine);
  border: 1px solid var(--rw-border);
  color: var(--rw-bone);
}

/* Main Content */
.main-content {
  width: 100%;
  max-width: 1380px;
  margin: 0 auto;
  padding: 30px 24px 56px;
  flex: 1;
}
.tab-panel { display: none; }
.tab-panel.active { display: block; animation: fadeUp 0.28s var(--ease); }
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.page-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 18px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.head-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

/* Cards & Grids */
.card {
  background: var(--rw-pine);
  border: 1px solid var(--rw-border);
  border-radius: var(--radius);
  padding: 22px;
  margin-bottom: 18px;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.card:hover { border-color: rgba(80, 162, 174, 0.3); }
.card-featured {
  background: linear-gradient(180deg, rgba(80, 162, 174, 0.13) 0%, var(--rw-pine) 55%);
  border-color: var(--rw-border-hi);
  box-shadow: 0 24px 60px -30px rgba(80, 162, 174, 0.28);
}
.card-title { font-family: var(--rw-font-dw); margin: 0 0 14px; font-size: 18px; color: #FFFFFF; }

.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.grid-4 { display: grid; grid-template-columns: 2fr 1fr 1fr 1.5fr; gap: 14px; }
@media (max-width: 900px) {
  .grid-4 { grid-template-columns: 1fr; }
  .bz-header-inner { justify-content: center; }
}
.align-end { display: flex; align-items: flex-end; }

/* Inputs */
label {
  display: block;
  font-family: var(--rw-font-m);
  font-size: 11px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--rw-mut-dk);
  margin-bottom: 6px;
}
input[type="text"], input[type="password"], input[type="number"], select, textarea {
  width: 100%;
  background: var(--rw-ink);
  border: 1px solid var(--rw-border);
  color: var(--rw-bone);
  border-radius: 10px;
  padding: 10px 12px;
  font-family: var(--rw-font-b);
  font-size: 13.5px;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--rw-brass);
  box-shadow: 0 0 0 3px rgba(80, 162, 174, 0.2);
}
.inline-group { display: flex; gap: 6px; }
.checkbox-inline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--rw-bone);
  cursor: pointer;
  margin: 0;
  font-family: var(--rw-font-b);
  text-transform: none;
  letter-spacing: 0;
  font-size: 13.5px;
}
.checkbox-inline input { accent-color: var(--rw-brass); width: 16px; height: 16px; }

/* BizBackerz Pill Buttons */
.btn {
  border: none;
  border-radius: 999px;
  padding: 10px 18px;
  font-family: var(--rw-font-b);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  text-decoration: none;
  transition: all 0.22s var(--ease);
}
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-sm { padding: 7px 13px; font-size: 12px; }
.btn-ico {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--rw-ink);
  color: var(--rw-brass);
  font-size: 12px;
}
.btn-primary, .btn-accent {
  background: var(--rw-brass);
  color: #FFFFFF;
}
.btn-primary:hover, .btn-accent:hover {
  background: #5eb3bf;
  transform: translateY(-1px);
  box-shadow: 0 10px 24px -8px rgba(80, 162, 174, 0.55);
}
.btn-ghost {
  background: var(--rw-ink);
  border: 1px solid var(--rw-border);
  color: var(--rw-bone);
}
.btn-ghost:hover {
  border-color: var(--rw-brass);
  color: #FFFFFF;
}
.btn-danger-ghost {
  background: transparent;
  border: 1px solid rgba(255, 62, 136, 0.45);
  color: #ff85b3;
}
.btn-danger-ghost:hover {
  background: rgba(255, 62, 136, 0.16);
  color: #FFFFFF;
}

.hint-bar {
  margin-top: 14px;
  padding: 10px 14px;
  border-radius: 10px;
  background: rgba(80, 162, 174, 0.12);
  border: 1px solid rgba(80, 162, 174, 0.28);
  color: var(--rw-bone);
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.hint-bar .rw-mono {
  background: var(--rw-brass);
  color: #FFFFFF;
  padding: 2px 8px;
  border-radius: 999px;
}

.toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }

/* Badges */
.badge {
  display: inline-block;
  font-family: var(--rw-font-m);
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.04em;
}
.badge-green { background: rgba(80, 162, 174, 0.2); color: var(--rw-brass-hi); border: 1px solid rgba(80, 162, 174, 0.35); }
.badge-blue { background: rgba(238, 238, 232, 0.1); color: var(--rw-bone); border: 1px solid rgba(238, 238, 232, 0.2); }
.badge-warn { background: rgba(245, 158, 11, 0.16); color: #fcd34d; border: 1px solid rgba(245, 158, 11, 0.3); }
.badge-red { background: rgba(255, 62, 136, 0.18); color: #ff85b3; border: 1px solid rgba(255, 62, 136, 0.38); }

/* Hunted Items */
.hunted-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 16px; }
.hunt-card {
  background: var(--rw-pine);
  border: 1px solid var(--rw-border);
  border-radius: var(--radius);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: all 0.22s var(--ease);
}
.hunt-card:hover { box-shadow: inset 0 0 0 1px var(--rw-border-hi); }
.hunt-card.vero { border-color: rgba(255, 62, 136, 0.45); opacity: 0.78; }
.hunt-top { display: flex; gap: 12px; }
.hunt-img { width: 76px; height: 76px; object-fit: cover; border-radius: 10px; background: var(--rw-ink); flex-shrink: 0; border: 1px solid var(--rw-border); }
.hunt-title { font-weight: 600; font-size: 13.5px; line-height: 1.38; color: #FFFFFF; }
.hunt-metrics { display: flex; gap: 6px; flex-wrap: wrap; }
.hunt-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: auto; }

/* Products */
.products-stack { display: flex; flex-direction: column; gap: 14px; }
.prod-card {
  background: var(--rw-pine);
  border: 1px solid var(--rw-border);
  border-radius: var(--radius);
  padding: 18px;
  display: grid;
  grid-template-columns: 112px 1fr auto;
  gap: 18px;
  align-items: start;
  transition: all 0.22s var(--ease);
}
.prod-card:hover { box-shadow: inset 0 0 0 1px var(--rw-border-hi); }
.prod-thumb { width: 112px; height: 112px; object-fit: cover; border-radius: 12px; background: var(--rw-ink); border: 1px solid var(--rw-border); }
.prod-meta { display: flex; gap: 7px; flex-wrap: wrap; margin: 8px 0; align-items: center; }
.prod-actions { display: flex; flex-direction: column; gap: 7px; min-width: 190px; }

/* Export & Stores Config */
.stores-export-grid, .stores-config-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 16px;
}
.steps-list { margin: 6px 0 0; padding-left: 20px; color: var(--rw-mut-dk); }
.steps-list li { margin-bottom: 6px; }
.steps-list strong { color: var(--rw-bone); }

/* Modal */
.modal { position: fixed; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center; padding: 18px; }
.modal-backdrop { position: fixed; inset: 0; background: rgba(8, 9, 10, 0.8); backdrop-filter: blur(6px); }
.modal-dialog {
  position: relative;
  z-index: 61;
  width: 100%;
  max-width: 980px;
  max-height: 90vh;
  background: var(--rw-pine);
  border: 1px solid var(--rw-border-hi);
  border-radius: 18px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.7);
}
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid var(--rw-border);
}
.modal-header h3 { font-family: var(--rw-font-dw); margin: 0; font-size: 18px; color: #FFFFFF; }
.modal-body { padding: 20px; overflow-y: auto; }

/* Gallery & Variations Table */
.img-strip { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.img-tile { position: relative; width: 84px; height: 84px; border-radius: 10px; overflow: hidden; border: 2px solid var(--rw-border); }
.img-tile.main { border-color: var(--rw-brass); box-shadow: 0 0 0 3px rgba(80, 162, 174, 0.28); }
.img-tile img { width: 100%; height: 100%; object-fit: cover; }
.img-tile button {
  position: absolute; top: 3px; right: 3px; background: rgba(8, 9, 10, 0.85); color: #fff;
  border: none; border-radius: 50%; width: 20px; height: 20px; cursor: pointer; font-size: 11px;
}

.var-table { width: 100%; border-collapse: collapse; margin-top: 8px; font-size: 12.5px; }
.var-table th, .var-table td { border: 1px solid var(--rw-border); padding: 7px 9px; text-align: left; }
.var-table th {
  background: var(--rw-ink);
  color: var(--rw-mut-dk);
  font-family: var(--rw-font-m);
  font-size: 10.5px;
  text-transform: uppercase;
}
.var-table input[type="number"], .var-table input[type="text"] { padding: 5px 7px; font-size: 12px; border-radius: 6px; }

.error-msg { color: #ff85b3; font-size: 12.5px; margin-top: 4px; }
.toast {
  position: fixed;
  bottom: 22px;
  right: 22px;
  z-index: 100;
  background: var(--rw-ink);
  border: 1px solid var(--rw-brass);
  color: #FFFFFF;
  padding: 12px 18px;
  border-radius: 999px;
  font-size: 13px;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.55);
}
