/* ============================================================
   SECUREESCROW — MAIN STYLESHEET
   Mobile-first, fintech-grade design
   ============================================================ */

:root {
  --primary:       #6366f1;
  --primary-dark:  #4f46e5;
  --primary-light: #a5b4fc;
  --success:       #10b981;
  --danger:        #ef4444;
  --warning:       #f59e0b;
  --info:          #3b82f6;
  --bg:            #f8fafc;
  --bg-card:       #ffffff;
  --bg-muted:      #f1f5f9;
  --border:        #e2e8f0;
  --text:          #0f172a;
  --text-muted:    #64748b;
  --text-light:    #94a3b8;
  --radius:        12px;
  --radius-sm:     8px;
  --radius-lg:     20px;
  --shadow:        0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.05);
  --shadow-md:     0 4px 16px rgba(0,0,0,.10);
  --shadow-lg:     0 10px 40px rgba(0,0,0,.14);
  --font:          'Segoe UI', system-ui, -apple-system, sans-serif;
  --transition:    .18s ease;
  --nav-h:         64px;
}

/* ── Reset ─────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main.main-content { flex: 1; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }
button { cursor: pointer; font-family: var(--font); }

/* ── Container ──────────────────────────────────── */
.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px 16px;
}

/* ── Typography ─────────────────────────────────── */
h1 { font-size: clamp(1.5rem, 4vw, 2.2rem); font-weight: 700; line-height: 1.2; }
h2 { font-size: 1.25rem; font-weight: 600; }
h3 { font-size: 1rem; font-weight: 600; }
p  { line-height: 1.7; }
.text-muted  { color: var(--text-muted); font-size: .875rem; }
.text-light  { color: var(--text-light); }
.bold        { font-weight: 700; }
.gradient-text {
  background: linear-gradient(135deg, var(--primary), #a855f7);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.page-title { margin-bottom: 24px; }

/* ── Navbar ─────────────────────────────────────── */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  height: var(--nav-h);
}
.nav-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 16px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.nav-brand {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--primary);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}
.brand-icon { font-size: 1.3rem; }
.nav-menu {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}
.nav-link {
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: .875rem;
  font-weight: 500;
  transition: background var(--transition);
  text-decoration: none;
}
.nav-link:hover { background: var(--bg-muted); text-decoration: none; }
.nav-divider { width: 1px; height: 20px; background: var(--border); margin: 0 4px; }
.nav-user { font-size: .8rem; color: var(--text-muted); padding: 0 8px; }
.nav-logout { color: var(--danger); }
.nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.4rem;
  padding: 8px;
  border-radius: var(--radius-sm);
  color: var(--text);
}
.nav-toggle:hover { background: var(--bg-muted); }

@media (max-width: 700px) {
  .nav-toggle { display: block; }
  .nav-menu {
    display: none;
    position: absolute;
    top: var(--nav-h);
    left: 0; right: 0;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    align-items: flex-start;
    padding: 12px;
    gap: 2px;
    box-shadow: var(--shadow-md);
  }
  .nav-menu.open { display: flex; }
  .nav-menu .btn { width: 100%; }
  .nav-divider { width: 100%; height: 1px; margin: 4px 0; }
}

/* ── Buttons ─────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-size: .9rem;
  font-weight: 600;
  border: 2px solid transparent;
  transition: all var(--transition);
  white-space: nowrap;
  text-decoration: none;
  line-height: 1;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); }

.btn-success {
  background: var(--success);
  color: #fff;
  border-color: var(--success);
}
.btn-success:hover { background: #059669; }

.btn-danger {
  background: var(--danger);
  color: #fff;
  border-color: var(--danger);
}
.btn-danger:hover { background: #dc2626; }
.btn-danger.btn-outline {
  background: transparent;
  color: var(--danger);
}
.btn-danger.btn-outline:hover { background: var(--danger); color: #fff; }

.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}
.btn-ghost:hover { background: var(--bg-muted); }

.btn-outline {
  background: transparent;
  color: var(--primary);
  border-color: var(--primary);
}
.btn-outline:hover { background: var(--primary); color: #fff; }

.btn-lg  { padding: 14px 28px; font-size: 1rem; border-radius: var(--radius); }
.btn-sm  { padding: 7px 14px; font-size: .8rem; }
.btn-xs  { padding: 4px 10px; font-size: .75rem; border-radius: 6px; }
.btn-block { width: 100%; display: flex; }
.btn-group { display: flex; gap: 6px; flex-wrap: wrap; }

/* ── Forms ──────────────────────────────────────── */
.form-group { margin-bottom: 20px; }
.form-label {
  display: block;
  font-size: .875rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}
.form-input {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: .9rem;
  font-family: var(--font);
  background: var(--bg-card);
  color: var(--text);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}
.form-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99,102,241,.15);
}
.form-input::placeholder { color: var(--text-light); }
textarea.form-input { resize: vertical; min-height: 90px; }
select.form-input { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2364748b' stroke-width='1.5' fill='none'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 36px; }
.form-hint { font-size: .78rem; color: var(--text-muted); margin-top: 4px; display: block; }

.input-group { position: relative; display: flex; }
.input-group .form-input { padding-right: 44px; }
.input-suffix {
  position: absolute;
  right: 0; top: 0; bottom: 0;
  width: 42px;
  background: none;
  border: none;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: color var(--transition);
}
.input-suffix:hover { color: var(--primary); }

.radio-group { display: flex; gap: 12px; flex-wrap: wrap; }
.radio-label {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition);
  font-size: .875rem;
  font-weight: 500;
}
.radio-label:has(input:checked) {
  border-color: var(--primary);
  background: rgba(99,102,241,.06);
  color: var(--primary);
}
.radio-label input { accent-color: var(--primary); }

/* Fee preview */
.fee-preview {
  background: var(--bg-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  margin-top: 10px;
}
.fee-row {
  display: flex;
  justify-content: space-between;
  font-size: .85rem;
  padding: 3px 0;
  color: var(--text-muted);
}
.fee-row.total {
  border-top: 1px solid var(--border);
  margin-top: 6px;
  padding-top: 8px;
  font-weight: 700;
  font-size: .95rem;
  color: var(--text);
}

/* File upload */
.file-upload-area {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 32px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition);
  background: var(--bg-muted);
  position: relative;
}
.file-upload-area:hover, .file-upload-area.dragover {
  border-color: var(--primary);
  background: rgba(99,102,241,.05);
}
.file-input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}
.upload-icon { font-size: 2rem; display: block; margin-bottom: 8px; }
.file-preview {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: var(--bg-muted);
  border-radius: var(--radius-sm);
  margin-top: 8px;
  font-size: .85rem;
  color: var(--text-muted);
}

/* Password strength */
.password-strength { height: 4px; border-radius: 2px; margin-top: 6px; transition: all .3s; }

/* ── Alerts ─────────────────────────────────────── */
.alert {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  border-left: 4px solid;
  font-size: .9rem;
  margin: 12px 16px;
  max-width: 1068px;
  margin-left: auto;
  margin-right: auto;
}
@media (min-width: 1132px) { .alert { margin-left: auto; margin-right: auto; } }
.alert-success { background: #f0fdf4; border-color: var(--success); color: #166534; }
.alert-error   { background: #fef2f2; border-color: var(--danger);  color: #991b1b; }
.alert-warning { background: #fffbeb; border-color: var(--warning);  color: #92400e; }
.alert-close {
  background: none; border: none; font-size: 1.2rem; line-height: 1;
  opacity: .5; cursor: pointer; padding: 0 4px; flex-shrink: 0;
}
.alert-close:hover { opacity: 1; }

/* ── Cards / Sections ───────────────────────────── */
.section-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: var(--shadow);
}
.section-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  gap: 12px;
  flex-wrap: wrap;
}
.section-title {
  font-size: 1.6rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 32px;
}

/* ── Badges ─────────────────────────────────────── */
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: .75rem;
  font-weight: 600;
  text-transform: capitalize;
}
.badge-buyer   { background: rgba(99,102,241,.12); color: var(--primary); }
.badge-seller  { background: rgba(16,185,129,.12); color: var(--success); }
.badge-admin   { background: rgba(239,68,68,.12);  color: var(--danger); }
.badge-success { background: rgba(16,185,129,.12); color: var(--success); }
.badge-warning { background: rgba(245,158,11,.12); color: #92400e; }
.badge-dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--danger);
  color: #fff;
  border-radius: 50%;
  width: 20px; height: 20px;
  font-size: .7rem;
  font-weight: 700;
  margin-left: 6px;
}

/* Status badges */
.status-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: .75rem;
  font-weight: 600;
  text-transform: capitalize;
}
.status-badge.status-lg { padding: 6px 16px; font-size: .875rem; }
.status-pending   { background: #fef9c3; color: #713f12; }
.status-funded    { background: #dbeafe; color: #1e40af; }
.status-delivered { background: #e0e7ff; color: #3730a3; }
.status-completed { background: #dcfce7; color: #14532d; }
.status-disputed  { background: #fee2e2; color: #7f1d1d; }
.status-cancelled { background: #f1f5f9; color: #475569; }
.status-approved  { background: #dcfce7; color: #14532d; }
.status-rejected  { background: #fee2e2; color: #7f1d1d; }
.status-open      { background: #fef9c3; color: #713f12; }
.status-resolved  { background: #dcfce7; color: #14532d; }

/* ── Tables ─────────────────────────────────────── */
.table-responsive { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .875rem;
}
.data-table th {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 2px solid var(--border);
  color: var(--text-muted);
  font-size: .78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
  white-space: nowrap;
}
.data-table td {
  padding: 12px 12px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.data-table tbody tr { transition: background var(--transition); }
.data-table tbody tr:hover { background: var(--bg-muted); }
.data-table tbody tr:last-child td { border-bottom: none; }
.table-toolbar { margin-bottom: 16px; }

/* Filter tabs */
.filter-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.filter-tab {
  padding: 6px 14px;
  border-radius: 20px;
  border: 1.5px solid var(--border);
  background: transparent;
  font-size: .8rem;
  font-weight: 600;
  color: var(--text-muted);
  transition: all var(--transition);
}
.filter-tab:hover { border-color: var(--primary); color: var(--primary); }
.filter-tab.active { background: var(--primary); border-color: var(--primary); color: #fff; }

/* ── Dashboard ──────────────────────────────────── */
.dashboard-page { padding-top: 24px; }
.dash-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.dash-header h1 { margin: 0; font-size: 1.6rem; }

/* Stats grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: var(--shadow);
  transition: box-shadow var(--transition);
}
.stat-card:hover { box-shadow: var(--shadow-md); }
.stat-card.highlight {
  border-color: var(--warning);
  background: linear-gradient(135deg, #fffbeb, var(--bg-card));
}
.stat-icon {
  width: 44px; height: 44px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}
.stat-icon.wallet  { background: rgba(99,102,241,.12); }
.stat-icon.tx      { background: rgba(59,130,246,.12); }
.stat-icon.active  { background: rgba(245,158,11,.12); }
.stat-icon.users   { background: rgba(168,85,247,.12); }
.stat-icon.dep     { background: rgba(16,185,129,.12); }
.stat-icon.wd      { background: rgba(239,68,68,.12); }
.stat-icon.disp    { background: rgba(245,158,11,.12); }
.stat-value { font-size: 1.4rem; font-weight: 800; line-height: 1.2; }
.stat-label { font-size: .75rem; color: var(--text-muted); margin-top: 2px; }

/* Wallet balance */
.wallet-balance-display {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(135deg, var(--primary), #7c3aed);
  color: #fff;
  border-radius: var(--radius);
  padding: 20px 24px;
  margin-bottom: 20px;
}
.wallet-balance-display.compact { padding: 14px 18px; margin-bottom: 24px; }
.balance-label { font-size: .85rem; opacity: .85; }
.balance-amount { font-size: 1.8rem; font-weight: 800; }

/* Empty state */
.empty-state {
  text-align: center;
  padding: 48px 20px;
  color: var(--text-muted);
}
.empty-state.small { padding: 24px; }
.empty-icon { font-size: 2.5rem; display: block; margin-bottom: 12px; }
.empty-state p { margin-bottom: 16px; }

/* ── Transaction Detail ──────────────────────────── */
.tx-page { padding-top: 24px; }
.tx-grid {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 24px;
  align-items: start;
}
@media (max-width: 900px) {
  .tx-grid { grid-template-columns: 1fr; }
}
.tx-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.tx-header h1 { font-size: 1.4rem; }

/* Progress bar */
.tx-progress {
  display: flex;
  align-items: center;
  margin-bottom: 28px;
  overflow-x: auto;
  padding-bottom: 4px;
}
.progress-step { display: flex; flex-direction: column; align-items: center; min-width: 80px; }
.progress-dot {
  width: 32px; height: 32px;
  border-radius: 50%;
  border: 2px solid var(--border);
  background: var(--bg-card);
  display: flex; align-items: center; justify-content: center;
  font-size: .8rem;
  font-weight: 700;
  color: var(--text-muted);
  transition: all var(--transition);
  margin-bottom: 6px;
}
.progress-step.done .progress-dot {
  background: var(--success);
  border-color: var(--success);
  color: #fff;
}
.progress-step.current .progress-dot {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  box-shadow: 0 0 0 4px rgba(99,102,241,.2);
}
.progress-label { font-size: .72rem; color: var(--text-muted); white-space: nowrap; }
.progress-step.done .progress-label,
.progress-step.current .progress-label { color: var(--text); font-weight: 600; }
.progress-line {
  flex: 1;
  height: 2px;
  background: var(--border);
  min-width: 24px;
  margin-bottom: 22px;
  transition: background var(--transition);
}
.progress-line.done { background: var(--success); }

.tx-details-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}
.tx-detail-item {
  background: var(--bg-muted);
  border-radius: var(--radius-sm);
  padding: 12px;
}
.detail-label { display: block; font-size: .72rem; color: var(--text-muted); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; margin-bottom: 4px; }
.detail-value { font-size: .95rem; font-weight: 600; }

.tx-description {
  background: var(--bg-muted);
  border-radius: var(--radius-sm);
  padding: 16px;
  margin-bottom: 20px;
}
.tx-description h3 { margin-bottom: 8px; color: var(--text-muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; }

.tx-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }

/* Dispute form */
.dispute-form {
  background: #fef2f2;
  border: 1.5px solid #fecaca;
  border-radius: var(--radius);
  padding: 20px;
  margin-top: 16px;
}
.dispute-form h3 { color: var(--danger); margin-bottom: 16px; }

/* Chat */
.chat-card { display: flex; flex-direction: column; height: 560px; }
.chat-title { margin-bottom: 12px; padding-bottom: 12px; border-bottom: 1px solid var(--border); }
.chat-messages {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 4px 0 12px;
}
.chat-msg { display: flex; }
.chat-msg.mine  { justify-content: flex-end; }
.chat-msg.theirs{ justify-content: flex-start; }
.chat-bubble { max-width: 80%; }
.chat-msg.mine  .chat-bubble { background: var(--primary); color: #fff; border-radius: 14px 14px 4px 14px; padding: 10px 14px; }
.chat-msg.theirs .chat-bubble { background: var(--bg-muted); border-radius: 14px 14px 14px 4px; padding: 10px 14px; }
.chat-sender { display: block; font-size: .7rem; opacity: .7; margin-bottom: 3px; font-weight: 600; }
.chat-bubble p { font-size: .875rem; line-height: 1.5; margin: 0; }
.chat-time { display: block; font-size: .68rem; opacity: .6; margin-top: 4px; text-align: right; }
.chat-form { border-top: 1px solid var(--border); padding-top: 12px; margin-top: auto; }
.chat-input-row { display: flex; gap: 8px; }
.chat-input { flex: 1; resize: none; min-height: 44px; }
.chat-send { flex-shrink: 0; padding: 10px 16px; }

/* ── Auth Pages ─────────────────────────────────── */
.auth-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - var(--nav-h) - 60px);
  padding: 32px 16px;
}
.auth-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px;
  width: 100%;
  max-width: 420px;
  box-shadow: var(--shadow-lg);
}
.auth-logo  { font-size: 1.3rem; font-weight: 800; color: var(--primary); margin-bottom: 20px; }
.auth-title { font-size: 1.6rem; margin-bottom: 4px; }
.auth-sub   { color: var(--text-muted); margin-bottom: 28px; font-size: .9rem; }
.auth-form  { margin-bottom: 20px; }
.auth-footer { text-align: center; font-size: .875rem; color: var(--text-muted); }

/* ── Landing Page ───────────────────────────────── */
/* Hero */
.hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
  max-width: 1100px;
  margin: 0 auto;
  padding: 80px 24px 60px;
}
@media (max-width: 768px) {
  .hero { grid-template-columns: 1fr; padding: 48px 16px 40px; text-align: center; }
  .hero-graphic { display: none; }
  .trust-badges { justify-content: center; }
}
.hero-badge {
  display: inline-block;
  background: rgba(99,102,241,.1);
  color: var(--primary);
  border: 1px solid rgba(99,102,241,.25);
  border-radius: 20px;
  padding: 6px 16px;
  font-size: .8rem;
  font-weight: 600;
  margin-bottom: 16px;
}
.hero-title { font-size: clamp(2rem, 5vw, 3.2rem); margin-bottom: 16px; }
.hero-subtitle { font-size: 1.05rem; color: var(--text-muted); margin-bottom: 32px; max-width: 440px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 32px; }
.trust-badges { display: flex; gap: 16px; flex-wrap: wrap; }
.trust-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: .8rem;
  color: var(--text-muted);
  font-weight: 600;
}

/* Hero card mockup */
.hero-graphic { display: flex; justify-content: center; }
.hero-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  width: 280px;
  box-shadow: var(--shadow-lg);
  animation: float 4s ease-in-out infinite;
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-10px); }
}
.hero-card-header { font-size: .78rem; color: var(--text-muted); font-weight: 600; margin-bottom: 8px; }
.hero-card-amount { font-size: 2rem; font-weight: 800; margin-bottom: 8px; }
.hero-card-status { font-size: .82rem; font-weight: 600; margin-bottom: 20px; }
.hero-card-status.funded { color: var(--success); }
.hero-card-flow { display: flex; align-items: center; gap: 8px; }
.flow-step {
  flex: 1; text-align: center;
  padding: 8px 4px;
  border-radius: var(--radius-sm);
  font-size: .75rem; font-weight: 600;
  background: var(--bg-muted);
  color: var(--text-muted);
}
.flow-step.active { background: var(--primary); color: #fff; }
.flow-step.done   { background: rgba(16,185,129,.12); color: var(--success); }
.flow-arrow { color: var(--text-light); font-size: .9rem; flex-shrink: 0; }

/* Smart Form Section */
.smart-form-section {
  background: linear-gradient(135deg, #f0f4ff, #fdf4ff);
  padding: 64px 16px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.smart-form-wrapper { max-width: 560px; margin: 0 auto; }
.step-label { font-size: .8rem; color: var(--text-muted); font-weight: 600; margin-bottom: 20px; }
.form-step { display: none; }
.form-step.active { display: block; }
.role-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.role-card {
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 16px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
}
.role-card:hover { border-color: var(--primary); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.role-icon { font-size: 2.2rem; }
.role-card strong { display: block; font-size: 1rem; }
.role-card small { color: var(--text-muted); font-size: .8rem; line-height: 1.4; }
.form-preview { background: var(--bg-card); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow-md); }
.form-preview p { margin-bottom: 20px; color: var(--text-muted); }

/* How It Works */
.how-section { padding: 80px 16px; }
.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 24px;
  max-width: 1000px;
  margin: 0 auto;
}
.step-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 20px;
  text-align: center;
  box-shadow: var(--shadow);
  transition: box-shadow var(--transition);
}
.step-card:hover { box-shadow: var(--shadow-md); }
.step-num {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), #7c3aed);
  color: #fff;
  font-size: 1.1rem;
  font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 16px;
}
.step-card h3 { margin-bottom: 8px; }
.step-card p  { font-size: .875rem; color: var(--text-muted); }

/* Why / Features */
.why-section { background: var(--bg-muted); padding: 80px 16px; }
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  max-width: 1000px;
  margin: 0 auto;
}
.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 20px;
  box-shadow: var(--shadow);
}
.feature-icon { font-size: 2rem; display: block; margin-bottom: 12px; }
.feature-card h3 { margin-bottom: 8px; }
.feature-card p  { font-size: .875rem; color: var(--text-muted); }

/* CTA Section */
.cta-section {
  background: linear-gradient(135deg, var(--primary), #7c3aed);
  color: #fff;
  text-align: center;
  padding: 80px 16px;
}
.cta-section h2 { font-size: 2rem; margin-bottom: 12px; }
.cta-section p  { opacity: .85; margin-bottom: 28px; }
.cta-section .btn-primary {
  background: #fff;
  color: var(--primary);
  border-color: #fff;
}
.cta-section .btn-primary:hover { background: #f0f4ff; }

/* ── Wallet Pages ────────────────────────────────── */
.two-col-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
@media (max-width: 640px) { .two-col-grid { grid-template-columns: 1fr; } }
.info-card { background: linear-gradient(135deg, #f8faff, var(--bg-card)); }
.bank-details { margin-bottom: 16px; }
.bank-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: .875rem;
}
.bank-row:last-child { border: none; }
.bank-row span { color: var(--text-muted); }
.info-note {
  background: var(--bg-muted);
  border-radius: var(--radius-sm);
  padding: 12px;
  font-size: .825rem;
  color: var(--text-muted);
  line-height: 1.6;
}
.info-list { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.info-list li { font-size: .875rem; color: var(--text-muted); }

/* ── Admin ───────────────────────────────────────── */
.admin-page { padding-top: 24px; }
.admin-stats { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
.quick-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
}
.quick-action-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px;
  background: var(--bg-muted);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-size: .875rem;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  transition: all var(--transition);
  position: relative;
}
.quick-action-btn:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
  text-decoration: none;
}
.quick-action-btn:hover .badge-dot { background: #fff; color: var(--primary); }

/* Disputes */
.disputes-list { display: flex; flex-direction: column; gap: 20px; }
.dispute-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.dispute-card.open { border-color: var(--warning); }
.dispute-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  background: var(--bg-muted);
  border-bottom: 1px solid var(--border);
  gap: 12px;
  flex-wrap: wrap;
}
.dispute-card.open .dispute-header { background: #fffbeb; }
.dispute-body { padding: 20px; }
.dispute-meta { display: flex; gap: 20px; flex-wrap: wrap; margin-bottom: 12px; font-size: .875rem; }
.dispute-reason { background: var(--bg-muted); border-radius: var(--radius-sm); padding: 12px; margin-bottom: 12px; font-size: .875rem; }
.dispute-reason strong { display: block; margin-bottom: 6px; color: var(--text-muted); }
.resolve-form { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border); }

/* ── Footer ─────────────────────────────────────── */
.footer {
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  padding: 24px 16px;
  margin-top: auto;
}
.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-size: .8rem;
  color: var(--text-muted);
}
.footer-links { display: flex; gap: 16px; }
.footer-links a { color: var(--text-muted); }
.footer-links a:hover { color: var(--primary); }

/* ── Utilities ───────────────────────────────────── */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* ── Scrollbar ───────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-muted); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-light); }

/* ── Animations ─────────────────────────────────── */
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.section-card, .stat-card, .auth-card { animation: fadeIn .3s ease; }

/* ============================================================
   SETTINGS PAGE
   ============================================================ */

.settings-section-header {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.settings-section-icon {
  font-size: 1.8rem;
  line-height: 1;
  flex-shrink: 0;
  margin-top: 2px;
}
.settings-section-header h2  { margin-bottom: 4px; }
.settings-section-header p   { margin: 0; }

/* Fee type toggle */
.fee-config-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
@media (max-width: 640px) { .fee-config-grid { grid-template-columns: 1fr; } }

.fee-type-toggle { display: flex; flex-direction: column; gap: 10px; }
.fee-type-opt {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all var(--transition);
}
.fee-type-opt:hover   { border-color: var(--primary); }
.fee-type-opt.active  { border-color: var(--primary); background: rgba(99,102,241,.06); }
.fee-type-opt input   { display: none; }
.fee-type-icon        { font-size: 1.6rem; flex-shrink: 0; }
.fee-type-opt strong  { display: block; font-size: .9rem; }
.fee-type-opt small   { color: var(--text-muted); font-size: .78rem; }

.fee-value-wrapper {
  display: flex;
  align-items: center;
  position: relative;
}
.fee-value-prefix {
  position: absolute;
  left: 12px;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 1rem;
  pointer-events: none;
}
.fee-value-input { padding-left: 26px; padding-right: 36px; }
.fee-value-suffix {
  position: absolute;
  right: 12px;
  color: var(--text-muted);
  font-weight: 600;
}
.fee-live-preview {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-muted);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  margin-top: 8px;
  font-size: .85rem;
  color: var(--text-muted);
}
.fee-live-preview strong { color: var(--primary); font-size: .9rem; }

/* Wallet settings grid */
.wallets-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}
.wallet-settings-card {
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  transition: border-color var(--transition);
  background: var(--bg-card);
}
.wallet-settings-card.has-address {
  border-color: var(--success);
  background: linear-gradient(135deg, #f0fdf4, var(--bg-card));
}
.wallet-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  gap: 8px;
}
.wallet-coin-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
}
.wallet-coin-icon { font-size: 1.3rem; font-weight: 900; }
.wallet-coin-badge strong { display: block; font-size: .875rem; }
.wallet-coin-badge small  { color: var(--text-muted); font-size: .75rem; }
.wallet-status-dot {
  font-size: .72rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
  white-space: nowrap;
}
.wallet-status-dot.active   { background: #dcfce7; color: #14532d; }
.wallet-status-dot.inactive { background: var(--bg-muted); color: var(--text-muted); }

.wallet-addr-row {
  display: flex;
  gap: 6px;
  align-items: flex-start;
}
.wallet-addr-input { font-family: monospace; font-size: .8rem; flex: 1; }

/* Settings row grid */
.settings-row-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}

.settings-save-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin-bottom: 32px;
  box-shadow: var(--shadow);
  gap: 16px;
  flex-wrap: wrap;
}

/* ============================================================
   DEPOSIT PAGE
   ============================================================ */

.deposit-page { padding-top: 24px; }

.deposit-instructions {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-bottom: 24px;
  font-size: .9rem;
  color: #1e40af;
  line-height: 1.6;
}
.dep-inst-icon { font-size: 1.3rem; flex-shrink: 0; margin-top: 2px; }

.deposit-layout {
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 24px;
  align-items: start;
  margin-bottom: 24px;
}
@media (max-width: 900px) {
  .deposit-layout { grid-template-columns: 1fr; }
}

/* Coin tabs */
.coin-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.coin-tab {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 24px;
  border: 2px solid var(--border);
  background: var(--bg-card);
  font-size: .82rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition);
  color: var(--text-muted);
}
.coin-tab-icon { font-size: 1.1rem; }
.coin-tab:hover { border-color: var(--coin-color, var(--primary)); color: var(--text); }
.coin-tab.active {
  background: var(--coin-color, var(--primary));
  border-color: var(--coin-color, var(--primary));
  color: #fff;
}

/* Coin panels */
.coin-panel { display: none; }
.coin-panel.active { display: block; }

.coin-panel-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  margin-bottom: 16px;
}
.coin-panel-icon {
  width: 48px; height: 48px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem;
  font-weight: 900;
  flex-shrink: 0;
}
.coin-network-label { font-size: .78rem; color: var(--text-muted); margin-top: 2px; }

/* Wallet address display */
.wallet-address-block { margin-bottom: 14px; }
.wallet-address-label {
  font-size: .78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.wallet-address-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-muted);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  transition: border-color var(--transition);
}
.wallet-address-box:hover { border-color: var(--primary); }
.wallet-address-text {
  flex: 1;
  font-family: monospace;
  font-size: .82rem;
  word-break: break-all;
  line-height: 1.5;
  color: var(--text);
}
.copy-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 8px 14px;
  font-size: .8rem;
  font-weight: 700;
  cursor: pointer;
  flex-shrink: 0;
  transition: all var(--transition);
  white-space: nowrap;
}
.copy-btn:hover { background: var(--primary-dark); transform: translateY(-1px); }
.copy-btn.copied { background: var(--success); }
.copy-confirm {
  font-size: .78rem;
  color: var(--success);
  font-weight: 600;
  height: 0;
  overflow: hidden;
  transition: height .2s;
}
.copy-confirm.show { height: 22px; }

.coin-warning {
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: .8rem;
  color: #92400e;
  line-height: 1.5;
}

/* Deposit form column */
.amount-input-wrap {
  position: relative;
  display: flex;
}
.amount-prefix {
  position: absolute;
  left: 12px; top: 50%; transform: translateY(-50%);
  font-weight: 700;
  color: var(--text-muted);
  pointer-events: none;
}
.amount-input { padding-left: 26px; }

.selected-coin-display {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: var(--bg-muted);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-weight: 600;
}
.sel-coin-icon { font-size: 1.4rem; font-weight: 900; }
.sel-coin-sym  { color: var(--text-muted); font-size: .85rem; }

.deposit-steps-card h3 { margin-bottom: 12px; font-size: .9rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: .05em; }
.deposit-steps { padding-left: 20px; display: flex; flex-direction: column; gap: 8px; }
.deposit-steps li { font-size: .875rem; color: var(--text-muted); }

/* Coin badge in table */
.coin-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: .72rem;
  font-weight: 800;
  background: rgba(99,102,241,.1);
  color: var(--primary);
  letter-spacing: .04em;
}
.txhash-short {
  font-family: monospace;
  font-size: .8rem;
  color: var(--text-muted);
  cursor: default;
}

/* Reject form inline */
.reject-form-inline {
  padding: 12px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: var(--radius-sm);
  margin-top: 8px;
}
