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

:root {
  --bg: #0b0c0f;
  --surface: #13141a;
  --surface2: #1a1b23;
  --surface3: #21232d;
  --border: rgba(255,255,255,0.06);
  --border-md: rgba(255,255,255,0.11);
  --border-bright: rgba(255,255,255,0.18);
  --text: #e8eaf2;
  --muted: #8b8fa8;
  --hint: #555870;
  --green: #ff6b1a;
  --green-dim: #e05a0d;
  --green-bg: rgba(255,107,26,0.08);
  --green-border: rgba(255,107,26,0.25);
  --blue: #60a5fa;
  --blue-bg: rgba(96,165,250,0.08);
  --blue-border: rgba(96,165,250,0.2);
  --red: #f87171;
  --red-bg: rgba(248,113,113,0.08);
  --red-border: rgba(248,113,113,0.2);
  --amber: #fbbf24;
  --amber-bg: rgba(251,191,36,0.08);
  --amber-border: rgba(251,191,36,0.2);
  --radius: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --grad: linear-gradient(135deg, #ff6b1a 0%, #ff8c4a 100%);
}

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

a { color: inherit; text-decoration: none; }

/* ── NAV ── */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(11,12,15,0.92);
  backdrop-filter: blur(12px);
  border-bottom: 0.5px solid var(--border);
}

.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  height: 58px;
  display: flex;
  align-items: center;
  gap: 32px;
}

.logo {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.5px;
}

.logo span { color: var(--green); }

.nav-links { display: flex; gap: 4px; flex: 1; }

.nav-link {
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  padding: 6px 12px;
  border-radius: var(--radius);
  transition: color 0.15s, background 0.15s;
}

.nav-link:hover, .nav-link.active { color: var(--text); background: var(--surface2); }

.nav-right { display: flex; align-items: center; gap: 8px; }

.nav-balance {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--green);
  background: var(--green-bg);
  border: 0.5px solid var(--green-border);
  border-radius: var(--radius);
  padding: 5px 10px;
}

/* ── BUTTONS ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 14px;
  border-radius: var(--radius);
  border: 0.5px solid var(--border-md);
  background: var(--surface2);
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.12s;
  white-space: nowrap;
  text-decoration: none;
}

.btn:hover { background: var(--surface3); border-color: var(--border-bright); }
.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none; }

.btn-primary {
  background: var(--green);
  color: #0b0c0f;
  border-color: var(--green);
  font-weight: 600;
}

.btn-primary:hover { background: #ff8c4a; border-color: #ff8c4a; }

.btn-ghost { background: transparent; }
.btn-ghost:hover { background: var(--surface2); }

.btn-lg { height: 44px; padding: 0 20px; font-size: 14px; }
.btn-xs { height: 28px; padding: 0 10px; font-size: 12px; }

.btn-group { display: flex; gap: 6px; }

/* ── HERO ── */
.hero { padding: 80px 24px 60px; }

.hero-inner { max-width: 700px; margin: 0 auto; text-align: center; }

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 600;
  color: var(--green);
  background: var(--green-bg);
  border: 0.5px solid var(--green-border);
  border-radius: 99px;
  padding: 4px 12px;
  margin-bottom: 20px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.hero h1 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 52px;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -1.5px;
  margin-bottom: 16px;
}

.grad {
  background: var(--grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  font-size: 16px;
  color: var(--muted);
  line-height: 1.7;
  margin-bottom: 36px;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

/* ── SELL CARD ── */
.sell-card {
  background: var(--surface);
  border: 0.5px solid var(--border-md);
  border-radius: var(--radius-xl);
  padding: 24px;
  text-align: left;
}

.sell-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.sell-card-title { font-size: 13px; font-weight: 500; color: var(--muted); }

.sell-card-help {
  font-size: 12px;
  color: var(--blue);
  display: flex;
  align-items: center;
  gap: 4px;
}

.sell-input-row { display: flex; gap: 8px; }

.sell-input-row input {
  flex: 1;
  height: 48px;
  background: var(--surface2);
  border: 0.5px solid var(--border-md);
  border-radius: var(--radius);
  padding: 0 16px;
  font-size: 14px;
  font-family: inherit;
  color: var(--text);
  outline: none;
  transition: border-color 0.15s;
}

.sell-input-row input:focus { border-color: var(--green-dim); }
.sell-input-row input::placeholder { color: var(--hint); }

/* ── STATUS ── */
.status {
  margin-top: 10px;
  font-size: 12px;
  padding: 8px 12px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  gap: 7px;
  border: 0.5px solid;
}

.status.success { background: var(--green-bg); color: var(--green); border-color: var(--green-border); }
.status.error { background: var(--red-bg); color: var(--red); border-color: var(--red-border); }
.status.loading { background: var(--amber-bg); color: var(--amber); border-color: var(--amber-border); }
.status.info { background: var(--blue-bg); color: var(--blue); border-color: var(--blue-border); }

/* ── RESULTS ── */
.results-section { padding: 0 24px 60px; }
.results-inner { max-width: 1100px; margin: 0 auto; }

.metrics-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}

.metric-card {
  background: var(--surface);
  border: 0.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
}

.metric-val { font-family: 'Space Grotesk', sans-serif; font-size: 24px; font-weight: 600; }
.metric-lbl { font-size: 12px; color: var(--muted); margin-top: 3px; }
.green { color: var(--green); }

.two-col { display: grid; grid-template-columns: 1fr 320px; gap: 20px; }
.col-main, .col-side { display: flex; flex-direction: column; gap: 16px; }

/* ── PANEL ── */
.panel {
  background: var(--surface);
  border: 0.5px solid var(--border-md);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
}

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

.panel-title { font-size: 13px; font-weight: 600; letter-spacing: 0.2px; }

.panel-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  border-top: 0.5px solid var(--border);
  margin-top: 14px;
}

.footer-label { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.4px; }
.footer-val { font-family: 'Space Grotesk', sans-serif; font-size: 20px; font-weight: 600; margin-top: 2px; }

/* ── ITEMS ── */
.item-list { display: flex; flex-direction: column; gap: 6px; }

.item-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--surface2);
  border: 0.5px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color 0.12s;
}

.item-row:hover { border-color: var(--border-md); }
.item-row.sel { border-color: var(--green-border); background: rgba(255,107,26,0.04); }

.rarity { width: 3px; height: 38px; border-radius: 2px; flex-shrink: 0; }

.item-img {
  width: 42px; height: 42px;
  background: var(--surface3);
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; overflow: hidden;
}

.item-img img { width: 100%; height: 100%; object-fit: contain; }

.item-info { flex: 1; min-width: 0; }
.item-name { font-size: 13px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item-wear { font-size: 11px; color: var(--hint); margin-top: 1px; }

.item-price { font-family: 'Space Grotesk', sans-serif; font-size: 14px; font-weight: 600; color: var(--green); min-width: 60px; text-align: right; }
.item-price.na { color: var(--hint); font-size: 12px; font-family: inherit; font-weight: 400; }

.item-provider { font-size: 10px; color: var(--muted); text-align: right; margin-top: 2px; }

.chk {
  width: 18px; height: 18px;
  border-radius: 4px;
  border: 0.5px solid var(--border-md);
  background: var(--surface);
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  pointer-events: none;
}

.chk.on { background: var(--green-bg); border-color: var(--green-border); }

/* ── PROVIDERS ── */
.provider-list { display: flex; flex-direction: column; gap: 8px; }

.provider-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--surface2);
  border: 0.5px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.12s;
}

.provider-row.best { border-color: var(--green-border); background: var(--green-bg); }

.provider-icon {
  width: 32px; height: 32px;
  border-radius: var(--radius);
  background: var(--surface3);
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; font-weight: 700;
  color: var(--muted);
  flex-shrink: 0;
}

.provider-name { flex: 1; font-size: 13px; font-weight: 500; }
.provider-price { font-family: 'Space Grotesk', sans-serif; font-size: 14px; font-weight: 600; }
.provider-best-tag { font-size: 10px; font-weight: 600; color: var(--green); text-transform: uppercase; letter-spacing: 0.4px; }

.best-detail { display: flex; flex-direction: column; gap: 0; }
.best-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 0.5px solid var(--border);
  font-size: 13px;
}
.best-row:last-child { border-bottom: none; }
.best-row span:first-child { color: var(--muted); }

/* ── BADGES ── */
.badge {
  font-size: 10px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 99px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.badge-green { background: var(--green-bg); color: var(--green); border: 0.5px solid var(--green-border); }
.badge-blue { background: var(--blue-bg); color: var(--blue); border: 0.5px solid var(--blue-border); }

/* ── FEATURES ── */
.features {
  border-top: 0.5px solid var(--border);
  padding: 60px 24px;
}

.features-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.feature { padding: 4px; }

.feature-icon {
  width: 40px; height: 40px;
  background: var(--green-bg);
  border: 0.5px solid var(--green-border);
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  color: var(--green);
  margin-bottom: 14px;
}

.feature-title { font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.feature-text { font-size: 13px; color: var(--muted); line-height: 1.65; }

/* ── FOOTER ── */
.footer { border-top: 0.5px solid var(--border); padding: 24px; }
.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 20px;
}
.footer-text { font-size: 12px; color: var(--hint); flex: 1; }
.footer-links { display: flex; gap: 16px; }
.footer-links a { font-size: 12px; color: var(--muted); }
.footer-links a:hover { color: var(--text); }

/* ── FORMS (auth pages) ── */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.auth-card {
  background: var(--surface);
  border: 0.5px solid var(--border-md);
  border-radius: var(--radius-xl);
  padding: 32px;
  width: 100%;
  max-width: 400px;
}

.auth-logo { text-align: center; margin-bottom: 24px; }
.auth-title { font-family: 'Space Grotesk', sans-serif; font-size: 22px; font-weight: 700; text-align: center; margin-bottom: 6px; }
.auth-sub { font-size: 13px; color: var(--muted); text-align: center; margin-bottom: 28px; }

.form-field { margin-bottom: 14px; }
.form-label { font-size: 12px; font-weight: 500; color: var(--muted); display: block; margin-bottom: 6px; }

.form-input {
  width: 100%;
  height: 42px;
  background: var(--surface2);
  border: 0.5px solid var(--border-md);
  border-radius: var(--radius);
  padding: 0 14px;
  font-size: 14px;
  font-family: inherit;
  color: var(--text);
  outline: none;
  transition: border-color 0.15s;
}

.form-input:focus { border-color: var(--green-dim); }
.form-input::placeholder { color: var(--hint); }

.form-submit {
  width: 100%;
  height: 44px;
  margin-top: 6px;
  font-size: 14px;
}

.auth-switch { text-align: center; margin-top: 20px; font-size: 13px; color: var(--muted); }
.auth-switch a { color: var(--green); }

.form-error {
  font-size: 12px;
  color: var(--red);
  background: var(--red-bg);
  border: 0.5px solid var(--red-border);
  border-radius: var(--radius);
  padding: 8px 12px;
  margin-top: 12px;
  display: none;
}

/* ── DASHBOARD ── */
.dashboard { padding: 40px 24px; }
.dash-inner { max-width: 1100px; margin: 0 auto; }

.dash-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 28px; }
.dash-title { font-family: 'Space Grotesk', sans-serif; font-size: 26px; font-weight: 700; letter-spacing: -0.5px; }

.dash-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 28px; }

.dash-card {
  background: var(--surface);
  border: 0.5px solid var(--border-md);
  border-radius: var(--radius-lg);
  padding: 20px 22px;
}

.dash-card-icon { font-size: 22px; color: var(--green); margin-bottom: 12px; }
.dash-card-val { font-family: 'Space Grotesk', sans-serif; font-size: 28px; font-weight: 700; margin-bottom: 4px; }
.dash-card-lbl { font-size: 12px; color: var(--muted); }

.section-title { font-size: 14px; font-weight: 600; margin-bottom: 14px; }

.tx-list { display: flex; flex-direction: column; gap: 6px; }
.tx-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: var(--surface2);
  border-radius: var(--radius);
  font-size: 13px;
}
.tx-icon { font-size: 16px; color: var(--muted); }
.tx-desc { flex: 1; }
.tx-desc-main { font-weight: 500; }
.tx-desc-sub { font-size: 11px; color: var(--hint); }
.tx-amount { font-weight: 600; font-family: 'Space Grotesk', sans-serif; }
.tx-amount.pos { color: var(--green); }
.tx-amount.neg { color: var(--red); }
.tx-status { font-size: 10px; font-weight: 600; padding: 3px 8px; border-radius: 99px; text-transform: uppercase; letter-spacing: 0.4px; }
.tx-status.done { background: var(--green-bg); color: var(--green); }
.tx-status.pending { background: var(--amber-bg); color: var(--amber); }

/* ── WITHDRAW MODAL ── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.75);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.modal {
  background: var(--surface);
  border: 0.5px solid var(--border-md);
  border-radius: var(--radius-xl);
  padding: 28px;
  width: 100%;
  max-width: 440px;
  position: relative;
}

.modal-close {
  position: absolute;
  top: 16px; right: 16px;
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  font-size: 18px;
  padding: 4px;
  height: auto;
}

.modal-title { font-family: 'Space Grotesk', sans-serif; font-size: 18px; font-weight: 700; margin-bottom: 4px; }
.modal-sub { font-size: 13px; color: var(--muted); margin-bottom: 20px; }
.modal-rows { display: flex; flex-direction: column; gap: 0; margin-bottom: 20px; }

.modal-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 0.5px solid var(--border);
  font-size: 13px;
}
.modal-row:last-child { border-bottom: none; }
.modal-row span:first-child { color: var(--muted); }
.modal-row span:last-child { font-weight: 500; }

.modal-actions { display: flex; gap: 8px; justify-content: flex-end; }

/* ── CRYPTO SELECTOR ── */
.crypto-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}

.crypto-opt {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px 6px;
  background: var(--surface2);
  border: 0.5px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.12s;
  font-size: 11px;
  font-weight: 500;
  color: var(--muted);
}

.crypto-opt:hover { border-color: var(--border-md); color: var(--text); }
.crypto-opt.sel { border-color: var(--green-border); background: var(--green-bg); color: var(--green); }
.crypto-opt i { font-size: 20px; }

.empty-state {
  text-align: center;
  padding: 32px;
  color: var(--hint);
  font-size: 13px;
}
.empty-state i { font-size: 32px; display: block; margin-bottom: 10px; color: var(--surface3); }

@media (max-width: 768px) {
  .hero h1 { font-size: 32px; }
  .two-col { grid-template-columns: 1fr; }
  .features-inner { grid-template-columns: repeat(2, 1fr); }
  .metrics-row { grid-template-columns: repeat(2, 1fr); }
  .dash-grid { grid-template-columns: 1fr; }
  .crypto-grid { grid-template-columns: repeat(3, 1fr); }
}

.badge-red   { background: var(--red-bg);   color: var(--red);   border: 0.5px solid var(--red-border); }
.badge-amber { background: var(--amber-bg); color: var(--amber); border: 0.5px solid var(--amber-border); }
