/* Codevercel Leads - shared theme for the landing page, buyer panel and admin panel.
   Colors: the background matches codevercel.com's theme color (#090303). The orange is the
   accent used in the earlier Codevercel Leads build (#ff7a1a). To change the brand colors,
   edit only the :root variables below. */

:root {
  --bg: #090303;
  --bg-2: #120807;
  --panel: #150c0a;
  --panel-2: #1c110d;
  --line: rgba(255, 122, 26, 0.18);
  --line-2: rgba(255, 255, 255, 0.07);
  --or: #ff7a1a;
  --or-2: #ffb347;
  --or-glow: rgba(255, 122, 26, 0.35);
  --text: #f6f0eb;
  --muted: #a99b93;
  --good: #4ade80;
  --bad: #ff5d5d;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.55);
  --max: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: var(--or-2); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.15; margin: 0 0 12px; letter-spacing: -0.02em; }
h1 { font-size: clamp(2.2rem, 5vw, 4rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 12px; color: var(--muted); }
code { background: var(--panel-2); border: 1px solid var(--line); padding: 2px 7px; border-radius: 6px; color: var(--or-2); font-size: 0.92em; }
.wrap { width: min(var(--max), calc(100% - 40px)); margin: 0 auto; }
.grad {
  background: linear-gradient(90deg, var(--or), var(--or-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.muted { color: var(--muted); }
.small { font-size: 0.86rem; }
.hidden { display: none !important; }

/* ---- Nav ---------------------------------------------------------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(14px);
  background: rgba(9, 3, 3, 0.72);
  border-bottom: 1px solid var(--line-2);
}
.nav .wrap { display: flex; align-items: center; gap: 18px; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 800; letter-spacing: -0.01em; }
.brand:hover { text-decoration: none; }
.brand img { width: 34px; height: 34px; border-radius: 10px; box-shadow: 0 0 18px var(--or-glow); }
.brand small { display: block; font-weight: 500; color: var(--muted); font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; }
.nav-links { margin-left: auto; display: flex; align-items: center; gap: 22px; }
.nav-links a { color: var(--muted); font-size: 0.95rem; }
.nav-links a:hover { color: var(--text); text-decoration: none; }

/* ---- Buttons, inputs, pills ---------------------------------------- */
.btn {
  appearance: none; border: 1px solid transparent; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 18px; border-radius: 999px; font: inherit; font-weight: 700; font-size: 0.95rem;
  color: #1a0b02; background: linear-gradient(135deg, var(--or), var(--or-2));
  box-shadow: 0 10px 30px -12px var(--or-glow);
  transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
  text-decoration: none; white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 16px 36px -12px var(--or-glow); text-decoration: none; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.btn.ghost { background: transparent; color: var(--text); border-color: var(--line); box-shadow: none; }
.btn.ghost:hover { border-color: var(--or); }
.btn.danger { background: transparent; color: var(--bad); border-color: rgba(255, 93, 93, 0.4); box-shadow: none; }
.btn.danger:hover { background: rgba(255, 93, 93, 0.08); }
.btn.sm { padding: 7px 12px; font-size: 0.82rem; }
.btn.block { width: 100%; }

.input, .select, textarea.input {
  width: 100%; padding: 11px 14px; border-radius: var(--radius-sm);
  background: var(--panel-2); color: var(--text); border: 1px solid var(--line-2);
  font: inherit; outline: none; transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
.input:focus, .select:focus { border-color: var(--or); box-shadow: 0 0 0 4px rgba(255, 122, 26, 0.15); }
.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field label { font-size: 0.85rem; color: var(--muted); font-weight: 600; }
.field .hint { font-size: 0.78rem; color: var(--muted); }

.pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px;
  font-size: 0.78rem; font-weight: 700; border: 1px solid var(--line-2); color: var(--muted); background: var(--panel);
}
.pill.ok { color: var(--good); border-color: rgba(74, 222, 128, 0.35); }
.pill.warn { color: var(--or-2); border-color: var(--line); }
.pill.bad { color: var(--bad); border-color: rgba(255, 93, 93, 0.35); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; box-shadow: 0 0 10px currentColor; }
.pill.ok .dot { animation: pulse 1.8s infinite; }

/* ---- Cards, grids, tables -------------------------------------------- */
.card {
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  border: 1px solid var(--line-2); border-radius: var(--radius); padding: 22px;
  box-shadow: var(--shadow);
}
.card.glow { border-color: var(--line); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.grid { display: grid; gap: 16px; }
.grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid.cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
@media (max-width: 980px) { .grid.cols-4, .grid.cols-5 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid.cols-3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .grid.cols-2, .grid.cols-3 { grid-template-columns: 1fr; } .nav-links a.hide-sm { display: none; } }

.stat { position: relative; overflow: hidden; }
.stat .label { font-size: 0.8rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; font-weight: 700; }
.stat .value { font-size: 2rem; font-weight: 800; margin-top: 6px; letter-spacing: -0.02em; }
.stat .sub { font-size: 0.82rem; color: var(--muted); }
.stat::after {
  content: ""; position: absolute; right: -40px; top: -40px; width: 120px; height: 120px;
  background: radial-gradient(circle, var(--or-glow), transparent 70%); pointer-events: none;
}

.table-wrap { overflow: auto; border-radius: var(--radius-sm); border: 1px solid var(--line-2); }
table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
/* Wide tables keep a readable width and scroll sideways inside .table-wrap instead of squashing. */
table.wide { min-width: 1120px; }
.nowrap { white-space: nowrap; }
.strong { font-weight: 700; color: var(--text); }
th, td { padding: 11px 12px; text-align: left; border-bottom: 1px solid var(--line-2); vertical-align: top; }
th { position: sticky; top: 0; background: var(--panel-2); color: var(--muted); font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.08em; z-index: 1; }
tbody tr { transition: background 0.15s ease; }
tbody tr:hover { background: rgba(255, 122, 26, 0.05); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
td.cell-clip { max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.empty { padding: 34px; text-align: center; color: var(--muted); }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.toolbar .input { width: auto; min-width: 220px; flex: 1; }
.toolbar .select { width: auto; }
.actions { display: flex; gap: 6px; flex-wrap: wrap; }
.pager { display: flex; align-items: center; gap: 10px; justify-content: flex-end; margin-top: 12px; color: var(--muted); font-size: 0.9rem; }

/* ---- Steps and lists ---------------------------------------------------- */
.steps { counter-reset: s; display: grid; gap: 12px; padding: 0; margin: 0; list-style: none; }
.steps li { counter-increment: s; position: relative; padding-left: 52px; color: var(--muted); }
.steps li::before {
  content: counter(s); position: absolute; left: 0; top: -2px; width: 36px; height: 36px; border-radius: 12px;
  display: grid; place-items: center; font-weight: 800; color: #1a0b02;
  background: linear-gradient(135deg, var(--or), var(--or-2)); box-shadow: 0 8px 20px -8px var(--or-glow);
}
.steps li strong { color: var(--text); display: block; }

/* ---- Modal and toast --------------------------------------------------- */
.modal-back {
  position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px;
  background: rgba(0, 0, 0, 0.7); backdrop-filter: blur(6px); animation: fade 0.2s ease;
}
.modal {
  width: min(560px, 100%); max-height: 90vh; overflow: auto; animation: rise 0.3s ease;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow);
}
.modal h3 { margin-bottom: 6px; }
.modal .row { display: flex; gap: 10px; justify-content: flex-end; margin-top: 18px; flex-wrap: wrap; }
.keybox {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 1.4rem; letter-spacing: 0.06em;
  padding: 16px; border-radius: var(--radius-sm); text-align: center; color: var(--or-2);
  background: #0c0605; border: 1px dashed var(--or); user-select: all; margin: 12px 0;
}
.toast-wrap { position: fixed; right: 20px; bottom: 20px; z-index: 200; display: grid; gap: 10px; }
.toast {
  min-width: 240px; max-width: 380px; padding: 12px 16px; border-radius: var(--radius-sm);
  background: var(--panel-2); border: 1px solid var(--line); box-shadow: var(--shadow); animation: rise 0.3s ease;
}
.toast.bad { border-color: rgba(255, 93, 93, 0.5); color: #ffb3b3; }
.toast.ok { border-color: rgba(74, 222, 128, 0.45); }

/* ---- Landing page ---------------------------------------------------- */
.hero { position: relative; padding: 120px 0 90px; overflow: hidden; isolation: isolate; }
.bg-layers { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.layer { position: absolute; will-change: transform; }
.layer.grid-bg {
  inset: -20%;
  background-image:
    linear-gradient(rgba(255, 122, 26, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 122, 26, 0.08) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse at 60% 30%, #000 10%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at 60% 30%, #000 10%, transparent 70%);
}
/* Parallax moves the .layer wrapper; the float animation moves the .orb inside it, so the two never fight. */
.orb { position: absolute; width: 480px; height: 480px; border-radius: 50%; filter: blur(60px); opacity: 0.5; }
.orb.a { background: radial-gradient(circle, #ff7a1a, transparent 65%); top: -120px; left: -120px; animation: float 14s ease-in-out infinite; }
.orb.b { background: radial-gradient(circle, #ffb347, transparent 65%); top: 30%; right: -160px; opacity: 0.35; animation: float 18s ease-in-out infinite reverse; }
.orb.c { background: radial-gradient(circle, #7a2a05, transparent 70%); bottom: -200px; left: 35%; opacity: 0.6; animation: float 22s ease-in-out infinite; }
.hero-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 50px; align-items: center; }
@media (max-width: 920px) { .hero-grid { grid-template-columns: 1fr; } .hero { padding-top: 80px; } }
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px; padding: 7px 14px; border-radius: 999px;
  border: 1px solid var(--line); background: rgba(255, 122, 26, 0.06); color: var(--or-2);
  font-size: 0.82rem; font-weight: 700; letter-spacing: 0.04em; margin-bottom: 20px;
}
.hero p.lead { font-size: 1.12rem; max-width: 560px; }
.cta-row { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 26px; }
.preview { position: relative; transform-style: preserve-3d; transition: transform 0.2s ease; }
.preview .card { padding: 0; overflow: hidden; }
.preview-top { display: flex; gap: 6px; padding: 12px 14px; background: var(--panel-2); border-bottom: 1px solid var(--line-2); }
.preview-top i { width: 10px; height: 10px; border-radius: 50%; background: #3a2a24; display: block; }
.preview-top i:first-child { background: var(--or); }
.preview-body { padding: 18px; display: grid; gap: 10px; }
.preview-row {
  display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: center; padding: 12px;
  border-radius: 12px; background: #0e0706; border: 1px solid var(--line-2); animation: rise 0.6s ease both;
}
.preview-row:nth-child(2) { animation-delay: 0.15s; }
.preview-row:nth-child(3) { animation-delay: 0.3s; }
.preview-row:nth-child(4) { animation-delay: 0.45s; }
.preview-row b { display: block; font-size: 0.95rem; }
.preview-row span { font-size: 0.8rem; color: var(--muted); }
.float-badge {
  position: absolute; right: -14px; bottom: -18px; padding: 12px 16px; border-radius: 14px;
  background: var(--panel-2); border: 1px solid var(--line); box-shadow: var(--shadow); animation: float 6s ease-in-out infinite;
}
.float-badge b { color: var(--or-2); font-size: 1.4rem; }

section.block { padding: 90px 0; position: relative; }
.section-head { max-width: 680px; margin-bottom: 40px; }
.feature { transition: transform 0.25s ease, border-color 0.25s ease; }
.feature:hover { transform: translateY(-6px); border-color: var(--or); }
.feature .ico {
  width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; margin-bottom: 16px;
  background: linear-gradient(135deg, rgba(255, 122, 26, 0.2), rgba(255, 179, 71, 0.05)); border: 1px solid var(--line);
  color: var(--or-2); font-weight: 800;
}
.feature p { font-size: 0.95rem; }
.divider { height: 1px; background: linear-gradient(90deg, transparent, var(--or), transparent); opacity: 0.4; }
.notice {
  padding: 16px 18px; border-radius: var(--radius-sm); border: 1px solid var(--line);
  background: rgba(255, 122, 26, 0.06); color: var(--muted); font-size: 0.9rem;
}
footer.site-foot { padding: 40px 0 60px; border-top: 1px solid var(--line-2); color: var(--muted); font-size: 0.9rem; }
footer.site-foot .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

/* ---- Panels (buyer and admin) ------------------------------------------ */
.app { min-height: 100vh; }
.app-main { padding: 28px 0 80px; }
.page-title { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.page-title p { margin: 4px 0 0; }
.login-card { width: min(460px, 100%); margin: 60px auto; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 22px; }
.tab {
  appearance: none; border: 1px solid var(--line-2); background: var(--panel); color: var(--muted);
  padding: 9px 16px; border-radius: 999px; font: inherit; font-weight: 700; cursor: pointer;
}
.tab.on { color: #1a0b02; background: linear-gradient(135deg, var(--or), var(--or-2)); border-color: transparent; }
.small-val { font-size: 1.25rem; line-height: 1.3; padding-top: 6px; }
.err { color: var(--bad); min-height: 1.3em; font-size: 0.9rem; margin: 8px 0 0; }
.mt { margin-top: 18px; }
.mt-lg { margin-top: 28px; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; font-size: 0.92rem; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }

/* ---- Motion ------------------------------------------------------------- */
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-16px); } }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }
.reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.in { opacity: 1; transform: none; }
.bar { height: 6px; border-radius: 999px; background: var(--panel-2); overflow: hidden; }
.bar > i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--or), var(--or-2)); transition: width 0.6s ease; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}
