/* ============================================================
   VALIDME — Dashboard & Exchange Flow Styles
   ============================================================ */

/* ── Dashboard Layout ─────────────────────────────────── */
.dash-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: calc(100vh - 70px);
  margin-top: 70px;
}

.dash-sidebar {
  background: var(--secondary);
  padding: 32px 0;
  position: sticky;
  top: 70px;
  height: calc(100vh - 70px);
  overflow-y: auto;
}

.dash-sidebar .sidebar-user {
  padding: 0 24px 28px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  margin-bottom: 16px;
}
.sidebar-avatar {
  width: 52px; height: 52px;
  border-radius: 50%; background: var(--primary);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem; font-weight: 800; color: #fff;
  margin-bottom: 10px;
}
.sidebar-name  { color: #fff; font-weight: 700; font-size: .95rem; }
.sidebar-email { color: rgba(255,255,255,.4); font-size: .75rem; margin-top: 2px; }
.sidebar-kyc {
  display: inline-flex; align-items: center; gap: 5px;
  margin-top: 8px; padding: 3px 10px;
  border-radius: 20px; font-size: .7rem; font-weight: 600;
}
.kyc-none     { background: rgba(255,200,0,.15); color: #ffc200; }
.kyc-pending  { background: rgba(255,120,0,.15); color: #ff7800; }
.kyc-verified { background: rgba(0,200,150,.15); color: var(--primary); }

.sidebar-nav { list-style: none; }
.sidebar-nav li a {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 24px;
  color: rgba(255,255,255,.6); font-size: .88rem;
  transition: var(--transition);
}
.sidebar-nav li a:hover,
.sidebar-nav li.active a {
  color: #fff;
  background: rgba(255,255,255,.06);
}
.sidebar-nav li.active a { border-left: 3px solid var(--primary); }
.sidebar-nav li a .nav-icon { font-size: 1.1rem; width: 20px; text-align: center; }
.sidebar-nav .nav-separator {
  padding: 16px 24px 6px;
  color: rgba(255,255,255,.2); font-size: .68rem;
  text-transform: uppercase; letter-spacing: 1px;
}

.dash-main { background: var(--bg); padding: 40px; overflow-x: hidden; }

/* ── Stat Cards ──────────────────────────────────────────── */
.dash-stats { display: grid; grid-template-columns: repeat(4,1fr); gap: 20px; margin-bottom: 36px; }
.stat-card {
  background: var(--white); border-radius: var(--radius);
  padding: 24px 20px; border: 1px solid var(--border);
  transition: var(--transition);
}
.stat-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.stat-card .sc-icon {
  width: 44px; height: 44px;
  border-radius: 12px; background: var(--primary-light);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem; margin-bottom: 14px;
}
.stat-card .sc-value { font-size: 1.5rem; font-weight: 800; color: var(--text); }
.stat-card .sc-label { font-size: .78rem; color: var(--text-light); margin-top: 4px; }
.stat-card .sc-change {
  font-size: .72rem; margin-top: 6px;
  display: flex; align-items: center; gap: 4px;
}
.sc-change.up   { color: var(--primary); }
.sc-change.down { color: var(--danger); }

/* ── Exchange Wizard ────────────────────────────────────── */
.exchange-wizard {
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
}

.wizard-steps-bar {
  display: flex;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}
.wizard-step-item {
  flex: 1; display: flex; align-items: center; justify-content: center;
  gap: 8px; padding: 16px 8px;
  font-size: .8rem; font-weight: 600;
  color: var(--text-light);
  border-bottom: 3px solid transparent;
  transition: var(--transition);
}
.wizard-step-item.active  { color: var(--primary); border-color: var(--primary); }
.wizard-step-item.done    { color: var(--primary); }
.wizard-step-item .step-num {
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--border); color: var(--text-light);
  display: flex; align-items: center; justify-content: center;
  font-size: .72rem; font-weight: 800;
}
.wizard-step-item.active .step-num { background: var(--primary); color: #fff; }
.wizard-step-item.done  .step-num  { background: var(--primary); color: #fff; }
.wizard-step-item.done  .step-num::after { content: '✓'; }

.wizard-body { padding: 40px; }
.wizard-panel { display: none; }
.wizard-panel.active { display: block; }

/* Step 1: Currency & Amount */
.exchange-form-grid {
  display: grid; grid-template-columns: 1fr auto 1fr;
  gap: 16px; align-items: center;
}
.exchange-block {
  border: 2px solid var(--border); border-radius: var(--radius);
  padding: 20px; transition: var(--transition);
}
.exchange-block:focus-within { border-color: var(--primary); }
.exchange-block-label {
  font-size: .72rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .5px; color: var(--text-light); margin-bottom: 12px;
}
.currency-selector {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px; border: 1px solid var(--border);
  border-radius: var(--radius-sm); cursor: pointer;
  transition: var(--transition); margin-bottom: 12px;
}
.currency-selector:hover { border-color: var(--primary); background: var(--primary-light); }
.currency-logo {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--primary-light);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; font-weight: 700;
}
.currency-info .cname { font-weight: 700; font-size: .9rem; }
.currency-info .cfull { font-size: .73rem; color: var(--text-light); }
.currency-selector .caret { margin-left: auto; color: var(--text-light); }
.amount-input-wrap { position: relative; }
.amount-input-wrap input {
  width: 100%; padding: 14px 80px 14px 16px;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  font-size: 1.3rem; font-weight: 700; outline: none;
  transition: var(--transition);
}
.amount-input-wrap input:focus { border-color: var(--primary); }
.amount-currency-badge {
  position: absolute; right: 14px; top: 50%;
  transform: translateY(-50%);
  background: var(--primary-light); color: var(--primary);
  padding: 3px 10px; border-radius: 20px;
  font-size: .78rem; font-weight: 700;
}
.swap-circle {
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--primary-light); border: 2px solid var(--primary);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem; cursor: pointer; transition: var(--transition);
}
.swap-circle:hover { background: var(--primary); color: #fff; transform: rotate(180deg); }

/* Rate summary box */
.rate-summary-box {
  background: var(--bg); border-radius: var(--radius-sm);
  padding: 16px 20px; margin: 20px 0;
  border: 1px solid var(--border);
}
.rate-row {
  display: flex; justify-content: space-between; align-items: center;
  font-size: .85rem; padding: 6px 0;
  border-bottom: 1px solid var(--border);
}
.rate-row:last-child { border-bottom: none; }
.rate-row .rl { color: var(--text-light); }
.rate-row .rv { font-weight: 600; color: var(--text); }
.rate-row .rv.highlight { color: var(--primary); font-size: 1rem; }

/* Countdown timer */
.countdown-bar {
  display: flex; align-items: center; gap: 12px;
  background: rgba(247,183,49,.1); border: 1px solid rgba(247,183,49,.3);
  border-radius: var(--radius-sm); padding: 10px 16px;
  font-size: .82rem; color: #b8880a; margin-bottom: 20px;
}
.countdown-num {
  font-size: 1.2rem; font-weight: 800;
  min-width: 44px; text-align: center;
  background: rgba(247,183,49,.2); border-radius: 6px; padding: 2px 6px;
}

/* Step 2: Recipient */
.recipient-form .form-group { margin-bottom: 20px; }
.recipient-form label { display: block; font-weight: 600; font-size: .85rem; margin-bottom: 8px; }
.recipient-form input,
.recipient-form select {
  width: 100%; padding: 13px 16px;
  border: 2px solid var(--border); border-radius: var(--radius-sm);
  font-size: .9rem; font-family: inherit; outline: none;
  transition: var(--transition);
}
.recipient-form input:focus,
.recipient-form select:focus { border-color: var(--primary); }
.input-with-prefix { display: flex; }
.input-prefix {
  padding: 0 14px; background: var(--bg);
  border: 2px solid var(--border); border-right: none;
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
  display: flex; align-items: center;
  font-weight: 600; font-size: .88rem; color: var(--text-light);
}
.input-with-prefix input { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }

/* Step 3: Payment Instructions */
.payment-instructions {
  background: var(--bg); border-radius: var(--radius);
  padding: 28px; border: 2px dashed var(--primary);
}
.payment-instructions h3 { color: var(--primary); margin-bottom: 16px; }
.payment-address-box {
  background: var(--white); border-radius: var(--radius-sm);
  padding: 16px 20px; margin: 16px 0;
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.payment-address { font-family: monospace; font-size: .9rem; word-break: break-all; }
.copy-btn {
  background: var(--primary-light); color: var(--primary);
  border: none; border-radius: 8px; padding: 8px 14px;
  font-size: .8rem; font-weight: 700; cursor: pointer;
  white-space: nowrap; transition: var(--transition);
}
.copy-btn:hover { background: var(--primary); color: #fff; }
.payment-steps { list-style: none; display: flex; flex-direction: column; gap: 12px; margin-top: 16px; }
.payment-steps li {
  display: flex; align-items: flex-start; gap: 12px;
  font-size: .88rem;
}
.payment-steps li .step-dot {
  width: 22px; height: 22px; min-width: 22px;
  background: var(--primary); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: .7rem; font-weight: 800; margin-top: 1px;
}

/* Step 4: Confirmation */
.order-success-card { text-align: center; padding: 20px 0; }
.success-icon-wrap {
  width: 80px; height: 80px; border-radius: 50%;
  background: var(--primary-light); margin: 0 auto 20px;
  display: flex; align-items: center; justify-content: center;
  font-size: 2.5rem;
}
.order-ref {
  font-size: 1.2rem; font-weight: 800;
  color: var(--primary); margin-bottom: 8px;
  cursor: pointer; letter-spacing: 1px;
}
.order-ref:hover { text-decoration: underline; }
.order-status-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 16px; border-radius: 50px;
  font-size: .82rem; font-weight: 700; margin-bottom: 20px;
}
.status-pending_payment { background: rgba(247,183,49,.15); color: #b8880a; }
.status-processing      { background: rgba(0,120,255,.12);  color: #007bff; }
.status-completed       { background: var(--primary-light); color: var(--primary); }
.status-failed          { background: rgba(255,71,87,.12);  color: var(--danger); }
.status-cancelled       { background: rgba(100,100,100,.1); color: #888; }

/* Wizard Navigation Buttons */
.wizard-nav {
  display: flex; justify-content: space-between; align-items: center;
  padding: 20px 40px; border-top: 1px solid var(--border);
  background: var(--bg);
}

/* ── Currency Picker Modal ───────────────────────────────── */
.currency-modal-overlay {
  display: none; position: fixed; inset: 0; z-index: 9000;
  background: rgba(0,0,0,.55); backdrop-filter: blur(6px);
  align-items: flex-end; justify-content: center;
}
.currency-modal-overlay.open { display: flex; }
.currency-modal {
  background: var(--white); border-radius: var(--radius) var(--radius) 0 0;
  width: 100%; max-width: 520px; max-height: 80vh;
  overflow: hidden; display: flex; flex-direction: column;
  animation: slideUp .3s ease;
}
@keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
.currency-modal-header {
  padding: 20px 24px; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}
.currency-modal-search {
  padding: 12px 24px; border-bottom: 1px solid var(--border);
}
.currency-modal-search input {
  width: 100%; padding: 10px 16px;
  border: 2px solid var(--border); border-radius: 50px;
  font-size: .9rem; outline: none;
}
.currency-modal-search input:focus { border-color: var(--primary); }
.currency-modal-list { overflow-y: auto; flex: 1; }
.currency-modal-item {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 24px; cursor: pointer;
  transition: var(--transition); border-bottom: 1px solid var(--border);
}
.currency-modal-item:hover { background: var(--primary-light); }
.currency-modal-item .cmi-logo {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--primary-light);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; font-weight: 700;
}
.currency-modal-item .cmi-name { font-weight: 700; font-size: .9rem; }
.currency-modal-item .cmi-full { font-size: .76rem; color: var(--text-light); }
.currency-modal-item .cmi-price { margin-left: auto; text-align: right; }
.currency-modal-item .cmi-price .cp { font-weight: 700; font-size: .88rem; }
.currency-modal-item .cmi-price .cc {
  font-size: .72rem;
  color: var(--primary);
}
.currency-modal-cat {
  padding: 8px 24px; background: var(--bg);
  font-size: .7rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .5px;
  color: var(--text-light);
}

/* ── Order History Table ─────────────────────────────────── */
.orders-table { width: 100%; border-collapse: collapse; }
.orders-table th {
  padding: 12px 16px; background: var(--bg);
  font-size: .78rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .5px;
  color: var(--text-light); text-align: left;
  border-bottom: 1px solid var(--border);
}
.orders-table td { padding: 14px 16px; border-bottom: 1px solid var(--border); font-size: .88rem; }
.orders-table tr:hover td { background: var(--primary-light); }
.orders-table .pair-cell { display: flex; align-items: center; gap: 8px; font-weight: 600; }

/* Upload proof */
.upload-zone {
  border: 2px dashed var(--border); border-radius: var(--radius-sm);
  padding: 32px; text-align: center; cursor: pointer;
  transition: var(--transition); margin-top: 16px;
}
.upload-zone:hover, .upload-zone.drag-over {
  border-color: var(--primary); background: var(--primary-light);
}
.upload-zone .upload-icon { font-size: 2.5rem; margin-bottom: 10px; }

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 1024px) {
  .dash-stats { grid-template-columns: repeat(2,1fr); }
}
@media (max-width: 768px) {
  .dash-layout { grid-template-columns: 1fr; }
  .dash-sidebar { position: relative; top: 0; height: auto; padding: 16px 0; }
  .dash-main { padding: 20px 16px; }
  .exchange-form-grid { grid-template-columns: 1fr; }
  .swap-circle { margin: 0 auto; transform: rotate(90deg); }
  .swap-circle:hover { transform: rotate(270deg); }
  .wizard-body { padding: 20px 16px; }
  .wizard-nav { padding: 16px; }
  .wizard-step-item span:not(.step-num) { display: none; }
  .dash-stats { grid-template-columns: 1fr 1fr; }
}
