/* ============================================================
   ZAYRX — Main Stylesheet
   Mobile-first, app-like design
   ============================================================ */

:root {
  --primary:      #f97316;   /* Orange accent */
  --primary-dark: #ea580c;
  --primary-light:#fed7aa;
  --secondary:    #1e293b;   /* Dark navy */
  --bg:           #f8fafc;
  --surface:      #ffffff;
  --surface2:     #f1f5f9;
  --border:       #e2e8f0;
  --text:         #0f172a;
  --text-muted:   #64748b;
  --text-light:   #94a3b8;
  --positive:     #16a34a;
  --positive-bg:  #dcfce7;
  --negative:     #dc2626;
  --negative-bg:  #fee2e2;
  --warning:      #d97706;
  --warning-bg:   #fef3c7;
  --radius:       14px;
  --radius-sm:    8px;
  --radius-lg:    20px;
  --shadow:       0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.06);
  --shadow-md:    0 4px 16px rgba(0,0,0,.10);
  --shadow-lg:    0 8px 32px rgba(0,0,0,.14);
  --nav-h:        64px;
  --header-h:     60px;
  --transition:   .18s ease;
  --font:         'Inter', 'SF Pro Display', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; -webkit-tap-highlight-color: transparent; scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  max-width: 480px;
  margin: 0 auto;
  position: relative;
  overflow-x: hidden;
}
a { text-decoration: none; color: inherit; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, select, textarea { font-family: inherit; }
img { max-width: 100%; }
ul { list-style: none; }

/* ── Layout wrapper ── */
.app-wrapper {
  min-height: 100vh;
  padding-bottom: calc(var(--nav-h) + 12px);
  padding-top: var(--header-h);
}
.page-content { padding: 0 16px 16px; }

/* ── Top Header ── */
.top-header {
  position: fixed;
  top: 0; left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  height: var(--header-h);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 16px;
  gap: 10px;
  z-index: 100;
  box-shadow: var(--shadow);
}
.top-header .logo {
  font-size: 1.4rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.5px;
}
.top-header .search-bar {
  flex: 1;
  display: flex;
  align-items: center;
  background: var(--surface2);
  border-radius: 10px;
  padding: 0 10px;
  height: 36px;
  gap: 6px;
}
.top-header .search-bar input {
  border: none;
  background: transparent;
  outline: none;
  font-size: .85rem;
  color: var(--text);
  width: 100%;
}
.top-header .search-bar input::placeholder { color: var(--text-light); }
.header-icon {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--surface2);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
  position: relative;
  flex-shrink: 0;
}
.header-icon .badge {
  position: absolute; top: 4px; right: 4px;
  width: 8px; height: 8px;
  background: var(--primary);
  border-radius: 50%;
  border: 2px solid var(--surface);
}
.avatar-btn img {
  width: 32px; height: 32px;
  border-radius: 50%;
  object-fit: cover;
}
.avatar-initials {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  font-size: .75rem;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}

/* ── Bottom Navigation ── */
.bottom-nav {
  position: fixed;
  bottom: 0; left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  height: var(--nav-h);
  background: var(--surface);
  border-top: 1px solid var(--border);
  display: flex;
  z-index: 100;
  box-shadow: 0 -2px 12px rgba(0,0,0,.07);
}
.nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: #94a3b8;
  font-size: .67rem;
  font-weight: 600;
  transition: color var(--transition);
  -webkit-tap-highlight-color: transparent;
  letter-spacing: .1px;
}
.nav-item .nav-icon {
  line-height: 1;
  transition: transform var(--transition);
  display: flex; align-items: center; justify-content: center;
}
.nav-item svg { display: block; }
.nav-item.active { color: var(--primary); }
.nav-item.active .nav-icon { transform: scale(1.1); }
.nav-item:hover { color: var(--primary); }

/* ── Cards ── */
.card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.card-body { padding: 16px; }
.card-header {
  padding: 14px 16px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.card-title { font-size: .95rem; font-weight: 700; }

/* ── Balance Card ── */
.balance-card {
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 60%, #1a1f35 100%);
  border-radius: var(--radius-lg);
  padding: 22px 20px 18px;
  color: #fff;
  position: relative;
  overflow: hidden;
  margin-bottom: 2px;
}
.balance-card::before {
  content: '';
  position: absolute;
  top: -40px; right: -40px;
  width: 160px; height: 160px;
  border-radius: 50%;
  background: rgba(249,115,22,.12);
  pointer-events: none;
}
.balance-card::after {
  content: '';
  position: absolute;
  bottom: -20px; left: -20px;
  width: 100px; height: 100px;
  border-radius: 50%;
  background: rgba(249,115,22,.08);
  pointer-events: none;
}
.balance-label {
  font-size: .78rem;
  color: rgba(255,255,255,.6);
  margin-bottom: 4px;
  display: flex; align-items: center; gap: 6px;
}
.balance-amount {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -1px;
  line-height: 1.1;
}
.balance-currency {
  font-size: .9rem;
  font-weight: 400;
  color: rgba(255,255,255,.65);
  margin-left: 4px;
}
.balance-pnl {
  margin-top: 10px;
  font-size: .82rem;
  color: rgba(255,255,255,.75);
}
.balance-pnl .pnl-val {
  color: #4ade80;
  font-weight: 600;
}
.balance-pnl .pnl-val.neg { color: #f87171; }
.eye-btn {
  background: none;
  border: none;
  color: rgba(255,255,255,.6);
  font-size: 1rem;
  padding: 2px;
  cursor: pointer;
}

/* ── Quick Actions Grid ── */
.quick-actions { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.qa-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.qa-icon {
  width: 54px; height: 54px;
  border-radius: 50%;
  background: #f1f4f9;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem;
  transition: transform var(--transition), background var(--transition);
  flex-shrink: 0;
}
.qa-item:hover .qa-icon, .qa-item:active .qa-icon {
  transform: scale(0.92);
  background: #e4e8f0;
}
.qa-label {
  font-size: .72rem;
  font-weight: 600;
  color: #1e293b;
  text-align: center;
}

/* ── Banners Carousel ── */
.banners-carousel {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
}
.banners-track {
  display: flex;
  transition: transform .4s ease;
}
.banner-slide {
  min-width: 100%;
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
}
.banner-slide img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  display: block;
}
.banner-slide .banner-content {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: linear-gradient(transparent, rgba(0,0,0,.55));
  padding: 20px 14px 12px;
  color: #fff;
}
.banner-content h3 { font-size: .9rem; font-weight: 700; }
.banner-content p  { font-size: .75rem; opacity: .85; margin-top: 2px; }
.banner-no-img {
  background: linear-gradient(135deg, var(--primary), #f59e0b);
  min-height: 140px;
  display: flex; align-items: center;
  padding: 20px;
  border-radius: var(--radius);
  color: #fff;
}
.banner-dots {
  display: flex;
  justify-content: center;
  gap: 5px;
  margin-top: 8px;
}
.banner-dot {
  width: 6px; height: 6px;
  border-radius: 3px;
  background: var(--border);
  transition: all .3s;
}
.banner-dot.active {
  background: var(--primary);
  width: 18px;
}

/* ── Section Switcher (Market/Posts) ── */
.section-switcher {
  display: flex;
  background: var(--surface2);
  border-radius: 10px;
  padding: 3px;
  gap: 2px;
}
.switcher-btn {
  flex: 1;
  text-align: center;
  padding: 7px 0;
  border-radius: 8px;
  font-size: .85rem;
  font-weight: 600;
  color: var(--text-muted);
  transition: all var(--transition);
  cursor: pointer;
}
.switcher-btn.active {
  background: var(--surface);
  color: var(--primary);
  box-shadow: var(--shadow);
}

/* ── Market List ── */
.market-list { display: flex; flex-direction: column; gap: 2px; }
.market-item {
  display: flex;
  align-items: center;
  padding: 12px 14px;
  background: var(--surface);
  border-radius: var(--radius-sm);
  gap: 12px;
  transition: background var(--transition);
  cursor: pointer;
}
.market-item:hover { background: var(--surface2); }
.coin-icon {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--surface2);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
  font-weight: 700;
  font-size: .75rem;
  color: var(--primary);
  border: 1.5px solid var(--border);
}
.market-info { flex: 1; }
.market-symbol { font-size: .9rem; font-weight: 700; }
.market-name { font-size: .72rem; color: var(--text-muted); margin-top: 2px; }
.market-chart { width: 70px; height: 34px; }
.market-price-col { text-align: right; min-width: 90px; }
.market-price { font-size: .9rem; font-weight: 700; }
.market-change {
  display: inline-block;
  font-size: .72rem;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 5px;
  margin-top: 3px;
}
.market-change.positive { background: var(--positive-bg); color: var(--positive); }
.market-change.negative { background: var(--negative-bg); color: var(--negative); }

/* ── Posts ── */
.post-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 14px;
  box-shadow: var(--shadow);
}
.post-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.post-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), #f59e0b);
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: .8rem;
  flex-shrink: 0;
}
.post-meta { flex: 1; }
.post-author { font-size: .85rem; font-weight: 700; }
.post-time { font-size: .72rem; color: var(--text-muted); }
.post-title { font-size: .9rem; font-weight: 700; margin-bottom: 4px; }
.post-content { font-size: .82rem; color: var(--text-muted); line-height: 1.5; }
.post-image { border-radius: 10px; width: 100%; margin-top: 10px; object-fit: cover; max-height: 200px; }
.post-actions {
  display: flex;
  gap: 16px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}
.post-action-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--text-muted);
  font-size: .78rem;
  cursor: pointer;
  transition: color var(--transition);
}
.post-action-btn:hover { color: var(--primary); }
.post-action-btn.liked { color: var(--primary); }

/* ── Trade Section ── */
.trade-tabs {
  display: flex;
  border-bottom: 2px solid var(--border);
  gap: 0;
}
.trade-tab {
  padding: 10px 20px;
  font-size: .88rem;
  font-weight: 600;
  color: var(--text-muted);
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  cursor: pointer;
  transition: all var(--transition);
}
.trade-tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}
.coming-soon-box {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}
.coming-soon-box .icon { font-size: 3rem; margin-bottom: 12px; }
.coming-soon-box h3 { font-size: 1.1rem; font-weight: 700; color: var(--text); margin-bottom: 6px; }
.coming-soon-box p { font-size: .85rem; }

/* ── Bot Cards ── */
.bot-tabs {
  display: flex;
  background: var(--surface2);
  border-radius: 10px;
  padding: 3px;
  gap: 2px;
  margin-bottom: 14px;
}
.bot-tab {
  flex: 1;
  text-align: center;
  padding: 7px 0;
  border-radius: 8px;
  font-size: .8rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition);
}
.bot-tab.active {
  background: var(--surface);
  color: var(--primary);
  box-shadow: var(--shadow);
}
.bot-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}
.bot-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), #f59e0b);
}
.bot-card-header {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 12px;
}
.bot-icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary), #f59e0b);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}
.bot-name { font-size: .95rem; font-weight: 700; }
.bot-subtitle { font-size: .75rem; color: var(--text-muted); margin-top: 2px; }
.bot-risk-badge {
  margin-left: auto;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: .68rem;
  font-weight: 700;
  text-transform: uppercase;
}
.risk-low     { background: #dcfce7; color: #16a34a; }
.risk-balanced{ background: #dbeafe; color: #2563eb; }
.risk-high    { background: #fef3c7; color: #d97706; }
.risk-aggressive { background: #fee2e2; color: #dc2626; }

.bot-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}
.bot-stat {
  background: var(--surface2);
  border-radius: 8px;
  padding: 8px 10px;
}
.bot-stat-label { font-size: .68rem; color: var(--text-muted); margin-bottom: 2px; }
.bot-stat-value { font-size: .88rem; font-weight: 700; }
.bot-stat-value.positive { color: var(--positive); }
.bot-stat-value.negative { color: var(--negative); }

.btn-copy-bot {
  width: 100%;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  border-radius: 10px;
  padding: 11px;
  font-size: .88rem;
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition);
  box-shadow: 0 4px 12px rgba(249,115,22,.35);
}
.btn-copy-bot:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(249,115,22,.45);
}
.btn-copy-bot:active { transform: scale(0.98); }

/* ── My Copies ── */
.copy-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 14px;
  box-shadow: var(--shadow);
}
.copy-card-header { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.copy-info { flex: 1; }
.copy-name { font-size: .9rem; font-weight: 700; }
.copy-pair { font-size: .72rem; color: var(--text-muted); }
.copy-status-badge {
  padding: 3px 9px;
  border-radius: 6px;
  font-size: .68rem;
  font-weight: 700;
  text-transform: uppercase;
}
.status-active   { background: var(--positive-bg); color: var(--positive); }
.status-paused   { background: var(--warning-bg); color: var(--warning); }
.status-stopped  { background: var(--surface2); color: var(--text-muted); }

.copy-equity-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
}
.copy-equity-item { text-align: center; }
.copy-equity-label { font-size: .68rem; color: var(--text-muted); }
.copy-equity-value { font-size: .9rem; font-weight: 700; }

.copy-pnl-bar {
  height: 4px;
  background: var(--surface2);
  border-radius: 2px;
  margin-bottom: 10px;
  overflow: hidden;
}
.copy-pnl-fill { height: 100%; border-radius: 2px; }
.copy-pnl-fill.pos { background: var(--positive); }
.copy-pnl-fill.neg { background: var(--negative); }

.copy-actions { display: flex; gap: 8px; }
.btn-sm {
  flex: 1;
  padding: 7px;
  border-radius: 8px;
  font-size: .75rem;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition);
}
.btn-outline-primary {
  border: 1.5px solid var(--primary);
  color: var(--primary);
  background: transparent;
}
.btn-outline-danger {
  border: 1.5px solid var(--negative);
  color: var(--negative);
  background: transparent;
}
.btn-outline-warning {
  border: 1.5px solid var(--warning);
  color: var(--warning);
  background: transparent;
}
.btn-sm:hover { opacity: .85; }

/* ── Wallet ── */
.wallet-header {
  background: linear-gradient(135deg, #1e293b, #0f172a);
  border-radius: var(--radius-lg);
  padding: 22px 20px;
  color: #fff;
  margin-bottom: 0;
}
.wallet-total-label { font-size: .78rem; color: rgba(255,255,255,.6); margin-bottom: 4px; }
.wallet-total-amount { font-size: 1.9rem; font-weight: 800; letter-spacing: -1px; }
.wallet-total-currency { font-size: .85rem; color: rgba(255,255,255,.6); margin-left: 4px; }

.wallet-actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 14px;
}
.wallet-action-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,.12);
  border-radius: var(--radius-sm);
  padding: 12px 8px;
  cursor: pointer;
  transition: background var(--transition);
  color: #fff;
}
.wallet-action-btn:hover { background: rgba(255,255,255,.2); }
.wallet-action-icon { font-size: 1.4rem; }
.wallet-action-label { font-size: .72rem; font-weight: 600; }

/* ── Deposit/Transfer Tabs ── */
.method-tabs {
  display: flex;
  background: var(--surface2);
  border-radius: 10px;
  padding: 3px;
  gap: 2px;
}
.method-tab {
  flex: 1;
  text-align: center;
  padding: 8px;
  border-radius: 8px;
  font-size: .83rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition);
}
.method-tab.active {
  background: var(--surface);
  color: var(--primary);
  box-shadow: var(--shadow);
}

/* ── Form elements ── */
.form-group { margin-bottom: 14px; }
.form-label {
  display: block;
  font-size: .8rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.form-control {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: .88rem;
  color: var(--text);
  background: var(--surface);
  outline: none;
  transition: border-color var(--transition);
  -webkit-appearance: none;
}
.form-control:focus { border-color: var(--primary); }
.form-control::placeholder { color: var(--text-light); }
select.form-control { cursor: pointer; }

.btn-primary {
  display: block;
  width: 100%;
  padding: 13px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  border-radius: var(--radius-sm);
  font-size: .92rem;
  font-weight: 700;
  text-align: center;
  cursor: pointer;
  border: none;
  transition: all var(--transition);
  box-shadow: 0 4px 12px rgba(249,115,22,.35);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(249,115,22,.45); }
.btn-primary:active { transform: scale(.98); }
.btn-primary:disabled { opacity: .6; cursor: not-allowed; transform: none; }

.btn-secondary {
  display: block;
  width: 100%;
  padding: 12px;
  background: var(--surface2);
  color: var(--text);
  border-radius: var(--radius-sm);
  font-size: .88rem;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  border: 1.5px solid var(--border);
  transition: all var(--transition);
}
.btn-secondary:hover { background: var(--border); }

/* ── Deposit Address Box ── */
.address-box {
  background: var(--surface2);
  border-radius: var(--radius-sm);
  padding: 14px;
  text-align: center;
}
.address-text {
  font-family: monospace;
  font-size: .78rem;
  color: var(--text);
  word-break: break-all;
  margin-bottom: 10px;
  line-height: 1.6;
}
.qr-wrapper {
  display: flex;
  justify-content: center;
  margin-bottom: 10px;
}
.qr-wrapper img { border-radius: 8px; border: 3px solid #fff; }
.copy-address-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 14px;
  background: var(--primary);
  color: #fff;
  border-radius: 6px;
  font-size: .78rem;
  font-weight: 600;
  cursor: pointer;
}

/* ── Transaction List ── */
.tx-list { display: flex; flex-direction: column; gap: 1px; }
.tx-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.tx-item:last-child { border-bottom: none; }
.tx-icon {
  width: 40px; height: 40px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}
.tx-icon.deposit  { background: var(--positive-bg); }
.tx-icon.withdraw { background: var(--negative-bg); }
.tx-icon.transfer { background: #dbeafe; }
.tx-icon.profit   { background: var(--positive-bg); }
.tx-icon.loss     { background: var(--negative-bg); }
.tx-icon.fee      { background: var(--warning-bg); }

.tx-info { flex: 1; }
.tx-type { font-size: .85rem; font-weight: 600; }
.tx-date { font-size: .72rem; color: var(--text-muted); margin-top: 2px; }
.tx-amount { font-size: .9rem; font-weight: 700; }
.tx-amount.positive { color: var(--positive); }
.tx-amount.negative { color: var(--negative); }
.tx-status {
  font-size: .68rem;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 5px;
  margin-top: 2px;
  display: inline-block;
}
.tx-status.completed { background: var(--positive-bg); color: var(--positive); }
.tx-status.pending   { background: var(--warning-bg); color: var(--warning); }
.tx-status.failed    { background: var(--negative-bg); color: var(--negative); }

/* ── More Page ── */
.more-section-title {
  font-size: .7rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .8px;
  padding: 12px 0 6px;
}
.more-list { background: var(--surface); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.more-item {
  display: flex;
  align-items: center;
  padding: 13px 14px;
  gap: 12px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background var(--transition);
  text-decoration: none;
  color: var(--text);
}
.more-item:last-child { border-bottom: none; }
.more-item:hover, .more-item:active { background: var(--surface2); }
.more-item-icon {
  width: 36px; height: 36px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}
.more-item-label { flex: 1; font-size: .88rem; font-weight: 500; }
.more-item-arrow { color: var(--text-light); font-size: .9rem; }
.more-item-badge {
  background: var(--primary);
  color: #fff;
  font-size: .65rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 10px;
}

/* ── Wallet Pay / UID Box ── */
.uid-box {
  background: linear-gradient(135deg, #1e293b, #0f172a);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
  color: #fff;
}
.uid-label { font-size: .75rem; color: rgba(255,255,255,.6); margin-bottom: 6px; }
.uid-value {
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: 2px;
  margin-bottom: 14px;
}
.uid-qr { display: flex; justify-content: center; margin-bottom: 12px; }
.uid-qr img { border-radius: 10px; border: 3px solid #fff; }
.btn-copy-uid {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  background: rgba(255,255,255,.15);
  border: 1px solid rgba(255,255,255,.25);
  color: #fff;
  border-radius: 8px;
  font-size: .8rem;
  font-weight: 600;
  cursor: pointer;
}

/* ── Page Headers ── */
.page-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: var(--header-h);
  z-index: 50;
}
.back-btn {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--surface2);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
  cursor: pointer;
  flex-shrink: 0;
}
.page-title { font-size: 1rem; font-weight: 700; }

/* ── Sections ── */
.section { margin-bottom: 18px; }
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.section-title { font-size: .9rem; font-weight: 700; }
.section-link { font-size: .78rem; color: var(--primary); font-weight: 600; }

/* ── Modals ── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 200;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s;
}
.modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}
.modal-sheet {
  background: var(--surface);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  width: 100%;
  max-width: 480px;
  max-height: 92vh;
  overflow-y: auto;
  padding: 20px 16px 32px;
  transform: translateY(100%);
  transition: transform .28s ease;
}
.modal-overlay.open .modal-sheet { transform: translateY(0); }
.modal-handle {
  width: 40px; height: 4px;
  background: var(--border);
  border-radius: 2px;
  margin: 0 auto 18px;
}
.modal-title { font-size: 1.05rem; font-weight: 800; margin-bottom: 16px; text-align: center; }

/* ── Disclaimer ── */
.disclaimer-box {
  background: var(--warning-bg);
  border: 1.5px solid var(--warning);
  border-radius: var(--radius-sm);
  padding: 14px;
  margin-bottom: 14px;
}
.disclaimer-box h4 { font-size: .88rem; font-weight: 700; color: var(--warning); margin-bottom: 6px; }
.disclaimer-box p, .disclaimer-box li { font-size: .78rem; color: #92400e; line-height: 1.6; }
.disclaimer-box ul { padding-left: 16px; margin-top: 4px; }

.checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 14px;
}
.checkbox-row input[type=checkbox] {
  width: 18px; height: 18px;
  accent-color: var(--primary);
  flex-shrink: 0;
  margin-top: 2px;
}
.checkbox-row label { font-size: .82rem; line-height: 1.5; cursor: pointer; }

/* ── Auth pages ── */
.auth-page {
  min-height: 100vh;
  background: linear-gradient(160deg, #0f172a 0%, #1e293b 50%, #1a1f35 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--surface);
  border-radius: 24px;
  padding: 32px 24px;
  box-shadow: var(--shadow-lg);
}
.auth-logo {
  text-align: center;
  font-size: 2.2rem;
  font-weight: 900;
  background: linear-gradient(135deg, var(--primary), #f59e0b);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 6px;
  letter-spacing: -1px;
}
.auth-tagline {
  text-align: center;
  font-size: .82rem;
  color: var(--text-muted);
  margin-bottom: 24px;
}
.auth-title { font-size: 1.2rem; font-weight: 800; margin-bottom: 20px; }
.auth-link { color: var(--primary); font-weight: 600; }
.auth-divider {
  text-align: center;
  font-size: .78rem;
  color: var(--text-muted);
  margin: 14px 0;
  position: relative;
}
.auth-divider::before, .auth-divider::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 40%;
  height: 1px;
  background: var(--border);
}
.auth-divider::before { left: 0; }
.auth-divider::after  { right: 0; }

/* ── Alerts ── */
.alert {
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: .82rem;
  margin-bottom: 12px;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}
.alert-danger  { background: var(--negative-bg); color: var(--negative); border: 1px solid #fca5a5; }
.alert-success { background: var(--positive-bg); color: var(--positive); border: 1px solid #86efac; }
.alert-info    { background: #dbeafe; color: #1d4ed8; border: 1px solid #93c5fd; }
.alert-warning { background: var(--warning-bg); color: var(--warning); border: 1px solid #fcd34d; }

/* ── Toast ── */
.toast-container {
  position: fixed;
  top: calc(var(--header-h) + 10px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 999;
  width: calc(100% - 32px);
  max-width: 448px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}
.toast {
  background: var(--secondary);
  color: #fff;
  border-radius: 10px;
  padding: 12px 16px;
  font-size: .84rem;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 10px;
  animation: toastIn .25s ease forwards;
  pointer-events: all;
}
.toast.success { background: var(--positive); }
.toast.error   { background: var(--negative); }
.toast.warning { background: var(--warning); }
@keyframes toastIn {
  from { opacity: 0; transform: translateY(-12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Search Overlay ── */
.search-overlay {
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 150;
  padding: var(--header-h) 16px 16px;
  display: none;
}
.search-overlay.open { display: block; }
.search-overlay-input {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface);
  border: 1.5px solid var(--primary);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  margin-bottom: 16px;
}
.search-overlay-input input {
  flex: 1;
  border: none;
  outline: none;
  font-size: .9rem;
  background: transparent;
}
.search-result {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background var(--transition);
}
.search-result:hover { background: var(--surface2); }

/* ── Notification Bell ── */
.notif-list { display: flex; flex-direction: column; gap: 1px; }
.notif-item {
  display: flex;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
}
.notif-item:last-child { border-bottom: none; }
.notif-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--primary);
  flex-shrink: 0;
  margin-top: 6px;
}
.notif-dot.read { background: transparent; }
.notif-body { flex: 1; }
.notif-title { font-size: .85rem; font-weight: 600; }
.notif-text  { font-size: .78rem; color: var(--text-muted); margin-top: 2px; }
.notif-time  { font-size: .7rem; color: var(--text-light); margin-top: 3px; }

/* ── Admin Link (visible only to admin users) ── */
.admin-bar {
  background: #0f172a;
  color: #f59e0b;
  font-size: .75rem;
  font-weight: 700;
  text-align: center;
  padding: 5px;
  letter-spacing: 1px;
}

/* ── Spinner ── */
.spinner {
  display: inline-block;
  width: 20px; height: 20px;
  border: 2.5px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(255,255,255,.85);
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 12px;
}

/* ── Empty State ── */
.empty-state {
  text-align: center;
  padding: 48px 20px;
  color: var(--text-muted);
}
.empty-state .icon { font-size: 3rem; margin-bottom: 10px; }
.empty-state p { font-size: .85rem; }

/* ── Profit / Loss tags ── */
.positive { color: var(--positive); }
.negative { color: var(--negative); }
.tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 5px;
  font-size: .72rem;
  font-weight: 600;
}

/* ── Responsive (≥ 480px desktop sidebar) ── */
@media (min-width: 480px) {
  body { max-width: 100%; background: #e2e8f0; }
  .app-wrapper {
    max-width: 480px;
    margin: 0 auto;
    background: var(--bg);
    box-shadow: var(--shadow-lg);
    min-height: 100vh;
  }
  .bottom-nav, .top-header, .modal-overlay, .toast-container {
    left: 50%;
    transform: translateX(-50%);
  }
}

/* ── Swipe / touch scroll ── */
.scroll-x {
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.scroll-x::-webkit-scrollbar { display: none; }

/* ── History table ── */
.history-table {
  width: 100%;
  font-size: .78rem;
  border-collapse: collapse;
}
.history-table th {
  font-size: .68rem;
  font-weight: 700;
  color: var(--text-muted);
  text-align: left;
  padding: 6px 8px;
  border-bottom: 1.5px solid var(--border);
  white-space: nowrap;
}
.history-table td {
  padding: 9px 8px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.history-table tr:last-child td { border-bottom: none; }

/* ── Fee info row ── */
.fee-info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: .82rem;
}
.fee-info-row:last-child { border-bottom: none; }
.fee-info-label { color: var(--text-muted); }
.fee-info-value { font-weight: 600; }

/* ── Range slider ── */
input[type=range] {
  width: 100%;
  accent-color: var(--primary);
  cursor: pointer;
}

/* ── Passcode dots ── */
.passcode-dots {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin: 16px 0;
}
.passcode-dot {
  width: 12px; height: 12px;
  border-radius: 50%;
  border: 2px solid var(--border);
  transition: background .15s;
}
.passcode-dot.filled { background: var(--primary); border-color: var(--primary); }

/* ── Success icon ── */
.success-icon {
  width: 70px; height: 70px;
  border-radius: 50%;
  background: var(--positive-bg);
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem;
  margin: 0 auto 16px;
}
