/* ================================================================
   SUPREMEX — Shared Stylesheet
   Dark Vault Aesthetic: Deep navy, gold accents, monospace details
   ================================================================ */

@import url('https://fonts.googleapis.com/css2?family=Syne:wght@400;600;700;800&family=DM+Mono:ital,wght@0,300;0,400;0,500;1,300&family=DM+Sans:wght@300;400;500&display=swap');

:root {
  --black:       #010204;
  --deep:        #06090f;
  --surface:     #0b1018;
  --card:        #101520;
  --card2:       #141b26;
  --border:      rgba(255,255,255,0.07);
  --border2:     rgba(255,255,255,0.12);
  --gold:        #c9a84c;
  --gold-light:  #e8c96a;
  --gold-dim:    rgba(201,168,76,0.12);
  --gold-dim2:   rgba(201,168,76,0.06);
  --cyan:        #38bdf8;
  --cyan-dim:    rgba(56,189,248,0.1);
  --green:       #22c55e;
  --green-dim:   rgba(34,197,94,0.1);
  --red:         #ef4444;
  --red-dim:     rgba(239,68,68,0.1);
  --amber:       #f59e0b;
  --amber-dim:   rgba(245,158,11,0.1);
  --text:        #dde3ef;
  --text2:       #8b95a7;
  --text3:       #4b5563;
  --radius:      2px;
}

*, *::before, *::after { margin:0; padding:0; box-sizing:border-box; }
html { scroll-behavior: smooth; font-size: 16px; }

body {
  background: var(--black);
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  font-weight: 300;
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.6;
}

/* Grain overlay */
body::after {
  content: '';
  position: fixed; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.035'/%3E%3C/svg%3E");
  pointer-events: none; z-index: 9999;
}

/* ── TYPOGRAPHY ── */
h1,h2,h3,h4 { font-family: 'Syne', sans-serif; font-weight: 700; letter-spacing: -0.02em; line-height: 1.15; }
h1 { font-size: clamp(1.8rem, 4vw, 2.8rem); }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); }
h3 { font-size: 1.1rem; }
p  { color: var(--text2); }

.mono { font-family: 'DM Mono', monospace; }
.gold { color: var(--gold); }
.green-text { color: var(--green); }
.red-text { color: var(--red); }
.muted { color: var(--text2); }

/* ── LAYOUT ── */
.container { max-width: 1100px; margin: 0 auto; padding: 0 2rem; }
.page-wrap  { max-width: 480px; margin: 0 auto; padding: 2rem 1.5rem 4rem; }
.full-center { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 2rem; }

/* ── NAV ── */
.topnav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(1,2,4,0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 0 2rem;
  height: 60px;
  display: flex; align-items: center; justify-content: space-between;
}

.nav-logo {
  font-family: 'Syne', sans-serif;
  font-size: 1.2rem; font-weight: 800;
  color: var(--text); text-decoration: none;
  letter-spacing: -0.02em;
}
.nav-logo span { color: var(--gold); }

.nav-right { display: flex; align-items: center; gap: 1.5rem; }

.nav-user {
  font-family: 'DM Mono', monospace;
  font-size: 0.7rem; color: var(--text2);
  letter-spacing: 0.06em;
}

.nav-logout {
  font-family: 'DM Mono', monospace;
  font-size: 0.65rem; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--text3);
  background: none; border: 1px solid var(--border); padding: 0.3rem 0.8rem;
  cursor: pointer; transition: all 0.2s;
}
.nav-logout:hover { border-color: var(--red); color: var(--red); }

/* ── CARDS ── */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  padding: 2rem;
  border-radius: var(--radius);
}
.card-sm { padding: 1.5rem; }
.card-lg { padding: 2.5rem; }

.card-title {
  font-family: 'DM Mono', monospace;
  font-size: 0.65rem; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--text3); margin-bottom: 1.5rem;
  display: flex; align-items: center; gap: 0.5rem;
}
.card-title::before { content: '//'; color: var(--gold); }

/* ── INPUTS ── */
.field { margin-bottom: 1.2rem; }

.field label {
  display: block;
  font-family: 'DM Mono', monospace;
  font-size: 0.65rem; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--text2); margin-bottom: 0.5rem;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  font-family: 'DM Mono', monospace;
  font-size: 0.9rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  outline: none;
  transition: border-color 0.2s, background 0.2s;
  -webkit-appearance: none;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--gold);
  background: var(--card);
}

.field input::placeholder,
.field textarea::placeholder { color: var(--text3); }

.field select option { background: var(--card); color: var(--text); }
.field textarea { resize: vertical; min-height: 90px; }

/* Amount input special */
.amount-wrap { position: relative; }
.amount-prefix {
  position: absolute; left: 1rem; top: 50%; transform: translateY(-50%);
  font-family: 'DM Mono', monospace; font-size: 0.9rem; color: var(--gold);
}
.amount-wrap input { padding-left: 2rem; }

/* ── BUTTONS ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  font-family: 'DM Mono', monospace;
  font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase;
  font-weight: 500;
  padding: 0.8rem 1.8rem;
  border: none; cursor: pointer;
  border-radius: var(--radius);
  transition: all 0.2s;
  text-decoration: none;
  white-space: nowrap;
}

.btn-gold {
  background: var(--gold);
  color: #000;
  clip-path: polygon(8px 0%, 100% 0%, calc(100% - 8px) 100%, 0% 100%);
}
.btn-gold:hover { background: var(--gold-light); transform: translateY(-1px); }

.btn-outline {
  background: transparent;
  color: var(--text2);
  border: 1px solid var(--border);
}
.btn-outline:hover { border-color: var(--gold); color: var(--gold); }

.btn-danger {
  background: transparent;
  color: var(--red);
  border: 1px solid rgba(239,68,68,0.3);
}
.btn-danger:hover { background: var(--red-dim); }

.btn-green {
  background: var(--green);
  color: #000;
  clip-path: polygon(8px 0%, 100% 0%, calc(100% - 8px) 100%, 0% 100%);
}
.btn-green:hover { filter: brightness(1.1); }

.btn-full { width: 100%; }
.btn-sm { padding: 0.5rem 1rem; font-size: 0.68rem; }

.btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none; }

/* ── BADGES / STATUS ── */
.badge {
  display: inline-flex; align-items: center; gap: 0.4rem;
  font-family: 'DM Mono', monospace;
  font-size: 0.62rem; letter-spacing: 0.1em; text-transform: uppercase;
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius);
}

.badge-gold    { background: var(--gold-dim);  color: var(--gold);  border: 1px solid rgba(201,168,76,0.25); }
.badge-green   { background: var(--green-dim); color: var(--green); border: 1px solid rgba(34,197,94,0.25); }
.badge-red     { background: var(--red-dim);   color: var(--red);   border: 1px solid rgba(239,68,68,0.25); }
.badge-amber   { background: var(--amber-dim); color: var(--amber); border: 1px solid rgba(245,158,11,0.25); }
.badge-cyan    { background: var(--cyan-dim);  color: var(--cyan);  border: 1px solid rgba(56,189,248,0.25); }
.badge-muted   { background: rgba(255,255,255,0.04); color: var(--text2); border: 1px solid var(--border); }

.badge::before { content: '●'; font-size: 0.45rem; }

/* ── DIVIDER ── */
.divider {
  border: none; border-top: 1px solid var(--border);
  margin: 1.5rem 0;
}

/* ── ALERTS ── */
.alert {
  padding: 0.8rem 1rem;
  border-radius: var(--radius);
  font-size: 0.85rem;
  margin-bottom: 1rem;
  display: flex; align-items: center; gap: 0.6rem;
  font-family: 'DM Mono', monospace;
}
.alert-error   { background: var(--red-dim);   color: var(--red);   border: 1px solid rgba(239,68,68,0.2); }
.alert-success { background: var(--green-dim); color: var(--green); border: 1px solid rgba(34,197,94,0.2); }
.alert-info    { background: var(--cyan-dim);  color: var(--cyan);  border: 1px solid rgba(56,189,248,0.2); }
.alert-warning { background: var(--amber-dim); color: var(--amber); border: 1px solid rgba(245,158,11,0.2); }

/* ── PAGE HEADER ── */
.page-header {
  padding: 3rem 0 2rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 2.5rem;
}
.page-header .tag {
  font-family: 'DM Mono', monospace;
  font-size: 0.65rem; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--gold); margin-bottom: 0.5rem;
}

/* ── TIMELINE / STEPS ── */
.timeline { display: flex; flex-direction: column; gap: 0; }

.tl-step {
  display: flex; gap: 1.2rem;
  padding: 1.2rem 0;
  border-bottom: 1px solid var(--border);
  position: relative;
}

.tl-dot {
  width: 28px; height: 28px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.7rem; font-family: 'DM Mono', monospace;
  flex-shrink: 0; margin-top: 0.1rem;
}

.tl-dot-done { background: var(--green-dim);  color: var(--green); border: 1px solid rgba(34,197,94,0.3); }
.tl-dot-active { background: var(--gold-dim); color: var(--gold);  border: 1px solid rgba(201,168,76,0.3); }
.tl-dot-pending { background: rgba(255,255,255,0.04); color: var(--text3); border: 1px solid var(--border); }

.tl-content h4 { font-size: 0.9rem; margin-bottom: 0.2rem; }
.tl-content p  { font-size: 0.8rem; color: var(--text2); }

/* ── OTP INPUT ── */
.otp-group { display: flex; gap: 0.6rem; justify-content: center; margin: 1.5rem 0; }

.otp-input {
  width: 58px; height: 68px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-align: center;
  font-family: 'Syne', sans-serif;
  font-size: 1.8rem; font-weight: 700;
  color: var(--gold);
  outline: none;
  transition: border-color 0.2s;
  -webkit-appearance: none;
}
.otp-input:focus { border-color: var(--gold); background: var(--card); }

/* ── FILE UPLOAD ── */
.upload-zone {
  border: 2px dashed var(--border2);
  padding: 3rem 2rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.25s;
  position: relative;
  border-radius: var(--radius);
}
.upload-zone:hover { border-color: var(--gold); background: var(--gold-dim2); }
.upload-zone.dragging { border-color: var(--gold); background: var(--gold-dim); }

.upload-zone input[type="file"] {
  position: absolute; inset: 0; opacity: 0; cursor: pointer;
  width: 100%; height: 100%;
}

.upload-icon { font-size: 2.5rem; margin-bottom: 0.8rem; opacity: 0.6; }
.upload-label { font-family: 'DM Mono', monospace; font-size: 0.75rem; color: var(--text2); }
.upload-sub { font-size: 0.72rem; color: var(--text3); margin-top: 0.3rem; font-family: 'DM Mono', monospace; }

.upload-preview {
  margin-top: 1rem;
  background: var(--green-dim);
  border: 1px solid rgba(34,197,94,0.2);
  padding: 0.7rem 1rem;
  display: flex; align-items: center; gap: 0.6rem;
  font-family: 'DM Mono', monospace; font-size: 0.72rem; color: var(--green);
}

/* ── DEAL CARD ── */
.deal-card {
  background: var(--card);
  border: 1px solid var(--border);
  padding: 1.5rem;
  transition: border-color 0.2s, transform 0.2s;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  display: block;
}
.deal-card:hover { border-color: rgba(201,168,76,0.3); transform: translateX(3px); }

.deal-card-top { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 0.8rem; }
.deal-card-id { font-family: 'DM Mono', monospace; font-size: 0.65rem; color: var(--text3); }
.deal-card-title { font-family: 'Syne', sans-serif; font-size: 1rem; font-weight: 700; margin-bottom: 0.3rem; }
.deal-card-desc { font-size: 0.82rem; color: var(--text2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.deal-card-bottom { display: flex; justify-content: space-between; align-items: center; margin-top: 1rem; }
.deal-card-amount { font-family: 'Syne', sans-serif; font-size: 1.3rem; font-weight: 700; color: var(--gold); }

/* ── STAT BOXES ── */
.stat-row { display: grid; grid-template-columns: repeat(3,1fr); gap: 1px; background: var(--border); border: 1px solid var(--border); margin-bottom: 2rem; }
.stat-box { background: var(--card); padding: 1.2rem 1.5rem; }
.stat-box-num { font-family: 'Syne', sans-serif; font-size: 1.8rem; font-weight: 800; color: var(--gold); }
.stat-box-label { font-family: 'DM Mono', monospace; font-size: 0.6rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text3); margin-top: 0.2rem; }

/* ── SPINNER ── */
.spinner {
  width: 18px; height: 18px;
  border: 2px solid var(--border2);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── ANIMATIONS ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes pulse {
  0%,100% { opacity: 1; }
  50%      { opacity: 0.4; }
}
@keyframes shimmer {
  from { background-position: -200% 0; }
  to   { background-position: 200% 0; }
}

.fade-up { animation: fadeUp 0.5s ease both; }
.fade-in { animation: fadeIn 0.4s ease both; }

/* ── LOCK ANIMATION ── */
.lock-anim {
  font-size: 4rem;
  animation: pulse 2s ease-in-out infinite;
}

/* ── SUCCESS CHECK ── */
.success-check {
  width: 72px; height: 72px;
  background: var(--green-dim);
  border: 2px solid var(--green);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem;
  margin: 0 auto 1.5rem;
  animation: fadeIn 0.5s ease both;
}

/* ── EMPTY STATE ── */
.empty-state {
  text-align: center; padding: 4rem 2rem;
  border: 1px dashed var(--border);
}
.empty-icon { font-size: 3rem; opacity: 0.3; margin-bottom: 1rem; }
.empty-title { font-family: 'Syne', sans-serif; font-size: 1rem; color: var(--text2); }
.empty-sub { font-size: 0.82rem; color: var(--text3); margin-top: 0.3rem; font-family: 'DM Mono', monospace; }

/* ── GRID LINES BACKGROUND ── */
.grid-bg {
  background-image:
    linear-gradient(rgba(201,168,76,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(201,168,76,0.03) 1px, transparent 1px);
  background-size: 50px 50px;
}

/* ── SPLIT LAYOUT ── */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }

/* ── UTILITY ── */
.text-center { text-align: center; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.flex { display: flex; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.flex-center  { display: flex; align-items: center; justify-content: center; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.w-full { width: 100%; }

/* ── RESPONSIVE ── */
@media (max-width: 640px) {
  .split { grid-template-columns: 1fr; }
  .stat-row { grid-template-columns: 1fr 1fr; }
  .otp-input { width: 48px; height: 58px; font-size: 1.5rem; }
}
