:root {
  --brand-50: #ffefe3;
  --brand-100: #ffd9bd;
  --brand-200: #ffc495;
  --brand-300: #ffad6e;
  --brand-400: #e28a4e;
  --brand-500: #b4743d; /* primary button */
  --brand-700: #6a3d1e;
  --ink-900: #161616;
  --ink-700: #3a3a3a;
  --ink-500: #6b6b6b;
  --surface: #ffffff;
}

/* Improve mobile text rendering and prevent iOS Safari auto-zoom */
html { -webkit-text-size-adjust: 100%; }

* {
  box-sizing: border-box;
}

html, body {
  height: 100%;
}

body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, 'Helvetica Neue', Arial, 'Noto Sans', 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';
  color: var(--ink-900);
  background: #0a0a0a;
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 16px;
}

/* App shell for list-based pages */
.app-body { background: #0a0a0a; padding: 0; display: block; min-height: 100dvh; }
.app {
  width: 100%;
  max-width: 480px;
  background: #111;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,.35);
  display: grid;
  grid-template-rows: auto 1fr auto;
}
.app-header {
  background: #4a4a4a;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 48px;
  padding: 0 12px;
  font-weight: 700;
  font-size: 18px;
  position: sticky;
  top: 0;
  z-index: 5;
  padding-left: 40px;
}
.app-main { background: #000; }
.pattern-bg { background-image: radial-gradient(rgba(255,255,255,.04) 1px, transparent 1px); background-size: 24px 24px; }

.quotes-list { list-style: none; margin: 0px; padding: 0 0 72px; display: grid; gap: 12px; }
.quote-card {
  width: 100%;
  border: 0;
  text-align: left;
  padding: 14px 14px;
  border-radius: 12px;
  background: linear-gradient(180deg, #b4743d 0%, #caa78a 60%, #b4743d 100%);
  color: #20140e;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 12px;
  cursor: pointer;
}
.quote-card:hover { filter: brightness(.98); }
.quote-card:active { transform: translateY(1px); }
.qc-left { display: grid; gap: 4px; }
.qc-symbol { font-weight: 800; letter-spacing: .5px; }
.qc-sub { font-size: 12px; color: #3b2a20; opacity: .85; }
.qc-right { display: grid; gap: 6px; justify-items: end; }
.qc-price { font-weight: 700; }

.badge {
  display: inline-block;
  padding: 6px 10px;
  font-weight: 700;
  border-radius: 8px;
  color: #111;
  font-size: 12px;
}
.badge--down { background: linear-gradient(90deg, #ff7a00, #ff3d00); color: #fff; }
.badge--up { background: linear-gradient(90deg, #b6ff77, #2ad44e); color: #0a381b; }

.tabbar {
  background: #0f0f0f;
  color: #cfcfcf;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
  padding: 10px 10px;
}
.tab {
  text-align: center;
  text-decoration: none;
  color: #bfbfbf;
  padding: 8px 0;
  border-radius: 10px;
  background: rgba(255,255,255,.04);
  font-size: 12px;
}
.tab.active { background: rgba(180,116,61,.25); color: #fff; }

/* Article list */
.media-hero { padding: 12px; }
.video-frame { position: relative; width: 100%; border-radius: 12px; overflow: hidden; background: #222; }
.video-frame::before { content: ""; display: block; padding-top: 56.25%; }
.video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; }

.article-list { list-style: none; margin: 8px 12px 80px; padding: 0; display: grid; gap: 10px; }
.article-item {
  width: 100%;
  text-align: left;
  border: 0;
  padding: 14px 14px;
  border-radius: 10px;
  background: #5a5a5a;
  color: #fff;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
}
.article-item:hover { filter: brightness(1.05); }
.chev { opacity: .9; }

/* Assets page */
.assets-wrap { padding: 12px; color: #f0f0f0; }
.account-lines { color: #d1d1d1; font-size: 13px; display: grid; gap: 4px; margin: 6px 4px 12px; }
.asset-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  background: rgba(255,255,255,.06);
  border-radius: 12px;
  padding: 8px;
}
.stat { background: linear-gradient(180deg,#b4743d,#d1b39c); color: #1b110c; border-radius: 10px; padding: 10px; text-align: center; }
.stat-value { font-weight: 800; }
.stat-label { font-size: 12px; opacity: .85; }

.action-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 14px 4px; }
.btn-tonal { background: #b4743d; color: #fff; padding: 10px 12px; border-radius: 10px; border: 0; font-weight: 600; }
.btn-outline { background: #f4f0ed; color: #1b110c; padding: 10px 12px; border-radius: 10px; border: 0; font-weight: 700; }
.btn-tonal:hover { filter: brightness(.95); }
.btn-outline:hover { filter: brightness(.98); }

.menu-list { list-style: none;  padding: 0; display: grid; gap: 10px; }
.menu-item { width: 100%; border: 0; background: rgba(255,255,255,.08); color: #eaeaea; text-align: left; padding: 12px 14px; border-radius: 10px; display: grid; grid-auto-flow: column; grid-auto-columns: max-content 1fr; gap: 10px; align-items: center; }
.menu-item:hover { background: rgba(255,255,255,.1); }
.mi-ico { font-size: 16px; }

.logout-btn { width: 100%; border: 0; border-radius: 12px; padding: 12px; color: #fff; background: linear-gradient(180deg,#b4743d,#d1b39c); font-weight: 700; }
.logout-btn:hover { filter: brightness(.98); }

/* Recharge page */
.recharge-page { padding: 12px; }
.back-link { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); text-decoration: none; color: #fff; font-size: 22px; }
.recharge-bank { border: 0; background: linear-gradient(180deg,#b4743d,#e9d9cc); color: #1b110c; font-weight: 700; padding: 10px 14px; border-radius: 10px; }
.card { margin-top: 12px; background: #5a5a5a; color: #fff; border-radius: 12px; padding: 14px; }
.card-dark { background: #5a5a5a; }
.card-title { font-weight: 700; margin-bottom: 10px; }
.chip-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 14px 0; }
.chip { border: 0; border-radius: 10px; padding: 12px 10px; background: linear-gradient(180deg,#b4743d,#e9d9cc); color: #1b110c; font-weight: 700; box-shadow: 0 2px 0 rgba(0,0,0,.25); }
.chip.active, .chip:hover { filter: brightness(.95); }
.cta.wide { width: 100%; }

/* Withdrawal */
.withdrawal-wrap { padding: 12px; }
.row-between { display: flex; justify-content: space-between; align-items: center; }
.label-strong { font-weight: 700; }
.muted { color: #e6e6e6; opacity: .9; }
.tiny { font-size: 12px; }
.mb-4 { margin-bottom: 4px; }
.mb-6 { margin-bottom: 6px; }
.mb-8 { margin-bottom: 8px; }
.mb-12 { margin-bottom: 12px; }
.mt-6 { margin-top: 6px; }
.mt-16 { margin-top: 16px; }
.input-row--inline { grid-template-columns: 1fr auto; }
.btn.ghost { background: #f4f0ed; color: #1b110c; border-radius: 10px; border: 0; padding: 0 12px; font-weight: 700; height: 46px; }
.kv-row { display: grid; grid-template-columns: 1fr auto; padding: 6px 0; }
.kv-row .k { color: #e6e6e6; opacity: .9; }
.rules-card { background: #6a6a6a; color: #fff; }
.rules-title { text-align: center; color: #ff6b6b; font-weight: 800; margin-bottom: 10px; }

/* Withdrawal records */
.withdrawal-records-wrap { padding: 12px; }
.rules-list { margin: 0; padding-left: 18px; }
.rules-list .note { color: #ff6b6b; font-weight: 700; }
.section-title { color: #fff; margin: 14px 2px 8px; }
.table { display: grid; gap: 8px; }
/* removed horizontal table scroll helpers */
.table-head { display: grid; grid-template-columns: 1.2fr .6fr .8fr; gap: 8px; padding: 8px 10px; border-radius: 10px; background: linear-gradient(180deg,#b4743d,#e9d9cc); color: #1b110c; font-weight: 800; }
.tr { display: grid; grid-template-columns: 1.2fr .6fr .8fr; gap: 8px; background: rgba(255,255,255,.08); color: #f0f0f0; padding: 10px; border-radius: 10px; }
.td { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pill { display: inline-block; padding: 4px 8px; border-radius: 999px; font-weight: 700; font-size: 12px; }
.pill--red { background: rgba(255,84,84,.2); color: #ff6b6b; }
.pill--green { background: rgba(56,210,128,.2); color: #2ed573; }

/* Home */
.home-wrap { padding: 12px; }
.hero-carousel { position: relative; border-radius: 12px; overflow: hidden; }
.hero-carousel img { width: 100%; display: block; height: 160px; object-fit: cover; }
.dots { position: absolute; bottom: 8px; left: 0; right: 0; display: grid; grid-auto-flow: column; gap: 6px; justify-content: center; }
.dot { width: 22px; height: 4px; border-radius: 2px; background: rgba(255,255,255,.4); }
.dot.active { background: #ffcf99; }
.quick-actions { margin: 12px 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
.qa { background: rgba(255,255,255,.08); color: #fff; border: 0; border-radius: 10px; padding: 10px 6px; display: grid; gap: 6px; justify-items: center; }
.qa-ico { font-size: 18px; }
.ticker { display: grid; grid-template-columns: auto 1fr; gap: 8px; background: #f4f0ed; color: #1b110c; border-radius: 10px; padding: 8px 10px; align-items: center; }
.speaker { font-size: 16px; }
.scroll { overflow: hidden; white-space: nowrap; }
.scroll span { display: inline-block; animation: marquee 10s linear infinite; }
@keyframes marquee { 0% { transform: translateX(0); } 100% { transform: translateX(-100%); } }
.featured-cards { margin: 12px 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.feat { border-radius: 12px; padding: 10px; background: linear-gradient(180deg, #b4743d 0%, #e9d9cc 100%); color: #1b110c; }
.feat-top { display: flex; justify-content: space-between; font-weight: 700; }
.feat-price { margin-top: 10px; font-weight: 800; }
.mt-12 { margin-top: 12px; }

/* Account records */
.record-list { list-style: none; margin: 12px; padding: 0 0 80px; display: grid; gap: 12px; }
.record-card { background: #5a5a5a; color: #fff; border-radius: 12px; padding: 12px; box-shadow: 0 2px 0 rgba(0,0,0,.25); cursor: pointer; }
.row { display: grid; grid-template-columns: 1fr auto; padding: 6px 2px; align-items: center; }
.muted { color: #d1d1d1; opacity: .9; font-size: 13px; }
.amt { font-weight: 800; }
.amt-down { color: #ff6b6b; }
.amt-up { color: #ffd166; }

.screen {
  width: 100%;
  max-width: 480px;
  background: var(--surface);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,.35);
}

/* Full-screen variant for pages like login */
.screen--full {
  position: fixed;
  inset: 0;
  max-width: none;
  width: 100%;
  height: 100dvh;
  border-radius: 0;
  box-shadow: none;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* Full-screen variant for app-shell pages */
.app--full {
  max-width: none;
  width: 100%;
  min-height: 100dvh;
  border-radius: 0;
  box-shadow: none;
  display: grid;
  grid-template-rows: auto 1fr auto;
  overflow-y: auto;
}

.hero {
  min-height: clamp(360px, 55vh, 520px);
  background: linear-gradient(180deg, #b4743d 0%, #4b2d18 100%);
  color: #fff;
  position: relative;
}

.hero-slim { min-height: clamp(280px, 29vh, 420px); }

.hero-inner {
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 24px;
}

.kicker {
  margin: 0 0 24px 0;
  font-weight: 600;
  text-align: center;
  opacity: .9;
}

.title {
  margin: 0 0 12px 0;
  font-size: clamp(24px, 6.2vw, 40px);
  line-height: 1.25;
  font-weight: 800;
}

.subtitle {
  margin: 0;
  color: #eaeaea;
  opacity: .9;
  font-size: clamp(12px, 3.2vw, 15px);
  line-height: 1.45;
}

.content {
  padding: 24px clamp(16px, 6vw, 32px) 36px;
}

.cta {
  width: 100%;
  border: 0;
  border-radius: 10px;
  height: clamp(44px, 6.2vh, 56px);
  background: var(--brand-500);
  color: #fff;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: none;
  cursor: pointer;
  transition: transform .08s ease, box-shadow .2s ease, background .2s ease;
}

.cta .icon { display: inline-flex; }

.cta:hover {
  background: #a56532;
}

.cta:active {
  transform: translateY(1px);
  box-shadow: none;
}

.footnote {
  margin: 22px 0 0;
  text-align: center;
  color: var(--ink-700);
  font-size: clamp(12px, 2.8vw, 14px);
}

.link {
  color: var(--brand-500);
  text-decoration: none;
  font-weight: 600;
}

.link:hover { text-decoration: underline; }
.link.small { font-weight: 500; font-size: 14px; }

/* Form */
.form { display: grid; gap: 16px; margin-top: 6px; }
.field { display: grid; gap: 8px; }
.label {
  font-size: 11px;
  color: var(--ink-700);
  font-weight: 600;
}
.input, .input-wrap {
  width: 100%;
  height: 46px;
  border: 1px solid #e6e6e6;
  border-radius: 10px;
  background: #fff;
  color: var(--ink-900);
}
.input { padding: 0 14px; font-size: 16px; }
.input:focus { outline: none; border-color: #d9d9d9; box-shadow: 0 0 0 3px rgba(180,116,61,.12); }
.input::placeholder { color: #b3b3b3; }

.input-wrap { display: grid; grid-template-columns: 1fr auto; align-items: center; }
.input-wrap .input { height: 100%; border: none; box-shadow: none; }
.icon-btn {
  width: 40px;
  height: 40px;
  margin-right: 4px;
  border: 0;
  background: transparent;
  color: #6b6b6b;
  display: inline-grid;
  place-items: center;
  border-radius: 8px;
  cursor: pointer;
}
.icon-btn:hover { background: #f5f5f5; color: #333; }

.row-between { display: flex; align-items: center; justify-content: space-between; }

/* Inline input with action button (Send OTP) */
.input-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: var(--brand-500);
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  border-radius: 10px;
  transition: background .2s ease;
}
.btn:hover { background: #a56532; }
.btn-compact { height: 42px; padding: 0 14px; }

/* Responsive breakpoints */
@media (min-width: 480px) {
  .screen { max-width: 520px; border-radius: 16px; }
  .app { max-width: 520px; border-radius: 16px; }
}

@media (min-width: 768px) {
  body { padding: 32px; }
  .screen { max-width: 720px; border-radius: 18px; }
  .app { max-width: 720px; border-radius: 18px; }
  .hero-inner { left: 40px; right: 40px; bottom: 32px; }
  .subtitle { max-width: 560px; }
}

@media (min-width: 1024px) {
  .screen { max-width: 960px; border-radius: 20px; }
  .app { max-width: 960px; border-radius: 20px; }
  .title { font-size: clamp(28px, 3.2vw, 48px); }
  .subtitle { font-size: clamp(14px, 1.4vw, 18px); }
}

/* Make app/screen full-bleed on common smartphones */
@media (max-width: 480px) {
  .screen, .app {
    max-width: none;
    width: 100%;
    min-height: 100vh;
    border-radius: 0;
    box-shadow: none;
  }
}

/* Respect safe-area insets (iOS notches) */
@supports (padding: max(0px)) {
  body { padding: max(16px, env(safe-area-inset-left)); }
  .content { padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right)); }
}

/* Small-phone responsiveness */
@media (max-width: 360px) {
  body { padding: 10px; }
  .screen, .app { border-radius: 10px; }
  .hero { min-height: clamp(300px, 50vh, 420px); }
  .hero-inner { left: 16px; right: 16px; bottom: 16px; }
  .content { padding: 18px 14px 24px; }
  .title { font-size: clamp(22px, 7vw, 28px); }
  .cta { height: 44px; }
  .quotes-list { margin: 10px; gap: 10px; }
  .table-head, .tr { grid-template-columns: 1fr .6fr .8fr; }
}


