/* ── Reset & Base ─────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body { font-family: 'IBM Plex Sans', sans-serif; color: #22242A; background: #fff; line-height: 1.5; }
a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
ul { list-style: none; }
button { cursor: pointer; font-family: inherit; }
input, select, textarea { font-family: inherit; }

/* ── Variables ────────────────────────────────────── */
:root {
  --purple: #9C3CE8;
  --purple-dark: #7B1FD0;
  --purple-light: #F4E8FF;
  --purple-bg: #FEF5FE;
  --gray-50: #FAFAFA;
  --gray-100: #F5F5F5;
  --gray-200: #EAEBEF;
  --gray-300: #D8DBE0;
  --gray-400: #CBD0D6;
  --gray-500: #A7AEB9;
  --gray-600: #707A8A;
  --gray-700: #4A5160;
  --gray-900: #22242A;
  --green: #00A17B;
  --red: #E53935;
  --yellow: #F19A37;
  --radius: 8px;
  --radius-lg: 16px;
  --shadow: 0 2px 12px rgba(0,0,0,.08);
  --shadow-lg: 0 8px 32px rgba(0,0,0,.12);
  --transition: .2s ease;
}

/* ── Header ───────────────────────────────────────── */
.remi-header {
  position: sticky; top: 0; z-index: 1000;
  background: #fff;
  border-bottom: 1px solid var(--gray-200);
}
.header-inner {
  max-width: 1280px; margin: 0 auto;
  padding: 12px 40px;
  display: flex; align-items: center; justify-content: space-between;
}
.logo { display: flex; align-items: center; margin-right: 32px; }
.logo svg text { transition: fill var(--transition); }
.logo:hover svg text { fill: var(--purple-dark); }
.header-left { display: flex; align-items: center; }
.header-right { display: flex; align-items: center; gap: 12px; }

.main-nav { display: flex; align-items: center; gap: 4px; }
.nav-link {
  padding: 6px 14px; border-radius: var(--radius);
  font-size: 14px; font-weight: 500; color: var(--gray-900);
  display: flex; align-items: center; gap: 6px;
  transition: background var(--transition);
}
.nav-link:hover, .nav-link.active { background: var(--gray-100); }
.badge-php {
  background: var(--purple); color: #fff;
  font-size: 10px; font-weight: 600; padding: 1px 6px;
  border-radius: 4px; letter-spacing: .5px;
}

/* Header Buttons */
.btn-ghost {
  padding: 6px 14px; border-radius: var(--radius);
  font-size: 12px; font-weight: 500; color: var(--gray-600);
  transition: color var(--transition);
}
.btn-ghost:hover { color: var(--purple); }
.btn-primary {
  padding: 7px 16px; border-radius: var(--radius);
  background: var(--purple); color: #fff;
  font-size: 12px; font-weight: 500; border: none;
  transition: background var(--transition);
  display: inline-flex; align-items: center; gap: 6px;
}
.btn-primary:hover { background: var(--purple-dark); }
.btn-outline {
  padding: 9px 20px; border-radius: var(--radius);
  border: 1.5px solid var(--purple); color: var(--purple);
  font-size: 15px; font-weight: 500;
  transition: all var(--transition);
  display: inline-flex; align-items: center; gap: 8px;
}
.btn-outline:hover { background: var(--purple); color: #fff; }
.btn-lg {
  padding: 13px 32px; font-size: 16px; font-weight: 500;
  border-radius: var(--radius); border: none;
  background: var(--purple); color: #fff;
  display: inline-flex; align-items: center; gap: 8px;
  transition: background var(--transition);
}
.btn-lg:hover { background: var(--purple-dark); }
.btn-lg:disabled { opacity: .4; cursor: not-allowed; }
.btn-white {
  padding: 9px 20px; border-radius: var(--radius);
  background: #fff; color: var(--gray-900);
  border: 1.5px solid var(--gray-400);
  font-size: 15px; font-weight: 500;
  display: inline-flex; align-items: center; gap: 8px;
  transition: border-color var(--transition);
}
.btn-white:hover { border-color: var(--purple); }

/* ── User Menu ────────────────────────────────────── */
.user-menu-wrap { position: relative; }
.user-menu-btn {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 10px; border-radius: var(--radius);
  border: none; background: transparent;
  font-size: 13px; font-weight: 500; color: var(--gray-900);
  transition: background var(--transition);
}
.user-menu-btn:hover { background: var(--gray-100); }
.user-avatar { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; }
.user-dropdown {
  display: none; position: absolute; right: 0; top: calc(100% + 8px);
  background: #fff; border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg); padding: 8px;
  min-width: 200px; box-shadow: var(--shadow-lg); z-index: 999;
}
.user-menu-wrap.open .user-dropdown { display: block; }
.user-menu-btn.open { background: var(--gray-100); }
.user-dropdown a {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: var(--radius);
  font-size: 14px; color: var(--gray-900);
  transition: background var(--transition);
}
.user-dropdown a:hover { background: var(--gray-100); }
.user-dropdown hr { border: none; border-top: 1px solid var(--gray-200); margin: 6px 0; }
.user-dropdown .text-danger { color: var(--red); }
.notif-wrap { position: relative; }
.icon-btn {
  width: 36px; height: 36px; border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  transition: background var(--transition); position: relative;
}
.icon-btn:hover { background: var(--gray-100); }
.badge-count {
  position: absolute; top: 2px; right: 2px;
  background: var(--red); color: #fff;
  font-size: 9px; font-weight: 700;
  width: 16px; height: 16px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}

/* ── Hero Section ─────────────────────────────────── */
.hero {
  background: var(--purple-bg);
  padding: 60px 0 0;
}
.hero-inner {
  max-width: 1280px; margin: 0 auto; padding: 0 40px;
  display: grid; grid-template-columns: 5fr 5fr; gap: 40px; align-items: center;
}
.hero-content h1 {
  font-size: 44px; font-weight: 600; line-height: 1.2;
  color: var(--gray-900); margin-bottom: 16px;
}
.hero-content h1 span { color: var(--purple); }
.hero-content .subtitle {
  font-size: 20px; color: var(--gray-600); font-weight: 400; margin-bottom: 32px;
}
.hero-form { max-width: 480px; }
.email-input-wrap {
  display: flex; flex-direction: column; gap: 10px;
}
.email-input-wrap input {
  height: 48px; padding: 0 14px;
  border: 1.5px solid var(--gray-400); border-radius: var(--radius);
  font-size: 16px; color: var(--gray-900); background: #fff;
  transition: border-color var(--transition);
  width: 100%;
}
.email-input-wrap input:focus { outline: none; border-color: var(--purple); }
.divider { display: flex; align-items: center; gap: 12px; margin: 20px 0; }
.divider span { color: var(--gray-600); font-size: 14px; }
.divider::before, .divider::after { content:''; flex:1; height:1px; background: var(--gray-200); }
.social-btns { display: flex; gap: 14px; }
.social-btns .btn-white { flex: 1; justify-content: center; height: 44px; }
.trust-badge {
  display: flex; align-items: center; gap: 10px;
  background: #fff; padding: 10px 16px; border-radius: var(--radius);
  margin-top: 22px; font-size: 14px; font-weight: 600; color: var(--gray-900);
}
.hero-img { display: flex; justify-content: flex-end; }
.hero-img img { max-height: 480px; width: auto; }

/* ── Stats bar ────────────────────────────────────── */
.stats-bar {
  background: #FBE9FE; border-radius: var(--radius-lg);
  padding: 32px 40px; margin: 0 40px;
  display: flex; align-items: center; justify-content: space-around;
  max-width: 1200px; margin: 24px auto 60px;
}
.stat-item { text-align: center; flex: 1; }
.stat-item h2 { font-size: 40px; font-weight: 600; color: var(--gray-900); }
.stat-item p { font-size: 20px; color: var(--gray-900); opacity: .8; margin-top: 8px; }
.stat-divider { width: 1px; background: #DAB5FD; align-self: stretch; }

/* ── Section ──────────────────────────────────────── */
.section { padding: 80px 0; }
.section-inner { max-width: 1280px; margin: 0 auto; padding: 0 40px; }
.section-label {
  font-size: 20px; font-weight: 400; color: var(--gray-600);
  text-transform: uppercase; letter-spacing: 1px; margin-bottom: 8px;
}
.section-title { font-size: 40px; font-weight: 600; color: var(--gray-900); line-height: 1.3; }
.section-sub { font-size: 24px; font-weight: 400; color: var(--gray-600); margin-top: 20px; }
.section-purple { background: var(--purple-light); }
.section-light { background: #FAF5FF; }

/* ── How It Works ─────────────────────────────────── */
.how-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; align-items: center; }
.how-img img { border-radius: var(--radius-lg); }
.steps { display: flex; flex-direction: column; gap: 0; margin: 32px 0; }
.step { display: flex; align-items: flex-start; gap: 16px; position: relative; padding-bottom: 28px; }
.step:last-child { padding-bottom: 0; }
.step:not(:last-child)::before {
  content: ''; position: absolute; left: 19px; top: 44px;
  width: 2px; height: calc(100% - 44px); background: var(--purple);
}
.step-num {
  width: 40px; height: 40px; border-radius: 50%;
  border: 2px solid var(--purple); background: var(--purple-light);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; color: var(--purple); font-weight: 500; flex-shrink: 0;
}
.step-label { font-size: 20px; font-weight: 500; color: var(--gray-900); margin-top: 6px; }

/* ── P2P Offer Table ──────────────────────────────── */
.offer-table-wrap { overflow-x: auto; }
.offer-filters {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 20px 0 16px;
}
.filter-tabs { display: flex; gap: 2px; background: var(--gray-100); padding: 3px; border-radius: var(--radius); }
.filter-tab {
  padding: 7px 20px; border-radius: 6px; border: none;
  font-size: 14px; font-weight: 500; background: transparent; color: var(--gray-600);
  transition: all var(--transition);
}
.filter-tab.active { background: #fff; color: var(--gray-900); box-shadow: 0 1px 4px rgba(0,0,0,.1); }
.filter-select {
  padding: 8px 14px; border: 1.5px solid var(--gray-400); border-radius: var(--radius);
  font-size: 14px; color: var(--gray-900); background: #fff; cursor: pointer;
}
.offer-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.offer-table th { padding: 12px 16px; text-align: left; font-weight: 500; color: var(--gray-600); border-bottom: 1px solid var(--gray-200); }
.offer-table td { padding: 16px; border-bottom: 1px solid var(--gray-100); vertical-align: middle; }
.offer-table tr:hover td { background: var(--gray-50); }
.trader-info { display: flex; align-items: center; gap: 10px; }
.trader-avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--purple-light); display: flex; align-items: center; justify-content: center; font-weight: 600; color: var(--purple); font-size: 14px; flex-shrink: 0; }
.trader-name { font-weight: 500; }
.trader-stats { font-size: 12px; color: var(--gray-600); }
.price-cell { font-size: 18px; font-weight: 600; color: var(--gray-900); }
.price-coin { font-size: 12px; color: var(--gray-600); font-weight: 400; }
.limit-cell { color: var(--gray-600); }
.payment-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.payment-tag {
  padding: 3px 8px; background: var(--gray-100); border-radius: 4px;
  font-size: 12px; color: var(--gray-600);
}
.btn-buy { background: var(--green); color: #fff; padding: 8px 20px; border-radius: var(--radius); border: none; font-size: 14px; font-weight: 500; transition: opacity var(--transition); }
.btn-buy:hover { opacity: .85; }
.btn-sell-red { background: var(--red); color: #fff; padding: 8px 20px; border-radius: var(--radius); border: none; font-size: 14px; font-weight: 500; transition: opacity var(--transition); }
.btn-sell-red:hover { opacity: .85; }
.empty-state { text-align: center; padding: 60px 20px; color: var(--gray-600); }
.empty-state svg { margin: 0 auto 16px; opacity: .4; }

/* ── Coin Cards / Market ──────────────────────────── */
.coin-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px,1fr)); gap: 16px; }
.coin-card {
  background: #fff; border: 1px solid var(--gray-200); border-radius: var(--radius-lg);
  padding: 20px; transition: box-shadow var(--transition), transform var(--transition);
  display: flex; flex-direction: column; gap: 12px;
}
.coin-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.coin-header { display: flex; align-items: center; gap: 10px; }
.coin-icon { width: 40px; height: 40px; border-radius: 50%; background: var(--gray-100); display: flex; align-items: center; justify-content: center; font-size: 18px; font-weight: 700; }
.coin-symbol { font-size: 16px; font-weight: 600; }
.coin-name { font-size: 12px; color: var(--gray-600); }
.coin-price { font-size: 22px; font-weight: 600; }
.coin-change { font-size: 13px; font-weight: 500; }
.coin-change.up { color: var(--green); }
.coin-change.down { color: var(--red); }
.coin-volume { font-size: 12px; color: var(--gray-600); }

/* ── Swap Form ────────────────────────────────────── */
.swap-card {
  background: #fff; border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg); padding: 28px;
  max-width: 480px; box-shadow: var(--shadow);
}
.swap-card h2 { font-size: 22px; font-weight: 600; margin-bottom: 24px; }
.swap-field { background: var(--gray-100); border-radius: var(--radius); padding: 14px 16px; margin-bottom: 8px; }
.swap-field label { font-size: 12px; color: var(--gray-600); margin-bottom: 4px; display: block; }
.swap-field-row { display: flex; align-items: center; gap: 10px; }
.swap-field input {
  flex: 1; border: none; background: transparent; font-size: 22px;
  font-weight: 500; color: var(--gray-900); outline: none;
}
.swap-coin-select {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 12px; border-radius: var(--radius);
  background: #fff; border: 1.5px solid var(--gray-200);
  font-size: 14px; font-weight: 500; cursor: pointer;
  transition: border-color var(--transition);
}
.swap-coin-select:hover { border-color: var(--purple); }
.swap-arrow {
  display: flex; justify-content: center; margin: 2px 0;
}
.swap-arrow button {
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--purple-light); border: 2px solid #fff;
  display: flex; align-items: center; justify-content: center;
  color: var(--purple); font-size: 18px; box-shadow: var(--shadow);
  transition: background var(--transition);
}
.swap-arrow button:hover { background: var(--purple); color: #fff; }
.swap-rate { font-size: 13px; color: var(--gray-600); padding: 8px 0; }

/* ── Auth Pages ───────────────────────────────────── */
.auth-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: var(--purple-bg); padding: 40px 20px; }
.auth-card {
  background: #fff; border-radius: var(--radius-lg);
  padding: 40px; width: 100%; max-width: 440px;
  box-shadow: var(--shadow-lg);
}
.auth-card h1 { font-size: 28px; font-weight: 600; margin-bottom: 8px; }
.auth-card .auth-sub { color: var(--gray-600); margin-bottom: 28px; font-size: 15px; }
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-size: 14px; font-weight: 500; margin-bottom: 6px; color: var(--gray-900); }
.form-control {
  width: 100%; height: 46px; padding: 0 14px;
  border: 1.5px solid var(--gray-400); border-radius: var(--radius);
  font-size: 15px; color: var(--gray-900); background: #fff;
  transition: border-color var(--transition);
}
.form-control:focus { outline: none; border-color: var(--purple); }
.form-control.error { border-color: var(--red); }
.form-error { color: var(--red); font-size: 12px; margin-top: 4px; }
.auth-footer { margin-top: 20px; text-align: center; font-size: 14px; color: var(--gray-600); }
.auth-footer a { color: var(--purple); font-weight: 500; }
.auth-divider { display: flex; align-items: center; gap: 12px; margin: 20px 0; }
.auth-divider span { color: var(--gray-600); font-size: 13px; flex-shrink: 0; }
.auth-divider::before, .auth-divider::after { content:''; flex:1; height:1px; background: var(--gray-200); }

/* ── Alert / Flash ────────────────────────────────── */
.alert {
  padding: 12px 16px; border-radius: var(--radius);
  font-size: 14px; margin-bottom: 18px;
  display: flex; align-items: flex-start; gap: 10px;
}
.alert-success { background: #E8F5E9; color: #1B5E20; border: 1px solid #A5D6A7; }
.alert-error   { background: #FFEBEE; color: #B71C1C; border: 1px solid #EF9A9A; }
.alert-info    { background: #E3F2FD; color: #0D47A1; border: 1px solid #90CAF9; }
.alert-warning { background: #FFF8E1; color: #E65100; border: 1px solid #FFE082; }

/* ── Dashboard / Wallet ───────────────────────────── */
.dashboard-wrap { max-width: 1280px; margin: 0 auto; padding: 40px; display: grid; grid-template-columns: 260px 1fr; gap: 28px; }
.sidebar { display: flex; flex-direction: column; gap: 4px; }
.sidebar-link {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; border-radius: var(--radius);
  font-size: 14px; font-weight: 500; color: var(--gray-600);
  transition: all var(--transition);
}
.sidebar-link:hover, .sidebar-link.active { background: var(--purple-light); color: var(--purple); }
.sidebar-link svg { opacity: .7; }
.sidebar-link.active svg { opacity: 1; }
.main-content { min-width: 0; }
.page-title { font-size: 24px; font-weight: 600; margin-bottom: 24px; color: var(--gray-900); }
.card {
  background: #fff; border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg); padding: 24px;
  box-shadow: 0 1px 4px rgba(0,0,0,.04);
}
.card-title { font-size: 16px; font-weight: 600; margin-bottom: 16px; }

/* Wallet Balance */
.wallet-overview {
  background: linear-gradient(135deg, var(--purple), #6A1FBF);
  border-radius: var(--radius-lg); padding: 28px; color: #fff; margin-bottom: 24px;
}
.wallet-total-label { font-size: 14px; opacity: .8; margin-bottom: 6px; }
.wallet-total-amount { font-size: 38px; font-weight: 700; margin-bottom: 4px; }
.wallet-total-sub { font-size: 14px; opacity: .7; }
.wallet-actions { display: flex; gap: 12px; margin-top: 24px; }
.wallet-action-btn {
  padding: 9px 20px; background: rgba(255,255,255,.2); color: #fff;
  border-radius: var(--radius); border: 1px solid rgba(255,255,255,.3);
  font-size: 14px; font-weight: 500;
  transition: background var(--transition);
}
.wallet-action-btn:hover { background: rgba(255,255,255,.3); }
.coin-list { display: flex; flex-direction: column; gap: 2px; }
.coin-list-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 0; border-bottom: 1px solid var(--gray-100);
}
.coin-list-item:last-child { border-bottom: none; }
.coin-info { display: flex; align-items: center; gap: 12px; }
.coin-bal { text-align: right; }
.coin-bal-amount { font-size: 15px; font-weight: 600; }
.coin-bal-fiat { font-size: 12px; color: var(--gray-600); }

/* ── Trade Chat ───────────────────────────────────── */
.trade-layout { display: grid; grid-template-columns: 1fr 380px; gap: 24px; max-width: 1100px; margin: 0 auto; padding: 32px 20px; }
.chat-box { border: 1px solid var(--gray-200); border-radius: var(--radius-lg); overflow: hidden; display: flex; flex-direction: column; }
.chat-header { padding: 16px 20px; border-bottom: 1px solid var(--gray-200); font-weight: 600; font-size: 15px; }
.chat-messages { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 12px; min-height: 400px; max-height: 500px; }
.chat-msg { max-width: 75%; }
.chat-msg.mine { align-self: flex-end; }
.chat-bubble { padding: 10px 14px; border-radius: 12px; font-size: 14px; line-height: 1.5; }
.chat-msg.mine .chat-bubble { background: var(--purple); color: #fff; border-bottom-right-radius: 4px; }
.chat-msg.theirs .chat-bubble { background: var(--gray-100); color: var(--gray-900); border-bottom-left-radius: 4px; }
.chat-time { font-size: 11px; color: var(--gray-500); margin-top: 3px; text-align: right; }
.chat-input-wrap { border-top: 1px solid var(--gray-200); padding: 12px 16px; display: flex; gap: 10px; }
.chat-input { flex: 1; border: 1.5px solid var(--gray-400); border-radius: var(--radius); padding: 10px 14px; font-size: 14px; resize: none; transition: border-color var(--transition); }
.chat-input:focus { outline: none; border-color: var(--purple); }
.chat-send { background: var(--purple); color: #fff; border: none; border-radius: var(--radius); padding: 0 18px; font-size: 14px; font-weight: 500; }

/* Trade Info Sidebar */
.trade-info-card { background: #fff; border: 1px solid var(--gray-200); border-radius: var(--radius-lg); overflow: hidden; }
.trade-status-bar { padding: 16px 20px; font-size: 14px; font-weight: 600; }
.status-pending   { background: #FFF8E1; color: #E65100; }
.status-paid      { background: #E8F5E9; color: #2E7D32; }
.status-released  { background: #E3F2FD; color: #1565C0; }
.status-disputed  { background: #FFEBEE; color: #C62828; }
.status-cancelled { background: var(--gray-100); color: var(--gray-600); }
.trade-detail-row { display: flex; justify-content: space-between; align-items: center; padding: 12px 20px; border-bottom: 1px solid var(--gray-100); font-size: 14px; }
.trade-detail-row:last-child { border-bottom: none; }
.detail-label { color: var(--gray-600); }
.detail-val { font-weight: 600; }
.trade-actions { padding: 16px 20px; display: flex; flex-direction: column; gap: 10px; border-top: 1px solid var(--gray-200); }

/* ── Timer ────────────────────────────────────────── */
.countdown { font-size: 32px; font-weight: 700; color: var(--purple); font-variant-numeric: tabular-nums; }
.countdown.urgent { color: var(--red); }

/* ── Tabs ─────────────────────────────────────────── */
.tabs-wrap { border-bottom: 1px solid var(--gray-200); margin-bottom: 24px; }
.tabs { display: flex; gap: 0; }
.tab-btn {
  padding: 12px 24px; border: none; background: transparent;
  font-size: 15px; font-weight: 500; color: var(--gray-600);
  border-bottom: 2px solid transparent; margin-bottom: -1px;
  transition: all var(--transition); cursor: pointer;
}
.tab-btn.active { color: var(--purple); border-bottom-color: var(--purple); }
.tab-btn:hover:not(.active) { color: var(--gray-900); }
.tab-content { display: none; }
.tab-content.active { display: block; }

/* ── Modal ────────────────────────────────────────── */
.modal-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,.5); z-index: 2000;
  align-items: center; justify-content: center;
}
.modal-overlay.open { display: flex; }
.modal {
  background: #fff; border-radius: var(--radius-lg);
  padding: 32px; max-width: 520px; width: 95%;
  max-height: 90vh; overflow-y: auto;
  box-shadow: var(--shadow-lg);
}
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.modal-title { font-size: 20px; font-weight: 600; }
.modal-close { background: none; border: none; font-size: 22px; color: var(--gray-600); cursor: pointer; }
.modal-footer { margin-top: 24px; display: flex; gap: 12px; justify-content: flex-end; }

/* ── Toast ────────────────────────────────────────── */
#toast-container { position: fixed; bottom: 24px; right: 24px; z-index: 9999; display: flex; flex-direction: column; gap: 10px; }
.toast {
  padding: 14px 20px; border-radius: var(--radius);
  font-size: 14px; font-weight: 500; color: #fff;
  min-width: 260px; box-shadow: var(--shadow-lg);
  animation: slideIn .3s ease;
}
.toast-success { background: var(--green); }
.toast-error   { background: var(--red); }
.toast-info    { background: var(--purple); }
@keyframes slideIn { from { transform: translateX(100%); opacity:0; } to { transform: translateX(0); opacity:1; } }

/* ── Footer ───────────────────────────────────────── */
.remi-footer { background: #fff; border-top: 1px solid var(--gray-200); padding: 48px 0 24px; }
.footer-top { max-width: 1280px; margin: 0 auto; padding: 0 40px; display: grid; grid-template-columns: repeat(4,1fr); gap: 32px; margin-bottom: 40px; }
.footer-col h4 { font-size: 16px; font-weight: 600; margin-bottom: 16px; }
.footer-col a { display: block; font-size: 14px; color: var(--gray-600); margin-bottom: 12px; transition: color var(--transition); }
.footer-col a:hover { color: var(--purple); }
.footer-bottom { max-width: 1280px; margin: 0 auto; padding: 24px 40px 0; border-top: 1px solid var(--gray-200); display: flex; justify-content: space-between; align-items: center; }
.footer-logo strong { font-size: 20px; color: var(--purple); }
.footer-logo p { font-size: 13px; color: var(--gray-600); margin-top: 4px; }
.footer-social { display: flex; gap: 16px; }
.social-icon { display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 50%; transition: background var(--transition); }
.social-icon:hover { background: var(--gray-100); }
.social-icon svg { transition: fill var(--transition); }
.social-icon:hover svg { fill: var(--purple); }

/* ── Misc ─────────────────────────────────────────── */
.text-purple { color: var(--purple); }
.text-green  { color: var(--green); }
.text-red    { color: var(--red); }
.text-gray   { color: var(--gray-600); }
.text-center { text-align: center; }
.mt-4 { margin-top: 16px; }
.mt-8 { margin-top: 32px; }
.mb-4 { margin-bottom: 16px; }
.fw-600 { font-weight: 600; }
.badge { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: 12px; font-weight: 600; }
.badge-green  { background: #E8F5E9; color: #2E7D32; }
.badge-red    { background: #FFEBEE; color: #C62828; }
.badge-yellow { background: #FFF8E1; color: #E65100; }
.badge-blue   { background: #E3F2FD; color: #1565C0; }
.badge-gray   { background: var(--gray-100); color: var(--gray-600); }
.separator { height: 1px; background: var(--gray-200); margin: 20px 0; }
.spinner { display: inline-block; width: 18px; height: 18px; border: 2px solid rgba(255,255,255,.4); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading { opacity: .6; pointer-events: none; }

/* ── Mobile Nav (hamburger) ───────────────────────── */
.mobile-menu-btn {
  display: none;
  background: none; border: none;
  padding: 6px; border-radius: var(--radius);
  cursor: pointer; color: var(--gray-900);
  transition: background var(--transition);
}
.mobile-menu-btn:hover { background: var(--gray-100); }
.mobile-nav-overlay {
  display: none; position: fixed; inset: 0; z-index: 1500;
  background: rgba(0,0,0,.5);
}
.mobile-nav-drawer {
  position: fixed; top: 0; left: 0; bottom: 0;
  width: 280px; background: #fff; z-index: 1600;
  overflow-y: auto; padding: 20px;
  transform: translateX(-100%);
  transition: transform .3s ease;
  box-shadow: var(--shadow-lg);
}
.mobile-nav-overlay.open { display: block; }
.mobile-nav-drawer.open { transform: translateX(0); }
.mobile-nav-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 24px;
}
.mobile-nav-close {
  background: none; border: none; font-size: 24px;
  color: var(--gray-600); cursor: pointer; padding: 4px;
}
.mobile-nav-links { display: flex; flex-direction: column; gap: 4px; }
.mobile-nav-links a {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px; border-radius: var(--radius);
  font-size: 15px; font-weight: 500; color: var(--gray-900);
  transition: background var(--transition);
}
.mobile-nav-links a:hover, .mobile-nav-links a.active {
  background: var(--purple-light); color: var(--purple);
}
.mobile-nav-links hr { border: none; border-top: 1px solid var(--gray-200); margin: 8px 0; }
.mobile-nav-links .text-danger { color: var(--red); }
.mobile-nav-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 20px; }
.mobile-nav-actions a { justify-content: center; text-align: center; }

/* ── Responsive ───────────────────────────────────── */
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-img { display: none; }
  .how-grid { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: repeat(2,1fr); }
  .stats-bar { flex-direction: column; gap: 24px; }
  .stat-divider { display: none; }
  .dashboard-wrap { grid-template-columns: 1fr; }
  .trade-layout { grid-template-columns: 1fr; }
  .coin-grid { grid-template-columns: repeat(auto-fill, minmax(160px,1fr)); }
}

@media (max-width: 600px) {
  /* Header */
  .header-inner { padding: 12px 16px; }
  .main-nav { display: none; }
  .header-right .btn-ghost,
  .header-right .btn-primary,
  .header-right .user-menu-wrap,
  .header-right .notif-wrap,
  .header-right .nav-link { display: none; }
  .mobile-menu-btn { display: flex; align-items: center; justify-content: center; }

  /* Layout */
  .section-inner { padding: 0 16px; }
  .dashboard-wrap { padding: 16px; grid-template-columns: 1fr; }
  .sidebar { display: flex; flex-direction: row; overflow-x: auto; gap: 4px; padding-bottom: 8px; }
  .sidebar-link { flex-shrink: 0; padding: 10px 12px; font-size: 13px; }
  .sidebar-link span { white-space: nowrap; }

  /* Hero */
  .hero { padding: 40px 0 0; }
  .hero-inner { padding: 0 16px; gap: 24px; }
  .hero-content h1 { font-size: 26px; }
  .hero-content .subtitle { font-size: 16px; margin-bottom: 24px; }
  .social-btns { flex-direction: column; }
  .social-btns .btn-white { width: 100%; }

  /* Stats */
  .stats-bar { margin: 16px; padding: 20px; }
  .stat-item h2 { font-size: 28px; }
  .stat-item p { font-size: 16px; }

  /* Section */
  .section { padding: 48px 0; }
  .section-title { font-size: 24px; }
  .section-sub { font-size: 18px; }

  /* Footer */
  .footer-top { grid-template-columns: 1fr; padding: 0 16px; }
  .footer-bottom { flex-direction: column; gap: 16px; padding: 24px 16px 0; }

  /* Auth */
  .auth-card { padding: 24px 20px; }
  .auth-page { padding: 24px 16px; align-items: flex-start; padding-top: 40px; }

  /* Wallet */
  .wallet-total-amount { font-size: 28px; }
  .wallet-actions { flex-wrap: wrap; }
  .wallet-action-btn { flex: 1; text-align: center; justify-content: center; }

  /* Swap */
  .swap-card { max-width: 100%; padding: 20px 16px; }

  /* P2P Offer Table */
  .offer-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .offer-filters { gap: 8px; }
  .offer-table th, .offer-table td { padding: 10px 12px; }

  /* Coin grid */
  .coin-grid { grid-template-columns: repeat(2,1fr); gap: 12px; }
  .coin-card { padding: 14px; }
  .coin-price { font-size: 17px; }

  /* Trade chat */
  .trade-layout { padding: 16px; gap: 16px; }
  .chat-messages { min-height: 280px; max-height: 340px; }

  /* Modal */
  .modal { padding: 24px 18px; }

  /* Toast */
  #toast-container { bottom: 16px; right: 16px; left: 16px; }
  .toast { min-width: unset; width: 100%; }

  /* Tables inside cards */
  .card { padding: 16px; }
  table { font-size: 13px; }

  /* Tabs - scrollable on mobile */
  .tabs { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .tab-btn { white-space: nowrap; padding: 12px 16px; font-size: 13px; }

  /* Prevent horizontal page overflow from fixed-width inputs/filters */
  body { overflow-x: hidden; }
  .filter-select, input[style*="width:140px"], input[style*="width: 140px"] { width: 100% !important; max-width: 100%; }
  .offer-filters, .filters-row, .p2p-filters { flex-wrap: wrap; }
  .offer-filters > *, .filters-row > *, .p2p-filters > * { flex: 1 1 140px; min-width: 0; }
}