/* ============================================================
   Travel Leads Marketplace — Design System
   Signature: leads render as boarding-pass ticket stubs;
   data readouts use a monospace "departure board" typeface.
   ============================================================ */

:root {
  --bg:        #0B1620;
  --surface:   #12212F;
  --surface-2: #1A2E3F;
  --line:      #2A3F52;
  --text:      #EDEFF2;
  --text-dim:  #8CA0AF;
  --gold:      #E8A33D;
  --gold-dim:  #B9822E;
  --teal:      #4FD1C5;
  --danger:    #E2574C;
  --radius:    14px;
  --font-display: 'Space Grotesk', sans-serif;
  --font-body: 'IBM Plex Sans', sans-serif;
  --font-mono: 'IBM Plex Mono', monospace;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  background-image:
    radial-gradient(circle at 15% 0%, rgba(232,163,61,0.06), transparent 40%),
    radial-gradient(circle at 85% 20%, rgba(79,209,197,0.05), transparent 40%);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; margin: 0 0 .4em; letter-spacing: -0.01em; }
p { margin: 0 0 1em; color: var(--text-dim); }
a { color: inherit; text-decoration: none; }

/* ---------- Topbar ---------- */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 32px; border-bottom: 1px solid var(--line);
  background: rgba(11,22,32,0.85); backdrop-filter: blur(8px);
  position: sticky; top: 0; z-index: 20;
}
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 700; font-size: 1.1rem; }
.brand-mark { color: var(--gold); font-size: 1.3rem; transform: rotate(-15deg); display: inline-block; }
.topnav { display: flex; align-items: center; gap: 22px; font-size: .92rem; font-weight: 500; }
.topnav a { color: var(--text-dim); transition: color .15s; }
.topnav a:hover { color: var(--text); }
.wallet-pill {
  display: flex; align-items: center; gap: 8px;
  background: var(--surface-2); border: 1px solid var(--line);
  padding: 7px 14px; border-radius: 999px;
  font-family: var(--font-mono); color: var(--gold) !important; font-size: .85rem;
}
.wallet-pill .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 6px var(--teal); }
.btn-solid, .btn-ghost {
  padding: 8px 18px; border-radius: 8px; font-weight: 600; font-size: .88rem;
  border: 1px solid var(--gold);
}
.btn-solid { background: var(--gold); color: #10151B !important; }
.btn-ghost { border-color: var(--line); color: var(--text-dim) !important; }
.btn-solid:hover { background: #f0b158; }
.btn-ghost:hover { border-color: var(--gold); color: var(--text) !important; }

/* ---------- Layout ---------- */
.wrap { max-width: 1180px; margin: 0 auto; padding: 40px 32px 80px; min-height: 60vh; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 28px; flex-wrap: wrap; gap: 14px; }
.eyebrow { font-family: var(--font-mono); text-transform: uppercase; letter-spacing: .12em; color: var(--gold); font-size: .75rem; margin-bottom: 6px; display: block; }

/* ---------- Cards / Panels ---------- */
.panel {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px;
}
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
@media (max-width: 800px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }

/* ---------- Forms ---------- */
label { display: block; font-size: .82rem; color: var(--text-dim); margin-bottom: 6px; font-weight: 500; }
input, select, textarea {
  width: 100%; padding: 11px 13px; margin-bottom: 16px;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px;
  color: var(--text); font-family: var(--font-body); font-size: .95rem;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--gold); outline-offset: 1px; border-color: var(--gold); }
button {
  cursor: pointer; font-family: var(--font-body); font-weight: 600; font-size: .95rem;
  padding: 12px 22px; border-radius: 8px; border: none;
  background: var(--gold); color: #10151B;
}
button:hover { background: #f0b158; }
button.secondary { background: transparent; border: 1px solid var(--line); color: var(--text); }
button.danger { background: var(--danger); color: #fff; }
button:disabled { opacity: .5; cursor: not-allowed; }
.field-error { color: var(--danger); font-size: .82rem; margin: -10px 0 14px; }

/* ---------- Flash messages ---------- */
.flash { max-width: 1180px; margin: 16px auto 0; padding: 12px 20px; border-radius: 8px; font-size: .9rem; }
.flash-success { background: rgba(79,209,197,0.12); border: 1px solid var(--teal); color: var(--teal); }
.flash-error { background: rgba(226,87,76,0.12); border: 1px solid var(--danger); color: var(--danger); }

/* ---------- Boarding-pass Lead Card (signature element) ---------- */
.ticket {
  display: grid; grid-template-columns: 1fr auto;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; position: relative;
}
.ticket-main { padding: 20px 22px; }
.ticket-stub {
  width: 128px; background: var(--surface-2); padding: 20px 14px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; border-left: 1px dashed var(--line); position: relative;
}
.ticket-stub::before, .ticket-stub::after {
  content: ''; position: absolute; width: 16px; height: 16px; background: var(--bg);
  border-radius: 50%; left: -8px;
}
.ticket-stub::before { top: -8px; }
.ticket-stub::after { bottom: -8px; }
.ticket-route { font-family: var(--font-mono); font-size: .78rem; color: var(--text-dim); text-transform: uppercase; letter-spacing: .08em; margin-bottom: 4px; }
.ticket-dest { font-family: var(--font-display); font-size: 1.15rem; font-weight: 700; margin-bottom: 10px; }
.ticket-meta { display: flex; gap: 18px; flex-wrap: wrap; margin: 12px 0; }
.ticket-meta-item { font-size: .8rem; }
.ticket-meta-item .label { color: var(--text-dim); display: block; font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 2px; }
.ticket-meta-item .value { font-family: var(--font-mono); font-weight: 600; }
.badge {
  display: inline-block; font-family: var(--font-mono); font-size: .7rem; text-transform: uppercase;
  letter-spacing: .06em; padding: 4px 10px; border-radius: 999px; font-weight: 600;
}
.badge-raw { background: rgba(140,160,175,0.15); color: var(--text-dim); }
.badge-verified { background: rgba(79,209,197,0.15); color: var(--teal); }
.badge-ticketbooked { background: rgba(232,163,61,0.18); color: var(--gold); }
.ticket-stub .price { font-family: var(--font-mono); font-size: 1.3rem; font-weight: 700; color: var(--gold); margin-bottom: 10px; }
.ticket-stub button { width: 100%; font-size: .82rem; padding: 10px 8px; }
.masked { color: var(--text-dim); font-family: var(--font-mono); letter-spacing: .04em; }

/* ---------- Filters bar ---------- */
.filters { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 24px; align-items: flex-end; }
.filters .field { min-width: 160px; margin-bottom: 0; }
.filters label { margin-bottom: 4px; }
.filters input, .filters select { margin-bottom: 0; }

/* ---------- Table (My Leads, transactions) ---------- */
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th, td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); }
th { color: var(--text-dim); font-weight: 600; font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; }
td.mono, th.mono { font-family: var(--font-mono); }
.status-pill { padding: 4px 10px; border-radius: 999px; font-size: .75rem; font-family: var(--font-mono); }
.status-converted { background: rgba(79,209,197,0.15); color: var(--teal); }
.status-followup { background: rgba(232,163,61,0.15); color: var(--gold); }
.status-replacement { background: rgba(226,87,76,0.15); color: var(--danger); }

/* ---------- Wallet balance hero ---------- */
.balance-hero {
  background: linear-gradient(135deg, var(--surface-2), var(--surface));
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 32px; margin-bottom: 28px;
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 20px;
}
.balance-amount { font-family: var(--font-mono); font-size: 2.4rem; font-weight: 700; color: var(--gold); }
.balance-label { font-size: .8rem; color: var(--text-dim); text-transform: uppercase; letter-spacing: .08em; margin-bottom: 6px; }
.low-balance-warning { color: var(--danger); font-size: .82rem; margin-top: 8px; font-weight: 600; }

/* ---------- Empty state ---------- */
.empty-state { text-align: center; padding: 60px 20px; color: var(--text-dim); }
.empty-state h3 { color: var(--text); }

/* ---------- Footer ---------- */
.sitefooter {
  border-top: 1px solid var(--line); padding: 24px 32px; display: flex;
  justify-content: space-between; font-size: .8rem; color: var(--text-dim); flex-wrap: wrap; gap: 8px;
}
.dim { color: var(--text-dim); }

/* ---------- Auth pages ---------- */
.auth-shell { max-width: 460px; margin: 60px auto; }
.auth-shell .panel { padding: 36px; }
.auth-switch { text-align: center; margin-top: 18px; font-size: .88rem; color: var(--text-dim); }
.auth-switch a { color: var(--gold); font-weight: 600; }
