/* =====================================================================
   AqarInvest — Real Estate Fintech
   Professional dark fintech theme · RTL/LTR aware
===================================================================== */

:root,
html[data-theme="dark"] {
  --bg: #0b1220;
  --bg-2: #0f1a2e;
  --bg-3: #13233c;
  --card: #101b30;
  --card-2: #16233b;
  --border: #1e2f4d;
  --border-soft: #16263f;

  --text: #e8eefb;
  --text-dim: #93a4c3;
  --text-faint: #5c6c91;

  --primary: #2f7dff;
  --primary-2: #00d4ff;
  --primary-grad: linear-gradient(135deg, #2f7dff 0%, #00d4ff 100%);
  --secondary: #8b5cf6;
  --gold: #f59e0b;
  --green: #10b981;
  --red: #ef4444;

  --radius: 18px;
  --radius-sm: 10px;
  --radius-lg: 24px;
  --shadow: 0 20px 50px -20px rgba(0, 0, 0, 0.55);
  --shadow-blue: 0 10px 40px -10px rgba(47, 125, 255, 0.35);

  --font-ar: 'Cairo', 'Inter', sans-serif;
  --font-en: 'Inter', 'Cairo', sans-serif;

  --nav-h: 80px;

  --header-bg: rgba(11,18,32,.55);
  --header-border: rgba(22,38,63,.45);
  --nav-hover: rgba(255,255,255,.05);
  --btn-ghost-bg: rgba(255,255,255,.05);
  --section-dark-bg: rgba(7,12,24,.5);
  --footer-bg: #070d1a;
  --field-band: rgba(255,255,255,.03);
  --code-bg: var(--bg-3);
  --card-soft: #16233b;
  --table-stripe: rgba(255,255,255,.02);
}

/* ============ Light theme ============ */
html[data-theme="light"] {
  --bg: #eef3fb;
  --bg-2: #ffffff;
  --bg-3: #eef2f9;
  --card: #ffffff;
  --card-2: #f5f9ff;
  --border: #d6e1f0;
  --border-soft: #e3ebf6;

  --text: #0f1b33;
  --text-dim: #44577a;
  --text-faint: #7c8fae;

  --primary: #2563eb;
  --primary-2: #0877e6;
  --secondary: #7c3aed;
  --gold: #d9840a;
  --green: #0a9d6f;
  --red: #e04343;

  --shadow: 0 20px 50px -22px rgba(28, 52, 99, 0.22);
  --shadow-blue: 0 10px 40px -12px rgba(47, 125, 255, 0.3);

  --header-bg: rgba(255,255,255,.88);
  --header-border: #e3ebf6;
  --nav-hover: rgba(15,27,51,.05);
  --btn-ghost-bg: rgba(15,27,51,.04);
  --section-dark-bg: #e6edf8;
  --footer-bg: #e4ebf6;
  --field-band: rgba(15,27,51,.03);
  --code-bg: #f1f5fb;
  --card-soft: #f2f7ff;
  --table-stripe: rgba(47,125,255,.03);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  background-image:
    radial-gradient(1100px 500px at 90% -10%, rgba(47,125,255,.14), transparent 60%),
    radial-gradient(900px 400px at -10% 20%, rgba(139,92,246,.1), transparent 55%),
    radial-gradient(700px 500px at 50% 110%, rgba(0,212,255,.08), transparent 60%);
  color: var(--text);
  font-family: var(--font-ar);
  line-height: 1.6;
  min-height: 100vh;
  min-height: 100dvh;
}
html[data-theme="light"] body {
  background-image:
    radial-gradient(1100px 500px at 90% -10%, rgba(47,125,255,.08), transparent 60%),
    radial-gradient(900px 400px at -10% 20%, rgba(139,92,246,.06), transparent 55%),
    radial-gradient(700px 500px at 50% 110%, rgba(0,212,255,.06), transparent 60%);
}
::selection { background: rgba(47,125,255,.3); color: inherit; }
html[data-theme="light"] ::selection { background: rgba(47,125,255,.22); }

body.ltr { font-family: var(--font-en); }

.container { width: min(1180px, 92%); margin-inline: auto; }

a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
button { font-family: inherit; cursor: pointer; }

/* ============ Typography helpers ============ */
.up { color: var(--green); }
.down { color: var(--red); }
.neutral { color: var(--text-dim); }
.gradient-text {
  background: var(--primary-grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
.eyebrow {
  display: inline-block;
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .5px;
  padding: 6px 14px;
  border-radius: 100px;
  background: rgba(47,125,255,.12);
  color: var(--primary-2);
  border: 1px solid rgba(47,125,255,.25);
  margin-bottom: 14px;
}

/* ============ Buttons ============ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: var(--radius-sm);
  padding: 11px 22px;
  font-size: .95rem;
  font-weight: 700;
  transition: transform .15s ease, box-shadow .2s ease, background .2s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--primary-grad);
  color: #fff;
  box-shadow: var(--shadow-blue);
}
.btn-primary:hover { box-shadow: 0 14px 44px -8px rgba(47,125,255,.55); }

.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1.5px solid var(--border);
}
.btn-outline:hover { border-color: var(--primary); color: var(--primary-2); }

.btn-wd {
  background: #1e3a8a;
  color: #fff;
  border: 1px solid #3b5bbf;
  box-shadow: 0 10px 28px -12px rgba(30, 58, 138, .7);
}
.btn-wd:hover { background: #2647a5; color: #fff; box-shadow: 0 14px 36px -10px rgba(30, 58, 138, .8); }
html[data-theme="light"] .btn-wd { background: #17307a; border-color: #3b5bbf; }
html[data-theme="light"] .btn-wd:hover { background: #1e3d92; color: #fff; }

.btn-ghost {
  background: var(--btn-ghost-bg);
  color: var(--text-dim);
}
.btn-ghost:hover { color: var(--text); background: rgba(255,255,255,.1); }

.btn-lg { padding: 14px 30px; font-size: 1.02rem; border-radius: 14px; }
.btn-xl { padding: 17px 42px; font-size: 1.05rem; border-radius: 14px; }
.btn-sm { padding: 7px 16px; font-size: .84rem; border-radius: 9px; }
.btn-block { width: 100%; }

/* ============ Header / Nav ============ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--header-bg);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--header-border);
}
.nav-wrap {
  height: var(--nav-h);
  display: flex;
  align-items: center;
  gap: 24px;
}
.brand { display: flex; align-items: center; gap: 10px; margin-inline-end: 16px; min-width: 0; }
.brand-logo {
  height: 52px;
  width: 52px;
  object-fit: contain;
  object-position: center;
  flex-shrink: 0;
  display: block;
}
.brand-logo-lg { height: 96px; width: 96px; margin: 0 auto; }
.brand-auth-title { margin-top: 10px; font-size: 1.1rem; display: block; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong { font-size: 1.02rem; letter-spacing: .2px; white-space: nowrap; }
.brand-text small { font-size: .68rem; color: var(--text-dim); }

.nav-links {
  display: flex;
  gap: 4px;
  flex: 1;
  margin-inline: 6px;
}

  .nav-links a {
  position: relative;
  padding: 8px 13px;
  border-radius: 9px;
  font-size: .9rem;
  font-weight: 600;
  color: var(--text-dim);
  white-space: nowrap;
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color .15s, background .15s;
}
.nav-links a:hover { color: var(--text); background: var(--nav-hover); }
.nav-links a.active { color: var(--primary-2); background: transparent; }
.nav-links a.active::after {
  content: "";
  position: absolute;
  inset-inline: 13px;
  bottom: 3px;
  height: 2px;
  border-radius: 2px;
  background: var(--primary);
}

.nav-actions { display: flex; align-items: center; gap: 10px; margin-inline-start: auto; }
.nav-actions .btn-sm { height: 38px; padding: 0 16px; border-radius: 11px; }
.nav-login-ico { display: none; }
.nav-login-ico svg { width: 18px; height: 18px; vertical-align: middle; display: block; }

/* Dashboard dropdown in the top nav */
.nav-dd { position: relative; }
.nav-dd > a {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 13px;
  border-radius: 9px;
  font-size: .9rem;
  font-weight: 600;
  color: var(--text-dim);
  transition: color .15s, background .15s;
  text-decoration: none;
}
.nav-dd > a:hover { color: var(--text); background: var(--nav-hover); }
.nav-dd > a.active { color: var(--primary-2); background: transparent; }
.nav-dd > a.active::after {
  content: "";
  position: absolute;
  inset-inline: 13px;
  bottom: 3px;
  height: 2px;
  border-radius: 2px;
  background: var(--primary);
}
.nav-dd-caret { font-size: .68rem; opacity: .7; transition: transform .2s ease; }
.nav-dd.is-open .nav-dd-caret, .nav-dd:hover .nav-dd-caret { transform: rotate(180deg); }

.nav-dd-menu {
  position: absolute;
  top: calc(100% + 12px);
  inset-inline-start: 0;
  min-width: 230px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 22px 55px -20px rgba(0, 0, 0, .55);
  padding: 8px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity .18s ease, transform .18s ease, visibility .18s;
  z-index: 95;
}
.nav-dd:hover .nav-dd-menu,
.nav-dd.is-open .nav-dd-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.nav-dd-menu a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: .88rem;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  transition: background .15s, color .15s;
}
.nav-dd-menu a:hover { background: var(--nav-hover); color: var(--primary-2); }
.nav-dd-menu a.active { color: var(--primary-2); background: transparent; }

/* Drawer submenu (mobile) */
.drawer-dd-menu {
  max-height: 0;
  overflow: hidden;
  transition: max-height .25s ease;
}
.drawer-dd-menu.open { max-height: 320px; }
.drawer-dd-head { display: flex; align-items: stretch; }
.drawer-dd-head .drawer-link { flex: 1; border-end-end-radius: 0; border-end-start-radius: 0; }
.dd-toggle {
  display: grid;
  place-items: center;
  width: 48px;
  flex-shrink: 0;
  background: transparent;
  border: 0;
  border-radius: 12px;
  cursor: pointer;
  color: var(--text-dim);
  transition: background .15s;
  padding: 0;
}
.dd-toggle:hover, .dd-toggle:active { background: var(--nav-hover); color: var(--text); }
.dd-caret { font-size: .72rem; transition: transform .2s ease; }
.drawer-dd.open .dd-caret { transform: rotate(180deg); }
.drawer-dd-menu .drawer-dd-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  margin-inline-start: 14px;
  border-radius: 10px;
  font-size: .88rem;
  font-weight: 600;
  color: var(--text-dim);
  transition: background .15s, color .15s;
}
.drawer-dd-link:hover { background: var(--nav-hover); color: var(--text); }
.drawer-dd-link.active { background: rgba(47, 125, 255, .12); color: var(--primary-2); }
.drawer-ico.sm { width: 30px; height: 30px; font-size: .95rem; border-radius: 8px; }

/* Mobile side drawer */
.nav-drawer {
  display: none;
  position: fixed;
  top: 0;
  bottom: 0;
  inset-inline-start: 0;
  width: min(300px, 86vw);
  background: var(--bg-2);
  border-inline-end: 1px solid var(--border);
  z-index: 10002;
  flex-direction: column;
  transform: translateX(-102%);
  transition: transform .26s ease;
  box-shadow: 10px 0 40px rgba(0,0,0,.35);
}
html[data-theme="light"] .nav-drawer { box-shadow: 10px 0 40px rgba(30,50,90,.18); }
.nav-drawer.open { transform: translateX(0); }
.drawer-head {
  display: flex; align-items: center; gap: 10px;
  padding: 16px;
  border-bottom: 1px solid var(--border);
}
.drawer-head strong { font-size: 1.05rem; }
.drawer-close {
  margin-inline-start: auto;
  background: none; border: 0; color: var(--text-dim);
  font-size: 1.15rem; cursor: pointer; padding: 4px 8px;
}
.drawer-body { flex: 1; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 4px; }
.drawer-link {
  position: relative;
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; border-radius: 11px;
  color: var(--text-dim); font-weight: 600; font-size: .95rem;
  transition: background .15s, color .15s;
}
.drawer-link:hover { background: var(--nav-hover); color: var(--text); }
.drawer-link.active { color: var(--primary-2); background: rgba(47,125,255,.12); }
.drawer-link.active::after { content: ""; position: absolute; inset-inline: 14px; bottom: 3px; height: 2px; border-radius: 2px; background: var(--primary); }
.drawer-ico { font-size: 1.1rem; }
.drawer-foot { padding: 14px 16px; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 8px; }
.drawer-logout { color: #f87171; }
.nav-drawer-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(2,8,23,.5);
  z-index: 10001;
}
html[data-theme="light"] .nav-drawer-overlay { background: rgba(30,50,90,.28); }
.nav-drawer.open ~ .nav-drawer-overlay,
.nav-drawer-overlay.open { display: block; }

.lang-switch {
  display: flex; align-items: center; gap: 5px;
  direction: rtl;
  font-size: .78rem; font-weight: 700;
  padding: 4px 10px; border: 1px solid var(--border);
  border-radius: 100px; color: var(--text-faint);
}
.lang-switch a { color: var(--text-faint); }
.lang-switch a.active { color: var(--primary-2); }
.lang-switch span { opacity: .4; }

/* Theme toggle */
.theme-toggle {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  background: var(--btn-ghost-bg);
  border: 1px solid var(--border);
  border-radius: 11px;
  font-size: 1.05rem;
  color: var(--text-dim);
  transition: color .15s, border-color .15s, transform .15s;
}
.theme-toggle:hover { color: var(--gold); border-color: rgba(245,158,11,.4); transform: translateY(-1px); }
.theme-toggle svg { width: 18px; height: 18px; display: block; }
.theme-toggle .icon-dark { display: inline; }
.theme-toggle .icon-light { display: none; }
html[data-theme="light"] .theme-toggle .icon-dark { display: none; }
html[data-theme="light"] .theme-toggle .icon-light { display: inline; }

.nav-toggle {
  display: none;
  width: 40px; height: 40px;
  align-items: center; justify-content: center;
  background: var(--btn-ghost-bg);
  border: 1px solid var(--border);
  border-radius: 11px;
  color: var(--text);
  cursor: pointer;
}

/* Mobile top-bar: logo + arrow toggle (phone only) */
.m-brand-btn {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 0;
  border-radius: 12px;
  border: none;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  box-shadow: none !important;
  transition: opacity .2s ease;
}
.m-brand-btn:hover, .m-brand-btn:focus, .m-brand-btn:active {
  background: transparent;
  box-shadow: none !important;
  transform: none;
  opacity: .85;
}
.m-brand-logo {
  height: 44px;
  width: auto;
  max-width: 46px;
  object-fit: contain;
  display: block;
}
.m-brand-name { font-size: .92rem; font-weight: 800; color: var(--text); white-space: nowrap; }
.m-brand-arrow {
  font-size: .72rem;
  line-height: 1;
  color: var(--text-dim);
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  transition: transform .25s ease;
}
.m-brand-btn.open .m-brand-arrow { transform: rotate(180deg); }

/* ============ Flash ============ */
.flash {
  position: fixed;
  top: calc(var(--nav-h) + 12px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 200;
  padding: 12px 26px;
  border-radius: 12px;
  font-weight: 700;
  font-size: .9rem;
  box-shadow: var(--shadow);
  animation: slideDown .3s ease;
}
.flash-success { background: #0b2e22; color: #34d399; border: 1px solid #1f7a54; }
.flash-error { background: #35121a; color: #f87171; border: 1px solid #93203a; }
@keyframes slideDown { from { opacity: 0; transform: translate(-50%, -12px); } to { opacity: 1; } }

/* ============ Hero ============ */
.hero { padding: 34px 0 60px; position: relative; overflow: hidden; }
.hero-bg-chart {
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background:
    linear-gradient(to left, rgba(8,14,28,.96) 0%, rgba(9,16,32,.72) 34%, rgba(9,15,30,.30) 62%, rgba(6,11,24,.55) 100%),
    url('../img/trading-bg.jpg') center / cover no-repeat;
}
.hero-bg-chart::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(to bottom, transparent 55%, rgba(7,12,24,.8) 100%);
}
@media (max-width: 760px) {
  .hero-bg-chart {
    background:
      linear-gradient(to left, rgba(8,14,28,.94) 0%, rgba(9,16,32,.72) 40%, rgba(9,15,30,.30) 100%),
      url('../img/trading-bg.jpg') center / cover no-repeat;
  }
}
.hero .container { position: relative; z-index: 1; }
.hero .container {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 48px;
  align-items: center;
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 16px; border-radius: 100px;
  background: rgba(16,185,129,.12);
  border: 1px solid rgba(16,185,129,.3);
  color: #34d399; font-weight: 600; font-size: .86rem;
  margin-bottom: 22px;
}
.hero-title { font-size: clamp(2.1rem, 5vw, 3.5rem); font-weight: 800; line-height: 1.18; margin-bottom: 18px; color: #ffffff; }
  .hero-brand { color: #ffffff; }
  .hero-tagline { color: var(--primary); }
.hero-sub {
  color: var(--text-dim);
  font-size: 1.06rem;
  max-width: 540px;
  margin-bottom: 30px;
}
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 44px; }
.hero-stats { display: flex; gap: 42px; }
.hero-stats .stat { display: flex; flex-direction: column; }
.hero-stats .stat strong { font-size: 1.5rem; font-weight: 800; }
.hero-stats .stat span { color: var(--text-faint); font-size: .82rem; }

.hero-visual { position: relative; }
.hero-card {
  background: linear-gradient(160deg, var(--card-2), var(--card));
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 4px);
  box-shadow: var(--shadow);
  padding: 26px;
}
.hero-card-main { position: relative; z-index: 2; overflow: hidden; }
.hero-card-main::before {
  content: ''; position: absolute;
  width: 340px; height: 340px; border-radius: 50%;
  background: radial-gradient(circle, rgba(47,125,255,.18), transparent 70%);
  top: -120px; inset-inline-end: -90px; pointer-events: none;
}
.hero-card-main::after {
  content: ''; position: absolute;
  width: 260px; height: 260px; border-radius: 50%;
  background: radial-gradient(circle, rgba(0,212,255,.13), transparent 70%);
  bottom: -110px; inset-inline-start: -80px; pointer-events: none;
}
.hv-top { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; position: relative; }
.hv-brand {
  width: 36px; height: 36px; border-radius: 11px; flex: 0 0 auto;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: #fff; font-weight: 800; font-size: 1.05rem;
  box-shadow: 0 6px 16px rgba(47,125,255,.35);
}
.hv-title { color: var(--text-dim); font-size: .88rem; font-weight: 700; }
.badge-live {
  margin-inline-start: auto; display: inline-flex; align-items: center; gap: 6px;
  font-size: .68rem; padding: 4px 11px; border-radius: 100px;
  background: rgba(16,185,129,.14); color: #34d399; border: 1px solid rgba(16,185,129,.3);
}
.badge-live i {
  width: 7px; height: 7px; border-radius: 50%; background: #34d399;
  animation: livePulse 1.6s ease-in-out infinite;
}
@keyframes livePulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(52,211,153,.5); }
  50% { box-shadow: 0 0 0 5px rgba(52,211,153,0); }
}

.hv-ops { display: grid; grid-template-columns: 1fr; gap: 8px; }
.hop-row {
  display: flex; align-items: center; gap: 11px;
  padding: 10px 12px; border-radius: 14px;
  background: linear-gradient(180deg, rgba(255,255,255,.045), rgba(255,255,255,.015));
  border: 1px solid var(--border-soft);
  animation: rowIn .4s ease both;
}
@keyframes rowIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.hop-row.op-new { animation: opFlash .7s ease; }
@keyframes opFlash { 0% { background: rgba(16,185,129,.16); } 100% { background: transparent; } }
.hor-ava {
  width: 32px; height: 32px; border-radius: 50%; flex: 0 0 auto;
  display: grid; place-items: center;
  font-size: .8rem; font-weight: 800; color: #fff; text-transform: uppercase;
  background: radial-gradient(circle at 30% 28%, rgba(255,255,255,.28), transparent 55%), var(--avc, #2f7dff);
  box-shadow: 0 4px 10px rgba(2,8,28,.35);
}
.hor-mid { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.hor-name { font-size: .76rem; font-weight: 700; letter-spacing: .3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: start; }
.hor-time { font-size: .6rem; color: var(--text-faint); }
.hor-wd { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; flex-shrink: 0; }
.hor-amt { font-size: .82rem; font-weight: 800; direction: ltr; font-family: ui-monospace, 'SF Mono', Consolas, monospace; color: #fff; }
html[data-theme="light"] .hor-amt { color: #111; }
.hor-ok {
  font-size: .54rem; font-weight: 700; color: #34d399;
  background: rgba(16,185,129,.12); border: 1px solid rgba(16,185,129,.3);
  padding: 1px 7px; border-radius: 100px;
}
.hv-wd-verify {
  display: flex; align-items: center; gap: 6px; justify-content: center;
  margin-top: 12px; font-size: .68rem; color: #34d399;
  background: rgba(16,185,129,.07); border: 1px solid rgba(16,185,129,.2);
  padding: 8px 12px; border-radius: 100px; text-align: center;
}

/* ============ Sections ============ */
.section { padding: 84px 0; }
.section-dark { background: var(--section-dark-bg); border-block: 1px solid var(--border-soft); }
.section-head { text-align: center; max-width: 680px; margin: 0 auto 46px; }
.section-head h2 { font-size: clamp(1.5rem, 3.4vw, 2.2rem); font-weight: 800; margin-bottom: 10px; }
.section-head p { color: var(--text-dim); }
.section-head.small { text-align: start; max-width: none; margin-bottom: 20px; }
.section-head.small h3 { font-size: 1.2rem; }
.section-head.small p { font-size: .9rem; }

/* ============ Project cards ============ */
.project-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}
.project-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s;
}
.project-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); border-color: #2b4d7e; }
.proj-img {
  position: relative;
  height: 152px;
  overflow: hidden;
  background:
    linear-gradient(120deg, color-mix(in srgb, var(--proj-color) 32%, transparent), transparent 72%),
    var(--bg-3);
}
.proj-img img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.proj-img-shade {
  position: absolute; inset: auto 0 0 0; height: 48%;
  background: linear-gradient(to top, rgba(2,8,23,.7), transparent);
  pointer-events: none;
}
.card-head {
  height: 76px;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 20px;
  background:
    linear-gradient(120deg, color-mix(in srgb, var(--proj-color) 22%, transparent), transparent 70%),
    var(--bg-3);
  border-bottom: 1px solid var(--border-soft);
}
.proj-logo { font-size: 2.4rem; }
.proj-status {
  font-size: .68rem; font-weight: 700;
  padding: 5px 12px; border-radius: 100px;
}
.proj-status.open { background: rgba(16,185,129,.14); color: #34d399; border: 1px solid rgba(16,185,129,.3); }
.proj-status.closing { background: rgba(245,158,11,.14); color: #fbbf24; border: 1px solid rgba(245,158,11,.3); }
.card-body { padding: 20px; display: flex; flex-direction: column; gap: 13px; flex: 1; }
.card-body h3 { font-size: 1.06rem; }
.proj-loc { font-size: .8rem; color: var(--text-dim); }
.proj-desc { font-size: .82rem; color: var(--text-dim); min-height: 40px; }

.progress-row { margin-top: 2px; }
.progress-label {
  display: flex; justify-content: space-between; align-items: center;
  font-size: .78rem; color: var(--text-dim); margin-bottom: 7px;
}
.progress-pct { font-weight: 800; color: var(--primary-2); }
.progress-track { height: 9px; background: var(--bg-3); border-radius: 100px; overflow: hidden; }
.progress-bar {
  height: 100%; border-radius: 100px;
  background: var(--primary-grad);
  transition: width .6s cubic-bezier(.6,0,.2,1);
}
.progress-target { font-size: .72rem; color: var(--text-faint); }

.card-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  border-block: 1px solid var(--border-soft);
  padding-block: 12px;
  background: var(--bg-2);
  border-radius: var(--radius-sm);
}
.card-metrics .metric { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.card-metrics .metric span { font-size: .66rem; color: var(--text-faint); }
.card-metrics .metric strong { font-size: .84rem; }

/* ---- Project cards as links ---- */
a.project-card { text-decoration: none; color: inherit; }
.proj-min-chip, .pj-min-chip {
  font-size: .66rem; font-weight: 800; color: #fff; line-height: 1.4;
  background: rgba(2,8,23,.6); border: 1px solid rgba(255,255,255,.25);
  padding: 4px 10px; border-radius: 100px; backdrop-filter: blur(4px); white-space: nowrap;
}
.proj-min-chip { position: absolute; inset-inline-start: 12px; top: 12px; }
/* Buy area inside offer cards (offers.php) */
.offer-buy-area { display: grid; gap: 8px; margin-top: 14px; }
.offer-buy-area .btn-block { margin: 0; }
.offer-bal-check { display: grid; gap: 6px; text-align: center; }
.offer-bal-check span { font-size: .76rem; font-weight: 700; color: var(--danger, #e0525e); }

/* Clickable cards (image + title lead to project details like the homepage) */
a.proj-img { display: block; }
.card-body h3 a { color: inherit; text-decoration: none; }
.card-body h3 a:hover { color: var(--primary-2); }
.dash-inv-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.dash-head-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* ---- Project detail page ---- */
.proj-hero { position: relative; }
.proj-hero-bg { position: absolute; inset: 0; overflow: hidden; }
.proj-hero-bg img { width: 100%; height: 100%; object-fit: cover; }
.proj-hero-shade {
  position: absolute; inset: 0;
  background:
    linear-gradient(to top, var(--bg) 4%, color-mix(in srgb, var(--bg) 55%, transparent) 34%, color-mix(in srgb, var(--proj-color) 22%, transparent) 100%),
    color-mix(in srgb, rgba(2,8,23,.6), transparent);
}
.proj-hero-inner {
  position: relative; z-index: 1;
  padding-top: 120px; padding-bottom: 60px;
  display: flex; flex-direction: column; align-items: flex-start; gap: 14px;
}
.proj-back {
  font-size: .82rem; font-weight: 700; color: #fff; text-decoration: none;
  background: rgba(2,8,23,.5); border: 1px solid rgba(255,255,255,.3);
  padding: 7px 16px; border-radius: 100px; backdrop-filter: blur(4px);
}
.proj-back:hover { background: var(--primary); }
.proj-hero .proj-status { font-size: .74rem; font-weight: 800; padding: 6px 14px; border-radius: 100px; }
.proj-hero-inner h1 {
  font-size: clamp(1.8rem, 4.5vw, 3rem); line-height: 1.2;
  color: #fff; text-shadow: 0 2px 20px rgba(0,0,0,.4); margin: 0;
}
.proj-hero-loc { font-size: .95rem; color: rgba(255,255,255,.9); margin: 0; }
.proj-hero-chips { display: flex; gap: 10px; flex-wrap: wrap; }
.proj-hero-chip, .proj-hero .proj-min-chip {
  font-size: .72rem; font-weight: 800; color: #fff; line-height: 1.5;
  background: rgba(2,8,23,.55); border: 1px solid rgba(255,255,255,.3);
  padding: 6px 14px; border-radius: 100px; backdrop-filter: blur(4px);
}
.proj-hero-chip b { color: #6ee7b7; }
.proj-hero .proj-min-chip { position: static; }

.proj-grid {
  display: grid; grid-template-columns: 1.3fr .7fr; gap: 34px; align-items: start;
}
.proj-main { display: flex; flex-direction: column; gap: 26px; }
.proj-block {
  background: var(--card); border: 1px solid var(--border-soft);
  border-radius: var(--radius); padding: 26px;
}
.proj-block h2 { font-size: 1.12rem; margin-bottom: 14px; padding-bottom: 12px; border-bottom: 1px solid var(--border-soft); }
.proj-about-p { font-size: .92rem; line-height: 2; color: var(--text-dim); margin: 0; }
.proj-feats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; padding: 0; margin: 0; list-style: none; }
.proj-feats li {
  font-size: .84rem; color: var(--text-dim);
  background: var(--bg-3); border: 1px solid var(--border-soft);
  border-radius: 12px; padding: 12px 14px;
}
.proj-feats li::before { content: "✓ "; color: var(--primary-2); font-weight: 800; }
.proj-fund-row {
  display: flex; justify-content: space-between;
  font-size: .82rem; margin-bottom: 8px; color: var(--text-dim);
}

.proj-side { position: sticky; top: 24px; }
.proj-invest-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 26px;
  display: flex; flex-direction: column; gap: 14px;
  box-shadow: var(--shadow);
  border-top: 3px solid color-mix(in srgb, var(--proj-color) 80%, var(--primary));
}
.proj-invest-logo {
  width: 52px; height: 52px; display: grid; place-items: center;
  font-size: 1.5rem; border-radius: 14px;
  background: linear-gradient(140deg, color-mix(in srgb, var(--proj-color) 28%, var(--bg-3)), var(--bg-3));
  border: 1px solid color-mix(in srgb, var(--proj-color) 40%, var(--border));
}
.proj-invest-card h3 { font-size: 1.12rem; margin: 0; }
.proj-invest-loc { font-size: .78rem; color: var(--text-dim); margin: 0; }
.proj-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.pj-stat {
  display: flex; flex-direction: column; gap: 2px; align-items: center;
  text-align: center; padding: 12px 8px; border-radius: var(--radius-sm);
  background: var(--bg-2); border: 1px solid var(--border-soft);
}
.pj-stat span { font-size: .64rem; color: var(--text-faint); }
.pj-stat strong { font-size: .92rem; }
.proj-trust { display: grid; gap: 2px; padding: 0; margin: 2px 0 0; list-style: none; }
.proj-trust li { font-size: .76rem; color: var(--text-dim); }
.proj-trust li::before { content: "✓ "; color: #34d399; font-weight: 800; }
.proj-note { font-size: .7rem; color: var(--text-faint); margin: 0; }

/* ============ Market indicators ============ */

/* ---- Plans (by market) ---- */
.plan-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-bottom: 34px; }
.plan-card {
  position: relative;
  background: linear-gradient(160deg, color-mix(in srgb, var(--primary-2) 8%, var(--card)), var(--card));
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 28px 24px; display: flex; flex-direction: column; gap: 12px; align-items: flex-start;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s;
}
.plan-card:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
.plan-icon {
  display: flex; align-items: center; justify-content: center;
  width: 52px; height: 52px; border-radius: 14px;
  background: color-mix(in srgb, var(--primary-2) 12%, var(--bg-3));
  border: 1px solid color-mix(in srgb, var(--primary-2) 25%, var(--border-soft));
  flex-shrink: 0;
}
.plan-icon .pl-ic { width: 25px; height: 25px; color: var(--primary-2); }
html[data-theme="light"] .plan-icon .pl-ic { color: var(--primary); }
.plan-card h3 { font-size: 1.08rem; line-height: 1.4; }
.plan-loc {
  display: flex; align-items: flex-start; gap: 6px;
  min-height: 34px; margin: 0;
  font-size: .78rem; line-height: 1.5; color: var(--text-dim);
}
.plan-loc svg { width: .95rem; height: .95rem; flex-shrink: 0; margin-top: 2px; color: var(--text-faint); }
.plan-card .btn { min-height: 48px; margin-top: auto; flex-shrink: 0; }

.plan-price {
  display: flex; align-items: baseline; gap: 8px;
  background: var(--bg-3); border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm); padding: 12px 16px; margin-block: 2px; width: 100%;
}
.plan-price b { font-size: 1.9rem; font-weight: 900; color: var(--primary-2); direction: ltr; }
.plan-price span { font-size: .72rem; color: var(--text-faint); }
.plan-feat { display: grid; gap: 7px; padding: 0; margin: 0; list-style: none; }
.plan-feat li { font-size: .8rem; color: var(--text-dim); }
.plan-feat li::before { content: "✓ "; color: var(--primary-2); font-weight: 800; }
.center-cta { text-align: center; margin-top: 34px; }

/* ============ News portal ============ */
.news-portal { padding-top: 26px; }
.news-mast {
  border-radius: var(--radius-lg);
  padding: 20px 22px;
  background-image: url('../img/news-mast.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  aspect-ratio: 1086 / 301;
  max-width: 1180px;
  margin-inline: auto;
  position: relative; overflow: hidden;
}
.news-mast-in { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.news-logo { display: inline-flex; align-items: center; gap: 10px; color: var(--primary-2);
  background: rgba(8, 12, 22, .35); padding: 8px 14px; border-radius: 100px;
  backdrop-filter: blur(3px);
}
.news-wordmark { font-size: 1.5rem; font-weight: 800; letter-spacing: -.01em; }
.news-wordmark b { color: var(--primary-grad); }
.news-live {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: .72rem; font-weight: 800; color: #fff;
  background: var(--primary-grad); border-radius: 100px; padding: 5px 12px;
}
.news-live i { width: 7px; height: 7px; border-radius: 50%; background: #ffdf5e; animation: newsBlink 1.2s infinite; }
@keyframes newsBlink { 50% { opacity: .25; } }
.news-tagline { margin: 14px 0 10px; text-align: center; color: var(--text-dim); font-size: .92rem; }
.news-meta {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center;
  gap: 8px 18px; font-size: .76rem; color: var(--text-dim);
}
.news-upd b { color: var(--primary-2); font-weight: 700; }
.news-srcs { direction: ltr; }
.news-refresh { color: #e03c38; font-weight: 800; text-decoration: underline; }
.news-body .news-chips { margin: 0 0 26px; }
.news-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 16px 0 2px; }
.chip {
  font: inherit; font-size: .76rem; font-weight: 700; cursor: pointer;
  padding: 6px 16px; border-radius: 100px;
  color: var(--text-dim); background: var(--bg-3);
  border: 1px solid var(--border-soft); transition: all .15s ease;
}
.chip:hover { color: var(--text); border-color: var(--primary-3); }
.chip.active { color: #fff; background: var(--primary-grad); border-color: transparent; }
.news-notice {
  margin: 14px 0 0; padding: 10px 14px; border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--primary-2) 10%, var(--bg-3));
  border: 1px solid color-mix(in srgb, var(--primary-2) 22%, var(--border-soft));
  font-size: .78rem; color: var(--text-dim); text-align: center;
}
.news-body { padding: 26px 0 70px; }

.news-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.news-badge {
  font-size: .66rem; font-weight: 800; letter-spacing: .02em;
  color: #fff; background: var(--primary-grad);
  padding: 3px 10px; border-radius: 100px;
}
.news-badge--crypto { background: linear-gradient(135deg, #7a4a12, #c97410); }
.news-badge--property { background: linear-gradient(135deg, #0e5c42, #1f9d63); }
.news-badge--general { background: linear-gradient(135deg, #1f3d7a, #3b6fd0); }
.news-time { font-size: .72rem; color: var(--text-faint); }
.news-open { display: inline-flex; align-items: center; gap: 6px; font-size: .8rem; font-weight: 800; color: var(--primary-2); }

.news-lead {
  display: grid; grid-template-columns: 1.05fr 1fr; gap: 0;
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-lg);
  overflow: hidden; margin-bottom: 26px;
  transition: box-shadow .2s, border-color .2s;
}
.news-lead:hover { box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--primary-2) 40%, var(--border)); }
.news-lead-cover { display: block; background-color: var(--bg-3); background-position: center; background-size: cover; min-height: 340px; }
.news-lead-body { padding: 28px 30px; display: flex; flex-direction: column; }
.news-lead .news-badge { align-self: flex-start; font-size: .72rem; padding: 4px 12px; margin-bottom: 12px; }
.news-lead-title { font-size: 1.5rem; font-weight: 900; line-height: 1.45; margin: 0 0 12px; }
.news-lead-snip { font-size: .9rem; line-height: 1.75; color: var(--text-dim); margin: 0 0 18px; flex-grow: 1; }
.news-lead:hover .news-lead-title { color: var(--primary-2); }

.news-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-bottom: 22px; }
.news-card {
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  transition: transform .18s ease, box-shadow .2s ease, border-color .2s;
}
.news-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--primary-2) 40%, var(--border)); }
.news-cover { display: block; background-color: var(--bg-3); background-position: center; background-size: cover; aspect-ratio: 4 / 3; }
.news-cover--grad { background: linear-gradient(140deg, var(--primary), var(--primary-2)) !important; position: relative; }
.news-cover--grad::after {
  content: "📊"; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-size: 2rem; opacity: .5;
}
.news-cover--mini { aspect-ratio: auto; width: 118px; min-width: 118px; height: 78px; }
.news-cover--mini::after { font-size: 1.1rem; }
.news-card-body { padding: 18px 20px 20px; display: flex; flex-direction: column; flex-grow: 1; }
.news-head { font-size: 1.06rem; font-weight: 800; line-height: 1.55; margin: 0 0 8px; }
.news-head a { color: inherit; }
.news-card:hover .news-head a { color: var(--primary-2); }
.news-snip { font-size: .85rem; line-height: 1.7; color: var(--text-dim); margin: 0; }

.news-more-btn {
  display: block; margin: 6px auto 0; cursor: pointer; font: inherit; font-weight: 800;
  color: #fff; background: var(--primary-grad);
  padding: 12px 34px; border: none; border-radius: 100px;
  box-shadow: var(--shadow);
}
.news-more-btn:hover { filter: brightness(1.08); }
.news-more { display: grid; gap: 12px; margin-top: 20px; }
.news-more[hidden] { display: none !important; }
.news-row {
  display: flex; gap: 14px; align-items: center;
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 12px; transition: border-color .2s, box-shadow .2s;
}
.news-row:hover { border-color: color-mix(in srgb, var(--primary-2) 40%, var(--border)); box-shadow: var(--shadow); }
.news-row-body { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.news-row-title { font-size: .92rem; font-weight: 700; line-height: 1.5; margin: 0 0 8px; }
.news-row-title a { color: inherit; }
.news-row:hover .news-row-title a { color: var(--primary-2); }

.news-empty {
  padding: 60px 20px; text-align: center; border-radius: var(--radius);
  background: var(--card); border: 1px dashed var(--border);
  color: var(--text-dim); font-size: 1rem;
}
.news-credit { text-align: center; font-size: .75rem; color: var(--text-faint); margin-top: 18px; }

@media (max-width: 900px) {
  .news-lead { grid-template-columns: 1fr; }
  .news-lead-cover { min-height: 250px; }
  .news-grid { grid-template-columns: repeat(2, 1fr); }
  .news-lead-title { font-size: 1.25rem; }
  .news-lead-body { padding: 22px; }
}
@media (max-width: 560px) {
  .news-grid { grid-template-columns: 1fr; }
  .news-mast { padding: 20px 16px; }
  .news-wordmark { font-size: 1.25rem; }
}

.news-lead-title a { color: inherit; }

/* ============ Article reader ============ */
.article-view { padding: 34px 0 80px; }
.container-narrow { max-width: 780px; }
.article-back { display: inline-block; margin-bottom: 18px; font-size: .85rem; font-weight: 700; color: var(--primary-2); }
.article-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 30px 34px;
}
.article-attrib {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap; padding-bottom: 16px;
  border-bottom: 1px solid var(--border-soft); margin-bottom: 20px;
}
.article-title { font-size: 1.6rem; font-weight: 900; line-height: 1.5; margin: 0 0 18px; }
.article-img { width: 100%; border-radius: var(--radius); margin-bottom: 20px; background: var(--bg-3); }
.article-img--ph { display: block; aspect-ratio: 16/8; background-size: cover; background-position: center; }
.article-body p { font-size: 1rem; line-height: 1.95; color: var(--text); margin: 0 0 16px; }
.article-fail { text-align: center; padding: 30px 10px; color: var(--text-dim); }
.article-fail p { margin-bottom: 16px; }
.article-fail-retry {
  display: inline-block; padding: 9px 22px; border-radius: 10px;
  font-size: .82rem; font-weight: 600; color: #fff;
  background: var(--primary-2);
}
.article-fail-retry:active { transform: scale(.96); }
.article-preview-note {
  margin-bottom: 18px; padding: 12px 16px; font-size: .78rem;
  color: var(--text-dim); background: color-mix(in srgb, var(--primary-2) 8%, var(--bg-3));
  border: 1px solid color-mix(in srgb, var(--primary-2) 20%, var(--border-soft));
  border-radius: var(--radius-sm); line-height: 1.7;
}
.related-sec { margin-top: 34px; }
.related-title { font-size: 1.15rem; font-weight: 900; margin: 0 0 16px; color: var(--text); }
.related-title::after { content: ""; display: block; width: 42px; height: 3px; margin-top: 8px; border-radius: 3px; background: var(--primary-grad); }
.related-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.related-card {
  display: flex; gap: 14px; align-items: stretch; overflow: hidden;
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  transition: transform .18s ease, border-color .2s, box-shadow .2s;
}
.related-card:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--primary-2) 40%, var(--border)); box-shadow: var(--shadow); }
.related-thumb { width: 110px; min-width: 110px; background-color: var(--bg-3); background-position: center; background-size: cover; }
.related-thumb--grad { background: linear-gradient(140deg, var(--primary), var(--primary-2)); position: relative; }
.related-thumb--grad::after { content: "📊"; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 1.3rem; opacity: .5; }
.related-info { flex: 1; min-width: 0; padding: 12px 14px 12px 0; display: flex; flex-direction: column; justify-content: center; }
.related-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.related-headline { font-size: .86rem; font-weight: 800; line-height: 1.55; color: var(--text); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.related-card:hover .related-headline { color: var(--primary-2); }
@media (max-width: 640px) {
  .related-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .article-card { padding: 20px 18px; }
  .article-title { font-size: 1.3rem; }
}

/* ============ Offers page ============ */
.offers-page.section { padding: 22px 0 70px; }
.offers-page .section-head { margin-bottom: 24px; }

/* ============ How it works (steps) ============ */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  align-items: stretch;
}
.step-card {
  position: relative;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 20px 22px;
  overflow: hidden;
  transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}
.step-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--primary-2));
  opacity: .55;
}
.step-card:hover {
  transform: translateY(-4px);
  border-color: rgba(47,125,255,.45);
  box-shadow: 0 18px 40px rgba(2,8,28,.45);
}
.step-num {
  position: absolute;
  top: 14px;
  inset-inline-end: 16px;
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1;
  color: var(--text-faint);
  opacity: .55;
  direction: ltr;
}
.step-ic {
  display: grid; place-items: center;
  width: 52px; height: 52px;
  margin-bottom: 16px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(47,125,255,.18), rgba(0,212,255,.14));
  border: 1px solid rgba(47,125,255,.3);
  color: var(--primary-2);
}
.step-ic svg { width: 26px; height: 26px; }
.step-card h3 {
  margin: 0 0 8px;
  font-size: 1.05rem;
  color: var(--text);
}
.step-card p {
  margin: 0;
  font-size: .84rem;
  line-height: 1.7;
  color: var(--text-dim);
}
@media (max-width: 1000px) {
  .steps-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .steps-grid { grid-template-columns: 1fr; }
  .step-num { top: 16px; inset-inline-end: 18px; }
}

.center-cta { text-align: center; margin-top: 34px; }

.pay-trust { text-align: center; margin: 40px 0 54px; }
.pay-badges {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center;
  column-gap: 26px; row-gap: 16px; margin-top: 8px;
}
.pay-badge { display: inline-flex; align-items: center; line-height: 0; }
.pay-badge img { width: auto; height: 40px; display: block; }
.pv-visa img { height: 38px; filter: brightness(0) invert(1); }
.pv-mc img { height: 40px; }
.pv-pp img { height: 40px; filter: brightness(0) invert(1); }
.pv-btc img { height: 54px; }
.pv-usdt img { height: 54px; }
html[data-theme="light"] .pv-visa img { filter: none; }
html[data-theme="light"] .pv-pp img { filter: none; }

/* ============ CTA section ============ */
.cta-section {
  background: var(--primary-grad);
  padding: 80px 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta-section::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(600px 300px at 50% -20%, rgba(255,255,255,.25), transparent 70%);
}
.cta-section h2 { font-size: clamp(1.6rem, 4vw, 2.5rem); font-weight: 800; color: #fff; position: relative; }
.cta-section p { color: rgba(255,255,255,.85); max-width: 560px; margin: 14px auto 30px; position: relative; }
.cta-section .btn { background: #fff; color: var(--primary); position: relative; }
.cta-section .btn:hover { box-shadow: 0 16px 40px -10px rgba(0,0,0,.35); }

/* ============ Footer ============ */
.site-footer { background: var(--footer-bg); border-top: 1px solid var(--border-soft); padding-top: 56px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 34px; padding-bottom: 40px; }
.footer-col h4 { font-size: .9rem; margin-bottom: 16px; color: var(--text); }
.footer-col a { display: block; color: var(--text-dim); font-size: .86rem; margin-bottom: 10px; transition: color .15s; }
.footer-col a:hover { color: var(--primary-2); }
.footer-col p { color: var(--text-dim); font-size: .86rem; margin-block: 14px; }
.footer-social { display: flex; gap: 10px; margin-top: 16px; }
.footer-social span {
  width: 36px; height: 36px; display: grid; place-items: center;
  border-radius: 10px; font-weight: 800; font-size: .8rem;
  background: var(--bg-3); border: 1px solid var(--border);
  color: var(--text-dim);
}
.footer-bottom { border-top: 1px solid var(--border-soft); padding: 20px 0; }
.footer-bottom-inner {
  display: flex; justify-content: space-between; align-items: center;
  font-size: .78rem; color: var(--text-faint);
}
.lang-switch-dark { display: inline-flex; gap: 6px; align-items: center; }
.lang-switch-dark a { color: var(--text-dim); }

/* ============ Auth pages ============ */
.auth-page { min-height: calc(100vh - var(--nav-h)); display: grid; place-items: center; padding: 60px 0; }
.auth-wrap { max-width: 480px; width: 100%; }
.auth-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 22px; padding: 40px 34px; box-shadow: var(--shadow);
}
.auth-head { text-align: center; margin-bottom: 26px; }
.auth-head h1 { font-size: 1.6rem; margin-bottom: 6px; }
.auth-head p { color: var(--text-dim); font-size: .9rem; }
.auth-ip-hint {
  margin-top: 14px; font-size: .75rem; color: var(--text-dim);
  background: var(--bg-2); border: 1px dashed var(--border);
  border-radius: 10px; padding: 6px 12px; display: inline-block;
}

.field { margin-bottom: 16px; }
.field label { display: block; font-size: .8rem; font-weight: 600; color: var(--text-dim); margin-bottom: 7px; }
.input {
  width: 100%;
  background: var(--bg-2);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 15px;
  color: var(--text);
  font-size: .95rem;
  font-family: inherit;
  transition: border-color .15s, box-shadow .15s;
}
.input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(47,125,255,.18); }
.input:disabled { opacity: .6; }
select.input { appearance: none; }
textarea.input { resize: vertical; min-height: 80px; }
.field-hint { font-size: .68rem; color: var(--text-faint); margin-top: 4px; display: block; }
.pw-wrap {
  margin: -4px 0 16px; padding: 14px 14px 12px;
  background: linear-gradient(160deg, rgba(47,125,255,.06), rgba(120,40,220,.04) 60%, rgba(255,255,255,0));
  border: 1px solid var(--border); border-radius: 16px;
  animation: pwIn .35s ease both;
}
@keyframes pwIn { from { opacity: 0; transform: translateY(-5px); } to { opacity: 1; transform: none; } }
.pw-meter-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.pw-meter-label { font-size: .76rem; font-weight: 800; color: var(--text-dim); letter-spacing: .2px; display: inline-flex; align-items: center; gap: 6px; }
.pw-lock { width: 15px; height: 15px; flex: none; color: var(--primary-2, #2f7dff); }
.pw-meter-score {
  font-size: .72rem; font-weight: 800; padding: 2px 10px; border-radius: 100px;
  background: var(--bg-3); color: var(--text-faint);
  transition: color .25s ease, background .25s ease, transform .2s ease;
}
.pw-meter-score[data-score="weak"] { background: rgba(245,158,11,.16); color: #f59e0b; }
.pw-meter-score[data-score="med"]  { background: rgba(234,179,8,.16);  color: #eab308; }
.pw-meter-score[data-score="strong"] { background: rgba(34,197,94,.16); color: #22c55e; }
.pw-meter-score.pop { animation: pwPop .3s ease; }
@keyframes pwPop { 0% { transform: scale(1); } 40% { transform: scale(1.22); } 100% { transform: scale(1); } }
.pw-meter-bar {
  height: 7px; border-radius: 100px; overflow: hidden;
  background: var(--bg-3); border: 1px solid var(--border);
}
.pw-meter-fill {
  display: block; height: 100%; width: 0%; border-radius: 100px;
  background: linear-gradient(90deg, #f59e0b, #eab308);
  transition: width .35s cubic-bezier(.4,0,.2,1), background .3s ease, box-shadow .3s ease;
}
.pw-meter-fill[data-grade="weak"] { background: linear-gradient(90deg, #f97316, #f59e0b); }
.pw-meter-fill[data-grade="med"]  { background: linear-gradient(90deg, #f59e0b, #eab308); box-shadow: 0 0 10px rgba(234,179,8,.45); }
.pw-meter-fill[data-grade="strong"] { background: linear-gradient(90deg, #22c55e, #4ade80); box-shadow: 0 0 12px rgba(34,197,94,.55); }
.pw-check {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px;
  margin-top: 12px;
}
.pw-rule {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: .74rem; font-weight: 700; color: var(--text-dim);
  opacity: .6; transition: opacity .25s ease, color .25s ease;
}
.pw-ico {
  flex: none; width: 20px; height: 20px; border-radius: 50%;
  display: inline-grid; place-items: center;
  border: 2px solid var(--text-faint);
  transition: border-color .25s ease, background .25s ease, box-shadow .25s ease;
}
.pw-ico::before {
  content: ""; width: 8px; height: 4.5px;
  border-left: 2.5px solid #fff; border-bottom: 2.5px solid #fff;
  transform: rotate(-45deg) scale(0); margin-top: -2px;
  transition: transform .22s cubic-bezier(.34,1.56,.64,1);
}
.pw-rule.ok .pw-ico { border-color: #22c55e; background: #22c55e; box-shadow: 0 2px 8px rgba(34,197,94,.45); }
.pw-rule.ok .pw-ico::before { transform: rotate(-45deg) scale(1); }
.pw-rule.ok { opacity: 1; color: #22c55e; }
.pw-warn {
  display: none; align-items: flex-start; gap: 8px;
  margin-top: 10px; padding: 9px 11px;
  font-size: .74rem; font-weight: 700; line-height: 1.5;
  color: #ef4444; background: rgba(239,68,68,.10);
  border: 1px solid rgba(239,68,68,.35); border-radius: 12px;
  animation: pwIn .3s ease both;
}
.pw-warn.show { display: flex; }
.pw-warn svg { width: 16px; height: 16px; flex: none; margin-top: 2px; }
.input-invalid { border-color: #ef4444 !important; box-shadow: 0 0 0 3px rgba(239,68,68,.18) !important; }
@media (max-width: 480px) { .pw-check { grid-template-columns: 1fr; } }

.pw-replace-note {
  margin: 2px 0 14px; padding: 10px 12px; border-radius: 12px;
  background: rgba(16,185,129,.08); border: 1px dashed rgba(16,185,129,.3);
  color: var(--text-dim); font-size: .78rem; line-height: 1.7;
}

.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

.captcha-box {
  display: flex; align-items: center; gap: 12px;
  background: var(--bg-2); border: 1.5px solid var(--border);
  border-radius: var(--radius-sm); padding: 10px 14px;
}
.captcha-q { font-weight: 800; font-size: 1rem; color: var(--primary-2); white-space: nowrap; }
.captcha-input { max-width: 110px; border: 0; background: var(--bg-3); }

.checkbox-field { margin-bottom: 20px; }
.checkbox { display: flex; align-items: flex-start; gap: 10px; font-size: .8rem; color: var(--text-dim); cursor: pointer; }
.checkbox input { margin-top: 3px; accent-color: var(--primary); width: 16px; height: 16px; }

.auth-links { margin-top: 22px; display: flex; flex-direction: column; gap: 8px; align-items: center; font-size: .85rem; color: var(--text-dim); }
.auth-links a { color: var(--primary-2); font-weight: 600; }

.alert {
  padding: 12px 16px; border-radius: 12px; font-size: .86rem; font-weight: 600;
  margin-bottom: 18px;
}
.alert-error { background: rgba(239,68,68,.12); border: 1px solid rgba(239,68,68,.3); color: #f87171; }
.alert-success { background: rgba(16,185,129,.12); border: 1px solid rgba(16,185,129,.3); color: #34d399; }

/* ============ Dashboard ============ */
.dash-wrap {
  max-width: 1120px;
  width: 92%;
  margin: 34px auto 70px;
}
.dash-avatar {
  width: 58px; height: 58px; margin: 0 auto 10px;
  display: grid; place-items: center;
  background: var(--primary-grad);
  border-radius: 50%;
  font-size: 1.6rem; font-weight: 800; color: #fff;
}
.dash-main { min-width: 0; display: flex; flex-direction: column; gap: 22px; }
.dash-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 22px;
}

.dash-hero {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  background: linear-gradient(135deg, var(--card-2), var(--card));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 26px;
}
.dash-hero h1 { font-size: 1.4rem; }
.dash-hero p { color: var(--text-dim); font-size: .9rem; }
.dash-hero-actions { display: flex; gap: 10px; }

.stat-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.stat-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 22px;
  display: flex; flex-direction: column; gap: 6px;
  transition: border-color .2s, transform .2s;
}
.stat-card:hover { border-color: #2b4d7e; transform: translateY(-3px); }
.stat-ico { font-size: 1.6rem; }
.stat-label { font-size: .78rem; color: var(--text-dim); }
.stat-card strong { font-size: 1.5rem; }
.stat-card em { font-style: normal; font-size: .74rem; font-weight: 700; }

.recent-row { display: grid; grid-template-columns: 1fr; gap: 18px; align-items: start; }

.table { width: 100%; border-collapse: collapse; font-size: .85rem; }
.table th { text-align: start; color: var(--text-faint); font-size: .72rem; text-transform: uppercase; letter-spacing: .4px; padding-bottom: 10px; border-bottom: 1px solid var(--border-soft); }
.table td { padding: 12px 0; border-bottom: 1px solid var(--border-soft); color: var(--text-dim); }
.table tr:last-child td { border-bottom: 0; }
.coin-ico { font-weight: 800; }
.pill { padding: 3px 10px; border-radius: 100px; font-size: .68rem; font-weight: 700; }
.pill.ok { background: rgba(16,185,129,.14); color: #34d399; }
.pill.pending { background: rgba(245,158,11,.14); color: #fbbf24; }

.profit-list { display: flex; flex-direction: column; }
.profit-item {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 0; border-bottom: 1px solid var(--border-soft);
}
.profit-item:last-child { border-bottom: 0; }
.profit-ico { font-size: 1.2rem; }
.profit-info { flex: 1; display: flex; flex-direction: column; }
.profit-info strong { font-size: .86rem; }
.profit-info small { font-size: .7rem; color: var(--text-faint); }
.profit-amount { font-weight: 700; font-size: .9rem; }

/* Profile meta */
.divider { height: 1px; background: var(--border-soft); margin: 24px 0; }
.meta-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.meta { background: var(--bg-2); border: 1px solid var(--border-soft); border-radius: var(--radius-sm); padding: 14px; display: flex; flex-direction: column; gap: 4px; }
.meta span { font-size: .7rem; color: var(--text-faint); }
.meta strong { font-size: .9rem; }
.badge-warn { color: #fbbf24; font-size: .78rem; }

.empty-state { text-align: center; color: var(--text-dim); padding: 40px 0; }
.card-body-summary { font-size: .82rem; color: var(--text-dim); }
.investments-list { grid-template-columns: repeat(2, 1fr); }

/* ============ Payment page ============ */
.wrap-page { padding: 50px 0; }

/* ---- Clean formal checkout layout ---- */
.pay-page { max-width: 1060px; margin: 0 auto; }
.pay-heading { margin-bottom: 26px; text-align: center; }
.pay-heading h2 { font-size: 1.6rem; margin-bottom: 6px; }
.pay-heading p { font-size: .85rem; color: var(--text-dim); margin: 0; }

.pay-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 26px; align-items: start;
  max-width: 720px; margin: 0 auto;
}
.pay-main { display: flex; flex-direction: column; gap: 20px; min-width: 0; }

.pay-card {
  background: var(--card); border: 1px solid var(--border-soft);
  border-radius: 18px; padding: 22px 24px;
}
.pay-card-head { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 18px; }
.pay-num {
  width: 32px; height: 32px; flex-shrink: 0; display: grid; place-items: center;
  font-size: .74rem; font-weight: 800; letter-spacing: .03em;
  border-radius: 10px; background: var(--bg-3); border: 1px solid var(--border);
  color: var(--primary-2);
}
.pay-card-tt h3 { font-size: 1.02rem; margin: 2px 0 2px; }
.pay-card-tt p { font-size: .74rem; color: var(--text-faint); margin: 0; }
.proof-fields .field { max-width: 480px; }

/* Coin selection */
.coin-select { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.coin-btn {
  background: var(--bg-2); border: 1.5px solid var(--border);
  border-radius: 14px; padding: 13px 14px;
  display: flex; align-items: center; gap: 12px;
  color: var(--text); cursor: pointer; position: relative; text-align: start;
  transition: border-color .15s, background .15s, box-shadow .15s;
}
.coin-btn:hover { border-color: var(--text-faint); }
.coin-btn.active {
  border-color: var(--primary); background: rgba(47,125,255,.1);
  box-shadow: 0 0 0 3px rgba(47,125,255,.15);
}
.coin-btn.active:hover { border-color: var(--primary); }
.coin-btn.active::after {
  content: '✓'; position: absolute; inset-inline-end: 12px; top: 50%; transform: translateY(-50%);
  width: 20px; height: 20px; display: grid; place-items: center;
  font-size: .66rem; border-radius: 50%; color: #fff; background: var(--primary);
}
.coin-logo {
  width: 40px; height: 40px; flex-shrink: 0; display: grid; place-items: center;
  border-radius: 50%; font-size: 1.2rem; font-weight: 800;
}
.coin-logo.btc { background: rgba(247,147,26,.15); color: #f7931a; }
.coin-logo.eth { background: rgba(99,110,226,.15); color: #636ee2; }
.coin-logo.usdt { background: rgba(38,161,123,.15); color: #26a17b; }
.coin-logo.bnb { background: rgba(240,185,11,.15); color: #f0b90b; }
.coin-txt { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.coin-txt strong { font-size: .86rem; }
.coin-txt small { font-size: .68rem; color: var(--text-faint); }

/* USDT TRC-20 tag + inline coin line (withdraw) */
.wd-coin-line { display: flex; align-items: center; gap: 12px; }
.wd-coin-line .transfer-coin-logo { width: 44px; height: 44px; }
.wd-coin-line .transfer-coin-txt { gap: 6px; }
.wd-coin-line strong { font-size: 1.15rem; }
.terms-box {
  margin-top: 20px; padding: 16px 18px;
  background: var(--bg-3); border: 1px solid var(--border-soft);
  border-inline-start: 3px solid var(--primary);
  border-radius: 12px;
}
.terms-box h4 { font-size: .9rem; font-weight: 800; margin-bottom: 10px; color: var(--text); }
.terms-box ul { margin: 0; padding-inline-start: 20px; display: flex; flex-direction: column; gap: 8px; }
.terms-box li { font-size: .78rem; line-height: 1.7; color: var(--text-dim); }
.usdt-brand-tag {
  display: inline-flex; align-items: center; gap: 6px; width: fit-content;
  padding: 3px 14px; border-radius: 100px;
  background: rgba(38,161,123,.16); color: #26a17b;
  font-size: .76rem; font-weight: 800; direction: ltr;
}
.usdt-brand-tag::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #26a17b; box-shadow: 0 0 0 3px rgba(38,161,123,.22); }

/* Amount */
.amount-field { max-width: 360px; }
.amount-input-wrap { display: flex; align-items: center; gap: 10px; }
.amount-input-wrap .input { flex: 1; font-size: 1.3rem; font-weight: 700; padding: 13px 16px; }
.amount-input-wrap .input::placeholder { color: rgba(255,255,255,.22); font-weight: 600; }
.amount-suffix {
  font-weight: 800; font-size: .88rem; color: var(--text-dim);
  background: var(--bg-3); border: 1px solid var(--border);
  padding: 14px 16px; border-radius: 10px;
}
.amount-meta { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 14px; }
.coin-value { font-size: .82rem; color: var(--text-dim); }
.coin-value strong {
  color: var(--primary-2); font-size: .92rem;
  background: rgba(0,212,255,.08); border: 1px dashed rgba(0,212,255,.35);
  padding: 3px 12px; border-radius: 100px; margin-inline-start: 4px;
}
.pay-min-hint {
  font-size: .72rem; font-weight: 700; color: var(--text-dim);
  background: var(--bg-3); border: 1px dashed var(--border);
  padding: 4px 12px; border-radius: 100px;
}

/* Transfer box */
.transfer-box {
  display: flex; flex-direction: column; gap: 20px;
  background: var(--bg-2); border: 1px solid var(--border-soft);
  border-radius: 16px; padding: 20px;
}
.transfer-coin { display: flex; align-items: center; gap: 14px; }
.transfer-coin-logo { width: 56px; height: 56px; border-radius: 50%; object-fit: contain; display: block; }
.transfer-coin-txt { display: flex; flex-direction: column; gap: 8px; }
.transfer-coin-txt strong { font-size: 1.35rem; font-weight: 800; letter-spacing: .5px; }
.transfer-body { display: flex; gap: 22px; align-items: center; }
.qr-wrap { display: flex; flex-direction: column; align-items: center; gap: 10px; flex-shrink: 0; }
.pay-qr-img {
  width: 160px; height: 160px;
  background: #fff; border-radius: 14px;
  padding: 8px; object-fit: contain;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .1), 0 6px 18px -8px rgba(0, 0, 0, .35);
}
.qr-caption { font-size: .66rem; color: var(--text-faint); text-align: center; max-width: 130px; }
.pay-address { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.pay-addr-label { font-size: .74rem; font-weight: 700; color: var(--text-dim); }
.addr-row { display: flex; gap: 8px; align-items: center; }
.addr-row code {
  flex: 1; min-width: 0; background: var(--bg-3); border: 1px solid var(--border);
  padding: 12px 14px; border-radius: 10px; font-size: .72rem;
  word-break: break-all; color: var(--primary-2);
  font-family: monospace; direction: ltr; text-align: start;
}
.network-note { font-size: .72rem; color: var(--text-faint); }
.net-select { display: flex; flex-direction: column; gap: 10px; margin-top: 2px; }
.net-select-label { font-size: .76rem; font-weight: 800; color: var(--text-dim); }
.net-chips { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; }
.net-chip {
  position: relative;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 12px; border-radius: 13px; cursor: pointer;
  background: var(--bg-3); border: 1px solid var(--border);
  color: var(--text-dim); font-family: inherit; text-align: center;
  transition: border-color .18s ease, background .18s ease, transform .12s ease, box-shadow .18s ease;
}
.net-chip:hover { border-color: rgba(47,125,255,.45); transform: translateY(-1px); }
.net-chip:focus-visible { outline: 2px solid var(--primary-2); outline-offset: 1px; }
.net-chip.active {
  background: rgba(47,125,255,.1); border-color: var(--primary-2);
  color: var(--text);
  box-shadow: 0 4px 14px -6px rgba(47,125,255,.55);
}
.net-chip-txt { display: flex; flex-direction: column; min-width: 0; gap: 1px; }
.net-chip-txt b { font-size: .8rem; font-weight: 800; color: var(--text); }
.net-chip-txt small { font-size: .62rem; color: var(--text-faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.net-check {
  margin-inline-start: auto; flex: none;
  display: grid; place-items: center;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--bg-2); border: 1px solid var(--border);
  color: #fff; transition: background .18s ease, border-color .18s ease, transform .18s ease;
}
.net-check svg { opacity: 0; transform: scale(.4); transition: opacity .18s ease, transform .18s ease; }
.net-chip.active .net-check {
  background: var(--primary-2); border-color: var(--primary-2);
  box-shadow: 0 2px 8px -2px rgba(47,125,255,.7);
}
.net-chip.active .net-check svg { opacity: 1; transform: scale(1); }
.net-select-hint { font-size: .66rem; color: var(--text-faint); margin: 0; }
@media (max-width: 480px) {
  .net-chips { grid-template-columns: 1fr; }
  .net-chip { padding: 8px 10px; }
}
.network-note b { color: var(--text); }

/* Submit request button */
.pay-submit { margin-top: 20px; text-align: center; }
.pay-submit .btn { width: 100%; }
.pay-submit-hint { font-size: .72rem; color: var(--text-faint); margin: 12px 0 0; }

/* Receipt after submitting */
.pay-receipt {
  max-width: 560px; margin: 0 auto; text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  padding: 34px 26px; background: var(--card); border: 1px solid var(--border);
  border-radius: 20px; box-shadow: var(--shadow);
  animation: payIn .3s ease;
}
@keyframes payIn { from { opacity: 0; transform: translateY(10px); } }
.pay-receipt[hidden] { display: none; }
.receipt-ok {
  width: 64px; height: 64px; display: grid; place-items: center;
  font-size: 1.6rem; color: #fff; border-radius: 50%;
  background: linear-gradient(135deg, #10b981, #059669);
  box-shadow: 0 12px 30px -8px rgba(16,185,129,.5);
}
.pay-receipt h3 { font-size: 1.15rem; margin: 0; }
.receipt-sub { font-size: .82rem; color: var(--text-dim); margin: 0; }
.receipt-summary { width: 100%; text-align: start; margin-top: 6px; }
.pay-receipt .btn { margin-top: 4px; }

/* Order summary panel */
.pay-summary {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 18px; overflow: hidden;
  border-top: 3px solid var(--primary);
  box-shadow: var(--shadow);
}
.summary-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 18px 20px; border-bottom: 1px solid var(--border-soft);
}
.summary-head h3 { font-size: .98rem; margin: 0; }
.summary-head .mono { font-size: .7rem; color: var(--text-faint); }
.sum-row {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 12px 20px; font-size: .78rem;
  border-bottom: 1px solid var(--border-soft);
}
.sum-row:last-child { border-bottom: 0; }
.sum-row span { color: var(--text-faint); }
.sum-row b { color: var(--text); font-weight: 700; text-align: end; }
.sum-row .ok { color: #10b981; }
.sum-row.sum-status b { display: inline-flex; align-items: center; gap: 8px; }
.mono { font-family: monospace; direction: ltr; font-size: .74rem; }
.spinner {
  width: 14px; height: 14px; border-radius: 50%;
  border: 2px solid rgba(16,185,129,.25); border-top-color: #10b981;
  animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.confirmed-note {
  margin-top: 14px; font-size: .72rem; color: var(--text-faint); text-align: center;
}

/* ============ Wallet hero ============ */
.wallet-hero {
  position: relative;
  border-radius: 22px;
  padding: 28px 30px;
  overflow: hidden;
  background: linear-gradient(135deg, #1b3b8f 0%, #0e2a63 60%, #122347 100%);
  border: 1px solid rgba(47,125,255,.35);
  box-shadow: 0 25px 60px -22px rgba(20, 60, 150, .6);
  color: #fff;
}
html[data-theme="light"] .wallet-hero {
  background: linear-gradient(135deg, #2f6bff 0%, #1d4fd0 60%, #163a9e 100%);
}
.wallet-glow {
  position: absolute;
  top: -80px; inset-inline-end: -40px;
  width: 320px; height: 320px;
  background: radial-gradient(circle, rgba(0,212,255,.35), transparent 65%);
  border-radius: 50%;
  pointer-events: none;
}
.wallet-head { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.wallet-ico {
  width: 52px; height: 52px; display: grid; place-items: center;
  font-size: 1.6rem;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 14px;
}
.wallet-label { display: block; font-weight: 800; font-size: 1.05rem; }
.wallet-sub { display: block; font-size: .74rem; color: rgba(255,255,255,.65); }
.wallet-badge {
  margin-inline-start: auto;
  font-size: .74rem; font-weight: 700;
  padding: 5px 14px; border-radius: 100px;
  background: rgba(16,185,129,.2);
  color: #6ff7c8;
  border: 1px solid rgba(16,185,129,.4);
}
.wallet-value { font-size: clamp(2.2rem, 5vw, 3.2rem); font-weight: 800; letter-spacing: .5px; margin-bottom: 20px; }
.wallet-meta {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  position: relative;
}
.wallet-meta > div {
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 14px;
  padding: 12px 16px;
  display: flex; flex-direction: column; gap: 2px;
}
.wallet-meta span { font-size: .7rem; color: rgba(255,255,255,.6); }
.wallet-meta strong { font-size: 1.05rem; }

/* Dashboard: clickable investments card */
.invest-card { display: flex; align-items: center; gap: 16px;
  margin-top: 18px; padding: 16px 20px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--primary) 14%, var(--card)), var(--card));
  border: 1px solid var(--border-soft); border-radius: 16px;
  text-decoration: none; transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease;
}
.invest-card:hover { border-color: var(--primary); box-shadow: 0 8px 22px rgba(0,0,0,.18); transform: translateY(-1px); }
.invest-card-ico {
  width: 48px; height: 48px; flex-shrink: 0; display: grid; place-items: center;
  font-size: 1.3rem; border-radius: 12px;
  background: rgba(0,212,255,.12); border: 1px solid rgba(0,212,255,.3);
}
.invest-card-tt { display: flex; flex-direction: column; gap: 4px; }
.invest-card-label { font-size: 1.05rem; font-weight: 800; color: var(--text); }
.invest-card-count { font-size: .76rem; color: var(--text-dim); }
.invest-card-arrow { margin-inline-start: auto; font-size: 1.3rem; color: var(--primary-2); }
.invest-card-narrow { margin-top: 4px; padding: 12px 20px; }

/* Dashboard quick actions: two compact cards side by side */
.invest-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 18px; }
.invest-cards .invest-card { margin-top: 0; padding: 14px 16px; gap: 12px; }
.invest-cards .invest-card-narrow { padding: 12px 16px; }
.invest-cards .invest-card-ico {
  width: 40px; height: 40px; font-size: 1.1rem;
}
@media (max-width: 700px) {
  .invest-cards { gap: 10px; margin-top: 14px; }
  .invest-cards .invest-card { padding: 12px 12px; gap: 10px; border-radius: 13px; }
  .invest-cards .invest-card-ico { width: 34px; height: 34px; font-size: 1rem; border-radius: 10px; }
  .invest-cards .invest-card-label { font-size: .82rem; }
  .invest-cards .invest-card-arrow { font-size: 1rem; }
}

/* ============ Payout countdown ============ */
.payout-count {
  margin-top: 18px;
  padding: 18px 20px 20px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(47,125,255,.10), rgba(124,160,255,.04) 55%, rgba(47,125,255,.08));
  border: 1px solid rgba(47,125,255,.22);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04);
}
.payout-count-head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.payout-count-ico {
  width: 42px; height: 42px; flex: none;
  display: grid; place-items: center;
  font-size: 1.3rem;
  border-radius: 13px;
  background: rgba(47,125,255,.14);
  border: 1px solid rgba(47,125,255,.25);
}
.payout-count-title { display: block; font-size: .95rem; font-weight: 800; color: var(--text); }
.payout-count-sub { display: block; font-size: .74rem; color: var(--text-dim); margin-top: 2px; }
.payout-count-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; max-width: 420px; margin-inline: auto; }
.payout-box {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 12px 6px; border-radius: 13px;
  background: rgba(255,255,255,.045);
  border: 1px solid rgba(255,255,255,.07);
}
.payout-num {
  font-size: 1.7rem; font-weight: 800; line-height: 1;
  color: #fff;
  font-variant-numeric: tabular-nums;
  background: linear-gradient(180deg, #fff, #a8c4ff);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  min-height: 1.7rem;
}
.payout-box span { font-size: .68rem; color: var(--text-dim); }
.payout-count-bar { margin-top: 16px; height: 5px; border-radius: 99px; background: rgba(255,255,255,.08); overflow: hidden; }
.payout-count-bar span { display: block; height: 100%; width: 0; border-radius: 99px; background: linear-gradient(90deg, #2f7dff, #7ca0ff); }
html[data-theme="light"] .payout-count { background: linear-gradient(135deg, rgba(47,125,255,.10), rgba(255,255,255,.6) 55%, rgba(47,125,255,.07)); }
html[data-theme="light"] .payout-box { background: rgba(255,255,255,.7); border-color: rgba(47,125,255,.18); }
html[data-theme="light"] .payout-num { background: linear-gradient(180deg, #173a8a, #2f7dff); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
html[data-theme="light"] .payout-count-bar { background: rgba(47,125,255,.15); }

/* ============ Investment rows ============ */
.investment-list { display: flex; flex-direction: column; }
.investment-row {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 0; border-bottom: 1px solid var(--border-soft);
}
.investment-row:last-child { border-bottom: 0; }
.inv-ico {
  width: 46px; height: 46px; flex-shrink: 0;
  display: grid; place-items: center; font-size: 1.3rem;
  background: var(--bg-3); border: 1px solid var(--border);
  border-radius: 12px;
}
.inv-info { flex: 1; min-width: 0; }
.inv-info strong { display: block; font-size: .95rem; }
.inv-info small { font-size: .74rem; color: var(--text-faint); }
.inv-thumb {
  width: 40px; height: 40px; border-radius: 11px; overflow: hidden;
  background: var(--bg-3); border: 1px solid var(--border-soft); flex-shrink: 0;
}
.inv-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.inv-meta { text-align: end; display: flex; flex-direction: column; gap: 4px; align-items: flex-end; }
.inv-meta strong { font-size: 1rem; }

/* ============ Investments page redesign ============ */
.inv-hero { margin-bottom: 18px; }
.inv-summary {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 16px;
}
.insum-item {
  display: flex; align-items: center; gap: 12px;
  background: var(--card); border: 1px solid var(--border-soft);
  border-radius: 16px; padding: 16px 18px;
}
.insum-ico {
  width: 42px; height: 42px; flex-shrink: 0; display: grid; place-items: center;
  border-radius: 12px; background: rgba(47,125,255,.12); border: 1px solid rgba(47,125,255,.28); color: var(--primary-2);
}
.insum-ico.green { background: rgba(16,185,129,.12); border-color: rgba(16,185,129,.28); color: #10b981; }
.insum-ico.gold  { background: rgba(245,158,11,.12); border-color: rgba(245,158,11,.3); color: #f59e0b; }
.insum-ico.blue  { background: rgba(139,92,246,.12); border-color: rgba(139,92,246,.3); color: #8b5cf6; }
.insum-txt { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.insum-label { font-size: .72rem; color: var(--text-faint); text-transform: uppercase; letter-spacing: .02em; }
.insum-value { font-size: 1.15rem; font-weight: 800; color: var(--text); }
.insum-value.up { color: var(--success, #10b981); }

.inv-cards { display: flex; flex-direction: column; gap: 14px; }
.inv-item {
  background: var(--card); border: 1px solid var(--border-soft);
  border-radius: 18px; padding: 16px 18px;
}
.inv-item-top { display: flex; align-items: center; gap: 14px; }
.inv-thumb-lg { width: 56px; height: 56px; border-radius: 14px; }
.inv-item .inv-info strong { font-size: 1rem; }
.inv-small-info { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.inv-pill { padding: 3px 10px; font-size: .68rem; }
.inv-daily-badge {
  display: inline-block; font-size: .7rem; font-weight: 800; color: #10b981;
  background: rgba(16,185,129,.12); border: 1px solid rgba(16,185,129,.28);
  padding: 3px 10px; border-radius: 100px; white-space: nowrap;
}
.inv-earned-text { font-size: .74rem; color: var(--text-faint); margin-top: 4px; }
.inv-earned-text b { font-weight: 800; color: var(--success, #10b981); }

@media (max-width: 900px) {
  .inv-summary { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 460px) {
  .insum-item { padding: 12px 13px; gap: 10px; }
  .insum-ico { width: 36px; height: 36px; }
  .insum-value { font-size: 1rem; }
  .inv-item { padding: 13px 14px; }
  .inv-thumb-lg { width: 48px; height: 48px; }
}

/* ============ Confirm payment box ============ */
.confirm-pay-box {
  background: var(--card); border: 1px solid var(--border-soft);
  border-radius: 18px; padding: 24px;
}
.confirm-pay-box .formal-head { margin-bottom: 20px; }
.confirm-pay-box p { font-size: .82rem; color: var(--text-dim); margin: 0; }
.coin-estimate { font-size: .95rem; color: var(--text-dim); margin-bottom: 14px; }
.coin-estimate strong { color: var(--primary-2); }

.pill.rejected { background: rgba(239,68,68,.12); color: #f87171; }
html[data-theme="light"] .pill.rejected { color: #d43f3f; background: rgba(239,68,68,.1); }

/* ============ Admin panel ============ */
.admin-wrap { max-width: 1180px; width: 92%; margin: 30px auto 70px; display: flex; flex-direction: column; gap: 20px; }
.admin-head {
  display: flex; justify-content: space-between; align-items: center;
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 22px 26px;
}
.admin-head h1 { font-size: 1.5rem; }
.admin-head p { color: var(--text-dim); font-size: .84rem; }
.admin-tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.admin-tabs a {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 10px 16px; border-radius: 11px;
  background: var(--card); border: 1px solid var(--border);
  color: var(--text-dim); font-size: .86rem; font-weight: 600;
  transition: border-color .15s, color .15s, background .15s;
}
.admin-tabs a i {
  font-style: normal; font-size: .68rem;
  background: var(--bg-3); border: 1px solid var(--border);
  padding: 1px 7px; border-radius: 100px; font-weight: 800;
}
.admin-tabs a.active { border-color: var(--primary); color: var(--primary-2); background: rgba(47,125,255,.1); }
.admin-tabs a.active i { background: rgba(47,125,255,.15); color: var(--primary-2); }
.admin-body { display: flex; flex-direction: column; gap: 20px; }

.admin-stats { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; }
.admin-stat {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 18px;
  display: flex; flex-direction: column; gap: 4px;
}
.admin-stat span { font-size: 1.4rem; }
.admin-stat strong { font-size: 1.15rem; }
.admin-stat small { font-size: .72rem; color: var(--text-dim); }
.admin-stat.warn { border-color: rgba(245,158,11,.4); }

.admin-table-scroll { overflow-x: auto; }
.admin-table { min-width: 820px; }
.admin-table td code.ipcode {
  font-family: monospace; font-size: .74rem; direction: ltr; text-align: start;
  background: var(--bg-3); border: 1px solid var(--border-soft);
  padding: 2px 8px; border-radius: 7px; color: var(--primary-2);
  display: inline-block; max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
html[data-theme="light"] .admin-table td code.ipcode { color: #0a5fd6; }
.wd-addr { display: inline-flex; align-items: center; gap: 6px; }
.wd-addr code { font-family: ui-monospace, 'SF Mono', Consolas, monospace; font-size: .74rem; direction: ltr; text-align: start; white-space: nowrap; background: var(--bg-3); border: 1px solid var(--border-soft); padding: 2px 8px; border-radius: 7px; color: var(--primary-2); }
html[data-theme="light"] .wd-addr code { color: #0a5fd6; }
.row-suspended { opacity: .55; }
.row-actions { display: flex; gap: 6px; }
.dep-proof { margin-top: 6px; }
.dep-proof-link { display: inline-block; line-height: 0; }
.dep-proof-thumb {
  width: 96px; height: 96px; object-fit: cover;
  border-radius: 10px; border: 1px solid var(--border);
  box-shadow: 0 2px 8px rgba(0,0,0,.25);
  transition: transform .15s ease; cursor: zoom-in;
}
.dep-proof-thumb:hover { transform: scale(2.1); z-index: 8; position: relative; }
.inline-form { display: inline; }
.inline-form .btn { margin-inline-end: 4px; }
.checkbox-inline { display: inline-flex; align-items: center; gap: 4px; font-size: .72rem; color: var(--text-dim); margin-inline-end: 6px; }
.btn-danger { background: #ef4444; border-color: #ef4444; color: #fff; }
.btn-danger:hover { background: #dc2626; }

/* per-user admin manage panel */
.manage-user { display: inline-block; margin-inline-start: 6px; vertical-align: middle; }
.manage-user summary { cursor: pointer; font-size: .76rem; font-weight: 700; color: var(--primary-2); padding: 3px 0; }
.manage-user[open] { display: block; margin: 8px 0 4px; }
.manage-user[open] summary { margin-bottom: 8px; }
.manage-block {
  display: flex; flex-direction: column; gap: 6px;
  background: var(--card); border: 1px solid var(--border-soft);
  border-radius: 12px; padding: 10px 12px; margin-bottom: 8px;
}
.manage-block b { font-size: .74rem; color: var(--text-dim); font-weight: 700; }
.mg-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.mg-row .input { flex: 1; min-width: 110px; padding: 6px 10px; font-size: .78rem; }
.mg-row .btn { white-space: nowrap; }
.ok-btn { background: #10b981; border-color: #10b981; color: #fff; }
.warn-btn { background: #f59e0b; border-color: #f59e0b; color: #fff; }
.login-tag { color: var(--primary-2); border-color: var(--primary-3); background: color-mix(in srgb, var(--primary-2) 12%, var(--bg-3)); }

/* backup / storage tab */
.backup-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.backup-box {
  background: var(--card); border: 1px solid var(--border); border-radius: 16px;
  padding: 18px 20px; display: flex; flex-direction: column; gap: 10px;
}
.backup-box h4 { margin: 0; font-size: .95rem; }
.backup-box p { font-size: .8rem; color: var(--text-dim); margin: 0; }
.backup-box .btn { align-self: flex-start; }
.box-row { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
/* password reveal (admin only) */
.ua-box summary { cursor: pointer; font-size: .68rem; color: var(--text-dim); }
.ua-box summary, .danger-text { display: inline-block; }
.danger-text { color: var(--danger, #e0525e); font-size: .85rem; }
.pw-reveal { display: inline-block; }
.pw-dots {
  cursor: pointer; user-select: none; letter-spacing: 2px;
  padding: 2px 8px; border-radius: 8px; font-weight: 700;
  background: var(--bg-3); border: 1px solid var(--border);
}
.pw-copy {
  display: inline-block; margin-top: 6px; padding: 4px 10px;
  background: var(--bg-2); border: 1px dashed var(--border); border-radius: 8px;
  font-family: ui-monospace, monospace; font-size: .78rem; direction: ltr;
}
/* withdraw page */
.wd-balance {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  background: linear-gradient(135deg, color-mix(in srgb, var(--primary) 16%, var(--card)), var(--card));
  border: 1px solid var(--border-soft); border-radius: 14px;
  padding: 14px 18px; margin-bottom: 18px;
}
.wd-balance span { font-size: .8rem; color: var(--text-dim); }
.wd-balance strong { font-size: 2.2rem; color: var(--primary-2); margin-inline-start: auto; font-weight: 800; letter-spacing: .5px; }
.wd-balance .wd-min {
  width: 100%; font-size: .72rem; font-weight: 600; color: var(--text-dim);
  background: transparent; border: none; padding: 0;
}
.dim { color: var(--text-faint); font-size: .72rem; }

.wd-lock {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  background: var(--bg-2);
  border: 1px solid var(--border-soft);
  border-radius: 14px; padding: 13px 16px; margin: 4px 0 16px;
}
.wd-lock .wd-lock-icon {
  flex: 0 0 38px; width: 38px; height: 38px; border-radius: 11px;
  display: grid; place-items: center;
  background: color-mix(in srgb, var(--text-dim) 13%, transparent);
  color: var(--text-dim);
}
.wd-lock .wd-lock-icon svg { width: 19px; height: 19px; }
.wd-lock span { font-size: .82rem; font-weight: 700; color: var(--text); }
.wd-lock strong { font-size: 1.18rem; color: var(--text); margin-inline-start: auto; font-weight: 800; letter-spacing: .4px; }
.wd-lock p { width: 100%; font-size: .72rem; color: var(--text-dim); margin: 0; line-height: 1.6; }

.wd-release {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  background: linear-gradient(135deg, color-mix(in srgb, #22c55e 12%, var(--card)), var(--card));
  border: 1px solid rgba(34,197,94,.30);
  border-radius: 14px; padding: 12px 16px; margin: 4px 0 16px;
}
.wd-release span { font-size: .8rem; font-weight: 700; color: #22c55e; }
.wd-release strong { font-size: 1.15rem; color: #22c55e; margin-inline-start: auto; }
.wd-release p { width: 100%; font-size: .72rem; color: var(--text-dim); margin: 0; }
.wd-release .wd-pending { color: #f59e0b; font-weight: 600; }
.wd-release-form { width: 100%; margin: 0; }
.wd-release-form .btn { width: auto; }

.frozen-set-form { display: flex; align-items: center; gap: 6px; }
.frozen-set-form .admin-num {
  width: 96px; padding: 6px 8px; text-align: center;
  border-radius: 9px; font-size: .8rem;
}

@media (max-width: 720px) { .backup-grid { grid-template-columns: 1fr; } }

.tag {
  display: inline-block; font-size: .72rem; font-weight: 700;
  background: var(--bg-3); border: 1px solid var(--border);
  padding: 2px 9px; border-radius: 100px; margin: 2px 2px; color: var(--text-dim);
}
.inp-label {
  display: block; font-size: .78rem; font-weight: 700;
  color: var(--text-dim); margin: 0 0 10px;
}
.inp-label .input { display: block; width: 100%; margin-top: 5px; }
.mini-progress {
  width: 90px; height: 6px; background: var(--bg-3); border-radius: 100px;
  overflow: hidden; display: inline-block; vertical-align: middle; margin-inline-end: 6px;
}
.mini-progress span { display: block; height: 100%; background: var(--primary-grad); border-radius: 100px; }
.img-thumb {
  display: inline-block; width: 46px; height: 30px; border-radius: 6px;
  overflow: hidden; vertical-align: middle; margin-inline-end: 8px;
  background: var(--bg-3); border: 1px solid var(--border-soft);
}
.img-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.field-row.four { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 900px) {
  .admin-stats { grid-template-columns: repeat(3, 1fr); }
  .field-row.four { grid-template-columns: repeat(2, 1fr); }
}

/* ============ Mobile ============ */
@media (max-width: 1080px) {
  .project-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 700px) {
}
@media (max-width: 860px) {
  .hero .container { grid-template-columns: 1fr; }
  .hero-visual { margin-top: 20px; }
  .recent-row { grid-template-columns: 1fr; }
  .pay-layout { grid-template-columns: 1fr; }
  .plan-grid { grid-template-columns: 1fr; }
  .proj-grid { grid-template-columns: 1fr; }
  .proj-side { position: static; }
  .proj-feats { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .nav-links { display: none; }
  .nav-drawer { display: flex; }
  body:not(.mobile-collapse) .site-header .brand { display: flex; }
  body:not(.mobile-collapse) .nav-toggle { display: inline-flex; }
  body:not(.mobile-collapse) .nav-actions .btn { display: inline-flex; }
  body:not(.mobile-collapse) .nav-actions .btn-primary { display: none; }
  body:not(.mobile-collapse) .nav-login-txt { display: none; }
  body:not(.mobile-collapse) .nav-login-ico { display: inline-flex; align-items: center; }
  body:not(.mobile-collapse) .nav-actions a.btn.btn-ghost {
    width: 40px; height: 40px; padding: 0;
    align-items: center; justify-content: center;
    background: var(--btn-ghost-bg);
    border: 1px solid var(--border);
    border-radius: 11px;
  }
  body:not(.mobile-collapse) .nav-actions a.btn.btn-ghost:hover { background: var(--nav-hover); }

  body.mobile-collapse .site-header .brand { display: none; }
  body.mobile-collapse .m-brand-btn { display: inline-flex; margin-inline-end: auto; }
  body.mobile-collapse .nav-wrap { height: 56px; }
  body.mobile-collapse .site-header { border-bottom: 0; }
  body.mobile-collapse .nav-toggle { display: inline-flex; }
  body.mobile-collapse .nav-actions .btn { display: inline-flex; }
  body.mobile-collapse .nav-actions {
    position: absolute;
    top: calc(100% - 2px);
    inset-inline: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 0 0 16px 16px;
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-top: 0;
    box-shadow: 0 16px 32px rgba(0, 0, 0, .3);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-14px);
    transition: transform .28s ease, opacity .28s ease, visibility .28s ease;
  }
  body.mobile-collapse.topnav-open .nav-actions { opacity: 1; visibility: visible; transform: translateY(0); }
  .coin-select { grid-template-columns: repeat(2, 1fr); }
  .transfer-box { align-items: stretch; }
  .transfer-body { flex-direction: column; align-items: stretch; }
  .stat-cards { grid-template-columns: 1fr; }
  .field-row { grid-template-columns: 1fr; }
  .meta-grid { grid-template-columns: 1fr; }
  .investments-list { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .project-grid { grid-template-columns: 1fr; }
  .hero-stats { gap: 20px; flex-wrap: wrap; }
  .footer-grid { grid-template-columns: 1fr; }
}

/* =====================================================================
   Mobile & small screens — polish
===================================================================== */
html { -webkit-text-size-adjust: 100%; }

/* --- Side drawer: glassy + RTL slide fix --- */
.nav-drawer {
  width: min(320px, 88vw);
  background: color-mix(in srgb, var(--bg-2) 90%, transparent);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-inline-end: 1px solid var(--border);
  box-shadow: 12px 0 44px rgba(0, 0, 0, .42);
  padding-bottom: env(safe-area-inset-bottom);
}
html[dir="rtl"] .nav-drawer { transform: translateX(102%); }
html[dir="rtl"] .nav-drawer.open { transform: translateX(0); }
.drawer-head {
  padding: calc(18px + env(safe-area-inset-top)) 16px 12px;
  border-bottom: 1px solid var(--border);
  position: relative;
}
.drawer-head::after {
  content: ""; position: absolute; inset: auto 0 0 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--primary), var(--primary-2), transparent);
  opacity: .6;
}
.drawer-head strong {
  background: var(--primary-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.drawer-close {
  width: 34px; height: 34px; display: grid; place-items: center;
  border-radius: 10px;
}
.drawer-close:active { transform: scale(.92); }
.drawer-body { padding: 14px; gap: 4px; }
.drawer-link { padding: 13px 14px; border-radius: 12px; }
.drawer-link:active { transform: scale(.98); }
.drawer-ico {
  width: 26px; height: 26px; flex-shrink: 0;
  display: grid; place-items: center;
  background: var(--bg-3); border: 1px solid var(--border-soft);
  border-radius: 8px; font-size: .95rem;
}
.drawer-link.active {
  color: #fff; background: var(--primary-grad);
  box-shadow: var(--shadow-blue);
}
.drawer-link.active .drawer-ico { background: rgba(255,255,255,.16); border-color: transparent; }
.drawer-foot { padding: 14px 16px calc(14px + env(safe-area-inset-bottom)); border-top: 1px solid var(--border); }
.nav-drawer-overlay { backdrop-filter: blur(2px); }

/* --- up to 700px phones --- */
@media (max-width: 700px) {
  :root { --nav-h: 62px; }
  html[data-theme="dark"] { --nav-h: 58px; }

  html { touch-action: manipulation; }
  body { -webkit-text-size-adjust: 100%; }

  .nav-wrap { gap: 10px; padding-inline: 12px 6px; }
  .brand { gap: 8px; margin-inline-end: 6px; }
  .brand-logo { height: 38px; width: 38px; }
  .brand-text strong { font-size: .92rem; }
  .brand-text small { display: none; }
  .nav-actions { gap: 6px; }
  .lang-switch { padding: 3px 8px; font-size: .68rem; }
  .theme-toggle, .nav-toggle { width: 36px; height: 36px; border-radius: 10px; font-size: 1rem; }
  .nav-toggle svg { width: 20px; height: 20px; }

  .flash { width: min(92vw, 400px); top: calc(var(--nav-h) + 10px); text-align: center; }

  .dash-wrap { width: 96%; margin: 14px auto 50px; gap: 12px; }
  .dash-card { padding: 16px; border-radius: 15px; }
  .dash-main { gap: 14px; }
  .section-head { margin-bottom: 26px; }
  .section-head.small { margin-bottom: 14px; }

  .stat-cards { gap: 10px; }
  .stat-card { padding: 16px; border-radius: 15px; }

  .admin-stats { grid-template-columns: repeat(3, 1fr); gap: 10px; }
  .admin-stat { padding: 16px 12px; }
  .admin-stat span { font-size: 1.2rem; }
  .admin-stat strong { font-size: 1rem; }

  .dash-hero { flex-direction: column; align-items: stretch; text-align: center; gap: 12px; padding: 20px 16px; }
  .dash-hero-actions { justify-content: center; flex-wrap: wrap; }
  .dash-hero-actions .btn { flex: 1 1 auto; min-width: 110px; }

  .btn-xl { width: 100%; max-width: 360px; padding: 14px 28px; }
  .btn { touch-action: manipulation; }

  /* Wallet hero compact */
  .wallet-hero { padding: 22px 18px; border-radius: 18px; }
  .wallet-head { gap: 10px; margin-bottom: 14px; }
  .wallet-ico { width: 42px; height: 42px; font-size: 1.25rem; border-radius: 12px; }
  .wallet-value { font-size: clamp(1.9rem, 9vw, 2.6rem); margin-bottom: 16px; }
  .wallet-meta { gap: 8px; }
  .wallet-meta > div { padding: 10px 12px; border-radius: 12px; }
  .wallet-meta strong { font-size: .95rem; }

  .investment-row { flex-wrap: wrap; gap: 8px; }
  .invest-form .field-row, .transfer-box { gap: 10px; }

  /* Admin tabs -> horizontal scrollable pills */
  .admin-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 4px;
    gap: 6px;
  }
  .admin-tabs::-webkit-scrollbar { display: none; }
  .admin-tabs a {
    flex-shrink: 0;
    white-space: nowrap;
    padding: 8px 14px;
    font-size: .8rem;
  }
  .admin-body { gap: 14px; }

  .proj-side { margin-top: 14px; }

  /* Compact dashboard + settings action buttons */
  .dash-hero-actions .btn {
    padding: 9px 16px; font-size: .83rem;
    min-width: 0; flex: 1 1 0; border-radius: 10px;
  }
  .set-panel .btn-block,
  .set-panel .pref-save,
  .wd-form .btn:not(.btn-sm) {
    padding: 8px 14px; font-size: .78rem; border-radius: 10px;
  }
  .wd-form .btn:not(.btn-sm) { width: 100%; }
  .settings-groups .lang-opt {
    padding: 7px 12px; font-size: .76rem; border-radius: 10px; flex: 1 1 0;
  }
  .set-group { border-radius: 14px; }
  .set-row { padding: 10px 11px; gap: 10px; }
  .set-ico { width: 31px; height: 31px; font-size: .95rem; border-radius: 9px; }
  .set-label { font-size: .83rem; }
  .set-value { font-size: .77rem; }
  .set-chev { font-size: .73rem; }
  .settings-groups { gap: 16px; }
  .btn-logout { padding: 10px 20px; font-size: .88rem; border-radius: 10px; margin-bottom: 56px; }
}

/* --- up to 480px small phones --- */
@media (max-width: 480px) {
  :root { --nav-h: 58px; }
  .brand-logo { height: 34px; width: 34px; }
  .admin-stats { grid-template-columns: repeat(2, 1fr); }
  .dash-hero h1 { font-size: 1.15rem; }
  .stat-card strong { font-size: 1.2rem; }
  .hero { padding: 42px 0 38px; }
  .section-head h2 { font-size: 1.35rem; }
  .field { margin-bottom: 12px; }
  .dash-avatar { width: 34px; height: 34px; font-size: .95rem; }
}

/* ============ Deposit / pay page — mobile polish ============ */
@media (max-width: 700px) {
  /* Dashboard deposit tab: drop the outer dash-card frame so the pay
     cards become the real surface (no triple-nested borders). */
  .dash-card:has(.pay-page) { padding: 0; border: 0; background: transparent; box-shadow: none; }

  .pay-heading h2 { font-size: 1.25rem; }
  .pay-heading { margin-bottom: 18px; }

  .pay-card { padding: 16px 14px; border-radius: 14px; }
  .pay-card-head { gap: 10px; margin-bottom: 14px; }
  .pay-num { width: 26px; height: 26px; font-size: .66rem; border-radius: 8px; }
  .pay-card-tt h3 { font-size: .95rem; }
  .pay-card-tt p { font-size: .7rem; }

  .amount-field { max-width: none; }
  .amount-input-wrap .input { font-size: 1.15rem; padding: 11px 13px; }
  .amount-suffix { font-size: .8rem; padding: 12px 12px; }
  .amount-meta { gap: 8px; margin-top: 10px; }

  .transfer-box { padding: 16px 14px; gap: 14px; border-radius: 14px; }
  .transfer-coin { gap: 11px; }
  .transfer-coin-logo { width: 46px; height: 46px; }
  .transfer-coin-txt strong { font-size: 1.1rem; }

  /* QR + address stack cleanly in the vertical layout */
  .transfer-body { gap: 16px; }
  .qr-wrap { width: 100%; }
  .pay-qr-img { width: 136px; height: 136px; }
  .addr-row { flex-wrap: wrap; gap: 8px; }
  .addr-row code { width: 100%; font-size: .68rem; padding: 10px 12px; }

  /* Step 03 is nested inside step 02 — flatten on phones */
  #pay-step-03 { background: transparent; border-color: transparent; padding: 0; border-radius: 0; }
  #pay-step-03 .pay-card-head { margin-bottom: 10px; }

  .pay-submit { margin-top: 14px; }
}

/* ============ Auth pages — mobile dimensions ============ */
@media (max-width: 760px) {
  .auth-page { padding: 26px 16px 48px; }
  .auth-card { padding: 30px 22px; border-radius: 20px; }
  .auth-head { margin-bottom: 22px; }
  .auth-head h1 { font-size: 1.38rem; }
  .auth-head p { font-size: .86rem; }
  .input { font-size: 16px; }
}
@media (max-width: 400px) {
  .auth-card { padding: 26px 18px; }
  .auth-head h1 { font-size: 1.26rem; }
}

/* ============ Settings (native app style) ============ */
.settings-topbar {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: 16px;
  background: linear-gradient(135deg, #1b52e0, #163a9e);
  border-radius: 20px;
  padding: 20px 22px;
  margin-bottom: 22px;
  color: #fff;
  box-shadow: 0 18px 45px -22px rgba(25, 70, 200, .7);
}
.settings-topbar::after {
  content: '';
  position: absolute;
  top: -90px;
  inset-inline-end: -30px;
  width: 260px;
  height: 260px;
  background: radial-gradient(circle, rgba(255, 255, 255, .2), transparent 65%);
  border-radius: 50%;
  pointer-events: none;
}
.st-avatar {
  width: 56px; height: 56px; flex-shrink: 0;
  display: grid; place-items: center;
  font-size: 1.45rem; font-weight: 800;
  border-radius: 18px;
  margin: 0;
  background: rgba(255, 255, 255, .18);
  border: 1px solid rgba(255, 255, 255, .3);
  color: #fff;
}
.settings-who { flex: 1; min-width: 0; position: relative; }
.settings-who strong { display: block; font-size: 1.22rem; font-weight: 800; }
.settings-who span { display: block; font-size: .84rem; opacity: .88; }
.settings-who-side { flex-shrink: 0; text-align: end; line-height: 1.7; position: relative; }
.settings-who-side span { display: block; font-size: .76rem; font-weight: 700; opacity: .95; }
.settings-who-side em { display: block; font-style: normal; font-size: .7rem; opacity: .82; }

.settings-groups { display: flex; flex-direction: column; gap: 22px; }
.set-group-title {
  margin: 0;
  padding-inline-start: 6px;
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .4px;
  text-transform: uppercase;
  color: var(--text-faint);
}
.set-group {
  background: var(--card);
  border: 1px solid var(--border-soft);
  border-radius: 16px;
  overflow: hidden;
}
.set-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: transparent;
  color: var(--text);
  border-bottom: 1px solid var(--border-soft);
  transition: background .15s ease;
  text-decoration: none;
}
.set-row:last-child { border-bottom: 0; }
a.set-toggle { cursor: pointer; }
.set-toggle:hover { background: var(--bg-2); }
.set-ico {
  width: 38px; height: 38px; flex-shrink: 0;
  display: grid; place-items: center;
  font-size: 1.1rem;
  background: rgba(47, 125, 255, .14);
  color: var(--primary-2);
  border-radius: 11px;
}
.set-ico.red { background: rgba(244, 63, 94, .12); color: #f43f5e; }
.set-ico.green { background: rgba(16, 185, 129, .13); color: #10b981; }

.set-label { flex: 1; min-width: 0; font-weight: 600; font-size: .94rem; }
.set-value {
  font-size: .86rem;
  color: var(--text-dim);
  max-width: 45%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pill-out {
  display: inline-flex;
  padding: 3px 12px;
  border-radius: 100px;
  font-size: .72rem;
  font-weight: 700;
  background: rgba(245, 158, 11, .12);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, .35);
}
.set-chev {
  flex-shrink: 0;
  font-size: .9rem;
  color: var(--text-faint);
  transition: transform .25s ease;
}
.set-toggle.open .set-chev { transform: rotate(180deg); }

.set-panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height .3s ease;
  background: var(--bg-2);
}
.set-panel.open { max-height: 1000px; }
.set-panel form { padding: 16px; border-top: 1px solid var(--border-soft); }

.btn-block { width: 100%; }

.btn-logout {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  margin: 24px auto 70px;
  padding: 13px 36px;
  width: fit-content;
  border: 1px solid rgba(244, 63, 94, .35);
  border-radius: 12px;
  background: rgba(244, 63, 94, .08);
  color: #f43f5e;
  font-weight: 800;
  font-size: .97rem;
  transition: all .18s ease;
  text-decoration: none;
}
.btn-logout:hover { background: #f43f5e; color: #fff; transform: translateY(-1px); box-shadow: 0 12px 30px -12px rgba(244, 63, 94, .6); }

.lang-pick { display: flex; gap: 10px; flex-wrap: wrap; }
.pref-save { display: inline-flex; align-items: center; gap: 6px; width: auto; margin-top: 14px; padding: 9px 18px; border-radius: 10px; font-size: .85rem; }
.lang-opt {
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 18px;
  border-radius: 14px;
  border: 1.5px solid var(--border);
  background: var(--bg-2);
  color: var(--text-dim);
  font-weight: 700;
  font-size: .92rem;
  transition: all .18s ease;
}
.lang-opt input { position: absolute; opacity: 0; pointer-events: none; }
.lang-opt span { display: flex; align-items: center; gap: 8px; }
.lang-opt:has(input:checked) { border-color: var(--primary); background: rgba(47, 125, 255, .12); color: var(--text); box-shadow: 0 0 0 3px rgba(47, 125, 255, .12); }

@media (max-width: 600px) {
  .settings-topbar { flex-wrap: wrap; padding: 18px; gap: 12px; }
  .settings-who-side { text-align: start; margin-inline-start: 52px; }
  .st-avatar { width: 50px; height: 50px; font-size: 1.3rem; border-radius: 15px; }
  .settings-groups { gap: 18px; }
}
@media (max-width: 400px) {
  .set-row { padding: 9px 10px; gap: 8px; }
  .set-ico { width: 29px; height: 29px; font-size: .9rem; border-radius: 8px; }
  .set-label { font-size: .8rem; }
  .set-value { font-size: .74rem; max-width: 40%; }
}

/* ============ Nav press feedback: consistent, no sticky highlight ============ */
.nav-links a, .nav-dd > a, .nav-dd-menu a,
.drawer-link, .drawer-dd-link, .dd-toggle,
.nav-toggle, .theme-toggle, .drawer-close, .lang-switch a,
.m-brand-btn, .m-brand-btn * {
  -webkit-tap-highlight-color: transparent;
  outline: none;
}
.nav-links a:focus-visible, .nav-dd > a:focus-visible, .nav-dd-menu a:focus-visible,
.drawer-link:focus-visible, .drawer-dd-link:focus-visible, .dd-toggle:focus-visible,
.nav-toggle:focus-visible, .theme-toggle:focus-visible, .drawer-close:focus-visible,
.lang-switch a:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}
.nav-links a:active, .nav-dd > a:active, .nav-dd-menu a:active,
.drawer-link:active, .drawer-dd-link:active, .dd-toggle:active,
.nav-toggle:active, .theme-toggle:active, .drawer-close:active,
.lang-switch a:active {
  background: rgba(47, 125, 255, .18);
  color: var(--primary-2);
}

/* Touch devices: hover must NOT stick after the tap — keep only the press flash */
@media (hover: none) {
  .coin-btn:not(.active):hover { border-color: var(--border); }
  .nav-links a:not(.active):hover, .nav-dd > a:not(.active):hover, .nav-dd-menu a:not(.active):hover,
  .drawer-link:not(.active):hover, .drawer-dd-link:not(.active):hover, .dd-toggle:hover {
    background: transparent;
    color: inherit;
  }
  .theme-toggle:hover {
    color: var(--text-dim);
    border-color: var(--border);
    transform: none;
  }
  .nav-toggle:hover { background: var(--btn-ghost-bg); }
}
/* ============ Fixed-price offers (gallery + buy) ============ */

.offer-gallery { display: flex; flex-direction: column; gap: 10px; }
.offer-gallery-main {
  border-radius: 16px; overflow: hidden; border: 1px solid var(--border);
  background: var(--bg-2); line-height: 0;
}
.offer-gallery-main img { width: 100%; height: auto; display: block; }
.offer-gallery-thumbs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.og-thumb {
  border: 2px solid var(--border); border-radius: 10px; padding: 0; overflow: hidden;
  background: var(--bg-2); cursor: pointer; line-height: 0; transition: border-color .15s, transform .15s;
}
.og-thumb img { width: 100%; height: 74px; object-fit: cover; }
.og-thumb:hover { border-color: var(--primary-2); transform: translateY(-2px); }
.og-thumb.active { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(47,125,255,.18); }
.offer-share-note {
  margin: 14px 0 0; padding: 12px 14px; border-radius: 12px;
  background: rgba(16,185,129,.1); border: 1px solid rgba(16,185,129,.25);
  color: var(--text); font-size: .8rem;
}
.offer-once-note { font-size: .74rem; color: var(--text-faint); margin: 4px 0 14px; }
.inv-earned { display: block; margin-top: 2px; }
.inv-earned b, .inv-info b.up { color: var(--success, #10b981); }
.inv-price-preview { display: flex; flex-direction: column; justify-content: center; gap: 6px; }
.inv-price-big { font-size: 1.7rem; color: var(--primary-2); line-height: 1.1; }
.btn-success {
  --btn-bg: var(--success, #10b981); --btn-bg-hover: var(--success, #10b981);
  background: var(--btn-bg); color: #fff; border: 1px solid transparent;
  box-shadow: 0 10px 24px -10px rgba(16,185,129,.55);
}
@media (max-width: 560px) {
  .offer-gallery-thumbs { grid-template-columns: repeat(4, 1fr); gap: 6px; }
  .og-thumb img { height: 58px; }
}
.offer-tenor-note {
  margin: 14px 0 0; padding: 12px 14px; border-radius: 12px;
  background: rgba(245,158,11,.1); border: 1px solid rgba(245,158,11,.28);
  color: var(--text); font-size: .8rem;
}
/* ============ Homepage offer card: prominent price & profit ============ */
.proj-daily-badge {
  position: absolute; inset-block-end: 10px; inset-inline-start: 10px; z-index: 3;
  display: inline-flex; align-items: baseline; gap: 5px;
  background: linear-gradient(135deg, rgba(16,185,129,.95), rgba(10,160,105,.92));
  color: #fff; font-weight: 800; font-size: .82rem; line-height: 1;
  padding: 7px 11px; border-radius: 999px; box-shadow: 0 8px 18px -8px rgba(16,185,129,.9);
}
.proj-daily-badge small { font-weight: 600; font-size: .6rem; opacity: .92; }
.offer-price-strip {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin: 14px 0 0; margin-top: auto; padding: 12px 14px; border-radius: 12px;
  background: rgba(47,125,255,.08); border: 1px solid rgba(47,125,255,.22);
}
.ops-label { font-size: .68rem; letter-spacing: .02em; color: var(--text-dim); font-weight: 600; }
.ops-price { font-size: 1.5rem; font-weight: 900; color: var(--primary-2, #2f7dff); line-height: 1; flex: 1; }
.ops-daily {
  font-size: .76rem; font-weight: 800; color: #10b981;
  padding: 5px 10px; border-radius: 999px; background: rgba(16,185,129,.12);
  white-space: nowrap;
}
@media (max-width: 560px) {
  .ops-price { font-size: 1.25rem; }
}

/* ============ Mobile: homepage offer cards ============ */
@media (max-width: 700px) {
  .project-grid { gap: 14px; }
  .project-card { border-radius: 14px; }
  .proj-img { height: auto; aspect-ratio: 16 / 11; }
  .card-head { height: auto; min-height: 60px; padding: 0 14px; }
  .proj-logo { font-size: 1.9rem; }
  .card-body { padding: 16px 15px; gap: 12px; }
  .card-body h3 { font-size: 1.04rem; line-height: 1.35; }
  .proj-loc { font-size: .76rem; }
  .proj-desc { font-size: .8rem; min-height: 0; }
  .proj-daily-badge { inset-block-end: 8px; inset-inline-start: 8px; padding: 6px 10px; font-size: .76rem; }
  .proj-daily-badge small { font-size: .56rem; }
  .offer-price-strip { flex-wrap: nowrap; padding: 12px 13px; gap: 8px; margin-top: auto; }
  .ops-label { font-size: .62rem; flex-shrink: 0; }
  .ops-price { font-size: 1.35rem; flex: 1; min-width: 0; }
  .ops-daily { font-size: .66rem; padding: 4px 8px; flex-shrink: 0; }
}
@media (max-width: 400px) {
  .project-grid { gap: 12px; }
  .proj-img { height: auto; aspect-ratio: 16 / 11; }
  .card-head { min-height: 54px; padding: 0 12px; }
  .proj-logo { font-size: 1.6rem; }
  .card-body { padding: 12px; gap: 9px; }
  .proj-daily-badge { padding: 5px 8px; font-size: .7rem; }
  .ops-price { font-size: 1.15rem; }
  .ops-daily { font-size: .62rem; padding: 3px 7px; }
}

/* ============ Mobile bottom navigation (phone only) ============ */
.m-nav { display: none; }
@media (max-width: 860px) {
  /* Keep the fixed bottom nav from covering the last button/row on phones */
  body:has(.m-nav) { padding-bottom: calc(90px + env(safe-area-inset-bottom, 0px)); }
  .m-nav {
    display: flex; position: fixed; inset-inline: 0; bottom: 0; z-index: 9999;
    align-items: stretch; justify-content: space-between;
    background: rgba(15, 18, 28, .98);
    backdrop-filter: blur(10px);
    padding: 6px 0 calc(10px + env(safe-area-inset-bottom, 0px));
    box-shadow: 0 -4px 16px rgba(0,0,0,.28);
  }
  .m-nav::before {
    content: ""; position: absolute; top: 0; inset-inline: 0;
    height: 3px; z-index: 1; pointer-events: none;
    background: var(--primary-grad);
  }
  .m-nav-it {
    flex: 1; min-width: 0; position: relative; white-space: nowrap;
    display: flex; flex-direction: column; align-items: center; gap: 4px;
    text-decoration: none; padding: 4px 0;
    color: var(--text-faint);
    transition: color .2s ease, background-color .2s ease, opacity .2s ease;
  }
  .m-nav-it .m-nav-lb {
    font-size: .58rem; font-weight: 600; letter-spacing: .2px;
    color: var(--text-faint); transition: color .2s ease;
    max-width: 100%; overflow: hidden; text-overflow: ellipsis;
  }
  .m-nav-it .m-nav-ico {
    display: grid; place-items: center;
    width: 46px; height: 30px;
  }
  .m-nav-it .m-nav-ico svg {
    width: 21px; height: 21px;
    fill: none;
    stroke: rgba(124, 160, 255, .62);
    stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round;
    transition: stroke .25s ease;
  }
  .m-nav-it.active { color: var(--text); }
  .m-nav-it.active .m-nav-ico svg {
    stroke: var(--primary-2);
    stroke-width: 2.1;
    filter: drop-shadow(0 0 6px rgba(47,125,255,.55));
  }
  html[data-theme="light"] .m-nav-it .m-nav-ico svg { stroke: rgba(23, 70, 180, .78); }
  html[data-theme="light"] .m-nav-it.active {
    background: linear-gradient(180deg, rgba(47,125,255,.22), rgba(47,125,255,.12));
    border-radius: 12px;
    box-shadow: inset 0 0 0 1px rgba(47,125,255,.3);
  }
  html[data-theme="light"] .m-nav {
    background: rgba(255, 255, 255, .98);
    box-shadow: 0 -4px 16px rgba(30, 50, 90, .1);
  }
  .m-nav-it.active .m-nav-lb { color: var(--primary-2); font-weight: 800; }
  body { padding-bottom: 76px; }
}

/* ===== PWA install button (always visible, outside drawer, top bar) ===== */
.install-app-btn {
  display: none;
  align-items: center;
  gap: 7px;
  height: 36px;
  padding: 0 12px;
  background: var(--btn-ghost-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text-dim);
  font-size: .85rem;
  font-weight: 700;
  cursor: pointer;
  transition: color .15s, border-color .15s, transform .15s;
}
.install-app-btn:hover { color: var(--gold); border-color: rgba(245,158,11,.4); transform: translateY(-1px); }
.install-app-btn svg { flex: none; display: block; }
@media (max-width: 900px) {
  .install-app-btn { display: inline-flex; }
}
@media (max-width: 480px) {
  .install-app-btn { height: 34px; padding: 0 10px; }
}

/* ===== PWA install button (desktop, mini icon between theme toggle & logout) ===== */
.install-app-btn-sm {
  width: 38px; height: 38px;
  display: none;
  align-items: center; justify-content: center;
  background: var(--btn-ghost-bg);
  border: 1px solid var(--border);
  border-radius: 11px;
  color: var(--text-dim);
  cursor: pointer;
  transition: color .15s, border-color .15s, transform .15s;
}
.install-app-btn-sm:hover { color: var(--gold); border-color: rgba(245,158,11,.4); transform: translateY(-1px); }
.install-app-btn-sm svg { display: block; }
@media (min-width: 901px) {
  .install-app-btn-sm { display: inline-flex; }
}
@media (max-width: 480px) {
  .install-app-btn-sm { width: 36px; height: 36px; border-radius: 10px; }
}

/* ===== PWA install modal ===== */
.pwa-modal {
  position: fixed; inset: 0; z-index: 1400;
  display: grid; place-items: center;
  background: rgba(3,7,18,.72);
  backdrop-filter: blur(3px);
  padding: 20px; animation: fadeIn .18s ease;
}
.pwa-modal[hidden] { display: none; }
.pwa-modal-card {
  width: min(420px, 100%);
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 24px 22px;
  box-shadow: 0 24px 60px rgba(0,0,0,.45);
  text-align: center;
}
.pwa-modal-ico {
  width: 72px; height: 72px; margin: 0 auto 14px;
  border-radius: 20px; overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: 0 8px 22px rgba(0,0,0,.35);
}
.pwa-modal-ico img { display: block; width: 100%; height: 100%; object-fit: cover; }
.pwa-modal-card h3 { margin: 0 0 8px; }
.pwa-modal-card > p { margin: 0 0 14px; color: var(--text-dim); font-size: .92rem; line-height: 1.7; }
.pwa-steps { text-align: right; margin: 0 0 18px; padding-inline-start: 18px; color: var(--text-2); font-size: .9rem; line-height: 1.9; }
.pwa-steps li { margin-bottom: 4px; }
.pwa-steps-wrap {
  margin: 16px 0 14px; padding: 12px 14px; text-align: right;
  border: 1px dashed var(--border); border-radius: 12px; background: rgba(127,127,127,.05);
}
.pwa-steps-wrap summary {
  cursor: pointer; font-size: .8rem; font-weight: 700; color: var(--text-dim);
  list-style: none; display: flex; align-items: center; gap: 6px; justify-content: center;
}
.pwa-steps-wrap summary::-webkit-details-marker { display: none; }
.pwa-steps-wrap[open] summary { margin-bottom: 8px; }
.pwa-steps-wrap summary::after { content: "▾"; font-size: .7rem; transition: transform .15s; }
.pwa-steps-wrap[open] summary::after { transform: rotate(180deg); }
.pwa-steps-inner { text-align: center; }
.pwa-steps-inner p { margin: 4px 0 8px; font-size: .82rem; color: var(--text-dim); }
.pwa-modal-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* Hide install buttons while running as an installed PWA app */
@media (display-mode: standalone), (display-mode: minimal-ui), (display-mode: fullscreen), (display-mode: window-controls-overlay) {
  .install-app-btn, .install-app-btn-sm { display: none !important; }
}

/* Welcome wave emoji — Apple-style image for all devices */
.dash-hero h1 .wave-emoji { margin-inline-start: 8px; vertical-align: -3px; display: inline-block; }

/* ===== Referrals page ===== */
.field-opt { font-size: .7rem; font-weight: 500; color: var(--text-faint); margin-inline-start: 4px; }
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: thin; }
.table-wrap .table { white-space: nowrap; }
.ref-code-row, .ref-link-row {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px;
}
.ref-code {
  display: inline-flex; align-items: center; gap: 10px;
  background: linear-gradient(135deg, rgba(47,125,255,.16), rgba(0,212,255,.1));
  border: 1px dashed var(--primary-2, #4d8dff);
  border-radius: 12px; padding: 10px 16px;
}
.ref-code code {
  font-size: 1.35rem; font-weight: 800; letter-spacing: 3px;
  color: var(--primary-2, #6da4ff);
  direction: ltr;
}
.ref-code-hint {
  font-size: .78rem; color: var(--text-faint); margin: 2px 0 0; line-height: 1.6;
}
.ref-link-row .input { flex: 1; min-width: 200px; direction: ltr; text-align: left; color: var(--primary-2, #6da4ff); font-weight: 600; }
.ref-share { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.ref-code-hint a { color: var(--primary-2, #6da4ff); }

.ref-stats { grid-template-columns: repeat(4, 1fr); }
.stat-card-gold { background: linear-gradient(135deg, rgba(255,186,0,.14), rgba(255,120,0,.08)); border-color: rgba(255,186,0,.35); }
.stat-card-gold strong { color: #ffc125; }
html[data-theme="light"] .stat-card-gold strong { color: #a97400; }

.ref-legend { display: grid; gap: 10px; margin: 4px 0 6px; }
.ref-legend > div {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  background: var(--card-bg); border: 1px solid var(--border-soft);
  border-radius: 10px; padding: 10px 14px; font-size: .85rem; color: var(--text-2);
}
.ref-legend strong { margin-inline-start: auto; color: var(--success, #2ecc71); direction: ltr; }
.ref-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; flex: none; }
.ref-dot.gold { background: #ffc125; }
.ref-dot.blue { background: #4d8dff; }
.ref-dot.green { background: #2ecc71; }
.ref-dot.inline { margin-inline-end: 6px; vertical-align: -1px; }

.pill.lvl-a { background: rgba(255,186,0,.16); color: #ffc125; }
.pill.lvl-b { background: rgba(77,141,255,.16); color: #7db0ff; }
.pill.lvl-c { background: rgba(46,204,113,.16); color: #4fe08c; }
html[data-theme="light"] .pill.lvl-a { color: #a97400; }
html[data-theme="light"] .pill.lvl-b { color: #1d5fce; }
html[data-theme="light"] .pill.lvl-c { color: #128a4f; }

.ref-payouts { display: grid; gap: 8px; margin-top: 4px; }
.ref-payout {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  background: var(--card-bg); border: 1px solid var(--border-soft);
  border-radius: 10px; padding: 8px 12px; font-size: .82rem; color: var(--text-2);
}
.ref-payout strong { margin-inline-start: auto; color: var(--success, #2ecc71); direction: ltr; font-size: .92rem; }
.ref-payout small { color: var(--text-faint); direction: ltr; }

.ref-intro { font-size: .9rem; color: var(--text-2); line-height: 1.9; margin: 2px 0 10px; }
.ref-levels { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 8px; }
.ref-levels li {
  background: var(--card-bg); border: 1px solid var(--border-soft); border-radius: 10px;
  padding: 10px 14px; font-size: .88rem; color: var(--text-2);
}
.ref-levels strong { color: var(--text); }
.set-group-title-sub {
  font-size: .82rem; font-weight: 700; color: var(--text-dim);
  margin: 14px 0 8px; display: flex; align-items: center; gap: 6px;
}
.demo-table { width: 100%; border-collapse: collapse; font-size: .85rem; }
.demo-table th, .demo-table td { padding: 8px 10px; text-align: center; border-bottom: 1px solid var(--border-soft); }
.demo-table thead th { color: var(--text-faint); font-size: .75rem; }
.demo-table thead th:first-child, .demo-table td:first-child { text-align: right; }
.demo-table td { color: var(--text-2); direction: ltr; }
.demo-table .pill { display: inline-flex; }

.ref-closing {
  font-size: .84rem; color: var(--text-dim); line-height: 1.8;
  margin: 12px 0 0; background: rgba(46,204,113,.08);
  border: 1px solid rgba(46,204,113,.2); border-radius: 10px; padding: 10px 14px;
}
.ref-net-list { display: grid; gap: 8px; }
.ref-net-row {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  background: var(--card-bg); border: 1px solid var(--border-soft);
  border-radius: 10px; padding: 8px 12px; font-size: .84rem;
}
.ref-net-user { font-weight: 700; color: var(--text); }
.ref-net-row small { color: var(--text-faint); margin-inline-start: auto; direction: ltr; }

@media (max-width: 860px) {
  .ref-stats { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- Home news widget ---------- */
#home-news { padding-bottom: 20px; }
#projects { padding-top: 12px; }
.section-head.home-news-head { margin-bottom: 24px; }
.home-news-title::after { content: ""; display: block; width: 46px; height: 3px; margin: 10px auto 0; border-radius: 3px; background: var(--primary-grad); }
.home-news-more { margin: 16px auto 0; display: flex; align-items: center; justify-content: center; gap: 8px; max-width: 300px; width: 100%; padding: 13px 18px; border-radius: 14px; background: var(--card); border: 1.5px dashed var(--border); color: var(--primary-2); font-weight: 800; font-size: .92rem; transition: border-color .2s, background .2s, transform .2s; }
.home-news-more:hover { border-color: var(--primary); background: rgba(47, 125, 255, .08); transform: translateY(-1px); }
.home-news { position: relative; display: flex; align-items: center; gap: 12px; }
.hn-viewport { flex: 1; min-width: 0; overflow: hidden; border-radius: var(--radius-lg); background: var(--card); border: 1.5px solid var(--border); box-shadow: 0 20px 46px -24px rgba(10,25,60,.5); touch-action: pan-y; }
.hn-track { display: flex; transition: transform .55s cubic-bezier(.22, 1, .36, 1); }
.hn-slide { flex: 0 0 100%; display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; padding: 18px; }
.hn-item { position: relative; display: flex; flex-direction: column; border: 1px solid var(--border-soft); border-radius: 16px; background: var(--card-2); color: var(--text); overflow: hidden; transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease; box-shadow: 0 2px 8px rgba(8,18,40,.05); }
.hn-item::before { content: ""; position: absolute; inset: 0; z-index: 4; border-radius: inherit; padding: 1.5px; background: linear-gradient(135deg, var(--primary), var(--primary-2)); -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0); -webkit-mask-composite: xor; mask-composite: exclude; opacity: 0; transition: opacity .25s ease; pointer-events: none; }
.hn-item:hover { transform: translateY(-7px); border-color: transparent; box-shadow: 0 26px 50px -20px rgba(15,40,90,.55); }
.hn-item:hover::before { opacity: 1; }
.hn-media { position: relative; flex: none; overflow: hidden; }
.hn-media::after { content: ""; position: absolute; inset: 0; z-index: 3; background: linear-gradient(105deg, transparent 40%, rgba(255,255,255,.18) 50%, transparent 60%); transform: translateX(-130%); transition: transform .85s ease; pointer-events: none; }
.hn-item:hover .hn-media::after { transform: translateX(130%); }
.hn-thumb { width: 100%; height: 150px; display: block; background-size: cover; background-position: center; background-color: var(--card-2); transition: transform .55s cubic-bezier(.22, 1, .36, 1); }
.hn-thumb::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(5,12,28,.5), rgba(5,12,28,0) 55%), linear-gradient(0deg, rgba(5,12,28,.35), transparent 40%); pointer-events: none; }
.hn-item:hover .hn-thumb { transform: scale(1.07); }
.hn-info { display: flex; flex-direction: column; gap: 8px; padding: 14px 16px 15px; min-width: 0; flex: 1; }
.hn-src { position: absolute; top: 12px; inset-inline-start: 12px; z-index: 2; font-size: 11px; font-weight: 800; letter-spacing: .3px; color: #fff; background: rgba(8,14,30,.55); backdrop-filter: blur(7px); -webkit-backdrop-filter: blur(7px); padding: 5px 11px; border-radius: 999px; border: 1px solid rgba(255,255,255,.18); }
.hn-cat { position: absolute; bottom: 10px; inset-inline-start: 12px; z-index: 2; display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 800; letter-spacing: .3px; padding: 5px 11px; border-radius: 999px; background: rgba(8,14,30,.6); backdrop-filter: blur(7px); -webkit-backdrop-filter: blur(7px); border: 1px solid rgba(255,255,255,.16); }
.hn-cat::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; }
.hn-cat--crypto { color: #ffb26b; }
.hn-cat--property { color: #7ee2a8; }
.hn-cat--general { color: #8ec5ff; }
.hn-title { font-size: 1.07rem; font-weight: 750; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.hn-desc { font-size: .86rem; color: var(--text-dim); line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.hn-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 10px; border-top: 1px dashed var(--border-soft); font-size: .83rem; font-weight: 600; }
.hn-meta-left { display: inline-flex; align-items: baseline; gap: 8px; min-width: 0; }
.hn-time { font-weight: 600; color: var(--text-faint); white-space: nowrap; }
.hn-rt { font-size: .76rem; font-weight: 700; color: var(--text-faint); opacity: .8; }
.hn-read { width: 34px; height: 34px; flex: none; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; background: rgba(0, 136, 255, .12); color: var(--primary-2); transition: background .2s, color .2s, transform .2s; }
.hn-arrow { transition: transform .2s; }
.hn-item:hover .hn-read { background: linear-gradient(135deg, var(--primary), var(--primary-2)); color: #fff; transform: rotate(-45deg); }
.hn-nav { flex: 0 0 auto; position: relative; width: 48px; height: 48px; border-radius: 50%; border: 1.5px solid var(--border); background: linear-gradient(160deg, var(--card), var(--card-2)); color: var(--text); font-size: 1.5rem; font-weight: 700; line-height: 1; cursor: pointer; box-shadow: 0 8px 20px -10px rgba(10,25,60,.5); overflow: hidden; transition: border-color .2s, color .2s, transform .2s, box-shadow .2s; }
.hn-nav::before { content: ""; position: absolute; inset: 0; border-radius: 50%; background: radial-gradient(circle at 30% 20%, rgba(0,212,255,.18), transparent 60%); opacity: 0; transition: opacity .2s; }
.hn-nav:hover { border-color: var(--primary); color: var(--primary-2); transform: translateY(-3px) scale(1.05); box-shadow: 0 14px 30px -12px rgba(0,140,255,.55); }
.hn-nav:hover::before { opacity: 1; }
.hn-nav:active { transform: translateY(0) scale(.96); }
.hn-dots { display: flex; justify-content: center; gap: 8px; margin-top: 16px; }
.hn-dot { width: 8px; height: 8px; border-radius: 50%; border: none; background: var(--border); cursor: pointer; padding: 0; transition: width .25s, background .25s, transform .25s; }
.hn-dot.on { width: 26px; border-radius: 999px; background: linear-gradient(90deg, var(--primary), var(--primary-2)); }

@media (max-width: 700px) {
  .hn-slide { grid-template-columns: 1fr; }
  .hn-thumb { height: 200px; }
  .hn-nav { display: none; }
  .home-news { gap: 0; }
}

@media (max-width: 700px) and (min-width: 561px) {
  .hn-item { flex-direction: row; align-items: stretch; }
  .hn-media { width: 150px; flex: none; margin: 12px; border-radius: 14px; }
  .hn-thumb { position: absolute; inset: 0; height: 100%; width: 100%; }
  .hn-info { padding: 12px 2px 12px 12px; }
  .hn-title { font-size: .98rem; -webkit-line-clamp: 3; }
  .hn-desc { -webkit-line-clamp: 2; }
}

@media (max-width: 560px) {
  .hn-viewport { border-radius: 20px; }
  .hn-slide { gap: 12px; padding: 12px; }
  .hn-item { flex-direction: row; align-items: stretch; border-radius: 16px; background: linear-gradient(140deg, var(--card-2), var(--card)); }
  .hn-media { width: 128px; flex: none; margin: 10px; border-radius: 13px; }
  .hn-thumb { position: absolute; inset: 0; height: 100%; width: 100%; }
  .hn-cat { bottom: 8px; inset-inline-start: 8px; font-size: 9px; padding: 3px 8px; gap: 4px; }
  .hn-info { padding: 10px 2px 10px 12px; gap: 5px; }
  .hn-title { font-size: .95rem; font-weight: 700; -webkit-line-clamp: 2; line-height: 1.45; }
  .hn-desc { font-size: .8rem; -webkit-line-clamp: 1; }
  .hn-meta { padding-top: 6px; font-size: .74rem; }
  .hn-read { width: 28px; height: 28px; }
  .hn-arrow { font-size: .82rem; }
  .hn-dots { margin-top: 12px; }
}

@media (min-width: 701px) and (max-width: 1024px) {
  .hn-thumb { height: 190px; }
}

/* ---------- Admin news manager ---------- */
.news-admin-form textarea.input { width: 100%; margin-bottom: 10px; }
.lnews-thumb { display: inline-block; width: 56px; height: 40px; border-radius: 6px; background-size: cover; background-position: center; background-color: var(--card-2); vertical-align: middle; }
.lnews-thumb--grad { background: linear-gradient(135deg, #0f2c4d, var(--card-2)); }

/* ============ Mobile app-like ============ */
@media (hover: none) and (pointer: coarse) {
  body { -webkit-touch-callout: none; touch-action: manipulation; }
  body, body * { -webkit-user-select: none; user-select: none; }
  body input, body textarea, body select, body button, body a, body .btn, body .wd-copy { -webkit-user-select: auto; user-select: auto; }
}

/* ============ Telegram support ============ */
.tg-float {
  position: fixed; bottom: 60px; right: 16px; z-index: 1000;
  width: 54px; height: 54px; border-radius: 50%;
  background: linear-gradient(135deg, #229ed9 0%, #0088cc 100%);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 10px 24px rgba(0,136,204,.5);
  color: #fff; transition: transform .15s ease;
}
.tg-float svg { width: 27px; height: 27px; }
.tg-float:active { transform: scale(.92); }
.tg-float:hover { transform: scale(1.06); filter: brightness(1.06); }
@media (max-width: 860px) {
  body:has(.m-nav) .tg-float { bottom: 120px; }
}

/* ============ App-like touch (mobile) ============
   Removes the browser's blue tap-highlight and text
   selection flash on interactive elements when tapped
   on phones, so it feels like a native app.
   ================================================== */
@media (max-width: 860px) {
  * { -webkit-tap-highlight-color: transparent; }
  a, button, .btn, input[type="submit"],
  label[for], select, summary,
  .set-row, .set-toggle, .nav-toggle, .m-brand-btn,
  [data-pwa-trigger], .theme-toggle, .withdraw-link,
  .offer-buy, .offer-btn, .wd-copy {
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
  }
  input, textarea, .input { -webkit-user-select: text; user-select: text; }
}

/* ============ Mobile browsing stability ============
   Prevents the "buttons/images shifting while scrolling"
   problem on phones: stable image footprint (no layout jump
   when lazy images load or browser chrome collapses), proper
   scroll offset under the sticky header, and tidy offer cards.
   ==================================================== */
@media (max-width: 860px) {
  html { scroll-padding-top: calc(var(--nav-h, 60px) + 10px); }
  .auth-page { min-height: calc(100dvh - var(--nav-h, 60px)); }

  /* Offer & detail images: reserve the box, keep it stable */
  .project-grid .project-card .proj-img {
    min-height: 190px;
  }
  .project-grid .project-card .proj-img img {
    position: absolute; inset: 0; width: 100%; height: 100%;
  }
  .offer-gallery {
    gap: 8px;
  }
  .offer-gallery-main {
    position: relative; aspect-ratio: 4 / 3; min-height: 210px;
  }
  .offer-gallery-main img {
    position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  }
  .offer-gallery-thumbs { grid-template-columns: repeat(4, 1fr); gap: 6px; }

  /* Detail hero: tighter top so the page feels proportional on phones */
  .proj-hero-inner { padding-top: 80px; padding-bottom: 34px; gap: 11px; }
  .proj-back { padding: 6px 14px; font-size: .78rem; }
  .proj-hero-inner h1 { font-size: clamp(1.4rem, 6.5vw, 1.9rem); }
  .proj-hero-chips { gap: 8px; }
  .proj-hero-chip, .proj-hero .proj-min-chip { font-size: .66rem; padding: 3px 10px; }

  /* Offer cards: never cram the price strip or wrap buy buttons awkwardly */
  .offer-price-strip {
    flex-wrap: wrap; row-gap: 6px;
    align-items: center;
  }
  .ops-price { min-width: 0; flex: 0 1 auto; }
  .offer-buy-area .btn-block,
  .proj-invest-card .btn-block {
    white-space: normal; line-height: 1.35; padding-block: 11px;
  }
  .card-body { min-width: 0; }
  .card-body h3, .proj-invest-card h3 { overflow-wrap: anywhere; }

  /* Keep last interactive controls clear of the fixed bottom nav */
  .section, .proj-block, .project-card { scroll-margin-bottom: 90px; }
}
