:root {
  --bg: #0b0f1a;
  --bg2: #111726;
  --bg3: #17203a;
  --line: #232c45;
  --text: #e7ecf7;
  --muted: #8b96b5;
  --accent: #0ecb81;
  --accent2: #65e6a5;
  --green: #0ecb81;
  --red: #f6465d;
  --radius: 10px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.45;
}

a { color: var(--accent2); text-decoration: none; }
a:hover { text-decoration: underline; }

.muted { color: var(--muted); }
.hidden { display: none !important; }

input, select, button { font-family: inherit; }

input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
input[type="number"] { -moz-appearance: textfield; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 0;
  border-radius: 8px;
  padding: 10px 16px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: filter .15s, transform .05s;
  color: #fff;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-accent { background: linear-gradient(135deg, var(--accent), var(--accent2)); color: #04120b; }
.btn-accent:hover { filter: brightness(1.06); }
.btn-ghost { background: var(--bg3); color: var(--text); border: 1px solid var(--line); }
.btn-ghost:hover { border-color: var(--accent); }
.btn-sm { padding: 6px 12px; font-size: 13px; }
.btn-block { width: 100%; }
.btn-red { background: var(--red); }
.btn-greenbg { background: var(--green); }

.notice { padding: 10px 14px; border-radius: 8px; margin-bottom: 14px; font-size: 13px; }
.notice-err { background: rgba(246,70,93,.12); border: 1px solid rgba(246,70,93,.4); }
.notice-ok { background: rgba(14,203,129,.12); border: 1px solid rgba(14,203,129,.4); }
.notice-warn { background: rgba(14,203,129,.12); border: 1px solid rgba(14,203,129,.4); }

/* Auth */
.auth-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 24px;
  background:
    radial-gradient(1000px 500px at 10% -10%, rgba(14,203,129,.12), transparent 60%),
    radial-gradient(900px 500px at 110% 110%, rgba(14,203,129,.08), transparent 60%),
    var(--bg);
}
.auth-card {
  width: 100%;
  max-width: 400px;
  background: var(--bg2);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 28px;
  box-shadow: 0 20px 60px rgba(0,0,0,.5);
}
.auth-brand { text-align: center; margin-bottom: 22px; }
.auth-logo {
  width: 54px; height: 54px;
  margin: 0 auto 10px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #04120b;
  font-size: 28px;
  font-weight: 800;
  display: flex; align-items: center; justify-content: center;
}
.auth-brand h1 { margin: 0; font-size: 22px; }
.auth-brand p { margin: 2px 0 0; color: var(--muted); }
.auth-tabs { display: flex; gap: 6px; margin-bottom: 18px; background: var(--bg3); padding: 4px; border-radius: 10px; }
.auth-tab { flex: 1; padding: 8px; border: 0; background: transparent; color: var(--muted); cursor: pointer; border-radius: 8px; font-weight: 600; }
.auth-tab.active { background: var(--accent); color: #04120b; }
.auth-form { display: flex; flex-direction: column; gap: 14px; }
.auth-form label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); }
.auth-form input { background: var(--bg); border: 1px solid var(--line); color: var(--text); padding: 10px 12px; border-radius: 8px; font-size: 14px; outline: none; }
.auth-form input:focus { border-color: var(--accent); }
.auth-hint { font-size: 12px; color: var(--muted); text-align: center; margin: 0; }

/* App shell */
.app-body { min-height: 100vh; display: flex; flex-direction: column; }
.topbar {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 12px 18px;
  background: var(--bg2);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 50;
  flex-wrap: wrap;
}
.topbar-brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 18px; }
.topbar-brand img { height: 40px; width: auto; object-fit: contain; background: transparent; }
.topbar-brand small { color: var(--accent); font-weight: 600; font-size: 12px; text-transform: uppercase; }
.topbar-brand-link { display: flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; }
.topbar-brand-link:hover { text-decoration: none; }
.topbar-nav { display: flex; gap: 4px; margin-left: 16px; }
.topbar-nav-link { color: var(--muted); font-weight: 600; font-size: 13px; padding: 6px 12px; border-radius: 8px; text-decoration: none; transition: background .2s, color .2s; }
.topbar-nav-link:hover { color: var(--text); text-decoration: none; background: var(--bg3); }
.topbar-nav-link.active { color: var(--accent2); background: rgba(14,203,129,.12); }
.brand-mark {
  width: 34px; height: 34px;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #04120b;
  font-weight: 800;
  display: flex; align-items: center; justify-content: center;
}
.topbar-balances { display: flex; gap: 10px; flex-wrap: wrap; margin-left: auto; }
.balance-box { background: var(--bg3); border: 1px solid var(--line); border-radius: 10px; padding: 6px 14px; text-align: right; min-width: 110px; }
.balance-box span { display: block; font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.balance-box strong { font-family: var(--mono); font-size: 15px; }
.pnl-box strong.pos { color: var(--green); }
.pnl-box strong.neg { color: var(--red); }
.topbar-actions { display: flex; gap: 8px; align-items: center; }

.account-switcher { display: flex; gap: 0; background: var(--bg3); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.acct-btn { padding: 6px 14px; border: 0; background: transparent; color: var(--muted); font-weight: 600; font-size: 12px; cursor: pointer; transition: background .2s, color .2s; text-transform: uppercase; letter-spacing: .04em; }
.acct-btn.active { background: var(--accent); color: #04120b; }
.acct-btn:hover:not(.active) { color: var(--text); }

.app-statusbar { padding: 8px 18px; font-size: 13px; background: rgba(14,203,129,.1); border-bottom: 1px solid rgba(14,203,129,.3); color: var(--accent2); }

.app-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 14px;
  padding: 14px 18px;
}
.chart-panel { background: var(--bg2); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; display: flex; flex-direction: column; min-width: 0; }
.chart-toolbar { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.symbol-select {
  background: var(--bg3); color: var(--text); border: 1px solid var(--line);
  border-radius: 8px; padding: 8px 10px; font-size: 14px; font-weight: 600; min-width: 180px; outline: none;
}
.symbol-select:focus { border-color: var(--accent); }
.pair-last { font-family: var(--mono); font-size: 18px; font-weight: 700; }
.pair-change { font-family: var(--mono); font-size: 13px; opacity: .85; }
.pair-change.pos { color: var(--green); }
.pair-change.neg { color: var(--red); }
#chart-container { height: 540px; }
#chart-container iframe { border: 0; }

/* Order panel */
.order-panel { display: flex; flex-direction: column; gap: 14px; background: var(--bg2); border: 1px solid var(--line); border-radius: 12px; padding: 16px; }
.order-header h2 { margin: 0 0 4px; font-size: 17px; }
.side-toggle { display: flex; gap: 6px; }
.side-btn { flex: 1; padding: 12px 8px; border-radius: 8px; border: 1px solid var(--line); background: var(--bg3); color: var(--muted); font-weight: 700; font-size: 14px; cursor: pointer; }
.side-btn.side-long.active { background: var(--green); border-color: var(--green); color: #04120b; }
.side-btn.side-short.active { background: var(--red); border-color: var(--red); color: #fff; }

.field { display: flex; flex-direction: column; gap: 6px; }
.field > span { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; }
.field input {
  background: var(--bg); border: 1px solid var(--line); color: var(--text);
  padding: 10px 12px; border-radius: 8px; font-size: 14px; outline: none; width: 100%;
}
.field input:focus { border-color: var(--accent); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.field-row .field input { font-family: var(--mono); font-size: 13px; }

.stepper { display: flex; align-items: stretch; }
.stepper input { text-align: center; border-radius: 0; font-family: var(--mono); }
.step-btn { width: 42px; background: var(--bg3); border: 1px solid var(--line); color: var(--text); font-size: 18px; cursor: pointer; }
.step-btn:first-child { border-radius: 8px 0 0 8px; }
.step-btn:last-child { border-radius: 0 8px 8px 0; }
.step-btn:hover { border-color: var(--accent); }

.order-summary { background: var(--bg3); border: 1px solid var(--line); border-radius: 10px; padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.order-summary-row { display: flex; justify-content: space-between; font-size: 13px; }
.order-summary-row span { color: var(--muted); }
.order-summary-row strong { font-family: var(--mono); }
.order-note { font-size: 12px; color: var(--muted); margin: 0; text-align: center; min-height: 16px; }

.btn-order { padding: 14px; font-size: 15px; }

/* Tables / positions */
.positions-section { padding: 0 18px 30px; }
.section-tabs { display: flex; gap: 6px; margin-bottom: 8px; }
.sec-tab { background: transparent; border: 0; color: var(--muted); font-weight: 600; padding: 8px 12px; cursor: pointer; border-bottom: 2px solid transparent; }
.sec-tab.active { color: var(--text); border-bottom-color: var(--accent); }
.badge { background: var(--accent); color: #04120b; border-radius: 20px; padding: 1px 8px; font-size: 12px; font-weight: 700; }

.table-wrap { background: var(--bg2); border: 1px solid var(--line); border-radius: 12px; overflow: auto; }
.data-table { width: 100%; border-collapse: collapse; min-width: 900px; }
.data-table th, .data-table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.data-table th { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); background: var(--bg3); position: sticky; top: 0; }
.data-table tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover { background: rgba(255,255,255,.02); }
.mono { font-family: var(--mono); }

.badge-side { font-weight: 700; font-size: 12px; padding: 2px 8px; border-radius: 6px; }
.badge-side.long { background: rgba(14,203,129,.15); color: var(--green); }
.badge-side.short { background: rgba(246,70,93,.15); color: var(--red); }
.pnl.pos { color: var(--green); }
.pnl.neg { color: var(--red); }
.row-table { display: flex; gap: 5px; align-items: center; }

/* Admin */
.admin-body .topbar .topbar-balances { display: none; }
.admin-nav { display: flex; gap: 4px; padding: 14px 18px 0; flex-wrap: wrap; }
.admin-nav-btn { background: transparent; border: 1px solid transparent; color: var(--muted); padding: 8px 14px; border-radius: 8px; cursor: pointer; font-weight: 600; }
.admin-nav-btn:hover { color: var(--text); }
.admin-nav-btn.active { background: var(--bg3); border-color: var(--line); color: var(--accent2); }
.admin-content { padding: 14px 18px 40px; }
.admin-view { display: flex; flex-direction: column; gap: 14px; }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.stat-box { background: var(--bg2); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; }
.stat-box span { display: block; font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.stat-box strong { font-family: var(--mono); font-size: 20px; }
.stat-box strong.pos { color: var(--green); }
.stat-box strong.neg { color: var(--red); }

.admin-card { background: var(--bg2); border: 1px solid var(--line); border-radius: 12px; padding: 16px; }
.admin-card h3 { margin: 0 0 6px; }
.inline-form { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.inline-form label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); }
.inline-form input { background: var(--bg); border: 1px solid var(--line); color: var(--text); padding: 8px 10px; border-radius: 8px; outline: none; }
.inline-form input:focus { border-color: var(--accent); }

.settings-form { display: flex; flex-direction: column; gap: 14px; max-width: 520px; }
.settings-form > label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); }
.settings-form input { background: var(--bg); border: 1px solid var(--line); color: var(--text); padding: 9px 11px; border-radius: 8px; outline: none; }
.settings-form input:focus { border-color: var(--accent); }
.settings-form textarea { background: var(--bg); border: 1px solid var(--line); color: var(--text); padding: 9px 11px; border-radius: 8px; outline: none; font-family: inherit; resize: vertical; }
.settings-form textarea:focus { border-color: var(--accent); }
.settings-form .checkline { flex-direction: row; align-items: center; gap: 10px; margin: 0; }
.settings-form .checkline input { width: auto; }

.row-filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.pos-filter.active { border-color: var(--accent); color: var(--accent2); }

.mini-actions { display: flex; gap: 6px; align-items: center; }
.icon-btn { background: transparent; border: 1px solid var(--line); color: var(--text); border-radius: 6px; padding: 4px 8px; font-size: 12px; cursor: pointer; }
.icon-btn:hover { border-color: var(--accent); color: var(--accent2); }
.inv-inp { background: var(--bg); border: 1px solid var(--line); color: var(--text); padding: 6px 8px; border-radius: 6px; font-size: 12px; outline: none; }
.inv-inp:focus { border-color: var(--accent); }

/* Modal */
.modal-bg { position: fixed; inset: 0; background: rgba(0,0,0,.6); display: flex; align-items: center; justify-content: center; z-index: 100; padding: 20px; }
[hidden] { display: none !important; }
.modal { background: var(--bg2); border: 1px solid var(--line); border-radius: 14px; padding: 20px; width: 100%; max-width: 380px; }
.modal h3 { margin: 0 0 14px; }
.modal-form { display: flex; flex-direction: column; gap: 12px; }
.modal-form label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); }
.modal-form input { background: var(--bg); border: 1px solid var(--line); color: var(--text); padding: 9px 11px; border-radius: 8px; outline: none; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; }

@media (max-width: 980px) {
  .app-grid { grid-template-columns: 1fr; }
  #chart-container { height: 420px; }
}

/* ===== Homepage ===== */
.home-nav { position: sticky; top: 0; z-index: 60; height: 110px; background: rgba(11,15,26,.85); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.home-nav-inner { max-width: 1200px; margin: 0 auto; height: 110px; display: flex; align-items: center; gap: 20px; padding: 0 20px; }
.home-brand { display: flex; align-items: center; }
.home-brand img { height: 70px; width: auto; max-width: none; object-fit: contain; background: transparent; }
.home-links { display: flex; gap: 18px; margin-left: 24px; }
.home-links a { color: var(--muted); font-weight: 600; font-size: 14px; }
.home-links a:hover { color: var(--accent2); text-decoration: none; }
.home-actions { margin-left: auto; display: flex; gap: 8px; }

.hero { width: 100%; margin: 0; padding: 0; }
.hero-slider { position: relative; border-radius: 0; overflow: hidden; aspect-ratio: 2 / 1; max-height: 820px; border: 0; border-bottom: 1px solid var(--line); box-shadow: none; background: #0a0e18; }
.hero-slide { position: absolute; inset: 0; opacity: 0; transition: opacity .8s ease; pointer-events: none; }
.hero-slide.active { opacity: 1; pointer-events: auto; }
.hero-shot { position: absolute; inset: 0; background-size: cover; background-position: center; }
.hero-shade { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(8,11,20,.1) 0%, rgba(8,11,20,.42) 45%, rgba(8,11,20,.88) 78%), linear-gradient(0deg, rgba(8,11,20,.78), transparent 55%); }
.hero-copy { position: absolute; top: 0; bottom: 0; left: 50%; right: 0; display: flex; flex-direction: column; justify-content: center; align-items: flex-end; text-align: right; padding: 40px clamp(24px, 6vw, 90px); z-index: 2; }
.hero-tag { display: inline-flex; width: fit-content; background: rgba(14,203,129,.15); border: 1px solid rgba(14,203,129,.4); color: var(--accent2); text-transform: uppercase; letter-spacing: .08em; font-size: 12px; font-weight: 700; padding: 5px 12px; border-radius: 999px; margin-bottom: 16px; }
.hero-copy h1 { font-size: clamp(26px, 4vw, 46px); line-height: 1.12; margin: 0 0 14px; }
.hero-copy p { color: var(--muted); font-size: clamp(14px, 1.6vw, 17px); max-width: 520px; margin: 0 0 24px; }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.hero-arrow { position: absolute; top: 50%; transform: translateY(-50%); z-index: 5; width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgba(255,255,255,.18); background: rgba(11,15,26,.45); color: #fff; font-size: 18px; cursor: pointer; transition: background .2s, border-color .2s; backdrop-filter: blur(4px); }
.hero-arrow:hover { background: var(--accent); color: #04120b; border-color: var(--accent); }
.hero-arrow-prev { left: 16px; }
.hero-arrow-next { right: 16px; }
.hero-dots { position: absolute; bottom: 18px; left: 0; right: 0; display: flex; justify-content: center; gap: 8px; z-index: 5; }
.hero-dot { width: 10px; height: 10px; border-radius: 999px; border: 0; background: rgba(255,255,255,.35); cursor: pointer; transition: all .25s; padding: 0; }
.hero-dot.active { background: var(--accent); width: 26px; }

.home-stats { max-width: 1200px; margin: 26px auto 0; padding: 0 20px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.stat-chip { background: var(--bg2); border: 1px solid var(--line); border-radius: 14px; padding: 18px; text-align: center; }
.stat-chip strong { display: block; font-family: var(--mono); font-size: 24px; color: var(--accent2); }
.stat-chip span { color: var(--muted); font-size: 13px; }

.home-features, .home-pairs { max-width: 1200px; margin: 0 auto; padding: 64px 20px 0; }
.home-heading { text-align: center; margin-bottom: 30px; }
.home-heading h2 { font-size: clamp(22px, 3vw, 32px); margin: 0 0 8px; }
.home-heading p { color: var(--muted); margin: 0; }
.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.feature-card { background: var(--bg2); border: 1px solid var(--line); border-radius: 16px; padding: 24px; transition: border-color .2s, transform .2s; }
.feature-card:hover { border-color: rgba(14,203,129,.5); transform: translateY(-3px); }
.feature-icon { width: 46px; height: 46px; border-radius: 12px; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, rgba(14,203,129,.18), rgba(14,203,129,.05)); color: var(--accent2); margin-bottom: 16px; }
.feature-icon svg { width: 24px; height: 24px; }
.feature-card h3 { margin: 0 0 6px; font-size: 17px; }
.feature-card p { margin: 0; color: var(--muted); font-size: 13.5px; }

.pair-chips { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.pair-chip { font-family: var(--mono); background: var(--bg2); border: 1px solid var(--line); color: var(--text); padding: 8px 16px; border-radius: 999px; font-weight: 600; }

.home-cta { width: 100%; margin: 60px 0 0; padding: 0; }
.cta-inner {
  position: relative;
  width: 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  text-align: center;
  padding: 48px 20px;
  background-image: url('images/loginimg.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
.cta-inner::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(11, 15, 26, .85), rgba(11, 15, 26, .55));
}
.cta-inner > * { position: relative; z-index: 1; }
.cta-inner h2 { font-size: clamp(22px, 3vw, 30px); margin: 0 0 8px; }
.cta-inner p { color: var(--muted); margin: 0 0 22px; }
.cta-inner .hero-actions { justify-content: center; }

.home-footer { max-width: 1200px; margin: 40px auto 0; padding: 26px 20px 40px; border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.home-foot-brand { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; }
.home-foot-brand img { width: 26px; height: 26px; object-fit: contain; }
.home-footer p { color: var(--muted); font-size: 13px; margin: 6px 0 0; }
.home-footer nav { display: flex; gap: 16px; }
.home-footer nav a { color: var(--muted); font-size: 13px; }
.home-footer nav a:hover { color: var(--accent2); text-decoration: none; }

/* ===== Homepage full-width banner ===== */
.home-image-banner { width: 100%; margin: 0; line-height: 0; }
.image-banner-full { display: block; width: 100%; height: auto; object-fit: cover; }

/* ===== Homepage testimonials ===== */
.home-testimonials { max-width: 1200px; margin: 60px auto 0; padding: 0 20px; }
.testimonial-inner { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: center; }
.testimonial-media { border-radius: 20px; overflow: hidden; border: 1px solid var(--line); line-height: 0; }
.testimonial-content h2 { font-size: clamp(22px, 3vw, 30px); margin: 0 0 8px; }
.testimonial-content > p { color: var(--muted); margin: 0 0 22px; }
.review-grid { display: grid; grid-template-columns: 1fr; gap: 14px; }
.review-card { background: var(--bg2); border: 1px solid var(--line); border-radius: 14px; padding: 18px; }
.review-card blockquote { margin: 0 0 10px; }
.review-card blockquote p { margin: 0; color: var(--text); font-size: 14px; }
.review-author strong { display: block; font-size: 13px; margin-bottom: 2px; }
.review-stars { color: var(--accent2); font-size: 14px; letter-spacing: 2px; }

/* ===== Auth fullscreen background ===== */
.auth-page { position: relative; display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: 24px; overflow-x: hidden; }
.auth-bg { position: fixed; inset: 0; background-size: cover; background-position: center; opacity: 0; transition: opacity .7s ease; z-index: 0; }
.auth-bg.active { opacity: 1; }
.auth-bg-shade { position: fixed; inset: 0; background: linear-gradient(180deg, rgba(8,11,20,.62), rgba(8,11,20,.84)); z-index: 1; }
.auth-panel { position: relative; z-index: 2; display: flex; align-items: center; justify-content: center; width: 100%; max-width: 500px; }
.auth-card { width: 100%; max-width: 460px; background: var(--bg2); border: 1px solid var(--line); border-radius: 18px; padding: 30px 30px 22px; box-shadow: 0 25px 70px rgba(0,0,0,.65); }
.auth-logo-img { width: 400px; max-width: 100%; height: auto; object-fit: contain; display: block; margin: 0 auto 12px; background: transparent; }
.auth-alt { text-align: center; font-size: 13px; margin: 16px 0 0; }
.auth-alt a { color: var(--muted); }
.auth-alt a:hover { color: var(--accent2); text-decoration: none; }

.pass-field { position: relative; display: flex; align-items: center; }
.pass-field input { width: 100%; padding-right: 66px; }
.pass-toggle { position: absolute; right: 6px; background: var(--bg3); border: 1px solid var(--line); color: var(--muted); font-size: 12px; border-radius: 6px; padding: 4px 8px; cursor: pointer; }
.pass-toggle:hover { color: var(--accent2); border-color: var(--accent); }

/* Dashboard sub-pages (deposit, withdraw, kyc, profile) */
.page-body { padding: 20px 18px; max-width: 960px; margin: 0 auto; }
.page-section { background: var(--bg2); border: 1px solid var(--line); border-radius: 12px; padding: 20px; margin-bottom: 18px; }
.page-section h2 { margin: 0 0 14px; font-size: 18px; }
.page-section p { color: var(--muted); font-size: 14px; margin: 0 0 12px; }
.page-form { display: flex; flex-direction: column; gap: 14px; max-width: 520px; }
.page-form label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); }
.page-form input, .page-form select, .page-form textarea { background: var(--bg); border: 1px solid var(--line); color: var(--text); padding: 9px 11px; border-radius: 8px; font-size: 14px; outline: none; }
.page-form input:focus, .page-form select:focus, .page-form textarea:focus { border-color: var(--accent); }
.page-form textarea { resize: vertical; min-height: 80px; }
.page-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.page-grid .page-section { margin-bottom: 0; }
.wallet-copy { display: flex; align-items: center; gap: 8px; }
.wallet-copy input { flex: 1; }
.wallet-copy .btn { flex: 0 0 auto; }
.qr-image { max-width: 220px; border-radius: 10px; border: 1px solid var(--line); margin-bottom: 12px; }
.status-badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.status-badge.pending { background: rgba(14,203,129,.15); color: var(--accent2); border: 1px solid rgba(14,203,129,.3); }
.status-badge.approved { background: rgba(14,203,129,.15); color: var(--green); border: 1px solid rgba(14,203,129,.3); }
.status-badge.rejected { background: rgba(239,68,68,.15); color: var(--red); border: 1px solid rgba(239,68,68,.3); }
.status-badge.none { background: var(--bg3); color: var(--muted); border: 1px solid var(--line); }
.account-info-row { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.account-info-row:last-child { border-bottom: 0; }
.account-info-row span { color: var(--muted); }
.balance-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 0; }
.balance-card { background: var(--bg3); border: 1px solid var(--line); border-radius: 10px; padding: 12px 16px; text-align: center; }
.balance-card span { display: block; font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.balance-card strong { display: block; font-family: var(--mono); font-size: 18px; margin-top: 4px; }

@media (max-width: 900px) {
  .hero-slider { aspect-ratio: 16 / 10; }
  .stat-chip strong { font-size: 20px; }
  .topbar { gap: 10px; }
  .topbar-nav { gap: 2px; margin-left: 8px; }
  .topbar-nav-link { padding: 4px 8px; font-size: 12px; }
  .topbar-balances { gap: 6px; }
  .balance-box { min-width: 80px; padding: 4px 10px; }
  .balance-box strong { font-size: 13px; }
  .page-grid { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .home-nav-inner { flex-wrap: wrap; gap: 10px; }
  .home-links { display: none; }
  .home-stats { grid-template-columns: repeat(2, 1fr); }
  .testimonial-inner { grid-template-columns: 1fr; gap: 20px; }
  .home-image-banner { aspect-ratio: auto; padding: 0; box-sizing: border-box; }
  .image-banner-full { width: 100%; height: auto; object-fit: cover; max-width: 100%; }
  .topbar { flex-wrap: wrap; }
  .topbar-brand { flex-wrap: wrap; gap: 8px; }
  .topbar-nav {
    display: flex;
    order: 99;
    width: 100%;
    margin: 6px 0 0;
    gap: 6px;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding-bottom: 2px;
  }
  .topbar-nav::-webkit-scrollbar { display: none; }
  .topbar-nav-link { white-space: nowrap; padding: 4px 10px; font-size: 12px; }
  .topbar-balances { width: 100%; justify-content: flex-end; }
  .topbar-actions { width: 100%; justify-content: flex-end; }
  .admin-body .topbar .topbar-balances { display: none; }
}