/* ==========================================================================
   AURA TRADE AI — Shared Design System
   Terminal / HUD aesthetic. Cyan + mint-green on near-black navy.
   ========================================================================== */

:root {
  --bg-void:        #050a11;
  --bg-panel:       #071019;
  --bg-panel-2:     #0a1826;
  --bg-input:       #04090f;

  --cyan:           #22d3ee;
  --cyan-bright:    #7fe8fb;
  --cyan-dim:       rgba(34, 211, 238, 0.35);
  --cyan-faint:     rgba(34, 211, 238, 0.12);
  --cyan-line:      rgba(56, 189, 248, 0.16);

  --mint:           #3ddc97;
  --mint-bright:    #6ff4b7;

  --violet:         #8b6df2;
  --violet-bright:  #b3a0ff;
  --violet-dim:     rgba(139, 109, 242, 0.35);
  --violet-faint:   rgba(139, 109, 242, 0.14);

  --amber:          #ffc85c;

  --text-primary:   #d7ecf3;
  --text-muted:     #5b7c8b;
  --text-dim:       #3a5765;

  --danger:         #ff5d7a;

  --radius:         2px;
  --font-display:   'Orbitron', sans-serif;
  --font-mono:      'Share Tech Mono', monospace;

  --glow-cyan:      0 0 18px rgba(34, 211, 238, 0.35);
  --glow-mint:      0 0 16px rgba(61, 220, 151, 0.35);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg-void);
  color: var(--text-primary);
  font-family: var(--font-mono);
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; }
img { max-width: 100%; display: block; }

::selection { background: var(--cyan-dim); color: #001318; }

/* Focus visibility for keyboard users */
a:focus-visible,
button:focus-visible,
input:focus-visible,
.btn:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

/* ---------- Animated grid / chart background canvas ---------- */
#hud-bg {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  background: var(--bg-void);
}

.page-shell {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ---------- Site header / nav (marketing pages) ---------- */
.site-header {
  position: relative;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px clamp(20px, 5vw, 64px);
  border-bottom: 1px solid var(--cyan-line);
  background: rgba(5, 10, 17, 0.55);
  backdrop-filter: blur(6px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  letter-spacing: 2px;
  font-size: 15px;
  color: var(--cyan-bright);
}

.brand img { width: 28px; height: 28px; }

.nav-links {
  display: flex;
  gap: 32px;
  font-size: 12px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-muted);
}
.nav-links a { transition: color .2s; }
.nav-links a:hover { color: var(--cyan); }

.nav-cta {
  display: flex;
  gap: 12px;
  align-items: center;
}

@media (max-width: 780px) {
  .site-header { flex-wrap: wrap; gap: 12px; padding: 16px 18px; }
  .nav-cta { gap: 8px; }
}
@media (max-width: 400px) {
  .brand { font-size: 12px; }
  .brand img { width: 22px; height: 22px; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 26px;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 2px;
  text-transform: uppercase;
  border-radius: var(--radius);
  border: 1px solid var(--cyan-dim);
  background: transparent;
  color: var(--cyan-bright);
  transition: all .2s ease;
  white-space: nowrap;
}
.btn:hover { background: var(--cyan-faint); box-shadow: var(--glow-cyan); }

.btn-primary {
  background: linear-gradient(180deg, #0f2f38, #071a20);
  border: 1px solid var(--cyan);
  color: var(--cyan-bright);
  font-weight: 700;
}
.btn-primary:hover { box-shadow: var(--glow-cyan); background: linear-gradient(180deg, #123945, #0a2129); }

.btn-mint {
  border-color: rgba(61, 220, 151, 0.45);
  color: var(--mint-bright);
}
.btn-mint:hover { background: rgba(61, 220, 151, 0.1); box-shadow: var(--glow-mint); }

.btn-block { width: 100%; }
.btn-lg { padding: 16px 28px; font-size: 14px; }

.btn[disabled] { opacity: .4; cursor: not-allowed; }
.btn[disabled]:hover { box-shadow: none; background: transparent; }

/* ---------- Corner-bracket panel (matches login card framing) ---------- */
.bracket-panel {
  position: relative;
  background: linear-gradient(180deg, var(--bg-panel), var(--bg-panel-2));
  border: 1px solid var(--cyan-dim);
  box-shadow: 0 0 40px rgba(0,0,0,.5), inset 0 0 60px rgba(34,211,238,0.03);
}
.bracket-panel::before,
.bracket-panel::after,
.bracket-panel .bl,
.bracket-panel .br {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  border-color: var(--cyan-bright);
  opacity: .8;
}
.bracket-panel::before { top: -1px; left: -1px; border-top: 2px solid; border-left: 2px solid; }
.bracket-panel::after { top: -1px; right: -1px; border-top: 2px solid; border-right: 2px solid; }
.bracket-panel .bl { bottom: -1px; left: -1px; border-bottom: 2px solid; border-left: 2px solid; }
.bracket-panel .br { bottom: -1px; right: -1px; border-bottom: 2px solid; border-right: 2px solid; }

/* ---------- Footer ---------- */
.site-footer {
  position: relative;
  z-index: 5;
  margin-top: auto;
  border-top: 1px solid var(--cyan-line);
  background: rgba(5, 10, 17, 0.7);
  padding: 36px clamp(20px, 5vw, 64px) 26px;
  font-size: 12px;
  color: var(--text-muted);
}
.footer-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto 24px;
}
.footer-col h4 {
  color: var(--cyan);
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin: 0 0 12px;
}
.footer-col a, .footer-col p { display: block; margin: 0 0 8px; color: var(--text-muted); }
.footer-col a:hover { color: var(--cyan); }
.footer-bottom {
  text-align: center;
  padding-top: 18px;
  border-top: 1px solid var(--cyan-line);
  color: var(--text-dim);
  letter-spacing: 1px;
}

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--bg-panel-2);
  border: 1px solid var(--cyan-dim);
  color: var(--text-primary);
  padding: 14px 22px;
  font-size: 12.5px;
  letter-spacing: .5px;
  border-radius: var(--radius);
  box-shadow: var(--glow-cyan);
  z-index: 999;
  opacity: 0;
  pointer-events: none;
  transition: all .3s ease;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); pointer-events: auto; }
.toast.error { border-color: rgba(255,93,122,0.5); color: #ffc2cf; }

/* ---------- Modal ---------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(2, 5, 9, 0.82);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 20px;
}
.modal-overlay[hidden] { display: none; }

/* ---------- Shared form fields (auth, dashboard, payment) ---------- */
.field { margin-bottom: 16px; }

.field label {
  display: block;
  font-size: 10.5px;
  letter-spacing: 2px;
  font-weight: 700;
  color: var(--cyan);
  margin-bottom: 7px;
}

.field-input {
  position: relative;
  display: flex;
  align-items: center;
  background: var(--bg-input);
  border: 1px solid rgba(56, 189, 248, 0.28);
  border-radius: 2px;
  transition: border-color .2s, box-shadow .2s;
}
.field-input:focus-within {
  border-color: var(--cyan);
  box-shadow: 0 0 0 1px rgba(34,211,238,0.2), var(--glow-cyan);
}

.field-input .icon {
  width: 38px;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--cyan);
  font-size: 13px;
}

.field-input input {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-size: 13.5px;
  padding: 12px 10px 12px 0;
  letter-spacing: .3px;
}
.field-input input::placeholder { color: #3d5b6a; }

.field-input .toggle-visibility {
  width: 38px;
  flex: none;
  background: none;
  border: none;
  color: var(--cyan);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  opacity: .8;
}
.field-input .toggle-visibility:hover { opacity: 1; }

.field-error {
  color: var(--danger);
  font-size: 11px;
  margin-top: 6px;
  letter-spacing: .3px;
  min-height: 14px;
}

/* Utility */
.muted { color: var(--text-muted); }
.mint { color: var(--mint-bright); }
.cyan { color: var(--cyan-bright); }
.center { text-align: center; }
