:root {
  color-scheme: light;
  --bg: #f3f1ec;
  --ink: #17191c;
  --muted: #716e68;
  --line: #ded8ce;
  --panel: #fffdf8;
  --panel-2: #f7f4ed;
  --teal: #0f766e;
  --teal-soft: #d7f0e7;
  --amber: #d9901c;
  --red: #c84a3a;
  --green: #16805f;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.app-shell {
  min-height: 100vh;
  max-width: 430px;
  margin: 0 auto;
  background: #f6f2ea;
  box-shadow: 0 0 0 1px rgba(33, 32, 29, 0.06);
}

.boot-screen,
.auth-screen {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: max(22px, env(safe-area-inset-top)) 18px max(22px, env(safe-area-inset-bottom));
}

.boot-screen {
  justify-content: center;
  align-items: center;
  gap: 10px;
  background: #1b1f22;
  color: white;
}

.boot-screen span {
  color: #d8d2c8;
  font-size: 13px;
}

.auth-screen {
  background:
    linear-gradient(180deg, rgba(21, 24, 27, 0.96), rgba(43, 43, 38, 0.98)),
    linear-gradient(120deg, rgba(155, 213, 73, 0.18), transparent 42%);
  color: #fffdf8;
}

.brand-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-top: 8px;
}

.brand-mark,
.avatar,
.exchange-icon {
  display: grid;
  place-items: center;
  font-weight: 900;
}

.brand-mark {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: #9bd549;
  color: #172015;
}

.brand-row strong,
.brand-row span,
.profile-card strong,
.profile-card span {
  display: block;
}

.brand-row span {
  margin-top: 3px;
  color: #d8d2c8;
  font-size: 12px;
}

.auth-panel,
.card,
.alert-card,
.sheet-card,
.profile-card {
  border: 1px solid rgba(33, 32, 29, 0.08);
  border-radius: 8px;
  background: var(--panel);
}

.auth-panel {
  padding: 18px;
  color: var(--ink);
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-bottom: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 4px;
  background: var(--panel-2);
}

.auth-tabs button {
  height: 36px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-weight: 850;
}

.auth-tabs button.active {
  background: #181b1e;
  color: white;
}

.section-kicker,
.muted-title {
  color: var(--teal);
  font-size: 12px;
  font-weight: 850;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  margin: 6px 0 16px;
  font-size: 24px;
  line-height: 1.12;
}

h2 {
  font-size: 18px;
  line-height: 1.18;
}

h3 {
  font-size: 16px;
}

label {
  display: block;
  margin-top: 12px;
  color: #565149;
  font-size: 12px;
  font-weight: 750;
}

input,
select {
  width: 100%;
  height: 44px;
  margin-top: 6px;
  border: 1px solid #d9d2c5;
  border-radius: 8px;
  padding: 0 12px;
  background: #fffefb;
  color: var(--ink);
  font-weight: 700;
  outline: none;
}

.primary-btn,
.secondary-btn,
.ghost-btn,
.danger-btn {
  width: 100%;
  height: 44px;
  border-radius: 8px;
  font-weight: 850;
}

.text-btn {
  width: 100%;
  height: 34px;
  margin-top: 8px;
  border: 0;
  background: transparent;
  color: var(--teal);
  font-size: 12px;
  font-weight: 850;
}

.primary-btn {
  margin-top: 16px;
  border: 0;
  background: #181b1e;
  color: #fffdf8;
}

.secondary-btn {
  border: 0;
  background: var(--teal);
  color: white;
}

.secondary-btn:disabled {
  background: #c9c3b8;
  color: #746f66;
}

.ghost-btn {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
}

.danger-btn {
  border: 1px solid #efc6be;
  background: #fff7f5;
  color: var(--red);
}

.split-row {
  display: grid;
  grid-template-columns: 1fr 86px;
  gap: 10px;
  align-items: end;
}

.security-note {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  border-radius: 8px;
  padding: 12px;
  background: rgba(255, 253, 248, 0.1);
  color: #e5ded2;
  font-size: 12px;
  line-height: 1.45;
}

.main-screen {
  min-height: 100vh;
  position: relative;
  padding: max(16px, env(safe-area-inset-top)) 14px calc(90px + env(safe-area-inset-bottom));
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 42px;
  margin-bottom: 14px;
}

.topbar strong,
.topbar span {
  display: block;
}

.topbar span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.icon-btn {
  min-width: 38px;
  height: 38px;
  border: 1px solid #ddd5c8;
  border-radius: 8px;
  background: #fffdf8;
  color: #202327;
  font-weight: 900;
}

.icon-btn.accent {
  border-color: var(--teal);
  background: var(--teal);
  color: white;
}

.page {
  display: none;
}

.page.active {
  display: block;
}

.balance-hero {
  border-radius: 8px;
  padding: 17px;
  background: linear-gradient(135deg, #1b1f22, #333024 58%, #0f766e);
  color: white;
}

.balance-hero span {
  color: #d9d5ca;
  font-size: 12px;
  font-weight: 750;
}

.balance-hero strong {
  display: block;
  margin-top: 7px;
  font-size: 32px;
  line-height: 1;
}

.hero-metrics,
.status-grid,
.summary-grid {
  display: grid;
  gap: 8px;
}

.hero-metrics {
  grid-template-columns: 1fr 1fr;
  margin-top: 13px;
}

.hero-metrics span {
  border-radius: 999px;
  padding: 7px 9px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff9ec;
}

.status-grid {
  grid-template-columns: 1fr 1fr;
  margin-top: 9px;
}

.status-pill,
.summary-grid div {
  border: 1px solid #ddd5c8;
  border-radius: 8px;
  padding: 9px;
  background: var(--panel);
  color: #4f4b44;
  font-size: 12px;
  font-weight: 850;
}

.card {
  margin-top: 10px;
  padding: 13px;
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.section-title span {
  color: var(--muted);
  font-size: 12px;
}

.balance-row,
.setting-row {
  display: grid;
  align-items: center;
  gap: 10px;
  border-top: 1px solid #ece5da;
}

.balance-row {
  grid-template-columns: 1fr auto auto;
  min-height: 32px;
  font-size: 13px;
}

.balance-row:first-of-type,
.setting-row:first-of-type {
  border-top: 0;
}

.balance-row em {
  min-width: 52px;
  color: var(--teal);
  font-style: normal;
  font-weight: 850;
  text-align: right;
}

.position-card,
.exchange-card,
.trade-item {
  border: 1px solid #e5ded3;
  border-radius: 8px;
  background: #fffefb;
}

.position-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  width: 100%;
  padding: 10px;
  color: inherit;
  text-align: left;
}

.position-card + .position-card,
.exchange-card + .exchange-card,
.trade-item + .trade-item {
  margin-top: 8px;
}

.position-card strong,
.position-card span,
.exchange-card strong,
.exchange-card span,
.trade-item strong,
.trade-item span {
  display: block;
}

.position-card span,
.exchange-card span,
.trade-item span,
.profile-card span,
.setting-row span,
.empty-state {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.position-card div:last-child,
.trade-item b {
  text-align: right;
}

.position-card:active {
  transform: translateY(1px);
}

.position-detail-head {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
}

.position-detail-head span,
.position-detail-head strong {
  display: block;
}

.position-detail-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.position-detail-head strong {
  margin-top: 4px;
  font-size: 20px;
}

.position-detail-head b {
  font-size: 18px;
}

.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.detail-grid div {
  min-width: 0;
  border: 1px solid #e5ded3;
  border-radius: 8px;
  padding: 9px;
  background: #fffefb;
}

.detail-grid span,
.detail-grid strong,
.detail-grid em {
  display: block;
}

.detail-grid span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.detail-grid strong {
  margin-top: 4px;
  font-size: 15px;
  line-height: 1.18;
  overflow-wrap: anywhere;
}

.detail-grid em {
  margin-top: 3px;
  color: #8a8276;
  font-size: 10px;
  font-style: normal;
  font-weight: 750;
  line-height: 1.25;
}

.positive {
  color: var(--green) !important;
}

.negative {
  color: var(--red) !important;
}

.alert-card {
  display: grid;
  grid-template-columns: 1fr;
  gap: 4px;
  margin-top: 9px;
  padding: 11px 12px;
  color: #5b4630;
  background: #fff8ec;
}

.alert-card span {
  color: #806643;
  font-size: 12px;
  line-height: 1.4;
}

.exchange-card {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 10px;
}

.exchange-select {
  display: grid;
  grid-template-columns: 42px 1fr;
  align-items: center;
  gap: 10px;
  min-width: 0;
  border: 0;
  padding: 0;
  background: transparent;
  color: inherit;
  text-align: left;
}

.exchange-card.ok {
  border-color: rgba(15, 118, 110, 0.38);
}

.exchange-card.warn {
  border-color: rgba(217, 144, 28, 0.48);
  background: #fff9ed;
}

.exchange-icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  color: white;
  font-size: 12px;
}

.switch-control {
  position: relative;
  width: 44px;
  height: 26px;
}

.switch-control input {
  position: absolute;
  inset: 0;
  opacity: 0;
}

.switch-control span {
  position: absolute;
  inset: 0;
  border: 1px solid #d8d0c3;
  border-radius: 999px;
  background: #e8e1d7;
  transition: background 0.16s ease, border-color 0.16s ease;
}

.switch-control span::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: white;
  box-shadow: 0 1px 3px rgba(35, 32, 26, 0.18);
  transition: transform 0.16s ease;
}

.switch-control input:checked + span {
  border-color: rgba(15, 118, 110, 0.35);
  background: var(--teal);
}

.switch-control input:checked + span::after {
  transform: translateX(18px);
}

.switch-control input:disabled + span {
  opacity: 0.45;
}

.okx {
  background: #1e2226;
}

.binance {
  background: #b98211;
}

.bitget {
  background: #13806f;
}

.bybit {
  background: #5b6470;
}

.sheet-card {
  margin-top: 10px;
  padding: 13px 15px 15px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 10px;
}

.check-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 14px;
  color: #3b3935;
  font-size: 13px;
  font-weight: 850;
}

.check-row input {
  width: 20px;
  height: 20px;
  margin: 0;
}

.button-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.summary-grid {
  grid-template-columns: repeat(2, 1fr);
}

.strategy-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 10px;
}

.summary-grid div {
  background: var(--panel-2);
}

.strategy-metrics div {
  border: 1px solid #e5ded3;
  border-radius: 8px;
  padding: 9px;
  background: #fffefb;
}

.summary-grid span,
.summary-grid strong,
.strategy-metrics span,
.strategy-metrics strong {
  display: block;
}

.strategy-metrics em {
  display: block;
  margin-top: 3px;
  color: #8a8276;
  font-size: 10px;
  font-style: normal;
  font-weight: 750;
  line-height: 1.25;
}

.summary-grid span,
.strategy-metrics span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.summary-grid strong,
.strategy-metrics strong {
  margin-top: 4px;
  font-size: 16px;
}

.metric-note {
  margin-top: 9px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.trade-item {
  display: grid;
  grid-template-columns: 64px 1fr auto;
  gap: 9px;
  align-items: start;
  padding: 11px 8px;
}

.trade-time {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  line-height: 1.25;
}

.trade-time span {
  display: inline-block;
  margin-right: 3px;
  color: #9a9185;
  font-size: 10px;
}

.trade-time span:nth-of-type(2) {
  margin-top: 4px;
}

.trade-item b {
  font-size: 12px;
}

.trade-item em {
  display: block;
  margin-top: 3px;
  color: #8a8276;
  font-size: 11px;
  font-style: normal;
  font-weight: 700;
}

.trade-item.open {
  border-color: rgba(15, 118, 110, 0.38);
  background: #f7fffb;
}

.pagination-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 10px;
  align-items: center;
  margin-top: 12px;
}

.pagination-row span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.pagination-row button:disabled {
  opacity: 0.45;
}

.profile-card {
  display: grid;
  grid-template-columns: 48px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 13px;
}

.avatar {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: #1e2226;
  color: white;
  font-size: 22px;
}

.verified {
  border-radius: 999px;
  padding: 5px 8px;
  background: var(--teal-soft);
  color: #075f58;
  font-size: 11px;
  font-weight: 850;
}

.setting-row {
  grid-template-columns: 1fr auto;
  min-height: 58px;
}

.setting-row b {
  color: var(--teal);
  font-size: 12px;
}

.tiny-btn {
  min-width: 58px;
  height: 34px;
  padding: 0 10px;
  font-size: 11px;
}

.danger-mini-btn {
  border: 1px solid rgba(198, 69, 54, 0.35);
  border-radius: 8px;
  background: #fff4f1;
  color: var(--red);
  font-weight: 900;
}

.audit-row {
  display: grid;
  gap: 3px;
  padding: 9px 0;
  border-top: 1px solid #ece5da;
}

.audit-row:first-child {
  border-top: 0;
}

.audit-row strong {
  font-size: 12px;
}

.audit-row span {
  color: var(--muted);
  font-size: 11px;
}

.totp-setup {
  display: grid;
  grid-template-columns: 112px 1fr;
  gap: 12px;
  align-items: center;
  margin-top: 12px;
  border-top: 1px solid #ece5da;
  padding-top: 12px;
}

.totp-setup img,
.qr-fallback {
  width: 112px;
  height: 112px;
  border: 1px solid #e5ded3;
  border-radius: 8px;
  background: white;
}

.totp-setup img {
  padding: 7px;
}

.qr-fallback {
  display: grid;
  place-items: center;
  padding: 9px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.totp-setup strong,
.totp-setup span,
.session-row strong,
.session-row span {
  display: block;
}

.totp-setup span,
.session-row span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.inline-form {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 8px;
  align-items: end;
  margin-top: 9px;
}

.inline-form input,
.inline-form .primary-btn,
.inline-form .ghost-btn {
  height: 34px;
  margin-top: 0;
}

.inline-form .primary-btn {
  width: auto;
}

.session-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
  border-top: 1px solid #ece5da;
  padding: 10px 0;
}

.session-row:first-of-type {
  border-top: 0;
  padding-top: 0;
}

.session-row b {
  color: var(--teal);
  font-size: 11px;
}

.session-row + .ghost-btn {
  margin-top: 8px;
}

.bottom-nav {
  position: fixed;
  z-index: 10;
  left: 50%;
  bottom: max(12px, env(safe-area-inset-bottom));
  width: min(402px, calc(100% - 28px));
  transform: translateX(-50%);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  border: 1px solid #ddd5c8;
  border-radius: 8px;
  padding: 6px;
  background: rgba(255, 253, 248, 0.96);
  box-shadow: 0 12px 24px rgba(35, 32, 26, 0.12);
}

.bottom-nav button {
  height: 50px;
  display: grid;
  place-items: center;
  gap: 2px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #67635b;
  font-size: 11px;
  font-weight: 850;
}

.bottom-nav button.active {
  background: var(--teal-soft);
  color: #075f58;
}

.toast {
  position: fixed;
  z-index: 20;
  left: 50%;
  bottom: 86px;
  max-width: min(390px, calc(100% - 32px));
  transform: translateX(-50%);
  border-radius: 8px;
  padding: 10px 12px;
  background: #181b1e;
  color: white;
  font-size: 13px;
  box-shadow: 0 12px 30px rgba(35, 32, 26, 0.2);
}

.secret-dialog {
  position: fixed;
  z-index: 30;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(13, 16, 18, 0.38);
}

.secret-dialog-panel {
  width: min(390px, 100%);
  border: 1px solid rgba(33, 32, 29, 0.1);
  border-radius: 8px;
  padding: 16px;
  background: var(--panel);
  box-shadow: 0 22px 56px rgba(9, 14, 17, 0.22);
}

.secret-dialog-panel strong {
  display: block;
  font-size: 16px;
}

.secret-dialog-panel p {
  margin: 10px 0 14px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.secret-copy-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 76px;
  gap: 8px;
  margin-top: 12px;
}

.secret-copy-row input {
  min-width: 0;
  margin-top: 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 12px;
}

.secret-copy-row button {
  width: 76px;
  height: 44px;
}

.hidden {
  display: none !important;
}

/* Financial app visual refresh: style-only overrides, no behavior changes. */
:root {
  --bg: #101315;
  --ink: #111417;
  --muted: #747a7f;
  --line: #e2e5e7;
  --panel: #ffffff;
  --panel-2: #f5f7f8;
  --teal: #007f73;
  --teal-soft: #dff5ef;
  --amber: #bc8428;
  --red: #d44f3f;
  --green: #08875d;
  --shadow-soft: 0 14px 34px rgba(12, 17, 20, 0.1);
  --shadow-lift: 0 20px 50px rgba(7, 12, 16, 0.18);
}

body {
  background:
    linear-gradient(180deg, #111619 0%, #182025 38%, #eef1f3 38%, #eef1f3 100%);
  font-feature-settings: "tnum" 1, "lnum" 1;
  -webkit-font-smoothing: antialiased;
}

.app-shell {
  background: #eef1f3;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.24);
}

.main-screen {
  background:
    linear-gradient(180deg, #111619 0, #111619 154px, #eef1f3 154px, #eef1f3 100%);
  padding: max(18px, env(safe-area-inset-top)) 14px calc(98px + env(safe-area-inset-bottom));
}

.topbar {
  min-height: 48px;
  margin-bottom: 16px;
  color: #f8faf9;
}

.topbar span {
  color: rgba(238, 243, 241, 0.68);
  font-size: 11px;
}

.topbar strong {
  margin-top: 3px;
  font-size: 22px;
  line-height: 1.05;
  letter-spacing: 0;
}

.icon-btn {
  min-width: 44px;
  height: 44px;
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.09);
}

.icon-btn.accent {
  border-color: rgba(0, 127, 115, 0.72);
  background: #00a28e;
  color: white;
  box-shadow: 0 12px 28px rgba(0, 127, 115, 0.28);
}

.auth-screen {
  background:
    linear-gradient(180deg, rgba(14, 18, 21, 0.98), rgba(23, 29, 33, 0.98)),
    linear-gradient(145deg, rgba(0, 159, 143, 0.22), transparent 48%);
}

.brand-mark {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  background: linear-gradient(135deg, #f0c96d, #00a28e);
  color: #091011;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28);
}

.auth-panel,
.card,
.sheet-card,
.profile-card,
.alert-card {
  border: 1px solid rgba(15, 23, 28, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow-soft);
}

.auth-panel {
  padding: 20px;
  box-shadow: 0 22px 56px rgba(0, 0, 0, 0.28);
}

.auth-tabs {
  border-color: #dfe5e7;
  background: #eef2f3;
}

.auth-tabs button.active {
  background: #101619;
  color: #fff;
  box-shadow: 0 8px 18px rgba(13, 18, 21, 0.16);
}

.section-kicker,
.muted-title {
  color: #007f73;
}

label {
  color: #4f575d;
}

input,
select {
  border-color: #d9e0e2;
  background: #f9fbfb;
  color: #111417;
}

input:focus,
select:focus {
  border-color: rgba(0, 127, 115, 0.62);
  background: white;
  box-shadow: 0 0 0 3px rgba(0, 127, 115, 0.1);
}

.primary-btn {
  background: #101619;
  color: #fff;
  box-shadow: 0 13px 25px rgba(11, 17, 20, 0.18);
}

.secondary-btn {
  background: #007f73;
  box-shadow: 0 10px 22px rgba(0, 127, 115, 0.18);
}

.ghost-btn {
  border-color: #dbe2e4;
  background: #ffffff;
  color: #1e2529;
}

.text-btn {
  color: #007f73;
}

.danger-btn,
.danger-mini-btn {
  border-color: rgba(212, 79, 63, 0.24);
  background: #fff4f2;
}

.balance-hero {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 20px 18px;
  background:
    linear-gradient(135deg, #101619 0%, #142321 53%, #007f73 100%);
  box-shadow: var(--shadow-lift);
}

.balance-hero::after {
  content: "";
  position: absolute;
  inset: auto 18px 0 18px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.35), transparent);
}

.balance-hero span {
  color: rgba(255, 255, 255, 0.7);
  font-size: 11px;
}

.balance-hero strong {
  margin-top: 9px;
  font-size: 34px;
  font-weight: 900;
  letter-spacing: 0;
}

.hero-metrics {
  gap: 10px;
  margin-top: 16px;
}

.hero-metrics span {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 9px 10px;
  background: rgba(255, 255, 255, 0.08);
  color: #f5faf8;
}

.status-grid {
  gap: 10px;
  margin-top: 12px;
}

.status-pill {
  min-height: 38px;
  border-color: rgba(17, 22, 25, 0.06);
  background: #ffffff;
  color: #30383d;
  box-shadow: 0 8px 18px rgba(17, 22, 25, 0.06);
}

.card,
.sheet-card {
  margin-top: 12px;
  padding: 14px;
}

.section-title {
  margin-bottom: 12px;
}

.section-title strong {
  font-size: 16px;
}

.section-title span {
  color: #858b90;
  font-weight: 750;
}

.balance-row,
.setting-row,
.session-row {
  border-color: #edf0f1;
}

.balance-row {
  min-height: 42px;
}

.balance-row span {
  color: #50585e;
}

.balance-row strong {
  font-size: 14px;
}

.balance-row em {
  color: #007f73;
}

.position-card,
.exchange-card,
.trade-item {
  border-color: #e1e7e8;
  background: #ffffff;
  box-shadow: 0 8px 20px rgba(17, 22, 25, 0.05);
}

.position-card {
  min-height: 68px;
  padding: 12px;
}

.position-card strong,
.trade-item strong {
  font-size: 16px;
  letter-spacing: 0;
}

.position-card span,
.exchange-card span,
.trade-item span,
.profile-card span,
.setting-row span,
.empty-state {
  color: #7a8186;
}

.position-card:active,
.exchange-card:active,
.trade-item:active {
  transform: translateY(1px);
  box-shadow: 0 5px 14px rgba(17, 22, 25, 0.08);
}

.positive {
  color: #07865d !important;
}

.negative {
  color: #d84d3c !important;
}

.alert-card {
  border-color: rgba(188, 132, 40, 0.28);
  background: #fff8ea;
  box-shadow: 0 8px 20px rgba(188, 132, 40, 0.08);
}

.exchange-card {
  padding: 12px;
}

.exchange-icon {
  border-radius: 8px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.exchange-card.ok {
  border-color: rgba(0, 127, 115, 0.28);
}

.exchange-card.warn {
  border-color: rgba(188, 132, 40, 0.28);
  background: #fffaf0;
}

.switch-control span {
  border-color: #d3dbde;
  background: #e5eaec;
}

.switch-control input:checked + span {
  border-color: #007f73;
  background: #007f73;
}

.summary-grid,
.strategy-metrics,
.detail-grid {
  gap: 10px;
}

.summary-grid div,
.strategy-metrics div,
.detail-grid div {
  border-color: #e1e7e8;
  background: #f9fbfb;
}

.summary-grid strong,
.strategy-metrics strong,
.detail-grid strong {
  font-size: 17px;
  font-weight: 900;
}

.trade-item {
  grid-template-columns: 66px 1fr auto;
  padding: 12px 10px;
}

.trade-time {
  color: #697177;
}

.trade-item.open {
  border-color: rgba(0, 127, 115, 0.34);
  background: #f3fffb;
}

.profile-card {
  padding: 14px;
}

.avatar {
  border-radius: 8px;
  background: linear-gradient(135deg, #101619, #007f73);
}

.verified {
  background: #dff5ef;
  color: #006f63;
}

.totp-setup img,
.qr-fallback {
  border-color: #e1e7e8;
}

.bottom-nav {
  width: min(402px, calc(100% - 28px));
  border-color: rgba(17, 22, 25, 0.1);
  border-radius: 8px;
  padding: 7px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 18px 44px rgba(10, 15, 18, 0.18);
  backdrop-filter: blur(18px);
}

.bottom-nav button {
  height: 52px;
  color: #697177;
}

.bottom-nav button.active {
  background: #101619;
  color: #ffffff;
  box-shadow: 0 10px 22px rgba(16, 22, 25, 0.16);
}

.toast {
  background: #101619;
  box-shadow: 0 18px 42px rgba(9, 14, 17, 0.28);
}

@media (min-width: 700px) {
  body {
    background:
      linear-gradient(180deg, #111619 0%, #1a2428 42%, #eef1f3 42%, #eef1f3 100%);
  }

  .app-shell {
    margin-top: 22px;
    margin-bottom: 22px;
    min-height: calc(100vh - 44px);
    border: 9px solid #151515;
    border-radius: 38px;
    overflow: hidden;
  }

  .bottom-nav {
    bottom: 34px;
  }
}

/* Final premium confirmation layer. Keep last so it wins over earlier drafts. */
body {
  background:
    radial-gradient(circle at 50% -12%, rgba(25, 197, 174, 0.3), transparent 31%),
    radial-gradient(circle at 16% 12%, rgba(216, 180, 106, 0.18), transparent 24%),
    linear-gradient(180deg, #070a0e 0%, #0c1116 42%, #11171d 100%);
  color: #f4f2ea;
}

.app-shell {
  background: linear-gradient(180deg, #080c10 0%, #10171d 100%);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08), 0 30px 90px rgba(0, 0, 0, 0.5);
}

.auth-screen,
.main-screen,
.boot-screen {
  background:
    radial-gradient(circle at 86% -5%, rgba(25, 197, 174, 0.22), transparent 32%),
    radial-gradient(circle at 0% 26%, rgba(216, 180, 106, 0.12), transparent 28%),
    linear-gradient(180deg, #080c10 0%, #10171d 100%);
  color: #f4f2ea;
}

.brand-row strong,
.topbar strong,
h1,
h2,
h3,
.section-title strong,
.profile-card strong,
.setting-row strong,
.session-row strong,
.balance-row strong,
.position-card strong,
.trade-item strong,
.summary-grid strong,
.strategy-metrics strong,
.detail-grid strong,
.sheet-card h3 {
  color: #fff8ea;
}

.brand-row span,
.topbar span,
.section-title span,
.balance-row span,
.position-card span,
.exchange-card span,
.trade-item span,
.profile-card span,
.setting-row span,
.empty-state,
.session-row span,
.detail-grid span,
.detail-grid em,
.strategy-metrics em,
.summary-grid span,
.strategy-metrics span,
.secret-dialog-panel p {
  color: rgba(244, 242, 234, 0.62);
}

.brand-mark {
  border: 1px solid rgba(216, 180, 106, 0.42);
  border-radius: 8px;
  background: linear-gradient(135deg, #d8b46a, #19c5ae);
  color: #07100e;
}

.prod-hero,
.ops-strip,
.ops-panel,
.auth-panel,
.card,
.sheet-card,
.profile-card,
.alert-card,
.secret-dialog-panel {
  border: 1px solid rgba(255, 255, 255, 0.1);
  background:
    linear-gradient(180deg, rgba(25, 32, 38, 0.92), rgba(14, 20, 25, 0.9)),
    rgba(15, 21, 26, 0.94);
  color: #f4f2ea;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(18px);
}

.prod-hero {
  padding: 16px;
}

.prod-hero span,
.prod-hero em,
.ops-strip span,
.ops-panel span,
.ops-caption {
  color: rgba(244, 242, 234, 0.6);
}

.prod-hero strong {
  display: block;
  margin-top: 7px;
  color: #fff8ea;
  font-size: 22px;
}

.prod-hero div {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 14px;
}

.prod-hero em {
  border: 1px solid rgba(25, 197, 174, 0.24);
  border-radius: 999px;
  padding: 6px 9px;
  background: rgba(25, 197, 174, 0.1);
  color: #bff7ef;
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
}

.auth-tabs,
.status-pill,
.summary-grid div,
.strategy-metrics div,
.detail-grid div,
.position-card,
.exchange-card,
.trade-item {
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.06);
  color: #f4f2ea;
}

.auth-tabs button {
  color: rgba(244, 242, 234, 0.58);
}

.auth-tabs button.active,
.primary-btn {
  background: linear-gradient(135deg, #d8b46a, #19c5ae);
  color: #07100e;
}

label,
.check-row {
  color: rgba(244, 242, 234, 0.72);
}

input,
select {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  color: #fff8ea;
}

input::placeholder {
  color: rgba(244, 242, 234, 0.38);
}

option {
  background: #10161b;
  color: #fff8ea;
}

.secondary-btn {
  background: #19c5ae;
  color: #07100e;
}

.ghost-btn,
.icon-btn {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  color: #f4f2ea;
}

.icon-btn.accent {
  border-color: rgba(25, 197, 174, 0.42);
  background: rgba(25, 197, 174, 0.16);
  color: #a8fff2;
}

.balance-hero {
  border: 1px solid rgba(216, 180, 106, 0.24);
  background:
    linear-gradient(135deg, rgba(12, 16, 20, 0.98), rgba(24, 38, 39, 0.98) 48%, rgba(25, 197, 174, 0.62)),
    #0f1519;
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.42);
}

.hero-metrics span {
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.09);
  color: #e7fff9;
}

.ops-strip,
.ops-panel {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
  padding: 10px;
}

.ops-strip div,
.ops-panel div {
  min-width: 0;
  border-left: 1px solid rgba(255, 255, 255, 0.1);
  padding-left: 9px;
}

.ops-strip div:first-child,
.ops-panel div:first-child {
  border-left: 0;
  padding-left: 0;
}

.ops-strip strong,
.ops-panel strong {
  display: block;
  margin-top: 4px;
  color: #fff8ea;
  font-size: 11px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.ops-caption {
  margin: -4px 0 12px;
  border-left: 2px solid rgba(25, 197, 174, 0.42);
  padding-left: 9px;
  line-height: 1.45;
}

.alert-card {
  border-color: rgba(216, 180, 106, 0.32);
  background: linear-gradient(135deg, rgba(216, 180, 106, 0.15), rgba(255, 255, 255, 0.04));
}

.exchange-card.active {
  border-color: rgba(216, 180, 106, 0.54);
  box-shadow: 0 0 0 1px rgba(216, 180, 106, 0.16), 0 14px 34px rgba(0, 0, 0, 0.24);
}

.trade-item.open {
  border-color: rgba(25, 197, 174, 0.34);
  background: rgba(25, 197, 174, 0.08);
}

.avatar {
  border: 1px solid rgba(216, 180, 106, 0.28);
  background: linear-gradient(135deg, #111820, #19c5ae);
}

.verified {
  background: rgba(25, 197, 174, 0.15);
  color: #9effef;
}

.positive {
  color: #37d59c !important;
}

.negative {
  color: #ff6b5d !important;
}

.danger-btn,
.danger-mini-btn {
  border-color: rgba(255, 107, 93, 0.28);
  background: rgba(255, 107, 93, 0.1);
  color: #ff958c;
}

.bottom-nav {
  border-color: rgba(216, 180, 106, 0.18);
  background: rgba(9, 13, 17, 0.86);
  box-shadow: 0 24px 54px rgba(0, 0, 0, 0.45);
}

.bottom-nav button {
  color: rgba(244, 242, 234, 0.62);
}

.bottom-nav button.active {
  outline: 1px solid rgba(216, 180, 106, 0.72);
  background: linear-gradient(135deg, rgba(216, 180, 106, 0.16), rgba(25, 197, 174, 0.16));
  color: #fff8ea;
}

.toast {
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(9, 13, 17, 0.94);
}

/* Premium production console direction - confirmation build, not deployed. */
:root {
  --bg: #090d11;
  --ink: #f4f2ea;
  --muted: #9ca6ac;
  --line: rgba(255, 255, 255, 0.1);
  --panel: rgba(18, 24, 29, 0.88);
  --panel-2: rgba(255, 255, 255, 0.06);
  --teal: #19c5ae;
  --teal-strong: #00a991;
  --teal-soft: rgba(25, 197, 174, 0.16);
  --mint: rgba(25, 197, 174, 0.2);
  --amber: #d8b46a;
  --red: #ff6b5d;
  --green: #37d59c;
  --shadow-soft: 0 18px 48px rgba(0, 0, 0, 0.34);
  --shadow-lift: 0 26px 70px rgba(0, 0, 0, 0.42);
}

body {
  background:
    radial-gradient(circle at 50% -10%, rgba(25, 197, 174, 0.28), transparent 30%),
    radial-gradient(circle at 15% 14%, rgba(216, 180, 106, 0.16), transparent 24%),
    linear-gradient(180deg, #070a0e 0%, #0c1116 42%, #11171d 100%);
  color: var(--ink);
}

.app-shell {
  position: relative;
  isolation: isolate;
  max-width: 430px;
  background:
    linear-gradient(180deg, rgba(10, 15, 20, 0.96), rgba(13, 18, 22, 0.98)),
    #0b1014;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08), 0 30px 90px rgba(0, 0, 0, 0.5);
}

.app-shell::before {
  content: "";
  position: fixed;
  z-index: -1;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.7), transparent 80%);
}

.boot-screen {
  background:
    radial-gradient(circle at 50% 0%, rgba(25, 197, 174, 0.24), transparent 42%),
    #080c10;
}

.auth-screen {
  gap: 18px;
  justify-content: flex-start;
  background:
    radial-gradient(circle at 80% 4%, rgba(25, 197, 174, 0.24), transparent 34%),
    radial-gradient(circle at 4% 40%, rgba(216, 180, 106, 0.14), transparent 28%),
    linear-gradient(180deg, #080c10 0%, #111820 100%);
  color: #f7f2e7;
}

.brand-row {
  gap: 13px;
}

.brand-mark {
  border: 1px solid rgba(216, 180, 106, 0.42);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(216, 180, 106, 0.98), rgba(25, 197, 174, 0.9)),
    #d8b46a;
  color: #07100e;
  box-shadow: 0 14px 34px rgba(25, 197, 174, 0.24);
}

.brand-row strong {
  color: #fff8ea;
}

.brand-row span {
  color: rgba(244, 242, 234, 0.62);
}

.prod-hero,
.ops-strip,
.ops-panel {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03)),
    rgba(16, 22, 27, 0.72);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(18px);
}

.prod-hero {
  padding: 16px;
}

.prod-hero span,
.prod-hero em,
.ops-strip span,
.ops-panel span,
.ops-caption {
  color: rgba(244, 242, 234, 0.58);
  font-size: 11px;
  font-style: normal;
  font-weight: 780;
  line-height: 1.45;
}

.prod-hero strong {
  display: block;
  margin-top: 7px;
  color: #fff8ea;
  font-size: 22px;
  letter-spacing: 0;
}

.prod-hero div {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 14px;
}

.prod-hero em {
  border: 1px solid rgba(25, 197, 174, 0.24);
  border-radius: 999px;
  padding: 6px 9px;
  background: rgba(25, 197, 174, 0.1);
  color: #bfeee6;
}

.auth-panel,
.card,
.sheet-card,
.profile-card,
.alert-card,
.secret-dialog-panel {
  border: 1px solid rgba(255, 255, 255, 0.1);
  background:
    linear-gradient(180deg, rgba(25, 32, 38, 0.92), rgba(14, 20, 25, 0.9)),
    rgba(15, 21, 26, 0.94);
  color: #f4f2ea;
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(18px);
}

.auth-panel {
  box-shadow: var(--shadow-lift);
}

.auth-tabs {
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
}

.auth-tabs button {
  color: rgba(244, 242, 234, 0.58);
}

.auth-tabs button.active {
  background: linear-gradient(135deg, #d8b46a, #19c5ae);
  color: #07100e;
}

.section-kicker,
.muted-title {
  color: #69e4d5;
}

h1,
h2,
h3,
.section-title strong,
.profile-card strong,
.setting-row strong,
.session-row strong {
  color: #fff8ea;
}

label {
  color: rgba(244, 242, 234, 0.68);
}

input,
select {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  color: #fff8ea;
}

input::placeholder {
  color: rgba(244, 242, 234, 0.36);
}

input:focus,
select:focus {
  border-color: rgba(25, 197, 174, 0.72);
  background: rgba(255, 255, 255, 0.09);
  box-shadow: 0 0 0 3px rgba(25, 197, 174, 0.14);
}

option {
  background: #10161b;
  color: #fff8ea;
}

.primary-btn {
  background: linear-gradient(135deg, #d8b46a, #19c5ae);
  color: #07100e;
  box-shadow: 0 14px 34px rgba(25, 197, 174, 0.2);
}

.secondary-btn {
  background: #19c5ae;
  color: #07100e;
}

.ghost-btn,
.icon-btn {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  color: #f4f2ea;
}

.text-btn {
  color: #69e4d5;
}

.security-note {
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.06);
  color: rgba(244, 242, 234, 0.7);
}

.main-screen {
  background:
    radial-gradient(circle at 85% -5%, rgba(25, 197, 174, 0.2), transparent 32%),
    radial-gradient(circle at 0% 26%, rgba(216, 180, 106, 0.11), transparent 28%),
    linear-gradient(180deg, #080c10 0%, #10171d 100%);
  color: #f4f2ea;
}

.topbar {
  color: #fff8ea;
}

.topbar span {
  color: rgba(244, 242, 234, 0.54);
  text-transform: uppercase;
}

.topbar strong {
  color: #fff8ea;
  font-size: 24px;
}

.icon-btn.accent {
  border-color: rgba(25, 197, 174, 0.42);
  background: rgba(25, 197, 174, 0.16);
  color: #a8fff2;
}

.balance-hero {
  border: 1px solid rgba(216, 180, 106, 0.24);
  background:
    linear-gradient(135deg, rgba(12, 16, 20, 0.98), rgba(24, 38, 39, 0.98) 48%, rgba(25, 197, 174, 0.62)),
    #0f1519;
  box-shadow: var(--shadow-lift);
}

.balance-hero span {
  color: rgba(244, 242, 234, 0.62);
}

.balance-hero strong {
  color: #fff8ea;
  text-shadow: 0 12px 38px rgba(25, 197, 174, 0.28);
}

.hero-metrics span {
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.09);
  color: #e7fff9;
}

.ops-strip,
.ops-panel {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
  padding: 10px;
}

.ops-strip div,
.ops-panel div {
  min-width: 0;
  border-left: 1px solid rgba(255, 255, 255, 0.1);
  padding-left: 9px;
}

.ops-strip div:first-child,
.ops-panel div:first-child {
  border-left: 0;
  padding-left: 0;
}

.ops-strip strong,
.ops-panel strong {
  display: block;
  margin-top: 4px;
  color: #fff8ea;
  font-size: 11px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.status-pill,
.summary-grid div,
.strategy-metrics div,
.detail-grid div {
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.06);
  color: #f4f2ea;
}

.alert-card {
  border-color: rgba(216, 180, 106, 0.32);
  background: linear-gradient(135deg, rgba(216, 180, 106, 0.15), rgba(255, 255, 255, 0.04));
  color: #f8dc98;
}

.alert-card span,
.section-title span,
.balance-row span,
.position-card span,
.exchange-card span,
.trade-item span,
.profile-card span,
.setting-row span,
.empty-state,
.session-row span,
.detail-grid span,
.detail-grid em,
.strategy-metrics em,
.summary-grid span,
.strategy-metrics span,
.secret-dialog-panel p {
  color: rgba(244, 242, 234, 0.58);
}

.balance-row,
.setting-row,
.session-row,
.audit-row {
  border-color: rgba(255, 255, 255, 0.08);
}

.balance-row strong,
.position-card strong,
.trade-item strong,
.summary-grid strong,
.strategy-metrics strong,
.detail-grid strong {
  color: #fff8ea;
}

.position-card,
.exchange-card,
.trade-item {
  border-color: rgba(255, 255, 255, 0.1);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.035)),
    rgba(255, 255, 255, 0.04);
  color: #f4f2ea;
}

.position-card,
.trade-item.open,
.exchange-card.active {
  box-shadow: inset 0 0 0 1px rgba(25, 197, 174, 0.1);
}

.exchange-card.ok {
  border-color: rgba(25, 197, 174, 0.42);
}

.exchange-card.active {
  border-color: rgba(216, 180, 106, 0.54);
  box-shadow: 0 0 0 1px rgba(216, 180, 106, 0.16), 0 14px 34px rgba(0, 0, 0, 0.24);
}

.exchange-card.warn {
  border-color: rgba(216, 180, 106, 0.34);
  background: rgba(216, 180, 106, 0.08);
}

.exchange-icon {
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.okx {
  background: #10161b;
}

.binance {
  background: linear-gradient(135deg, #d8b46a, #9b6c19);
}

.bitget {
  background: linear-gradient(135deg, #19c5ae, #0d756a);
}

.bybit {
  background: #59636e;
}

.switch-control span {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.08);
}

.switch-control input:checked + span {
  border-color: rgba(25, 197, 174, 0.62);
  background: #19c5ae;
}

.ops-caption {
  margin: -4px 0 12px;
  border-left: 2px solid rgba(25, 197, 174, 0.42);
  padding-left: 9px;
}

.positive {
  color: #37d59c !important;
}

.negative {
  color: #ff6b5d !important;
}

.avatar {
  border: 1px solid rgba(216, 180, 106, 0.28);
  background: linear-gradient(135deg, #111820, #19c5ae);
  color: #fff8ea;
}

.verified {
  background: rgba(25, 197, 174, 0.15);
  color: #9effef;
}

.danger-btn,
.danger-mini-btn {
  border-color: rgba(255, 107, 93, 0.28);
  background: rgba(255, 107, 93, 0.1);
  color: #ff958c;
}

.bottom-nav {
  border-color: rgba(216, 180, 106, 0.18);
  background: rgba(9, 13, 17, 0.82);
  box-shadow: 0 24px 54px rgba(0, 0, 0, 0.45);
}

.bottom-nav button {
  color: rgba(244, 242, 234, 0.62);
}

.bottom-nav button.active {
  outline: 1px solid rgba(216, 180, 106, 0.72);
  background:
    linear-gradient(135deg, rgba(216, 180, 106, 0.16), rgba(25, 197, 174, 0.16)),
    rgba(255, 255, 255, 0.06);
  color: #fff8ea;
}

.toast {
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(9, 13, 17, 0.94);
}

@media (max-width: 360px) {
  .ops-strip,
  .ops-panel {
    grid-template-columns: 1fr;
  }

  .ops-strip div,
  .ops-panel div {
    border-left: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: 8px 0 0;
  }

  .ops-strip div:first-child,
  .ops-panel div:first-child {
    border-top: 0;
    padding-top: 0;
  }
}

@media (min-width: 700px) {
  body {
    background:
      radial-gradient(circle at 50% -10%, rgba(25, 197, 174, 0.22), transparent 32%),
      linear-gradient(180deg, #070a0e 0%, #0d1218 100%);
  }

  .app-shell {
    border-color: #050608;
  }
}

/* Auto Trader mobile UI redesign - frontend-only visual layer. */
:root {
  --bg: #f3f0e8;
  --ink: #171a1d;
  --muted: #6f6a61;
  --line: #ded7ca;
  --panel: #fffefa;
  --panel-2: #f5f1e9;
  --teal: #2f7f73;
  --teal-strong: #276f65;
  --teal-soft: #d8f0ea;
  --mint: #cfeee6;
  --amber: #d99b2b;
  --red: #c9463d;
  --green: #287c72;
  --shadow-soft: 0 10px 28px rgba(44, 39, 31, 0.08);
  --shadow-lift: 0 18px 46px rgba(30, 28, 23, 0.16);
}

body {
  background:
    radial-gradient(circle at 50% -8%, rgba(49, 127, 115, 0.08), transparent 34%),
    #f6f3ed;
  color: var(--ink);
}

.app-shell {
  max-width: 430px;
  background: #f2eee6;
  box-shadow: 0 0 0 1px rgba(31, 27, 22, 0.05), 0 22px 70px rgba(32, 29, 25, 0.14);
}

.boot-screen {
  background: #1b1e1f;
}

.auth-screen {
  min-height: 100vh;
  gap: 20px;
  justify-content: flex-start;
  background:
    linear-gradient(180deg, #1a1d1f 0%, #222521 56%, #f2eee6 56%, #f2eee6 100%);
  color: #fffefa;
}

.brand-row {
  padding-top: 10px;
}

.brand-row strong {
  font-size: 18px;
}

.brand-row span {
  color: rgba(255, 254, 250, 0.72);
}

.brand-mark {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: #a7df59;
  color: #172015;
  box-shadow: none;
}

.auth-panel,
.card,
.sheet-card,
.profile-card,
.alert-card {
  border: 1px solid rgba(46, 40, 31, 0.1);
  border-radius: 8px;
  background: rgba(255, 254, 250, 0.98);
  box-shadow: var(--shadow-soft);
}

.auth-panel {
  padding: 20px 18px;
  color: var(--ink);
}

.auth-tabs {
  border-color: #e1d9cc;
  background: #f3eee5;
}

.auth-tabs button {
  color: #6f6a61;
}

.auth-tabs button.active {
  background: #171a1d;
  color: #fffefa;
  box-shadow: none;
}

.section-kicker,
.muted-title {
  color: var(--teal);
}

h1 {
  font-size: 25px;
  letter-spacing: 0;
}

label {
  color: #5b554c;
}

input,
select {
  height: 48px;
  border-color: #dcd4c7;
  border-radius: 8px;
  background: #fffefa;
}

input:focus,
select:focus {
  border-color: rgba(47, 127, 115, 0.58);
  box-shadow: 0 0 0 3px rgba(47, 127, 115, 0.12);
}

.primary-btn,
.secondary-btn,
.ghost-btn,
.danger-btn {
  min-height: 46px;
  border-radius: 8px;
}

.primary-btn {
  background: #171a1d;
  box-shadow: none;
}

.secondary-btn {
  background: var(--teal);
  box-shadow: none;
}

.ghost-btn {
  border-color: #ded7ca;
  background: #fffefa;
}

.security-note {
  margin-top: auto;
  background: rgba(255, 254, 250, 0.1);
}

.main-screen {
  min-height: 100vh;
  background: #f2eee6;
  padding: max(30px, env(safe-area-inset-top)) 14px calc(98px + env(safe-area-inset-bottom));
}

.topbar {
  min-height: 52px;
  margin-bottom: 18px;
  color: var(--ink);
}

.topbar span {
  color: #6f6a61;
  font-size: 12px;
}

.topbar strong {
  margin-top: 3px;
  color: var(--ink);
  font-size: 22px;
  letter-spacing: 0;
}

.icon-btn {
  min-width: 44px;
  height: 44px;
  border-color: #dcd4c7;
  border-radius: 8px;
  background: #fffefa;
  color: #171a1d;
  box-shadow: none;
}

.icon-btn.accent {
  border-color: var(--teal);
  background: var(--teal);
  color: #fffefa;
  box-shadow: none;
}

.balance-hero {
  border: 0;
  border-radius: 8px;
  padding: 20px 18px;
  background:
    linear-gradient(135deg, rgba(23, 26, 29, 0.96), rgba(38, 63, 54, 0.96) 56%, rgba(47, 127, 115, 0.96)),
    #222520;
  box-shadow: none;
}

.balance-hero::after {
  display: none;
}

.balance-hero strong {
  margin-top: 10px;
  font-size: 35px;
  letter-spacing: 0;
}

.hero-metrics span {
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.13);
}

.status-grid {
  margin-top: 10px;
}

.status-pill {
  display: flex;
  align-items: center;
  min-height: 42px;
  border-color: #ded7ca;
  background: #fffefa;
  color: #4d4840;
  box-shadow: none;
}

.alert-card {
  border-color: #ead9b7;
  background: #fff8eb;
  color: #5e4631;
  box-shadow: none;
}

.card,
.sheet-card {
  margin-top: 12px;
  padding: 14px;
}

.section-title {
  margin-bottom: 12px;
}

.section-title strong {
  font-size: 17px;
}

.section-title span {
  color: #817b71;
}

.balance-row,
.setting-row,
.session-row {
  border-color: #ebe4d8;
}

.balance-row {
  min-height: 34px;
}

.position-card,
.exchange-card,
.trade-item {
  border-color: #e3dbcf;
  border-radius: 8px;
  background: #fffefa;
  box-shadow: none;
}

.position-card {
  min-height: 66px;
}

.position-card strong,
.trade-item strong {
  font-size: 16px;
}

.position-card span,
.exchange-card span,
.trade-item span,
.profile-card span,
.setting-row span,
.empty-state {
  color: #726c62;
}

.position-detail-head {
  background: #fffefa;
}

.detail-grid,
.summary-grid,
.strategy-metrics {
  gap: 8px;
}

.detail-grid div,
.summary-grid div,
.strategy-metrics div {
  border-color: #e8e1d6;
  background: #f7f3ec;
}

.exchange-list {
  display: grid;
  gap: 10px;
}

.exchange-card {
  padding: 12px;
}

.exchange-card.ok {
  border-color: rgba(47, 127, 115, 0.42);
}

.exchange-card.active {
  border-color: rgba(47, 127, 115, 0.55);
  box-shadow: 0 0 0 1px rgba(47, 127, 115, 0.18);
}

.exchange-card.warn {
  border-color: rgba(217, 155, 43, 0.46);
  background: #fff8eb;
}

.exchange-icon {
  border-radius: 8px;
  box-shadow: none;
}

.switch-control span {
  border-color: #d8d0c4;
  background: #e8e1d7;
}

.switch-control input:checked + span {
  border-color: var(--teal);
  background: var(--teal);
}

.sheet-card h3 {
  font-size: 19px;
}

.button-row {
  margin-top: 2px;
}

.trade-item {
  grid-template-columns: 64px 1fr auto;
  padding: 12px 10px;
}

.trade-time {
  color: #777064;
}

.trade-item.open {
  border-color: rgba(47, 127, 115, 0.36);
  background: #f4fffb;
}

.profile-card {
  padding: 14px;
}

.avatar {
  border-radius: 14px;
  background: #171a1d;
}

.verified {
  background: var(--teal-soft);
  color: #236b62;
}

.danger-btn,
.danger-mini-btn {
  border-color: rgba(201, 70, 61, 0.28);
  background: #fff4f1;
  color: var(--red);
}

.totp-setup {
  grid-template-columns: 104px 1fr;
}

.totp-setup img,
.qr-fallback {
  width: 104px;
  height: 104px;
  border-color: #e3dbcf;
}

.inline-form {
  grid-template-columns: 1fr;
}

.inline-form .primary-btn,
.inline-form .ghost-btn {
  width: 100%;
}

.bottom-nav {
  width: min(402px, calc(100% - 28px));
  gap: 4px;
  border-color: #ddd5c8;
  border-radius: 8px;
  padding: 7px;
  background: rgba(255, 254, 250, 0.94);
  box-shadow: 0 18px 40px rgba(34, 30, 24, 0.16);
  backdrop-filter: blur(18px);
}

.bottom-nav button {
  height: 54px;
  align-content: center;
  border-radius: 8px;
  color: #5f5a52;
  font-size: 11px;
  line-height: 1;
}

.bottom-nav button > span {
  display: block;
  margin-bottom: 4px;
  color: currentColor;
  font-size: 20px;
  font-weight: 700;
  line-height: 1;
}

.bottom-nav button.active {
  outline: 2px solid #e5a52c;
  outline-offset: -2px;
  background: var(--teal-soft);
  color: #1f6d64;
  box-shadow: none;
}

.toast {
  background: #171a1d;
}

.secret-dialog {
  background: rgba(23, 26, 29, 0.42);
}

.secret-dialog-panel {
  border-color: rgba(46, 40, 31, 0.12);
  border-radius: 8px;
  background: #fffefa;
}

@media (max-width: 360px) {
  .main-screen {
    padding-left: 10px;
    padding-right: 10px;
  }

  .balance-hero strong {
    font-size: 30px;
  }

  .trade-item {
    grid-template-columns: 56px minmax(0, 1fr);
  }

  .trade-item b {
    grid-column: 2;
    text-align: left;
  }
}

@media (min-width: 700px) {
  body {
    background: #f6f3ed;
  }

  .app-shell {
    margin-top: 22px;
    margin-bottom: 22px;
    min-height: calc(100vh - 44px);
    border: 9px solid #151515;
    border-radius: 38px;
    overflow: hidden;
  }

  .main-screen,
  .auth-screen,
  .boot-screen {
    min-height: calc(100vh - 62px);
  }

  .bottom-nav {
    bottom: 34px;
  }
}

/* FINAL OVERRIDE: premium production command center. */
html body {
  background:
    radial-gradient(circle at 50% -12%, rgba(25, 197, 174, 0.3), transparent 31%),
    radial-gradient(circle at 16% 12%, rgba(216, 180, 106, 0.18), transparent 24%),
    linear-gradient(180deg, #070a0e 0%, #0c1116 42%, #11171d 100%) !important;
  color: #f4f2ea;
}

body .app-shell,
body .auth-screen,
body .main-screen,
body .boot-screen {
  background:
    radial-gradient(circle at 86% -5%, rgba(25, 197, 174, 0.22), transparent 32%),
    radial-gradient(circle at 0% 26%, rgba(216, 180, 106, 0.12), transparent 28%),
    linear-gradient(180deg, #080c10 0%, #10171d 100%) !important;
  color: #f4f2ea;
}

body .brand-row strong,
body .topbar strong,
body h1,
body h2,
body h3,
body .section-title strong,
body .profile-card strong,
body .setting-row strong,
body .session-row strong,
body .balance-row strong,
body .position-card strong,
body .trade-item strong,
body .summary-grid strong,
body .strategy-metrics strong,
body .detail-grid strong,
body .sheet-card h3 {
  color: #fff8ea !important;
}

body .brand-row span,
body .topbar span,
body .section-title span,
body .balance-row span,
body .position-card span,
body .exchange-card span,
body .trade-item span,
body .profile-card span,
body .setting-row span,
body .empty-state,
body .session-row span,
body .detail-grid span,
body .detail-grid em,
body .strategy-metrics em,
body .summary-grid span,
body .strategy-metrics span,
body .secret-dialog-panel p {
  color: rgba(244, 242, 234, 0.62) !important;
}

body .brand-mark {
  border: 1px solid rgba(216, 180, 106, 0.42);
  border-radius: 8px;
  background: linear-gradient(135deg, #d8b46a, #19c5ae) !important;
  color: #07100e;
}

body .prod-hero,
body .ops-strip,
body .ops-panel,
body .auth-panel,
body .card,
body .sheet-card,
body .profile-card,
body .alert-card,
body .secret-dialog-panel {
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  background:
    linear-gradient(180deg, rgba(25, 32, 38, 0.92), rgba(14, 20, 25, 0.9)),
    rgba(15, 21, 26, 0.94) !important;
  color: #f4f2ea !important;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(18px);
}

body .prod-hero {
  padding: 16px;
}

body .prod-hero span,
body .prod-hero em,
body .ops-strip span,
body .ops-panel span,
body .ops-caption {
  color: rgba(244, 242, 234, 0.6) !important;
}

body .prod-hero strong {
  display: block;
  margin-top: 7px;
  color: #fff8ea;
  font-size: 22px;
}

body .prod-hero div {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 14px;
}

body .prod-hero em {
  border: 1px solid rgba(25, 197, 174, 0.24);
  border-radius: 999px;
  padding: 6px 9px;
  background: rgba(25, 197, 174, 0.1);
  color: #bff7ef !important;
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
}

body .auth-tabs,
body .status-pill,
body .summary-grid div,
body .strategy-metrics div,
body .detail-grid div,
body .position-card,
body .exchange-card,
body .trade-item {
  border-color: rgba(255, 255, 255, 0.1) !important;
  background: rgba(255, 255, 255, 0.06) !important;
  color: #f4f2ea !important;
}

body .auth-tabs button {
  color: rgba(244, 242, 234, 0.58);
}

body .auth-tabs button.active,
body .primary-btn {
  background: linear-gradient(135deg, #d8b46a, #19c5ae) !important;
  color: #07100e !important;
}

body label,
body .check-row {
  color: rgba(244, 242, 234, 0.72);
}

body input,
body select {
  border-color: rgba(255, 255, 255, 0.12) !important;
  background: rgba(255, 255, 255, 0.06) !important;
  color: #fff8ea !important;
}

body input::placeholder {
  color: rgba(244, 242, 234, 0.38);
}

body option {
  background: #10161b;
  color: #fff8ea;
}

body .secondary-btn {
  background: #19c5ae !important;
  color: #07100e !important;
}

body .ghost-btn,
body .icon-btn {
  border-color: rgba(255, 255, 255, 0.12) !important;
  background: rgba(255, 255, 255, 0.06) !important;
  color: #f4f2ea !important;
}

body .icon-btn.accent {
  border-color: rgba(25, 197, 174, 0.42) !important;
  background: rgba(25, 197, 174, 0.16) !important;
  color: #a8fff2 !important;
}

body .balance-hero {
  border: 1px solid rgba(216, 180, 106, 0.24) !important;
  background:
    linear-gradient(135deg, rgba(12, 16, 20, 0.98), rgba(24, 38, 39, 0.98) 48%, rgba(25, 197, 174, 0.62)),
    #0f1519 !important;
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.42);
}

body .hero-metrics span {
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.09) !important;
  color: #e7fff9 !important;
}

body .ops-strip,
body .ops-panel {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
  padding: 10px;
}

body .ops-strip div,
body .ops-panel div {
  min-width: 0;
  border-left: 1px solid rgba(255, 255, 255, 0.1);
  padding-left: 9px;
}

body .ops-strip div:first-child,
body .ops-panel div:first-child {
  border-left: 0;
  padding-left: 0;
}

body .ops-strip strong,
body .ops-panel strong {
  display: block;
  margin-top: 4px;
  color: #fff8ea;
  font-size: 11px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

body .ops-caption {
  margin: -4px 0 12px;
  border-left: 2px solid rgba(25, 197, 174, 0.42);
  padding-left: 9px;
  line-height: 1.45;
}

body .alert-card {
  border-color: rgba(216, 180, 106, 0.32) !important;
  background: linear-gradient(135deg, rgba(216, 180, 106, 0.15), rgba(255, 255, 255, 0.04)) !important;
}

body .exchange-card.active {
  border-color: rgba(216, 180, 106, 0.54) !important;
  box-shadow: 0 0 0 1px rgba(216, 180, 106, 0.16), 0 14px 34px rgba(0, 0, 0, 0.24);
}

body .trade-item.open {
  border-color: rgba(25, 197, 174, 0.34) !important;
  background: rgba(25, 197, 174, 0.08) !important;
}

body .avatar {
  border: 1px solid rgba(216, 180, 106, 0.28);
  background: linear-gradient(135deg, #111820, #19c5ae) !important;
}

body .verified {
  background: rgba(25, 197, 174, 0.15) !important;
  color: #9effef !important;
}

body .positive {
  color: #37d59c !important;
}

body .negative {
  color: #ff6b5d !important;
}

body .danger-btn,
body .danger-mini-btn {
  border-color: rgba(255, 107, 93, 0.28) !important;
  background: rgba(255, 107, 93, 0.1) !important;
  color: #ff958c !important;
}

body .bottom-nav {
  border-color: rgba(216, 180, 106, 0.18) !important;
  background: rgba(9, 13, 17, 0.86) !important;
  box-shadow: 0 24px 54px rgba(0, 0, 0, 0.45);
}

body .bottom-nav button {
  color: rgba(244, 242, 234, 0.62);
}

body .bottom-nav button.active {
  outline: 1px solid rgba(216, 180, 106, 0.72);
  background: linear-gradient(135deg, rgba(216, 180, 106, 0.16), rgba(25, 197, 174, 0.16)) !important;
  color: #fff8ea;
}

body .toast {
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(9, 13, 17, 0.94) !important;
}

/* Records list-only refinement. */
body .trade-item {
  grid-template-columns: 92px minmax(0, 1fr) auto !important;
  gap: 12px !important;
  align-items: start !important;
  padding: 14px 16px !important;
}

body .trade-time {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 3px 4px;
  color: rgba(244, 242, 234, 0.54) !important;
  font-size: 12px;
  font-weight: 850;
  line-height: 1.22;
}

body .trade-time span {
  margin: 0;
  color: rgba(244, 242, 234, 0.42) !important;
  font-size: 11px;
  line-height: 1.22;
}

body .trade-time strong {
  display: block;
  color: rgba(244, 242, 234, 0.62) !important;
  font-size: 12px;
  font-weight: 850;
  line-height: 1.22;
}

body .trade-main {
  min-width: 0;
}

body .trade-main > strong {
  display: block;
  color: #fff8ea !important;
  font-size: 17px;
  line-height: 1.18;
  overflow-wrap: anywhere;
}

body .trade-main > span {
  display: block;
  margin-top: 8px;
  color: rgba(244, 242, 234, 0.6) !important;
  font-size: 13px;
  font-weight: 760;
  line-height: 1.25;
}

body .trade-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 9px;
}

body .trade-facts em {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  margin: 0;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  padding: 4px 8px;
  background: rgba(255, 255, 255, 0.045);
  color: rgba(244, 242, 234, 0.68) !important;
  font-size: 11px;
  font-style: normal;
  font-weight: 820;
  line-height: 1;
  white-space: nowrap;
}

body .trade-item > b {
  min-width: 72px;
  color: #37d59c;
  font-size: 15px;
  font-weight: 900;
  line-height: 1.2;
  text-align: right;
  white-space: nowrap;
}
