@charset "UTF-8";
/* ============================================================================
   PropFirmDev design system — "Aurora"
   Shared by landing, dashboard and terminal. Page-specific rules live in
   landing.css / dashboard.css / terminal.css. Theme switches via
   <html data-theme="dark|light"> (assets/theme.js + ui.js).
   ========================================================================== */
:root {
  --font-display: "Sora", "Inter", "Segoe UI", system-ui, sans-serif;
  --font-body: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
  --radius-xs: 8px;
  --radius-sm: 12px;
  --radius: 16px;
  --radius-lg: 22px;
  --radius-xl: 28px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --brand: #7c6cff;
  --brand-2: #5b5bf6;
  --cyan: #22d3ee;
  --green: #34d399;
  --red: #fb7185;
  --amber: #fbbf24;
  --gradient-brand: linear-gradient(120deg, #8f7bff 0%, #6366f1 48%, #22d3ee 100%);
  --gradient-text: linear-gradient(100deg, #b8a9ff 0%, #8f7bff 40%, #5eead4 100%);
  --gradient-green: linear-gradient(120deg, #34d399, #10b981);
  --gradient-red: linear-gradient(120deg, #fb7185, #e11d48);
  --container: 1240px;
}
:root[data-theme="dark"],
:root:not([data-theme]) {
  color-scheme: dark;
  --bg: #070a12;
  --bg-2: #0a0e1a;
  --surface: rgba(255, 255, 255, 0.035);
  --surface-solid: #0e1322;
  --surface-2: rgba(255, 255, 255, 0.06);
  --surface-3: rgba(255, 255, 255, 0.09);
  --glass: rgba(10, 14, 26, 0.94);
  --line: rgba(255, 255, 255, 0.08);
  --line-2: rgba(255, 255, 255, 0.14);
  --text: #eef0f8;
  --text-2: #b7bdd1;
  --muted: #7f879f;
  --muted-2: #5a6279;
  --brand-soft: rgba(124, 108, 255, 0.16);
  --brand-line: rgba(124, 108, 255, 0.4);
  --green-soft: rgba(52, 211, 153, 0.14);
  --red-soft: rgba(251, 113, 133, 0.14);
  --amber-soft: rgba(251, 191, 36, 0.14);
  --cyan-soft: rgba(34, 211, 238, 0.14);
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
  --shadow-sm: 0 8px 24px rgba(0, 0, 0, 0.35);
  --glow: 0 0 60px rgba(124, 108, 255, 0.25);
  --input-bg: rgba(255, 255, 255, 0.04);
  --chart-bg: #0b0f1b;
  --chart-grid: rgba(255, 255, 255, 0.05);
  --chart-text: #7f879f;
  --orb-opacity: 0.55;
}
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f4f6fb;
  --bg-2: #ffffff;
  --surface: rgba(255, 255, 255, 0.82);
  --surface-solid: #ffffff;
  --surface-2: rgba(15, 23, 42, 0.04);
  --surface-3: rgba(15, 23, 42, 0.07);
  --glass: rgba(255, 255, 255, 0.96);
  --line: rgba(15, 23, 42, 0.09);
  --line-2: rgba(15, 23, 42, 0.16);
  --text: #0b1020;
  --text-2: #334155;
  --muted: #64748b;
  --muted-2: #94a3b8;
  --brand-soft: rgba(99, 91, 255, 0.1);
  --brand-line: rgba(99, 91, 255, 0.35);
  --green-soft: rgba(16, 185, 129, 0.12);
  --red-soft: rgba(225, 29, 72, 0.1);
  --amber-soft: rgba(245, 158, 11, 0.14);
  --cyan-soft: rgba(6, 182, 212, 0.12);
  --shadow: 0 24px 60px rgba(15, 23, 42, 0.12);
  --shadow-sm: 0 8px 24px rgba(15, 23, 42, 0.08);
  --glow: 0 0 60px rgba(99, 91, 255, 0.18);
  --input-bg: #ffffff;
  --chart-bg: #ffffff;
  --chart-grid: rgba(15, 23, 42, 0.06);
  --chart-text: #64748b;
  --green: #10b981;
  --red: #e11d48;
  --brand: #635bff;
  --gradient-text: linear-gradient(100deg, #5b4dff 0%, #6366f1 45%, #0891b2 100%);
  --orb-opacity: 0.35;
}

/* ---------- reset & base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background 0.3s, color 0.3s;
}
button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}
button,
a,
input,
select {
  touch-action: manipulation;
}
button,
a {
  -webkit-tap-highlight-color: transparent;
}
a {
  color: inherit;
  text-decoration: none;
}
button {
  cursor: pointer;
  border: 0;
  background: none;
  padding: 0;
}
img,
svg {
  max-width: 100%;
  display: inline-block;
  vertical-align: middle;
}
button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
/* Loading overlays keep the original content in layout: no button/row resizing. */
button.request-pending, a.request-pending {
  position:relative; color:transparent !important; text-shadow:none !important;
  cursor:default; pointer-events:none; opacity:.85;
}
.request-pending > * { opacity:0 !important; }
body button.request-pending[aria-busy="true"]::before, body a.request-pending[aria-busy="true"]::before {
  content:""; position:absolute; width:14px; height:14px;
  top:calc(50% - 8px); left:calc(50% - 59px);
  border:2px solid var(--text); border-right-color:transparent; border-radius:50%;
  animation:request-spin .8s linear infinite; pointer-events:none;
  background:none; box-shadow:none; right:auto; bottom:auto; z-index:1;
}
body button.request-pending[aria-busy="true"]::after, body a.request-pending[aria-busy="true"]::after {
  content:attr(data-busy-text); position:absolute; inset:0;
  display:flex; align-items:center; justify-content:center; padding-left:23px;
  color:var(--text); font-size:inherit; font-weight:inherit; white-space:nowrap; pointer-events:none;
  background:none; transform:none; transition:none; z-index:1;
}
body button.request-pending.request-compact[aria-busy="true"]::before, body a.request-pending.request-compact[aria-busy="true"]::before {left:calc(50% - 8px);}
body button.request-pending.request-compact[aria-busy="true"]::after, body a.request-pending.request-compact[aria-busy="true"]::after {content:none;}
@keyframes request-spin {to {transform:rotate(360deg);}}
@media (prefers-reduced-motion:reduce) {body button.request-pending[aria-busy="true"]::before,body a.request-pending[aria-busy="true"]::before {animation:none;}}
:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 3px;
  border-radius: 6px;
}
h1,
h2,
h3,
h4,
p {
  margin-top: 0;
}
h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  line-height: 1.12;
  letter-spacing: -0.03em;
  font-weight: 700;
  color: var(--text);
}
h1 {
  font-size: 42px;
}
h2 {
  font-size: 36px;
}
h3 {
  font-size: 20px;
  letter-spacing: -0.02em;
}
h4 {
  font-size: 15px;
  letter-spacing: -0.01em;
}
p {
  color: var(--text-2);
}
small {
  font-size: 12px;
}
::selection {
  background: var(--brand);
  color: #fff;
}
.hidden {
  display: none !important;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}
.container {
  width: min(var(--container), calc(100% - 48px));
  margin-inline: auto;
}
.muted,
.micro {
  color: var(--muted);
}
.micro {
  font-size: 12px;
  line-height: 1.7;
}
.mono,
.num {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}
.positive {
  color: var(--green) !important;
}
.negative {
  color: var(--red) !important;
}
.gradient-text {
  background: var(--gradient-text);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* ---------- ambient background: soft gradients, no blur render passes ---------- */
.ambient {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
  contain: paint;
  isolation: isolate;
}
.orb {
  position: absolute;
  border-radius: 50%;
  opacity: var(--orb-opacity);
  animation: drift 64s ease-in-out infinite alternate;
}
.orb-a {
  width: min(58vw, 520px);
  height: min(58vw, 520px);
  top: -160px;
  left: -100px;
  background: radial-gradient(circle, rgba(109,93,255,.55) 0%, rgba(109,93,255,.32) 20%, rgba(109,93,255,.12) 42%, rgba(109,93,255,.025) 62%, transparent 74%);
}
.orb-b {
  width: min(50vw, 460px);
  height: min(50vw, 460px);
  top: 10vh;
  right: -120px;
  background: radial-gradient(circle, rgba(34,211,238,.45) 0%, rgba(34,211,238,.26) 20%, rgba(34,211,238,.1) 42%, rgba(34,211,238,.02) 62%, transparent 74%);
  animation-delay: -24s;
  animation-duration: 80s;
}
.orb-c {
  width: min(40vw, 340px);
  height: min(40vw, 340px);
  bottom: -100px;
  left: 30vw;
  background: radial-gradient(circle, rgba(168,85,247,.35), rgba(168,85,247,.1) 42%, transparent 74%);
  animation: none;
}
.grid-fade {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 70% 50% at 50% 0%, #000 10%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse 70% 50% at 50% 0%, #000 10%, transparent 70%);
  opacity: 0.6;
}
@keyframes drift {
  0% { transform: translate(0, 0); }
  50% { transform: translate(18px, 12px); }
  100% { transform: translate(-14px, 24px); }
}
/* Keep page backgrounds and steady status indicators still between updates. */
body:is([data-app="landing"],[data-app="admin"],[data-app="dashboard"],[data-app="terminal"]) .ambient .orb {
  animation: none;
}
body:is([data-app="landing"],[data-app="admin"],[data-app="dashboard"],[data-app="terminal"]) :is(.live-dot,.pulse-dot,.progress-fill)::after {
  content: none;
}
/* Decorative motion only: never pause chart data, account updates or execution. */
html[data-motion-paused] :is(.orb,.float-card,.auth-float,.price-tag,.marquee-track),
.motion-outside { animation-play-state: paused !important; }
html[data-motion-paused] :is(.live-dot,.pulse-dot)::after { animation-play-state: paused !important; }
@media (max-width:760px), (pointer:coarse) {
  .orb-a { width:min(50vw,200px); height:min(50vw,200px); top:-70px; left:-45px; }
  .orb-b { width:min(44vw,176px); height:min(44vw,176px); top:20vh; right:-50px; }
  .orb-c { display:none; }
}

/* ---------- brand ---------- */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  white-space: nowrap;
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.03em;
}
.brand img {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  box-shadow: 0 6px 18px rgba(99, 91, 255, 0.35);
}
.brand-word em {
  font-style: normal;
  font-weight: 600;
  background: var(--gradient-text);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ---------- buttons ---------- */
.button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 12px 22px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 14px;
  line-height: 1.2;
  color: #fff;
  background: var(--gradient-brand);
  background-size: 160% 160%;
  border: 1px solid transparent;
  box-shadow: 0 10px 30px rgba(99, 91, 255, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.25);
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), background-position 0.5s var(--ease), filter 0.2s;
  white-space: nowrap;
  overflow: hidden;
  isolation: isolate;
}
.button::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 20%, rgba(255, 255, 255, 0.28) 50%, transparent 80%);
  transform: translateX(-120%);
  transition: transform 0.7s var(--ease);
  z-index: -1;
}
.button:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 40px rgba(99, 91, 255, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.3);
  background-position: 100% 50%;
}
.button:hover::after {
  transform: translateX(120%);
}
.button:active {
  transform: translateY(0) scale(0.98);
}
.button svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.button.small {
  min-height: 38px;
  padding: 8px 14px;
  font-size: 13px;
  border-radius: 10px;
  gap: 8px;
}
.button.xs {
  min-height: 32px;
  padding: 5px 11px;
  font-size: 12px;
  border-radius: 8px;
  gap: 6px;
}
.button.full {
  width: 100%;
}
.button.secondary,
.button.ghost {
  background: var(--surface-2);
  color: var(--text);
  border-color: var(--line-2);
  box-shadow: none;
}
.button.secondary:hover,
.button.ghost:hover {
  background: var(--surface-3);
  box-shadow: var(--shadow-sm);
  border-color: var(--brand-line);
}
.button.ghost {
  background: transparent;
}
.button.danger {
  background: var(--red-soft);
  color: var(--red);
  border-color: rgba(251, 113, 133, 0.35);
  box-shadow: none;
}
.button.danger:hover {
  background: rgba(251, 113, 133, 0.22);
  box-shadow: none;
}
.button.success {
  background: var(--gradient-green);
  box-shadow: 0 10px 30px rgba(16, 185, 129, 0.3);
  color: #04281b;
}
.button.success:hover {
  box-shadow: 0 16px 40px rgba(16, 185, 129, 0.4);
}
.button.outline {
  background: transparent;
  color: var(--text);
  border-color: var(--line-2);
  box-shadow: none;
}
.button.outline:hover {
  border-color: var(--brand);
  color: var(--brand);
  box-shadow: none;
}
.quiet,
.link-button {
  color: var(--muted);
  padding: 4px;
  font: inherit;
  border-radius: 6px;
  transition: color 0.15s;
}
.quiet:hover,
.link-button:hover,
.text-link:hover {
  color: var(--text);
}
.link-button {
  color: var(--brand);
  font-size: 13px;
  font-weight: 500;
}
.text-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-2);
}
.icon-button {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--text-2);
  transition: background 0.15s, color 0.15s, border-color 0.15s, transform 0.2s var(--ease);
}
.icon-button:hover {
  background: var(--surface-3);
  color: var(--text);
  border-color: var(--line-2);
  transform: translateY(-1px);
}
.icon-button svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 1.8;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* theme toggle */
.theme-toggle {
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  display: grid;
  place-items: center;
  color: var(--text-2);
  transition: background 0.2s, border-color 0.2s, transform 0.3s var(--ease);
  flex-shrink: 0;
}
.theme-toggle:hover {
  background: var(--surface-3);
  border-color: var(--brand-line);
  transform: rotate(-12deg);
}
.theme-toggle svg {
  position: absolute;
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 1.8;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: opacity 0.3s, transform 0.4s var(--ease);
}
:root[data-theme="dark"] .theme-toggle .icon-moon,
:root:not([data-theme]) .theme-toggle .icon-moon {
  opacity: 0;
  transform: rotate(90deg) scale(0.5);
}
:root[data-theme="light"] .theme-toggle .icon-sun {
  opacity: 0;
  transform: rotate(-90deg) scale(0.5);
}
:root[data-theme="light"] .theme-toggle {
  color: #0f172a;
}

/* ---------- labels, tags, badges ---------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  letter-spacing: 0.16em;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: 18px;
}
.eyebrow::before {
  content: "";
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: var(--gradient-brand);
}
.eyebrow.plain::before {
  display: none;
}
.tag,
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
  border-radius: 999px;
  padding: 5px 10px;
  border: 1px solid var(--brand-line);
  background: var(--brand-soft);
  color: var(--brand);
}
.badge {
  text-transform: none;
  letter-spacing: 0;
  font-size: 12px;
}
.badge::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 8px currentColor;
}
.badge.neutral,
.tag.neutral {
  color: var(--muted);
  background: var(--surface-2);
  border-color: var(--line);
}
.badge.good,
.tag.good {
  color: var(--green);
  background: var(--green-soft);
  border-color: rgba(52, 211, 153, 0.35);
}
.badge.bad,
.tag.bad {
  color: var(--red);
  background: var(--red-soft);
  border-color: rgba(251, 113, 133, 0.35);
}
.badge.warn,
.tag.warn {
  color: var(--amber);
  background: var(--amber-soft);
  border-color: rgba(251, 191, 36, 0.35);
}
.tag::before {
  display: none;
}
.live-dot,
.pulse-dot,
.pill-dot {
  position: relative;
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  flex-shrink: 0;
}
.live-dot::after,
.pulse-dot::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid currentColor;
  color: var(--green);
  animation: ping 1.6s ease-out infinite;
}
.pulse-dot,
.pulse-dot::after {
  background: var(--brand);
  color: var(--brand);
}
.pulse-dot::after {
  background: none;
}
@keyframes ping {
  0% {
    transform: scale(0.6);
    opacity: 0.9;
  }
  100% {
    transform: scale(1.8);
    opacity: 0;
  }
}

/* ---------- cards & surfaces ---------- */
.card {
  position: relative;
  padding: 26px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 22px;
  min-width: 0;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  transition: border-color 0.25s, transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.card.hover:hover,
.lift:hover {
  border-color: var(--brand-line);
  transform: translateY(-3px);
  box-shadow: var(--shadow-sm);
}
.card > h3 {
  margin-bottom: 20px;
}
.card p {
  font-size: 13.5px;
  line-height: 1.75;
}
.card-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 22px;
}
.card-heading h3 {
  margin: 0;
  font-size: 17px;
}
.card-heading .eyebrow {
  margin-bottom: 6px;
  font-size: 10px;
}
.glass {
  background: var(--glass);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border: 1px solid var(--line);
}
.glow-border {
  position: relative;
}
.glow-border::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(124, 108, 255, 0.6), rgba(34, 211, 238, 0.15) 40%, transparent 70%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}
.soft-note {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.75;
  margin-top: 18px;
}
.simulation-note {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px 14px;
  border: 1px dashed var(--brand-line);
  border-radius: var(--radius-sm);
  background: var(--brand-soft);
  font-size: 12px;
  line-height: 1.7;
  color: var(--text-2);
  margin-top: 18px;
}
.notice {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 18px 20px;
  background: var(--brand-soft);
  border: 1px solid var(--brand-line);
  border-radius: var(--radius-sm);
  margin-bottom: 24px;
  color: var(--brand);
}
.notice.good {
  background: var(--green-soft);
  border-color: rgba(52, 211, 153, 0.35);
  color: var(--green);
}
.notice.bad {
  background: var(--red-soft);
  border-color: rgba(251, 113, 133, 0.35);
  color: var(--red);
}
.notice > span,
.notice > svg {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
  font-size: 18px;
  text-align: center;
}
.notice p {
  margin: 0;
  font-size: 13px;
  color: var(--text-2);
}
.notice strong {
  color: var(--text);
}

/* ---------- forms ---------- */
input,
select,
textarea {
  background: var(--input-bg);
  border: 1px solid var(--line-2);
  color: var(--text);
  padding: 12px 14px;
  border-radius: 11px;
  width: 100%;
  font-size: 14px;
  min-width: 0;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}
select {
  appearance: none;
  -webkit-appearance: none;
  background-color: var(--surface-solid);
  border-color: var(--brand-line);
  background-image: linear-gradient(45deg, transparent 50%, var(--brand) 50%), linear-gradient(135deg, var(--brand) 50%, transparent 50%), linear-gradient(120deg, var(--brand-soft), transparent);
  background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%, center;
  background-size: 5px 5px, 5px 5px, 100% 100%;
  background-repeat: no-repeat;
  padding-right: 36px;
}
select option { background:var(--surface-solid); color:var(--text); }
select:hover { border-color:var(--brand); }
select:disabled { opacity:.55; cursor:not-allowed; }
input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 4px var(--brand-soft);
}
input::placeholder {
  color: var(--muted-2);
}
input[readonly] {
  color: var(--muted);
  background: var(--surface-2);
}
input[type="file"] {
  padding: 10px;
}
label {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-2);
  display: block;
  margin: 14px 0 7px;
}
label input,
label select {
  margin-top: 7px;
  font-weight: 400;
}
form > .button {
  margin-top: 20px;
}
form > .form-error {
  margin-top: 12px;
}
.form-error {
  font-size: 13px;
  color: var(--red);
  min-height: 0;
}
.form-error:not(:empty) {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--red-soft);
  border: 1px solid rgba(251, 113, 133, 0.3);
}
.checkbox {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  line-height: 1.7;
  margin: 16px 0;
  font-weight: 400;
  color: var(--text-2);
}
.checkbox input {
  width: 16px;
  height: 16px;
  margin-top: 3px;
  flex-shrink: 0;
  accent-color: var(--brand);
}
.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.input-group {
  position: relative;
}
.input-group > input {
  padding-right: 64px;
}
.input-group .suffix {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  font-family: var(--font-mono);
}
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.chips button,
.chip {
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--text-2);
  font-size: 12.5px;
  font-weight: 500;
  padding: 7px 13px;
  transition: all 0.2s var(--ease);
}
.chips button:hover {
  border-color: var(--brand);
  color: var(--brand);
  transform: translateY(-1px);
}
.chips button.selected {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
  box-shadow: 0 6px 18px rgba(99, 91, 255, 0.35);
}

/* ---------- tables ---------- */
.data-table-wrap {
  overflow-x: auto;
  min-width: 0;
  max-width: 100%;
  overscroll-behavior-x: contain;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
}
.data-table-wrap table {
  border-collapse: collapse;
  width: max-content;
  min-width: 100%;
  table-layout: auto;
  font-size: 13px;
  text-align: left;
}
.history-value,.trade-time { white-space: nowrap; }
.data-table-wrap th {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
  background: var(--surface-2);
  border-bottom: 1px solid var(--line);
  padding: 12px 14px;
}
.data-table-wrap td {
  padding: 13px 14px;
  border-bottom: 1px solid var(--line);
  color: var(--text-2);
  vertical-align: middle;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow-wrap: normal;
  word-break: normal;
}
.data-table-wrap tbody tr {
  transition: background 0.15s;
}
.data-table-wrap tbody tr:hover {
  background: var(--surface-2);
}
.data-table-wrap tr:last-child td {
  border-bottom: 0;
}
.data-table-wrap td input {
  width: 160px;
  font-size: 12px;
  padding: 7px 10px;
  border-radius: 8px;
}
.data-table-wrap td select {
  width: auto;
  font-size: 12px;
  padding: 7px 30px 7px 10px;
  border-radius: 8px;
}
.table-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
/* Keep table controls in one row; forms and modal actions may still wrap. */
.data-table-wrap .table-actions {
  display: inline-flex;
  flex-flow: row nowrap;
  width: max-content;
  white-space: nowrap;
}
.data-table-wrap .table-actions > * {
  flex: 0 0 auto;
}
.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--muted);
  font-size: 13px;
  border: 1px dashed var(--line-2);
  border-radius: var(--radius-sm);
}
.empty-state strong {
  display: block;
  color: var(--text);
  margin-bottom: 6px;
  font-weight: 600;
  font-size: 14px;
}
.empty-state::before {
  content: "";
  display: block;
  width: 44px;
  height: 44px;
  margin: 0 auto 14px;
  border-radius: 14px;
  background: var(--brand-soft);
  border: 1px solid var(--brand-line);
  mask: none;
}

/* ---------- rule rows ---------- */
.rule-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  color: var(--muted);
}
.rule-row:last-child {
  border-bottom: 0;
}
.rule-row strong {
  color: var(--text);
  font-weight: 600;
  font-family: var(--font-mono);
  font-size: 13px;
}

/* ---------- progress ---------- */
.progress-line {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 8px;
}
.progress-track {
  height: 8px;
  border-radius: 8px;
  background: var(--surface-3);
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: var(--gradient-brand);
  border-radius: 8px;
  transition: width 0.8s var(--ease);
  position: relative;
}
.progress-fill::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.35), transparent);
  animation: shimmer 2.2s linear infinite;
}
@keyframes shimmer {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}

/* ---------- crypto icons ---------- */
.coin {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
}
.coin svg {
  width: 100%;
  height: 100%;
  display: block;
}
.coin-btc {
  background: #f7931a;
}
.coin-eth {
  background: #627eea;
}
.coin-usdt {
  background: #26a17b;
}
.coin-usdc {
  background: #2775ca;
}
.coin-trx {
  background: #ef0027;
}
.coin-bnb {
  background: #f3ba2f;
}
.coin-sol {
  background: linear-gradient(135deg, #9945ff, #14f195);
}
.coin-usd {
  background: linear-gradient(135deg, #7c6cff, #22d3ee);
}
.coin-mock {
  background: linear-gradient(135deg, #475569, #1e293b);
}
.coin.sm {
  width: 24px;
  height: 24px;
}
.coin.lg {
  width: 48px;
  height: 48px;
}
.coin-stack {
  display: inline-flex;
}
.coin-stack .coin {
  margin-left: -8px;
  border: 2px solid var(--bg);
}
.coin-stack .coin:first-child {
  margin-left: 0;
}

/* ---------- dialogs / modals ---------- */
dialog {
  border: 1px solid var(--line-2);
  border-radius: var(--radius-lg);
  background: var(--surface-solid);
  color: var(--text);
  padding: 0;
  max-width: min(760px, 94vw);
  width: 560px;
  max-height: 88vh;
  overflow: auto;
  box-shadow: var(--shadow), var(--glow);
  animation: modal-in 0.35s var(--ease);
}
dialog.wide {
  width: 860px;
}
dialog::backdrop {
  background: rgba(3, 5, 12, 0.72);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  animation: fade-in 0.25s ease;
}
:root[data-theme="light"] dialog::backdrop {
  background: rgba(15, 23, 42, 0.45);
}
.modal-head {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 22px 26px 18px;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  background: var(--surface-solid);
  z-index: 2;
}
.modal-head h3 {
  margin: 0;
  font-size: 18px;
  flex: 1;
}
.modal-head p {
  margin: 2px 0 0;
  font-size: 12.5px;
  color: var(--muted);
}
.modal-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--brand-soft);
  border: 1px solid var(--brand-line);
  color: var(--brand);
  flex-shrink: 0;
}
.modal-icon svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.modal-body {
  padding: 22px 26px 26px;
}
.dialog-close {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: var(--muted);
  border: 1px solid var(--line);
  background: var(--surface-2);
  transition: all 0.15s;
  flex-shrink: 0;
}
.dialog-close:hover {
  color: var(--text);
  background: var(--surface-3);
  transform: rotate(90deg);
}
.dialog-close svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}
@keyframes modal-in {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes fade-in {
  from {
    opacity: 0;
  }
}

/* ---------- toast: manual top-layer portal, with a high-z fallback ---------- */
#toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 2147483647;
  top: auto;
  left: auto;
  width: auto;
  height: auto;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  overflow: visible;
  pointer-events: none;
  max-width: min(420px, calc(100vw - 32px));
}
#toast[popover]:not(:popover-open) {display:none}
#toast::backdrop {background:transparent;backdrop-filter:none;pointer-events:none}
.toast-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 14px;
  background: var(--surface-solid);
  border: 1px solid var(--line-2);
  box-shadow: var(--shadow);
  font-size: 13.5px;
  color: var(--text);
  animation: toast-in 0.4s var(--ease);
  pointer-events: auto;
  border-left: 3px solid var(--green);
}
.toast-item.error {
  border-left-color: var(--red);
}
.toast-item .toast-icon {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  background: var(--green-soft);
  color: var(--green);
}
.toast-item.error .toast-icon {
  background: var(--red-soft);
  color: var(--red);
}
.toast-item .toast-icon svg {
  width: 13px;
  height: 13px;
  stroke: currentColor;
  stroke-width: 2.5;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.toast-item.leaving {
  animation: toast-out 0.3s ease forwards;
}
@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateX(24px) scale(0.96);
  }
}
@keyframes toast-out {
  to {
    opacity: 0;
    transform: translateX(24px) scale(0.96);
  }
}

/* ---------- footer ---------- */
.site-footer {
  padding: 22px 40px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 20px;
  font-size: 12px;
  color: var(--muted);
  margin-top: 40px;
}

/* ---------- reveal animations ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
  transition-delay: var(--delay, 0ms);
}
[data-reveal].in {
  opacity: 1;
  transform: none;
}
[data-delay="1"] {
  --delay: 90ms;
}
[data-delay="2"] {
  --delay: 180ms;
}
[data-delay="3"] {
  --delay: 270ms;
}
[data-delay="4"] {
  --delay: 360ms;
}
.skeleton {
  animation: breathe 1.5s infinite;
  opacity: 0.55;
}
@keyframes breathe {
  50% {
    opacity: 0.25;
  }
}
@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ---------- responsive ---------- */
@media (max-width: 760px) {
  body {
    font-size: 14px;
  }
  .container {
    width: calc(100% - 32px);
  }
  h1 {
    font-size: 32px;
  }
  h2 {
    font-size: 28px;
  }
  .card {
    padding: 20px;
    margin-bottom: 16px;
  }
  .field-row {
    grid-template-columns: 1fr;
  }
  .site-footer {
    padding: 18px 20px;
    flex-direction: column;
    gap: 6px;
  }
  dialog {
    width: calc(100vw - 20px);
    max-height: 92vh;
  }
  .modal-head,
  .modal-body {
    padding-inline: 18px;
  }
  #toast {
    right: 12px;
    bottom: 12px;
    left: 12px;
    max-width: none;
  }
}
/* Keep customer mobile alerts clear of the fixed navigation footers. */
@media (max-width:760px) {
  body[data-app="dashboard"] #toast,
  body[data-app="terminal"] #toast {
    top: calc(12px + env(safe-area-inset-top, 0px));
    bottom: auto;
    left: max(12px, env(safe-area-inset-left, 0px));
    right: max(12px, env(safe-area-inset-right, 0px));
    max-width: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation: none !important;
    transition: none !important;
  }
  [data-reveal] {
    opacity: 1;
    transform: none;
  }
}

/* Top-level page information can be dismissed without leaving a spacer. */
[data-dismissible-notice] {position:relative;padding-right:52px}
[data-dismissible-notice][hidden] {display:none!important}
.page-notice-close {
 position:absolute;top:6px;right:7px;display:grid;place-items:center;width:32px;height:32px;
 min-width:32px;padding:7px;border:1px solid transparent;border-radius:8px;
 background:transparent;color:var(--text-2);cursor:pointer;line-height:1;
}
.page-notice-close svg {width:16px;height:16px;stroke:currentColor;stroke-width:1.8;fill:none;stroke-linecap:round}
.page-notice-close:hover {background:var(--brand-soft);border-color:var(--brand-line);color:var(--text)}
.page-notice-close:focus-visible {outline:2px solid var(--brand);outline-offset:1px}
.page-notice-message {min-width:0;overflow-wrap:anywhere}
.notice>.page-notice-message {width:auto;height:auto;flex:1;font:inherit;stroke:none}
.challenge-reference {display:inline-flex;align-items:center;gap:5px;padding:2px 4px;border:1px solid transparent;border-radius:6px;background:transparent;color:inherit;font:inherit;letter-spacing:normal;text-transform:none;white-space:nowrap;vertical-align:baseline}
.challenge-reference svg {width:12px;height:12px;flex-shrink:0;fill:none;stroke:currentColor;stroke-width:1.7;opacity:.65}
.challenge-reference:hover,.challenge-reference:focus-visible {color:var(--brand);border-color:var(--brand-line);background:var(--brand-soft)}
.copied-trade-mark {display:inline-flex;align-items:center;justify-content:center;width:15px;height:15px;padding:0;margin-left:5px;flex-shrink:0;border:1px solid var(--brand);border-radius:2px;font:750 10px var(--font-mono);color:var(--brand);background:var(--brand-soft);line-height:1;letter-spacing:0;text-transform:none;vertical-align:middle}
.wallet-copy,.wallet-tx-link{display:inline-flex;align-items:center;gap:5px;white-space:nowrap;vertical-align:middle;color:var(--text);font-size:12px;font-weight:600;text-decoration:none}
.wallet-copy{padding:3px 2px;border:0;border-radius:5px;background:transparent;font-family:var(--font-mono,"JetBrains Mono",monospace);cursor:pointer}
.wallet-copy:hover,.wallet-copy:focus-visible,.wallet-tx-link:hover{color:var(--brand)}
.wallet-copy.copied{color:var(--green)}
.wallet-copy svg,.wallet-tx-link svg{width:14px;height:14px;flex:none;fill:none;stroke:currentColor;stroke-width:1.7}
.wallet-tx-link{color:var(--brand);font-family:inherit}
.ledger-entry-context{display:block;margin-top:4px;color:var(--muted);font-size:11px;line-height:1.4}

/* iPhone focus zoom starts with small form text. Keep touch controls readable
   without restricting viewport/pinch zoom or changing desktop typography.
   Amount and authenticator fields already use larger type; preserve it. */
@media (any-pointer: coarse) {
  :where(input:not(
    [type="hidden"], [type="checkbox"], [type="radio"], [type="range"],
    [type="file"], [type="color"], [type="button"], [type="submit"], [type="reset"],
    .auth-code-digits input, #factor-confirm-form [name="code"],
    .amount-input input, .wallet-amount input,
    .custody-amount input, .product-transfer-dialog .input-group input
  ), textarea, select, [contenteditable]:not([contenteditable="false"])) {
    font-size: 16px !important;
  }
}

/* Keep every dialog close control in its header's upper-right corner. */
dialog :is(.wallet-head,.copy-head,.mt-detail-head,.wl-drawer-title){position:relative}
dialog :is(.modal-head,.wallet-head,.copy-head,.mt-detail-head,.wl-drawer-title):has(>.dialog-close){padding-right:66px;min-height:48px}
dialog :is(.modal-head,.wallet-head,.copy-head,.mt-detail-head,.wl-drawer-title)>.dialog-close{position:absolute;top:14px;right:14px;margin:0;align-self:flex-start}
.modal-head>div{min-width:0;flex:1}
.tag[hidden]{display:none!important}
