@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;600;700;800&display=swap');

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; overflow: hidden; font-family: 'Roboto', sans-serif; background: #f5f7fa; color: #1a1a2e; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
button { font-family: inherit; cursor: pointer; border: none; }

/* ── App Shell ── */
.app-shell { display: flex; flex-direction: column; height: 100dvh; max-width: 480px; margin: 0 auto; background: #f5f7fa; position: relative; }

/* ── Top App Bar ── */
.app-bar {
  background: linear-gradient(135deg, #00c7ff, #0090c7);
  padding: 0 16px;
  height: 56px; min-height: 56px;
  display: flex; align-items: center; justify-content: space-between;
  color: #fff; flex-shrink: 0; position: relative; z-index: 10;
}
.app-bar-back {
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(255,255,255,0.18); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; font-weight: 700; flex-shrink: 0;
}
.app-bar-title { font-size: 17px; font-weight: 700; flex: 1; text-align: center; }
.app-bar-icon {
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(255,255,255,0.18);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; flex-shrink: 0;
}
.app-bar-brand { display: flex; align-items: center; gap: 8px; font-size: 17px; font-weight: 700; }
.app-bar-brand img { width: 28px; height: 28px; border-radius: 50%; }

/* ── Scrollable Content ── */
.app-content { flex: 1; overflow-y: auto; overflow-x: hidden; padding: 16px; scroll-behavior: smooth; }
.app-content::-webkit-scrollbar { display: none; }

/* ── Bottom Navigation ── */
.bottom-nav {
  height: 60px; min-height: 60px;
  background: #fff; border-top: 1px solid #e8ecf0;
  display: flex; align-items: center;
  flex-shrink: 0; z-index: 10;
}
.nav-item {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 3px;
  padding: 8px 0; font-size: 10px; font-weight: 500; color: #94a3b8;
  transition: color 0.2s;
}
.nav-item .nav-icon { font-size: 22px; line-height: 1; }
.nav-item.active { color: #00c7ff; }
.nav-item.active .nav-icon { filter: none; }

/* ── Cards ── */
.card {
  background: #fff; border-radius: 16px;
  padding: 16px; margin-bottom: 12px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.card--cyan {
  background: linear-gradient(135deg, #00c7ff, #0090c7);
  color: #fff;
}

/* ── Balance Card ── */
.balance-label { font-size: 12px; opacity: 0.85; margin-bottom: 4px; }
.balance-amount { font-size: 30px; font-weight: 800; margin-bottom: 4px; }
.balance-usdt { font-size: 12px; opacity: 0.75; margin-bottom: 14px; }
.balance-row { display: flex; gap: 12px; }
.balance-col { flex: 1; }
.balance-col-label { font-size: 10px; opacity: 0.75; margin-bottom: 2px; }
.balance-col-value { font-size: 14px; font-weight: 700; }
.balance-divider { width: 1px; background: rgba(255,255,255,0.3); margin: 0; }

/* Stats row under balance */
.balance-stats { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; margin-top: 14px; padding-top: 14px; border-top: 1px solid rgba(255,255,255,0.25); }
.balance-stat-label { font-size: 9.5px; opacity: 0.75; }
.balance-stat-value { font-size: 13px; font-weight: 700; }

/* ── Rate Banner ── */
.rate-banner {
  background: #e0f7ff; border-radius: 10px;
  padding: 10px 14px; font-size: 12px; color: #0284c7;
  display: flex; align-items: center; gap: 8px; margin-bottom: 12px;
}
.rate-banner a { color: #0284c7; font-weight: 600; }

/* ── Quick Actions ── */
.quick-actions { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 12px; }
.quick-action {
  background: #fff; border-radius: 14px; padding: 12px 4px;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.07); font-size: 11px; font-weight: 500; color: #475569;
}
.quick-action .qa-icon { font-size: 22px; }

/* ── Claim Button ── */
.btn-claim {
  width: 100%; padding: 16px;
  background: linear-gradient(135deg, #00c7ff, #0090c7);
  border-radius: 14px; color: #fff;
  font-size: 15px; font-weight: 700; text-align: center;
  margin-bottom: 12px; display: block;
}

/* ── Section Header ── */
.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.section-title { font-size: 14px; font-weight: 700; color: #1a1a2e; }
.section-link { font-size: 12px; color: #00c7ff; font-weight: 600; }

/* ── Shortcut Cards (Accès rapide) ── */
.shortcuts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; }
.shortcut-card {
  background: #fff; border-radius: 14px; padding: 14px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
  border-left: 3px solid #00c7ff;
}
.shortcut-card-title { font-size: 13px; font-weight: 700; }
.shortcut-card-sub { font-size: 10.5px; color: #64748b; }

/* ── Team Stats Row ── */
.dash-stats { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; margin-bottom: 12px; }
.dash-stat { background: #fff; border-radius: 14px; padding: 14px 10px; text-align: center; box-shadow: 0 1px 4px rgba(0,0,0,0.06); }
.dash-stat-value { font-size: 16px; font-weight: 800; color: #1a1a2e; }
.dash-stat-label { font-size: 10px; color: #94a3b8; margin-top: 2px; }
.dash-stat-value.green { color: #22c55e; }
.dash-stat-value.blue { color: #00c7ff; }

/* ── Transaction / Activity List ── */
.tx-list { display: flex; flex-direction: column; gap: 0; }
.tx-item {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 0; border-bottom: 1px solid #f1f5f9;
}
.tx-item:last-child { border-bottom: none; }
.tx-icon {
  width: 38px; height: 38px; border-radius: 10px;
  background: #f0f9ff; display: flex; align-items: center; justify-content: center;
  font-size: 18px; flex-shrink: 0;
}
.tx-info { flex: 1; }
.tx-name { font-size: 13px; font-weight: 600; color: #1a1a2e; }
.tx-date { font-size: 11px; color: #94a3b8; margin-top: 2px; }
.tx-amount { font-size: 13px; font-weight: 700; }
.tx-amount.green { color: #22c55e; }
.tx-amount.red { color: #ef4444; }

/* ── VIP Package Card ── */
.vip-card {
  background: #fff; border-radius: 16px; margin-bottom: 12px;
  overflow: hidden; box-shadow: 0 1px 4px rgba(0,0,0,0.07);
  display: flex;
}
.vip-card-left {
  width: 110px; min-width: 110px; padding: 16px 10px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 6px;
}
.vip-card-left.starter { background: #1a1a2e; }
.vip-card-left.silver  { background: #1a1a2e; }
.vip-card-left.gold    { background: #1a0a00; }
.vip-card-left.diamond { background: #0a0a1e; }
.vip-gem { font-size: 32px; }
.vip-name { font-size: 12px; font-weight: 800; color: #fff; }
.vip-price { font-size: 13px; font-weight: 700; color: #8b5cf6; }
.vip-status {
  font-size: 9px; font-weight: 700; padding: 3px 8px; border-radius: 20px; margin-top: 2px;
}
.vip-status.owned { background: #22c55e20; color: #22c55e; border: 1px solid #22c55e; }
.vip-status.not-owned { background: #f1f5f9; color: #64748b; border: 1px solid #e2e8f0; }

.vip-card-right { flex: 1; padding: 12px; }
.vip-meta-grid {
  display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 6px; margin-bottom: 8px;
}
.vip-meta-item { }
.vip-meta-label { font-size: 8px; color: #94a3b8; font-weight: 600; text-transform: uppercase; }
.vip-meta-value { font-size: 12px; font-weight: 700; color: #1a1a2e; }
.vip-meta-value.orange { color: #f59e0b; }
.vip-meta-value.green { color: #22c55e; }
.vip-progress { height: 4px; background: #e8ecf0; border-radius: 2px; margin: 8px 0; }
.vip-progress-fill { height: 100%; background: #00c7ff; border-radius: 2px; }
.vip-bottom { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.vip-rev { font-size: 10px; color: #64748b; }
.vip-rev strong { color: #22c55e; }
.btn-vip-buy {
  background: #8b5cf6; color: #fff; border-radius: 10px;
  padding: 10px 14px; font-size: 11px; font-weight: 700;
  display: flex; align-items: center; gap: 4px;
}
.btn-vip-detail {
  background: #00c7ff; color: #fff; border-radius: 10px;
  padding: 10px 14px; font-size: 11px; font-weight: 700;
  display: flex; align-items: center; gap: 4px;
}

/* ── Wallet Grid ── */
.wallet-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; }
.wallet-cell {
  background: #fff; border-radius: 14px; padding: 14px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.wallet-cell-label { font-size: 11px; color: #64748b; margin-bottom: 6px; }
.wallet-cell-value { font-size: 17px; font-weight: 800; }
.wallet-cell-icon { font-size: 18px; margin-top: 6px; }

/* ── Action Buttons Row ── */
.action-row { display: flex; gap: 10px; margin-bottom: 16px; }
.action-btn {
  flex: 1; background: #fff; border-radius: 14px; padding: 14px 8px;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.07); font-size: 12px; font-weight: 600; color: #475569;
}
.action-btn .ab-icon { font-size: 22px; }

/* ── P2P ── */
.p2p-tabs { display: flex; background: #f1f5f9; border-radius: 12px; padding: 4px; margin-bottom: 14px; }
.p2p-tab {
  flex: 1; padding: 10px; border-radius: 9px; text-align: center;
  font-size: 14px; font-weight: 600; color: #64748b;
}
.p2p-tab.active { background: #fff; color: #00c7ff; box-shadow: 0 1px 4px rgba(0,0,0,0.1); }

.p2p-filters { display: flex; gap: 8px; margin-bottom: 12px; }
.p2p-filter {
  padding: 8px 14px; background: #fff; border-radius: 20px;
  font-size: 12px; font-weight: 600; color: #475569;
  border: 1.5px solid #e2e8f0; display: flex; align-items: center; gap: 4px;
}

.p2p-offer {
  background: #fff; border-radius: 14px; padding: 14px;
  margin-bottom: 10px; box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.p2p-offer-top { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 6px; }
.p2p-offer-trader { font-size: 14px; font-weight: 700; }
.p2p-offer-rating { font-size: 11px; color: #64748b; }
.p2p-offer-price { font-size: 16px; font-weight: 800; color: #1a1a2e; text-align: right; }
.p2p-offer-unit { font-size: 10px; color: #94a3b8; }
.p2p-offer-meta { font-size: 11px; color: #64748b; margin-bottom: 10px; }
.p2p-offer-bottom { display: flex; justify-content: space-between; align-items: center; }
.p2p-payment { font-size: 11px; color: #475569; display: flex; align-items: center; gap: 4px; }

/* ── Buttons ── */
.btn-primary {
  background: #00c7ff; color: #fff; border-radius: 10px;
  padding: 10px 18px; font-size: 13px; font-weight: 700;
}
.btn-success {
  background: #22c55e; color: #fff; border-radius: 10px;
  padding: 10px 18px; font-size: 13px; font-weight: 700;
}
.btn-full {
  width: 100%; padding: 16px; border-radius: 14px;
  font-size: 15px; font-weight: 700; text-align: center;
  background: #00c7ff; color: #fff; display: block; margin-top: 16px;
}
.btn-full.danger { background: transparent; color: #ef4444; }
.btn-secondary {
  background: #f1f5f9; color: #475569; border-radius: 10px;
  padding: 10px 18px; font-size: 13px; font-weight: 600;
}

/* ── Forms ── */
.form-section { margin-bottom: 16px; }
.form-label { font-size: 12px; font-weight: 600; color: #64748b; margin-bottom: 8px; display: block; }
.form-input {
  width: 100%; border: 1.5px solid #e2e8f0; border-radius: 12px;
  padding: 13px 16px; font-size: 14px; font-family: inherit;
  background: #fff; color: #1a1a2e; outline: none;
  transition: border-color 0.2s;
}
.form-input:focus { border-color: #00c7ff; }
.chip-group { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  padding: 8px 16px; border-radius: 20px; font-size: 12px; font-weight: 600;
  border: 1.5px solid #e2e8f0; background: #fff; color: #475569;
}
.chip.active { background: #00c7ff; color: #fff; border-color: #00c7ff; }

/* ── QR Block ── */
.qr-block {
  background: #f8fafc; border-radius: 14px; padding: 24px;
  display: flex; flex-direction: column; align-items: center; gap: 12px; margin: 16px 0;
}
.qr-placeholder {
  width: 140px; height: 140px; background: #e8ecf0; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; color: #94a3b8;
}
.qr-address { font-size: 16px; font-weight: 700; color: #1a1a2e; }
.btn-copy {
  width: 36px; height: 36px; background: #00c7ff; border-radius: 8px;
  display: flex; align-items: center; justify-content: center; color: #fff; font-size: 14px;
}
.address-row { display: flex; align-items: center; gap: 8px; background: #fff; border-radius: 10px; padding: 10px 14px; border: 1.5px solid #e2e8f0; }

/* ── Warning Box ── */
.warning-box {
  background: #fffbeb; border: 1.5px solid #fde68a; border-radius: 12px;
  padding: 12px 14px; font-size: 12px; color: #92400e; line-height: 1.5;
  margin: 12px 0;
}
.info-box {
  background: #eff6ff; border: 1.5px solid #bfdbfe; border-radius: 12px;
  padding: 12px 14px; font-size: 12px; color: #1e40af; line-height: 1.5;
  margin: 12px 0;
}
.success-box {
  background: #f0fdf4; border: 1.5px solid #bbf7d0; border-radius: 12px;
  padding: 12px 14px; font-size: 12px; color: #166534; line-height: 1.5;
  margin-bottom: 16px; display: flex; align-items: flex-start; gap: 10px;
}
.error-box {
  background: #fff5f5; border: 1.5px solid #fecaca; border-radius: 12px;
  padding: 12px 14px; font-size: 12px; color: #dc2626; line-height: 1.5;
  margin-bottom: 16px; display: flex; align-items: flex-start; gap: 10px;
}

/* ── Amount Input ── */
.amount-row {
  display: flex; align-items: center; justify-content: space-between;
  border: 1.5px solid #e2e8f0; border-radius: 12px; padding: 13px 16px;
  background: #fff; margin-bottom: 8px;
}
.amount-input {
  font-size: 22px; font-weight: 800; background: none;
  border: none; outline: none; width: 100%; color: #1a1a2e;
}
.btn-max {
  padding: 6px 12px; background: #e0f2fe; border-radius: 8px;
  font-size: 11px; font-weight: 700; color: #0284c7;
}
.fee-row {
  display: flex; justify-content: space-between;
  padding: 10px 0; border-bottom: 1px solid #f1f5f9;
  font-size: 13px;
}
.fee-row:last-child { border-bottom: none; }
.fee-label { color: #64748b; }
.fee-value { font-weight: 600; color: #1a1a2e; }
.fee-value.blue { color: #00c7ff; }
.fee-value.green { color: #22c55e; }

/* ── TEAM ── */
.team-rank-card {
  background: linear-gradient(135deg, #00c7ff, #0090c7);
  border-radius: 16px; padding: 20px; margin-bottom: 16px; color: #fff;
}
.rank-label { font-size: 11px; opacity: 0.85; margin-bottom: 4px; }
.rank-value { font-size: 22px; font-weight: 800; display: flex; align-items: center; gap: 8px; margin-bottom: 16px; }
.rank-stats { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; padding-top: 16px; border-top: 1px solid rgba(255,255,255,0.25); }
.rank-stat-value { font-size: 18px; font-weight: 800; }
.rank-stat-label { font-size: 10px; opacity: 0.8; margin-top: 2px; }

.level-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; margin-bottom: 16px; }
.level-card { background: #fff; border-radius: 12px; padding: 14px 10px; text-align: center; box-shadow: 0 1px 4px rgba(0,0,0,0.06); }
.level-card-label { font-size: 10px; color: #94a3b8; margin-bottom: 6px; }
.level-card-count { font-size: 20px; font-weight: 800; }
.level-card-amount { font-size: 13px; font-weight: 700; color: #22c55e; }

.menu-list { display: flex; flex-direction: column; gap: 0; }
.menu-item {
  display: flex; align-items: center; gap: 14px;
  padding: 16px; background: #fff; border-bottom: 1px solid #f1f5f9;
}
.menu-item:first-child { border-radius: 16px 16px 0 0; }
.menu-item:last-child { border-bottom: none; border-radius: 0 0 16px 16px; }
.menu-icon { font-size: 22px; width: 32px; text-align: center; }
.menu-text { flex: 1; font-size: 14px; font-weight: 600; }
.menu-arrow { color: #94a3b8; font-size: 16px; }

/* ── Profile ── */
.profile-avatar-section { display: flex; flex-direction: column; align-items: center; padding: 24px 0 16px; margin-bottom: 4px; }
.profile-avatar {
  width: 72px; height: 72px; border-radius: 50%;
  background: #e0f7ff; display: flex; align-items: center; justify-content: center;
  font-size: 28px; font-weight: 800; color: #0090c7; margin-bottom: 12px; position: relative;
}
.avatar-edit {
  position: absolute; bottom: 0; right: 0;
  width: 22px; height: 22px; background: #00c7ff; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; font-size: 11px; color: #fff;
}
.profile-name { font-size: 17px; font-weight: 700; margin-bottom: 4px; }
.profile-since { font-size: 12px; color: #64748b; margin-bottom: 8px; }
.badge-kyc {
  background: #f0fdf4; border: 1px solid #86efac; color: #16a34a;
  padding: 4px 12px; border-radius: 20px; font-size: 11px; font-weight: 600;
}

/* ── Toggle Switch ── */
.toggle-row { display: flex; align-items: flex-start; justify-content: space-between; padding: 16px 0; border-bottom: 1px solid #f1f5f9; }
.toggle-row:last-child { border-bottom: none; }
.toggle-info { flex: 1; padding-right: 12px; }
.toggle-name { font-size: 14px; font-weight: 600; color: #1a1a2e; margin-bottom: 3px; }
.toggle-desc { font-size: 11.5px; color: #64748b; }
.toggle {
  position: relative; width: 44px; height: 24px; flex-shrink: 0;
}
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute; inset: 0; background: #e2e8f0; border-radius: 24px;
  transition: background 0.2s; cursor: pointer;
}
.toggle-slider::before {
  content: ''; position: absolute; width: 18px; height: 18px; border-radius: 50%;
  background: #fff; top: 3px; left: 3px; transition: transform 0.2s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.toggle input:checked + .toggle-slider { background: #00c7ff; }
.toggle input:checked + .toggle-slider::before { transform: translateX(20px); }

/* ── Crypto List ── */
.crypto-item {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 0; border-bottom: 1px solid #f1f5f9;
}
.crypto-item:last-child { border-bottom: none; }
.crypto-logo {
  width: 42px; height: 42px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; font-weight: 800; flex-shrink: 0;
}
.crypto-name { font-size: 14px; font-weight: 700; }
.crypto-symbol { font-size: 11px; color: #94a3b8; }
.crypto-price { font-size: 14px; font-weight: 700; text-align: right; }
.crypto-change { font-size: 11.5px; font-weight: 600; text-align: right; }
.crypto-change.up { color: #22c55e; }
.crypto-change.down { color: #ef4444; }

/* ── Messages ── */
.search-bar {
  display: flex; align-items: center; gap: 8px;
  background: #f1f5f9; border-radius: 12px; padding: 10px 14px; margin-bottom: 16px;
}
.search-bar input {
  flex: 1; background: none; border: none; outline: none;
  font-size: 13.5px; font-family: inherit; color: #1a1a2e;
}
.search-bar input::placeholder { color: #94a3b8; }

.msg-item {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 0; border-bottom: 1px solid #f1f5f9; cursor: pointer;
}
.msg-item:last-child { border-bottom: none; }
.msg-avatar {
  width: 46px; height: 46px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; font-weight: 800; color: #fff; flex-shrink: 0;
}
.msg-body { flex: 1; min-width: 0; }
.msg-name { font-size: 14px; font-weight: 700; margin-bottom: 3px; }
.msg-preview { font-size: 12px; color: #64748b; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.msg-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.msg-time { font-size: 11px; color: #94a3b8; }
.msg-badge {
  background: #00c7ff; color: #fff; border-radius: 20px;
  padding: 2px 7px; font-size: 10px; font-weight: 700;
}

/* ── Order Card (P2P) ── */
.order-card { background: #fff; border-radius: 14px; padding: 16px; margin-bottom: 10px; box-shadow: 0 1px 4px rgba(0,0,0,0.06); }
.order-top { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.order-type { padding: 3px 10px; border-radius: 20px; font-size: 11px; font-weight: 700; }
.order-type.buy { background: #eff6ff; color: #2563eb; }
.order-type.sell { background: #fef9c3; color: #92400e; }
.order-amount { font-size: 18px; font-weight: 800; margin-bottom: 4px; }
.order-fiat { font-size: 12px; color: #64748b; margin-bottom: 8px; }
.order-status { font-size: 12px; font-weight: 600; display: flex; align-items: center; gap: 6px; }
.order-status.pending { color: #f59e0b; }
.order-status.confirmed { color: #22c55e; }
.order-status.dispute { color: #ef4444; }

/* ── Litige Card ── */
.litige-card { background: #fff; border-radius: 14px; padding: 16px; margin-bottom: 10px; box-shadow: 0 1px 4px rgba(0,0,0,0.06); }
.litige-top { display: flex; justify-content: space-between; margin-bottom: 6px; }
.litige-id { font-size: 14px; font-weight: 700; }
.litige-amount { font-size: 14px; font-weight: 700; }
.litige-with { font-size: 12px; color: #64748b; margin-bottom: 6px; }
.litige-motif { font-size: 12px; color: #475569; margin-bottom: 10px; }
.litige-status { display: inline-block; padding: 5px 14px; border-radius: 20px; font-size: 12px; font-weight: 600; }
.litige-status.pending { background: #fffbeb; color: #92400e; }
.litige-status.resolved-me { background: #f0fdf4; color: #166534; }
.litige-status.resolved-other { background: #fef2f2; color: #991b1b; }

/* ── Historique Tabs ── */
.hist-tabs { display: flex; background: #e8ecf0; border-radius: 24px; padding: 3px; margin-bottom: 16px; }
.hist-tab {
  flex: 1; padding: 8px; border-radius: 21px; text-align: center;
  font-size: 12px; font-weight: 600; color: #64748b;
}
.hist-tab.active { background: #1a1a2e; color: #fff; }

/* ── Invitation ── */
.code-box {
  background: #fff; border-radius: 14px; padding: 16px;
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px; border: 1.5px solid #e2e8f0;
}
.code-value { font-size: 20px; font-weight: 800; color: #00c7ff; }
.share-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.share-btn {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  font-size: 11px; font-weight: 500; color: #475569;
}
.share-btn .sb-icon {
  width: 48px; height: 48px; border-radius: 14px;
  background: #f1f5f9; display: flex; align-items: center; justify-content: center;
  font-size: 22px;
}

/* ── Commissions ── */
.commission-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 13px 0; border-bottom: 1px solid #f1f5f9;
}
.commission-item:last-child { border-bottom: none; }
.commission-name { font-size: 14px; font-weight: 600; }
.commission-level { font-size: 11px; color: #94a3b8; }
.commission-amount { font-size: 14px; font-weight: 700; color: #22c55e; }

/* ── Rang System ── */
.rang-item {
  display: flex; align-items: center; gap: 14px;
  padding: 14px; background: #fff; margin-bottom: 8px;
  border-radius: 14px; box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.rang-icon { font-size: 26px; width: 40px; text-align: center; }
.rang-name { font-size: 14px; font-weight: 700; }
.rang-req { font-size: 11.5px; color: #64748b; }
.rang-check { margin-left: auto; font-size: 18px; color: #22c55e; }
.rang-lock { margin-left: auto; font-size: 18px; color: #94a3b8; }

/* ── Progress Bar ── */
.progress-wrap { margin: 16px 0; }
.progress-bar { height: 8px; background: #e8ecf0; border-radius: 4px; overflow: hidden; }
.progress-fill { height: 100%; background: #00c7ff; border-radius: 4px; }
.progress-labels { display: flex; justify-content: space-between; font-size: 11px; color: #64748b; margin-top: 6px; }

/* ── Support ── */
.support-cta {
  background: linear-gradient(135deg, #00c7ff, #0090c7);
  border-radius: 16px; padding: 16px; margin-bottom: 16px; color: #fff;
  display: flex; align-items: center; justify-content: space-between;
}
.support-cta-text h3 { font-size: 15px; font-weight: 700; margin-bottom: 4px; }
.support-cta-text p { font-size: 11.5px; opacity: 0.85; }
.ticket-item { background: #fff; border-radius: 12px; padding: 14px; margin-bottom: 8px; box-shadow: 0 1px 4px rgba(0,0,0,0.06); }
.ticket-id { font-size: 14px; font-weight: 700; margin-bottom: 6px; }
.ticket-status { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: 11px; font-weight: 600; }
.ticket-status.open { background: #fffbeb; color: #92400e; }
.ticket-status.resolved { background: #f0fdf4; color: #166534; }

/* ── Settings ── */
.settings-section { margin-bottom: 20px; }
.settings-label { font-size: 11px; font-weight: 700; color: #94a3b8; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 8px; }
.settings-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px; background: #fff; border-bottom: 1px solid #f1f5f9;
}
.settings-item:first-of-type { border-radius: 14px 14px 0 0; }
.settings-item:last-of-type { border-bottom: none; border-radius: 0 0 14px 14px; }
.settings-item-label { font-size: 14px; font-weight: 500; }
.settings-item-value { font-size: 13px; color: #00c7ff; font-weight: 600; display: flex; align-items: center; gap: 4px; }
.settings-item-arrow { color: #94a3b8; }

/* ── Détails Plan ── */
.plan-detail-card { background: #fff; border-radius: 16px; overflow: hidden; margin-bottom: 12px; box-shadow: 0 1px 4px rgba(0,0,0,0.06); display: flex; }
.plan-detail-left { width: 100px; min-width: 100px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 12px; }
.plan-detail-left.gold { background: #1a0a00; }
.plan-detail-right { flex: 1; padding: 12px; }
.plan-detail-meta { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 6px; margin-bottom: 4px; }

.gains-card { background: #f0fdf4; border-radius: 14px; padding: 16px; margin-bottom: 12px; }
.gains-title { font-size: 13px; font-weight: 700; color: #1a1a2e; margin-bottom: 12px; display: flex; align-items: center; gap: 6px; }
.gains-row { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }
.gains-item-label { font-size: 10px; color: #64748b; margin-bottom: 3px; }
.gains-item-value { font-size: 14px; font-weight: 700; color: #22c55e; }

/* ── Utils ── */
.text-center { text-align: center; }
.text-green { color: #22c55e; }
.text-red { color: #ef4444; }
.text-blue { color: #00c7ff; }
.text-muted { color: #94a3b8; font-size: 11.5px; }
.mt-8 { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mb-12 { margin-bottom: 12px; }
.fw-700 { font-weight: 700; }
.green { color: #22c55e; }
.orange { color: #f59e0b; }

/* ── Balance aliases ── */
.balance-sub-label { font-size: 10px; opacity: 0.8; }
.balance-sub-value { font-size: 14px; font-weight: 700; }

/* ── QR extras ── */
.qr-caption { font-size: 12px; color: #64748b; text-align: center; }
.address-text { font-size: 12px; font-family: monospace; word-break: break-all; flex: 1; color: #1a1a2e; }
.btn-copy { padding: 8px 12px; background: #00c7ff; border-radius: 8px; font-size: 12px; font-weight: 600; color: #fff; white-space: nowrap; width: auto; height: auto; }

/* ── Wallet cell as link/button ── */
.wallet-cell { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; text-align: center; font-size: 11px; font-weight: 600; color: #475569; cursor: pointer; }
.wallet-cell p { margin: 0; }

/* ── P2P offer internals ── */
.p2p-seller { font-size: 14px; font-weight: 700; }
.p2p-orders { font-size: 11px; color: #64748b; }
.p2p-offer-row { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 6px; margin-bottom: 8px; }
.p2p-label { font-size: 9px; color: #94a3b8; font-weight: 600; text-transform: uppercase; }
.p2p-price { font-size: 13px; font-weight: 700; color: #1a1a2e; }
.p2p-value { font-size: 12px; font-weight: 600; color: #475569; }
.p2p-methods { display: flex; gap: 6px; flex-wrap: wrap; }
.p2p-methods span { background: #f1f5f9; padding: 3px 10px; border-radius: 20px; font-size: 10px; font-weight: 600; color: #475569; }
.btn-p2p-buy { background: #00c7ff; color: #fff; border-radius: 10px; padding: 10px 14px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.btn-p2p-sell { background: #f59e0b; color: #fff; border-radius: 10px; padding: 10px 14px; font-size: 12px; font-weight: 700; white-space: nowrap; }

/* ── Ticket status alias ── */
.ticket-status.closed { background: #f0fdf4; color: #166534; }

/* ── Crypto aliases ── */
.crypto-icon { width: 42px; height: 42px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 16px; font-weight: 800; color: #fff; flex-shrink: 0; }
.crypto-info { flex: 1; }
.crypto-sym { font-size: 11px; color: #94a3b8; }
.crypto-vals { text-align: right; }
.crypto-amt { font-size: 11px; color: #64748b; }

/* ── Messages content alias ── */
.msg-content { flex: 1; min-width: 0; }

/* ── Team Rank Card (detailed) ── */
.team-rank-card { background: linear-gradient(135deg, #00c7ff, #0090c7); border-radius: 16px; padding: 20px; margin-bottom: 16px; color: #fff; display: flex; align-items: center; gap: 16px; }
.team-rank-left { text-align: center; }
.team-rank-right { flex: 1; display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; border-left: 1px solid rgba(255,255,255,0.3); padding-left: 16px; }
.team-rank-label { font-size: 10px; opacity: 0.8; margin-bottom: 4px; }
.team-rank-badge { font-size: 28px; font-weight: 900; line-height: 1; }
.team-rank-name { font-size: 10px; opacity: 0.85; margin-top: 2px; }
.team-stat { text-align: center; }
.ts-val { font-size: 18px; font-weight: 800; }
.ts-label { font-size: 10px; opacity: 0.8; margin-top: 2px; }

/* ── Level item (rang grid) ── */
.level-item { background: #fff; border-radius: 12px; padding: 14px 10px; text-align: center; box-shadow: 0 1px 4px rgba(0,0,0,0.06); }
.level-num { font-size: 16px; font-weight: 800; color: #00c7ff; margin-bottom: 4px; }
.level-count { font-size: 11px; color: #64748b; margin-bottom: 4px; }
.level-rate { font-size: 13px; font-weight: 700; color: #1a1a2e; }

/* ── Rang detailed ── */
.active-rang { border: 2px solid #00c7ff; }
.rang-badge { width: 44px; height: 44px; border-radius: 12px; background: #1a1a2e; color: #fff; display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 800; flex-shrink: 0; }
.rang-info { flex: 1; }
.rang-name { font-size: 14px; font-weight: 700; }
.rang-cond { font-size: 11px; color: #64748b; margin-top: 2px; }
.rang-bonus { font-size: 11px; color: #22c55e; margin-top: 2px; }
.rang-current { font-size: 11px; font-weight: 700; color: #00c7ff; white-space: nowrap; }
.rang-progress-wrap { text-align: right; min-width: 60px; }

/* ── Profile extras ── */
.profile-email { font-size: 12px; color: #64748b; margin-top: 2px; margin-bottom: 10px; }
.profile-badge { background: #e0f7ff; color: #0090c7; padding: 4px 12px; border-radius: 20px; font-size: 12px; font-weight: 600; }
.menu-arrow { margin-left: auto; color: #94a3b8; font-size: 18px; font-weight: 300; }

/* ── Settings (renamed to avoid conflict) ── */
.settings-title { font-size: 12px; font-weight: 700; color: #94a3b8; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 0; padding: 12px 0 0; }
.settings-label { font-size: 14px; font-weight: 600; color: #1a1a2e; }
.settings-sub { font-size: 11px; color: #64748b; margin-top: 2px; }
.btn-settings-action { background: none; color: #00c7ff; font-size: 14px; font-weight: 600; padding: 4px 8px; border-radius: 8px; }
.select-pref { background: #f1f5f9; border: none; border-radius: 8px; padding: 6px 10px; font-size: 13px; font-weight: 600; color: #0f172a; cursor: pointer; outline: none; }

/* ── Toast ── */
.toast {
  position: fixed; bottom: 80px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: #1a1a2e; color: #fff; padding: 12px 20px; border-radius: 24px;
  font-size: 13px; font-weight: 600; opacity: 0; transition: all 0.3s;
  z-index: 1000; white-space: nowrap; pointer-events: none; max-width: 90%;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ════════════════════════════════════════
   RESPONSIVE — TABLETTE ≥768px
   ════════════════════════════════════════ */
@media (min-width: 768px) {
  .app-shell { max-width: 768px; }
  .app-content { padding: 20px 28px; }

  /* Balance card */
  .balance-amount { font-size: 36px; }

  /* Quick actions — 4 cols already, just bigger */
  .quick-action { padding: 16px 8px; font-size: 12px; }
  .quick-action .qa-icon { font-size: 26px; }

  /* Shortcuts 3 cols */
  .shortcuts { grid-template-columns: 1fr 1fr 1fr; }

  /* Dash stats 3 cols with more padding */
  .dash-stat { padding: 18px 14px; }
  .dash-stat-value { font-size: 18px; }

  /* VIP card larger left panel */
  .vip-card-left { width: 130px; min-width: 130px; }
  .vip-gem { font-size: 38px; }
  .vip-meta-grid { grid-template-columns: repeat(4, 1fr); }

  /* Wallet grid — 4 cols */
  .wallet-grid { grid-template-columns: repeat(4, 1fr); }

  /* Action row bigger */
  .action-btn { padding: 18px 12px; font-size: 13px; }

  /* P2P filters scrollable */
  .p2p-filters { flex-wrap: wrap; }

  /* Level grid 6 cols on tablet */
  .level-grid { grid-template-columns: repeat(6, 1fr); }

  /* Rang items more padding */
  .rang-item { padding: 18px 20px; }

  /* Profile avatar bigger */
  .profile-avatar { width: 84px; height: 84px; font-size: 32px; }

  /* Form inputs wider feel */
  .form-input { padding: 15px 20px; font-size: 15px; }

  /* Section title bigger */
  .section-title { font-size: 15px; }

  /* Hist tabs bigger */
  .hist-tab { padding: 10px 16px; font-size: 13px; }

  /* Crypto item spacing */
  .crypto-logo { width: 48px; height: 48px; font-size: 22px; }
  .crypto-name { font-size: 15px; }
  .crypto-price { font-size: 15px; }
}

/* ════════════════════════════════════════
   RESPONSIVE — DESKTOP ≥1024px
   ════════════════════════════════════════ */

/* Sidebar — hidden on mobile/tablet, injected by JS on desktop */
.app-sidebar {
  display: none;
  width: 240px;
  min-width: 240px;
  height: 100vh;
  background: #1e293b;
  flex-direction: column;
  position: fixed;
  left: 0; top: 0;
  z-index: 200;
  overflow-y: auto;
}
.sidebar-brand {
  display: flex; align-items: center; gap: 12px;
  padding: 28px 20px 22px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.sidebar-brand img { width: 38px; height: 38px; border-radius: 10px; object-fit: cover; }
.sidebar-brand-name { font-size: 14px; font-weight: 700; color: #fff; line-height: 1.2; }
.sidebar-brand-sub { font-size: 10px; color: #64748b; margin-top: 2px; }
.sidebar-nav { flex: 1; padding: 14px 12px; display: flex; flex-direction: column; gap: 2px; }
.sidebar-item {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 14px; border-radius: 10px;
  font-size: 14px; font-weight: 400; color: #94a3b8;
  transition: all 0.15s; text-decoration: none;
}
.sidebar-item:hover { background: rgba(255,255,255,0.07); color: #e2e8f0; }
.sidebar-item.active { background: rgba(0,199,255,0.15); color: #00c7ff; font-weight: 700; }
.sidebar-icon { font-size: 18px; width: 22px; text-align: center; flex-shrink: 0; }
.sidebar-footer {
  padding: 14px 12px 20px;
  border-top: 1px solid rgba(255,255,255,0.08);
}
.sidebar-logout {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 14px; border-radius: 10px;
  font-size: 14px; color: #64748b; cursor: pointer;
  transition: all 0.15s; text-decoration: none;
}
.sidebar-logout:hover { background: rgba(239,68,68,0.1); color: #ef4444; }
.sidebar-lang { display: flex; gap: 4px; padding: 0 4px 10px; }
.sidebar-lang-btn { flex: 1; padding: 4px; border-radius: 6px; border: 1px solid rgba(255,255,255,.1); background: transparent; color: #64748b; font-size: 11px; font-weight: 700; cursor: pointer; transition: all .15s; }
.sidebar-lang-btn:hover { background: rgba(99,102,241,.2); color: #a5b4fc; }
.sidebar-lang-btn.active { background: rgba(99,102,241,.3); color: #818cf8; border-color: rgba(99,102,241,.5); }

@media (min-width: 1024px) {
  html, body { overflow: hidden; }

  body { display: flex; flex-direction: row; }

  /* Show sidebar */
  .app-sidebar { display: flex; }

  /* App shell fills remaining space */
  .app-shell {
    margin-left: 240px;
    max-width: none;
    width: calc(100vw - 240px);
    flex: 1;
  }

  /* Topbar becomes white */
  .app-bar {
    background: #fff;
    color: #1e293b;
    border-bottom: 1px solid #e2e8f0;
    height: 64px; min-height: 64px;
    padding: 0 32px;
    box-shadow: none;
  }
  .app-bar-title { color: #1e293b; font-size: 18px; }
  .app-bar-brand { color: #1e293b; }
  .app-bar-brand img { display: none; }
  .app-bar-back { background: #f1f5f9; color: #1e293b; }
  .app-bar-icon { background: #f1f5f9; color: #1e293b; font-size: 16px; }

  /* Hide bottom nav */
  .bottom-nav { display: none !important; }

  /* Content padding */
  .app-content { padding: 32px 40px; }

  /* Toast repositioned */
  .toast { bottom: 28px; }

  /* ── Dashboard desktop ── */
  .balance-amount { font-size: 44px; }
  .balance-label { font-size: 13px; }
  .quick-action { padding: 20px 10px; font-size: 13px; }
  .quick-action .qa-icon { font-size: 28px; }
  .shortcuts { grid-template-columns: repeat(4, 1fr); }
  .dash-stats { grid-template-columns: repeat(3, 1fr); gap: 16px; }
  .dash-stat { padding: 20px; }
  .dash-stat-value { font-size: 22px; }

  /* ── Cards desktop ── */
  .card { padding: 20px; margin-bottom: 16px; border-radius: 20px; }
  .section-title { font-size: 16px; }
  .section-header { margin-bottom: 14px; }

  /* ── VIP desktop ── */
  .vip-card-left { width: 150px; min-width: 150px; padding: 20px 14px; }
  .vip-gem { font-size: 42px; }
  .vip-name { font-size: 14px; }
  .vip-price { font-size: 15px; }
  .vip-card-right { padding: 16px 20px; }
  .vip-meta-grid { grid-template-columns: repeat(4, 1fr); gap: 12px; }
  .vip-meta-value { font-size: 14px; }

  /* ── Wallet desktop ── */
  .wallet-grid { grid-template-columns: repeat(4, 1fr); gap: 16px; }
  .wallet-cell { padding: 20px; border-radius: 16px; }
  .wallet-cell-value { font-size: 20px; }
  .action-btn { padding: 20px 14px; font-size: 13px; }
  .action-btn .ab-icon { font-size: 26px; }
  .crypto-logo, .crypto-icon { width: 52px; height: 52px; font-size: 22px; }
  .crypto-name { font-size: 15px; }
  .crypto-price { font-size: 15px; }
  .crypto-symbol, .crypto-sym, .crypto-amt { font-size: 12px; }

  /* ── P2P desktop ── */
  .p2p-offers-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
  .p2p-offer { margin-bottom: 0; }
  .p2p-offer-trader { font-size: 15px; }
  .p2p-offer-price { font-size: 18px; }
  .p2p-filters { gap: 10px; }
  .p2p-filter { padding: 10px 18px; font-size: 13px; }

  /* ── TEAM desktop ── */
  .level-grid { grid-template-columns: repeat(6, 1fr); gap: 14px; }
  .level-card { padding: 18px 12px; }
  .level-card-count { font-size: 24px; }
  .team-rank-card { padding: 28px; }
  .ts-val { font-size: 22px; }
  .rang-item { padding: 18px 22px; }
  .rang-name { font-size: 15px; }
  .rang-badge { width: 52px; height: 52px; font-size: 16px; }

  /* ── Profil desktop ── */
  .profile-avatar-section { padding: 36px 0 24px; }
  .profile-avatar { width: 92px; height: 92px; font-size: 36px; }
  .profile-name { font-size: 20px; }
  .menu-item { padding: 18px 20px; }
  .menu-text { font-size: 15px; }
  .menu-icon { font-size: 24px; }

  /* ── Forms desktop ── */
  .form-input { padding: 16px 20px; font-size: 15px; border-radius: 14px; }
  .btn-full { padding: 18px; font-size: 16px; border-radius: 16px; }
  .amount-input { font-size: 28px; }
  .btn-max { padding: 8px 16px; font-size: 12px; }

  /* ── Settings desktop ── */
  .settings-item { padding: 18px 20px; }
  .settings-item-label { font-size: 15px; }
  .toggle-name { font-size: 15px; }

  /* ── Marchés desktop table ── */
  .crypto-item { padding: 18px 0; }

  /* ── Messages desktop ── */
  .msg-item { padding: 18px 0; }
  .msg-avatar { width: 52px; height: 52px; font-size: 17px; }
  .msg-name { font-size: 15px; }
  .search-bar { padding: 12px 18px; border-radius: 14px; }
  .search-bar input { font-size: 14px; }

  /* ── Progress + Hist tabs ── */
  .hist-tab { padding: 11px 20px; font-size: 13px; }
  .progress-bar { height: 10px; }

  /* ── Support & Tickets ── */
  .support-cta { padding: 24px; border-radius: 20px; }
  .support-cta-text h3 { font-size: 18px; }
  .ticket-item { padding: 18px; border-radius: 16px; }

  /* ── QR desktop ── */
  .qr-block { padding: 32px; }
  .qr-placeholder { width: 180px; height: 180px; }

  /* ── Balance card desktop ── */
  .balance-stats { margin-top: 20px; padding-top: 20px; gap: 16px; }
  .balance-stat-value { font-size: 16px; }
  .balance-stat-label { font-size: 11px; }
  .rank-stats { gap: 20px; padding-top: 20px; }
  .rank-stat-value { font-size: 22px; }
}

/* ── Page transitions ─────────────────────────────── */
html { background: #0f172a; }
body { opacity: 0; transition: opacity .35s cubic-bezier(.4,0,.2,1); }
body.ready { opacity: 1; }

/* ════════════════════════════════════════
   MOBILE — correctifs responsivité
   ════════════════════════════════════════ */

/* Empêcher le débordement horizontal global */
.app-shell  { overflow-x: hidden; }
.app-content { overflow-x: hidden; }

/* ── Chips / filtres scrollables horizontalement ── */
.p2p-filters {
  display: flex; gap: 8px;
  overflow-x: auto; -webkit-overflow-scrolling: touch;
  scrollbar-width: none; padding-bottom: 4px;
  flex-wrap: nowrap !important;
}
.p2p-filters::-webkit-scrollbar { display: none; }
.p2p-filters .chip { flex-shrink: 0; }

/* ── QR code responsive ── */
#qr-img {
  width: min(220px, calc(100vw - 80px));
  height: min(220px, calc(100vw - 80px));
  display: block;
  margin: 0 auto;
  border-radius: 12px;
}

/* ── Adresse de dépôt — nouvelle carte ── */
.address-card {
  background: #fff;
  border-radius: 14px;
  padding: 16px;
  border: 1.5px solid #e2e8f0;
  margin-top: 8px;
}
.address-card-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #64748b;
  margin-bottom: 8px;
}
.address-text {
  font-size: 13px;
  font-family: monospace;
  word-break: break-all;
  color: #1a1a2e;
  line-height: 1.5;
}

/* ── Warning / info box ── */
.warning-box, .info-box {
  font-size: 12px; word-break: break-word;
}

/* ── Balance card sur petits écrans ── */
@media (max-width: 360px) {
  .balance-amount { font-size: 26px; }
  .balance-stats { gap: 4px; }
  .balance-stat-value { font-size: 12px; }
  .balance-stat-label { font-size: 9px; }
  .balance-col-value, .balance-sub-value { font-size: 13px; }

  /* Quick actions 2x2 sur écrans < 360px */
  .quick-actions { grid-template-columns: repeat(2, 1fr); gap: 8px; }

  /* Chips plus petits */
  .chip { padding: 7px 12px; font-size: 11px; }

  /* Wallet grid 2 colonnes */
  .wallet-grid { grid-template-columns: 1fr 1fr; }

  /* Dash stats */
  .dash-stats { gap: 6px; }
  .dash-stat-value { font-size: 14px; }
  .dash-stat-label { font-size: 9px; }
}

/* ── Safe area iPhone (notch / home bar) ── */
.bottom-nav {
  padding-bottom: env(safe-area-inset-bottom, 0px);
  height: auto; min-height: 60px;
}
.app-bar {
  padding-top: env(safe-area-inset-top, 0px);
}

/* ════════════════════════════════════════
   HAMBURGER & MOBILE DRAWER
   ════════════════════════════════════════ */

/* Bouton hamburger dans l'app-bar */
.app-bar-hamburger {
  width: 36px; height: 36px;
  background: rgba(255,255,255,0.18);
  border-radius: 10px;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 5px; flex-shrink: 0; cursor: pointer;
  border: none; padding: 0;
}
.app-bar-hamburger span {
  display: block; width: 18px; height: 2px;
  background: #fff; border-radius: 2px;
  transition: transform 0.25s, opacity 0.25s;
}
.app-bar-hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.app-bar-hamburger.open span:nth-child(2) { opacity: 0; }
.app-bar-hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Overlay fond semi-transparent */
.drawer-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(15,23,42,0.5);
  backdrop-filter: blur(2px);
  opacity: 0; pointer-events: none;
  transition: opacity 0.28s cubic-bezier(.4,0,.2,1);
}
.drawer-overlay.open { opacity: 1; pointer-events: all; }

/* Tiroir (slide depuis la droite) */
.drawer {
  position: absolute; top: 0; right: 0; bottom: 0;
  width: min(300px, 85vw);
  background: #fff; display: flex; flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(.4,0,.2,1);
  overflow-y: auto; overscroll-behavior: contain;
}
.drawer-overlay.open .drawer { transform: translateX(0); }

/* En-tête du tiroir */
.drawer-header {
  background: linear-gradient(135deg, #00c7ff 0%, #0090c7 100%);
  padding: 24px 16px 20px;
  display: flex; align-items: center; gap: 12px;
}
.drawer-avatar {
  width: 46px; height: 46px; border-radius: 50%;
  background: rgba(255,255,255,0.25);
  color: #fff; font-size: 18px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.drawer-user-info { flex: 1; min-width: 0; }
.drawer-user-name {
  font-size: 14px; font-weight: 700; color: #fff;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.drawer-user-phone { font-size: 11px; color: rgba(255,255,255,0.8); margin-top: 2px; }
.drawer-close {
  width: 30px; height: 30px; border-radius: 50%;
  background: rgba(255,255,255,0.2); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700; flex-shrink: 0; cursor: pointer; border: none;
}

/* Navigation du tiroir */
.drawer-nav { flex: 1; padding: 8px 0; }
.drawer-item {
  display: flex; align-items: center; gap: 14px;
  padding: 13px 20px; color: #374151; font-size: 14px; font-weight: 500;
  text-decoration: none; transition: background 0.15s;
  position: relative;
}
.drawer-item:active, .drawer-item:hover { background: #f1f5f9; }
.drawer-item.active { color: #00c7ff; background: #e0f7ff; }
.drawer-item-icon { font-size: 18px; width: 24px; text-align: center; flex-shrink: 0; }
.drawer-item-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: #00c7ff; margin-left: auto;
}
.drawer-divider { height: 1px; background: #e8ecf0; margin: 6px 20px; }

/* Pied du tiroir */
.drawer-footer { padding: 12px 0 16px; border-top: 1px solid #e8ecf0; }
.drawer-lang { display: flex; gap: 6px; padding: 0 16px 10px; }
.drawer-lang-btn { flex: 1; padding: 5px; border-radius: 6px; border: 1px solid #e2e8f0; background: transparent; color: #64748b; font-size: 12px; font-weight: 700; cursor: pointer; }
.drawer-lang-btn.active { background: #ede9fe; color: #7c3aed; border-color: #c4b5fd; }
.drawer-logout {
  display: flex; align-items: center; gap: 14px;
  padding: 13px 20px; color: #ef4444; font-size: 14px; font-weight: 500;
  text-decoration: none; transition: background 0.15s;
}
.drawer-logout:active { background: #fef2f2; }

/* ════════════════════════════════════════
   PAGE PROFIL — PREMIUM
   ════════════════════════════════════════ */

/* Hero section */
.profil-hero {
  position: relative;
  background: linear-gradient(160deg, #00c7ff 0%, #005fa3 100%);
  padding: 28px 20px 32px;
  text-align: center;
  overflow: hidden;
}
.profil-hero::before {
  content: '';
  position: absolute; top: -40px; right: -40px;
  width: 200px; height: 200px;
  border-radius: 50%;
  background: rgba(255,255,255,0.07);
}
.profil-hero::after {
  content: '';
  position: absolute; bottom: -60px; left: -30px;
  width: 160px; height: 160px;
  border-radius: 50%;
  background: rgba(255,255,255,0.05);
}
.profil-avatar-wrap {
  position: relative; display: inline-block; margin-bottom: 14px;
}
.profil-avatar-lg {
  width: 82px; height: 82px; border-radius: 50%;
  background: rgba(255,255,255,0.25);
  border: 3px solid rgba(255,255,255,0.6);
  color: #fff; font-size: 30px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto;
}
.profil-avatar-edit {
  position: absolute; bottom: 0; right: 0;
  width: 26px; height: 26px; border-radius: 50%;
  background: #fff; border: none; cursor: pointer;
  font-size: 13px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}
.profil-hero-name {
  font-size: 20px; font-weight: 700; color: #fff;
  margin-bottom: 4px; letter-spacing: -0.3px;
}
.profil-hero-phone {
  font-size: 13px; color: rgba(255,255,255,0.8); margin-bottom: 12px;
}
.profil-hero-badges { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.profil-badge-kyc {
  font-size: 11px; font-weight: 600;
  padding: 4px 10px; border-radius: 20px;
  background: rgba(255,255,255,0.2); color: #fff;
}
.profil-badge-kyc.verified { background: rgba(34,197,94,0.25); }
.profil-badge-member {
  font-size: 11px; font-weight: 500;
  padding: 4px 10px; border-radius: 20px;
  background: rgba(255,255,255,0.15); color: rgba(255,255,255,0.9);
}

/* Stats rapides */
.profil-stats-row {
  display: flex; align-items: center;
  background: #fff; border-radius: 16px;
  margin: -18px 0 16px; position: relative; z-index: 2;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
  padding: 18px 8px;
}
.profil-stat { flex: 1; text-align: center; }
.profil-stat-value { font-size: 17px; font-weight: 700; color: #1a1a2e; }
.profil-stat-label { font-size: 10px; color: #94a3b8; margin-top: 3px; font-weight: 500; }
.profil-stat-div { width: 1px; height: 36px; background: #e8ecf0; }

/* Carte sécurité */
.profil-security-card {
  background: #fff; border-radius: 14px;
  padding: 16px; margin-bottom: 20px;
  border: 1.5px solid #e2e8f0;
}
.profil-security-title { font-size: 13px; font-weight: 700; color: #1a1a2e; }
.profil-security-sub { font-size: 11px; color: #64748b; margin-top: 2px; margin-bottom: 10px; }
.profil-security-bar-wrap { margin-bottom: 10px; }
.profil-security-bar {
  height: 6px; background: #e8ecf0; border-radius: 6px; overflow: hidden;
}
.profil-security-fill {
  height: 100%; border-radius: 6px;
  background: linear-gradient(90deg, #f59e0b, #22c55e);
  transition: width 0.6s ease;
}
.profil-security-cta {
  font-size: 12px; font-weight: 600; color: #00c7ff;
  text-decoration: none;
}

/* Étiquettes de section */
.profil-section-label {
  font-size: 10px; font-weight: 700;
  color: #94a3b8; letter-spacing: 0.1em;
  margin: 20px 0 8px 4px;
}

/* Icônes colorées dans les items menu */
.profil-menu-icon {
  width: 36px; height: 36px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 17px; flex-shrink: 0;
}

/* Corps des items menu avec sous-titre */
.menu-item-body { flex: 1; min-width: 0; }
.menu-item-body p:first-child { font-size: 14px; font-weight: 500; color: #1a1a2e; }
.menu-item-sub { font-size: 11px; color: #94a3b8; margin-top: 2px; }

/* Override menu-item pour profil */
.profil-page .menu-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; border-radius: 0;
  border-bottom: 1px solid #f1f5f9;
}
.profil-page .menu-item:last-child { border-bottom: none; }
.profil-page .menu-list {
  background: #fff; border-radius: 14px;
  overflow: hidden; border: 1.5px solid #e2e8f0;
  margin-bottom: 4px;
}

/* Bouton déconnexion */
.profil-logout-btn {
  width: 100%; padding: 14px;
  background: #fef2f2; color: #dc2626;
  border: 1.5px solid #fecaca; border-radius: 14px;
  font-size: 14px; font-weight: 600;
  margin: 20px 0 8px; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 8px;
}
.profil-logout-btn:active { background: #fee2e2; }

/* Zone critique */
.profil-danger-zone {
  background: #fff5f5; border: 1.5px solid #fecaca;
  border-radius: 14px; padding: 16px; margin-bottom: 32px;
}
.profil-danger-title {
  font-size: 10px; font-weight: 700; color: #ef4444;
  letter-spacing: 0.1em; margin-bottom: 10px;
  text-transform: uppercase;
}
.profil-delete-btn {
  width: 100%; padding: 12px;
  background: transparent; color: #dc2626;
  border: 1.5px solid #fca5a5; border-radius: 10px;
  font-size: 13px; font-weight: 600; cursor: pointer;
  margin-bottom: 8px;
}
.profil-delete-btn:active { background: #fee2e2; }
.profil-danger-note {
  font-size: 11px; color: #94a3b8; text-align: center; line-height: 1.5;
}

/* Desktop override — masquer le hamburger au-dessus de 1024px */
@media (min-width: 1024px) {
  .app-bar-hamburger { display: none; }
  .drawer-overlay { display: none; }
}

/* ── Tabs historique sur petits écrans ── */
@media (max-width: 380px) {
  .hist-tab { font-size: 11px; padding: 7px 6px; }
  .p2p-tab  { font-size: 12px; padding: 9px 6px; }
}

/* ── Section header ── */
@media (max-width: 360px) {
  .section-header { flex-wrap: wrap; gap: 4px; }
  .section-title  { font-size: 13px; }
}

/* ── KYC upload zone ── */
.kyc-upload-zone {
  display: flex; align-items: center; justify-content: center;
  border: 1.5px dashed #cbd5e1; border-radius: 12px;
  padding: 16px 12px; cursor: pointer; background: #f8fafc;
  transition: border-color 0.2s, background 0.2s;
}
.kyc-upload-zone:hover { border-color: #00c7ff; background: #f0fbff; }
.kyc-upload-placeholder { font-size: 13px; color: #64748b; pointer-events: none; }

/* ══════════════════════════════════════════════════════════════
   MARCHÉS — page marchés live CoinGecko
   ══════════════════════════════════════════════════════════════ */

/* Stats globales */
.mkt-global-bar {
  display: flex; gap: 8px; margin-bottom: 14px;
}
.mkt-global-pill {
  flex: 1; background: #fff; border-radius: 12px;
  padding: 10px 8px; text-align: center;
  box-shadow: 0 1px 4px rgba(0,0,0,.05);
}
.mkt-global-val { font-size: 13px; font-weight: 700; color: #0f172a; }
.mkt-global-lbl { font-size: 10px; color: #94a3b8; margin-top: 2px; }
.mkt-global-up  { color: #22c55e; }
.mkt-global-dn  { color: #ef4444; }

/* Recherche */
.mkt-search-wrap { position: relative; margin-bottom: 12px; }
.mkt-search {
  width: 100%; padding: 10px 14px 10px 36px; border-radius: 12px;
  border: 1.5px solid #e2e8f0; background: #fff;
  font-size: 13px; outline: none; color: #0f172a;
}
.mkt-search:focus { border-color: #00c7ff; }
.mkt-search-icon {
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  font-size: 14px; pointer-events: none;
}

/* Sort bar */
.mkt-sort-bar {
  display: flex; align-items: center; gap: 4px;
  padding: 0 4px 8px; font-size: 11px; color: #94a3b8;
}
.mkt-sort-bar span { flex: 1; }
.mkt-sort-btn {
  padding: 4px 8px; border-radius: 8px; font-size: 11px;
  font-weight: 600; color: #64748b; background: none; cursor: pointer;
  transition: background .15s, color .15s;
}
.mkt-sort-btn.active { background: #e0f7ff; color: #00a8d8; }

/* Liste de coins */
.mkt-list { background: #fff; border-radius: 14px; overflow: hidden; }
.mkt-coin {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px; border-bottom: 1px solid #f1f5f9;
  cursor: pointer; transition: background .12s;
}
.mkt-coin:last-child { border-bottom: none; }
.mkt-coin:hover { background: #f8fafc; }
.mkt-rank { font-size: 11px; color: #94a3b8; font-weight: 600; min-width: 22px; text-align: right; }
.mkt-logo {
  width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0;
  object-fit: cover; background: #f1f5f9;
}
.mkt-logo-fallback {
  width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 800; color: #fff; background: #64748b;
}
.mkt-coin-info { flex: 1; min-width: 0; }
.mkt-coin-name { font-size: 13px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mkt-coin-sym  { font-size: 11px; color: #94a3b8; font-weight: 500; }
.mkt-price-col { text-align: right; min-width: 80px; }
.mkt-price     { font-size: 13px; font-weight: 700; }
.mkt-mcap-val  { font-size: 10px; color: #94a3b8; margin-top: 1px; }
.mkt-change    { font-size: 11.5px; font-weight: 700; min-width: 54px; text-align: right; padding: 4px 8px; border-radius: 8px; }
.mkt-change.up { color: #16a34a; background: #f0fdf4; }
.mkt-change.dn { color: #dc2626; background: #fef2f2; }
.mkt-change.flat { color: #94a3b8; background: #f8fafc; }

/* Skeleton */
@keyframes mkt-shimmer {
  0%   { background-position: -300px 0; }
  100% { background-position: calc(300px + 100%) 0; }
}
.mkt-skel-row {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px; border-bottom: 1px solid #f1f5f9;
}
.mkt-skel {
  border-radius: 8px;
  background: linear-gradient(90deg, #f1f5f9 25%, #e8ecf0 50%, #f1f5f9 75%);
  background-size: 300px 100%;
  animation: mkt-shimmer 1.3s infinite;
}
.mkt-skel-circle  { width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0; }
.mkt-skel-name    { height: 13px; width: 90px; margin-bottom: 4px; }
.mkt-skel-sym     { height: 10px; width: 50px; }
.mkt-skel-price   { height: 13px; width: 70px; margin-left: auto; }

/* Footer / refresh */
.mkt-footer {
  text-align: center; font-size: 11px; color: #94a3b8; margin-top: 12px; padding-bottom: 4px;
}

/* Modal détail coin */
.mkt-modal-backdrop {
  position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 200;
}
.mkt-modal-sheet {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 201;
  background: #fff; border-radius: 24px 24px 0 0;
  max-height: 88vh; overflow-y: auto;
  padding: 20px 16px 32px;
  animation: slideUp .25s ease;
}
@keyframes slideUp {
  from { transform: translateY(100%); }
  to   { transform: translateY(0); }
}
.mkt-modal-drag { width: 40px; height: 4px; background: #e2e8f0; border-radius: 2px; margin: 0 auto 16px; }
.mkt-modal-header { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.mkt-modal-logo { width: 52px; height: 52px; border-radius: 50%; }
.mkt-modal-name { font-size: 20px; font-weight: 800; }
.mkt-modal-sym  { font-size: 13px; color: #94a3b8; font-weight: 600; }
.mkt-modal-rank { font-size: 11px; color: #00a8d8; background: #e0f7ff; padding: 2px 8px; border-radius: 8px; font-weight: 700; }
.mkt-modal-close {
  margin-left: auto; background: #f1f5f9; border: none; border-radius: 50%;
  width: 32px; height: 32px; font-size: 14px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.mkt-modal-price-big { font-size: 32px; font-weight: 800; margin-bottom: 12px; }
.mkt-modal-changes { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.mkt-modal-change-pill {
  font-size: 12px; font-weight: 700; padding: 4px 12px; border-radius: 20px;
}
.mkt-modal-stats-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 16px;
}
.mkt-stat-card { background: #f8fafc; border-radius: 12px; padding: 12px; }
.mkt-stat-lbl  { font-size: 11px; color: #94a3b8; margin-bottom: 4px; }
.mkt-stat-val  { font-size: 14px; font-weight: 700; }
.mkt-modal-desc { font-size: 13px; color: #475569; line-height: 1.6; margin-bottom: 16px; }
.mkt-modal-cta  { padding: 14px; text-align: center; font-weight: 700; font-size: 15px; }

/* Responsive desktop */
@media (min-width: 768px) {
  .mkt-modal-sheet { max-width: 480px; left: 50%; right: auto; transform: translateX(-50%); border-radius: 20px; bottom: 40px; }
  @keyframes slideUp { from { opacity:0; transform: translateX(-50%) translateY(30px); } to { opacity:1; transform: translateX(-50%) translateY(0); } }
}

/* ══════════════════════════════════════════════════════════════
   MESSAGES — notifications, annonces, support
   ══════════════════════════════════════════════════════════════ */

.msg-empty {
  text-align: center; padding: 48px 16px; color: #94a3b8; font-size: 13px;
}

/* Notifications */
.msg-notif-row {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 14px 16px; border-bottom: 1px solid #f1f5f9;
  background: #fff; cursor: pointer; transition: background .12s;
}
.msg-notif-row:last-child { border-bottom: none; }
.msg-notif-row.unread { background: #f0f9ff; }
.msg-notif-row:hover { background: #f8fafc; }
.msg-notif-icon {
  font-size: 22px; flex-shrink: 0; width: 36px; text-align: center; margin-top: 2px;
}
.msg-notif-body { flex: 1; min-width: 0; }
.msg-notif-title { font-size: 13px; font-weight: 700; color: #0f172a; margin-bottom: 3px; }
.msg-notif-text  { font-size: 12px; color: #64748b; line-height: 1.5; margin-bottom: 4px; }
.msg-notif-date  { font-size: 11px; color: #94a3b8; }
.msg-notif-dot {
  width: 8px; height: 8px; border-radius: 50%; background: #00c7ff;
  flex-shrink: 0; margin-top: 6px;
}

/* Annonces */
.msg-annonce-card {
  background: #fff; border-radius: 14px; padding: 16px;
  margin-bottom: 12px; box-shadow: 0 1px 4px rgba(0,0,0,.06);
}
.msg-annonce-header {
  display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px;
}
.msg-annonce-badge {
  font-size: 10px; font-weight: 700; color: #fff;
  background: linear-gradient(135deg, #00a8d8, #0077a8);
  padding: 2px 8px; border-radius: 8px; text-transform: uppercase;
}
.msg-annonce-date  { font-size: 11px; color: #94a3b8; }
.msg-annonce-title { font-size: 14px; font-weight: 700; color: #0f172a; margin-bottom: 6px; }
.msg-annonce-body  { font-size: 13px; color: #475569; line-height: 1.6; }
