/* KASH TRADER — shared design system */
:root {
  --navy: #1a3a5c;
  --navy-deep: #0d1f33;
  --navy-light: #2a5080;
  --gold: #c9a227;
  --gold-bright: #e4bc3a;
  --gold-dim: rgba(201, 162, 39, 0.15);
  --bg: #06080c;
  --bg-panel: #0c1018;
  --bg-elevated: #121820;
  --border: #1e2a3a;
  --border-light: #2a3d52;
  --text: #e8edf5;
  --text-muted: #7b8ca8;
  --text-dim: #4a5d7a;
  --green: #00c853;
  --green-dim: rgba(0, 200, 83, 0.12);
  --red: #ff1744;
  --red-dim: rgba(255, 23, 68, 0.12);
  --blue: #2979ff;
  --radius: 8px;
  --radius-lg: 12px;
  --font: 'Plus Jakarta Sans', system-ui, sans-serif;
  --mono: 'JetBrains Mono', 'Consolas', monospace;
  --display: 'Space Grotesk', system-ui, sans-serif;
  --chart-bg: #000;
  --chart-green-fill: rgba(16, 96, 16, 0.85);
  --chart-red-fill: rgba(80, 16, 16, 0.85);
  --chart-line: #40D040;
  --chart-dot: rgba(64, 208, 64, 0.25);
  --chart-grid: rgba(255, 255, 255, 0.07);
  --chart-grid-zero: rgba(255, 255, 255, 0.22);
  --chart-label: rgba(255, 255, 255, 0.35);
  --chart-ratebox: rgba(0, 0, 0, 0.75);
  --chart-ratebox-border: rgba(255, 255, 255, 0.45);
  --chart-rate-text: #fff;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
}

a { color: var(--gold); text-decoration: none; }
a:hover { color: var(--gold-bright); }

/* ── Auth pages (register / login) ── */
.auth-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.auth-hero {
  background: linear-gradient(145deg, var(--navy-deep) 0%, #0a1628 50%, var(--bg) 100%);
  padding: 48px 56px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-right: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}

.auth-hero::before {
  content: '';
  position: absolute;
  top: -20%;
  right: -10%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, var(--gold-dim) 0%, transparent 70%);
  pointer-events: none;
}

.auth-hero-logo {
  display: inline-block;
}

.logo-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  border-radius: 10px;
  padding: 8px 14px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
}

.logo-wrap img {
  display: block;
  max-width: 200px;
  height: auto;
  max-height: 56px;
  width: auto;
}

.auth-hero-logo.logo-wrap img,
.auth-hero-logo .logo-wrap img {
  max-width: 200px;
  max-height: 56px;
}

.auth-hero-logo img {
  max-width: 220px;
  height: auto;
}

.auth-hero-tagline {
  font-family: var(--display);
  font-size: 28px;
  font-weight: 700;
  line-height: 1.25;
  margin-top: 48px;
  max-width: 420px;
}

.auth-hero-tagline span { color: var(--gold); }

.auth-hero-desc {
  color: var(--text-muted);
  font-size: 15px;
  max-width: 400px;
  margin-top: 16px;
}

.auth-features {
  list-style: none;
  margin-top: 40px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.auth-features li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 14px;
  color: var(--text-muted);
}

.auth-features .feat-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius);
  background: var(--gold-dim);
  border: 1px solid rgba(201, 162, 39, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.auth-features strong {
  display: block;
  color: var(--text);
  font-size: 13px;
  margin-bottom: 2px;
}

.auth-hero-footer {
  font-size: 11px;
  color: var(--text-dim);
  margin-top: auto;
  padding-top: 32px;
}

.auth-form-panel {
  background: var(--bg-panel);
  padding: 48px 56px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow-y: auto;
}

.auth-form-wrap {
  max-width: 420px;
  width: 100%;
  margin: 0 auto;
}

.auth-form-wrap h1 {
  font-family: var(--display);
  font-size: 26px;
  font-weight: 700;
  margin-bottom: 6px;
}

.auth-form-wrap .subtitle {
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 28px;
}

.form-group { margin-bottom: 18px; }

.form-label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.form-input,
.form-select {
  width: 100%;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
}

.form-input:focus,
.form-select:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px var(--gold-dim);
}

.form-input.mono { font-family: var(--mono); letter-spacing: 0.5px; }

.form-hint {
  font-size: 11px;
  color: var(--text-dim);
  margin-top: 5px;
}

.form-error {
  font-size: 12px;
  color: var(--red);
  margin-top: 6px;
  display: none;
}

.form-error.show { display: block; }

.form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  color: var(--text-muted);
  margin: 20px 0;
  cursor: pointer;
}

.checkbox-row input {
  margin-top: 3px;
  accent-color: var(--gold);
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 24px;
  border-radius: var(--radius);
  border: none;
  font-family: var(--display);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.3px;
  cursor: pointer;
  transition: all 0.2s;
  width: 100%;
}

.btn-gold {
  background: linear-gradient(135deg, var(--gold-bright), var(--gold));
  color: var(--navy-deep);
  box-shadow: 0 4px 20px rgba(201, 162, 39, 0.35);
}

.btn-gold:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 28px rgba(201, 162, 39, 0.45);
}

.btn-gold:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--border-light);
  color: var(--text-muted);
}

.btn-outline:hover {
  border-color: var(--gold);
  color: var(--gold);
}

.auth-switch {
  text-align: center;
  margin-top: 24px;
  font-size: 14px;
  color: var(--text-muted);
}

.alert {
  padding: 12px 14px;
  border-radius: var(--radius);
  font-size: 13px;
  margin-bottom: 16px;
  display: none;
}

.alert.show { display: block; }
.alert-error { background: var(--red-dim); border: 1px solid var(--red); color: #ff8a9b; }
.alert-success { background: var(--green-dim); border: 1px solid var(--green); color: #6dffb0; }

.field-hidden { display: none !important; }

.phone-prefix {
  display: flex;
  gap: 8px;
}

.phone-prefix .prefix {
  flex-shrink: 0;
  width: 72px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--text-muted);
}

.phone-prefix .form-input { flex: 1; }

@media (max-width: 900px) {
  .auth-page { grid-template-columns: 1fr; }
  .auth-hero { padding: 32px 24px; min-height: auto; border-right: none; border-bottom: 1px solid var(--border); }
  .auth-hero-tagline { font-size: 22px; margin-top: 24px; }
  .auth-features { display: none; }
  .auth-form-panel { padding: 32px 24px; }
}

@media (max-width: 480px) {
  .form-row-2 { grid-template-columns: 1fr; }
}
