:root {
  --bg: #0a1420;
  --bg-elevated: #101f30;
  --bg-card: #132537;
  --border: #223447;
  --text: #e8f0ee;
  --text-muted: #8ea3ab;
  --accent: #3fb6a0;
  --accent-strong: #5fd0ba;
  --green: #3fb6a0;
  --red: #e3584c;
  --blue: #4f8cf0;
  --radius: 10px;
  --max-width: 1100px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
}

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

h1, h2, h3 { line-height: 1.2; margin: 0 0 0.5em; }
h1 { font-size: 2rem; }
h2 { font-size: 1.4rem; margin-top: 2.2rem; }
h3 { font-size: 1.05rem; }

p { margin: 0 0 1em; }
.muted { color: var(--text-muted); font-size: 0.92rem; }
.note { font-style: italic; }

/* ---- Pre-launch banner ---- */
.prelaunch-banner {
  background: rgba(227, 179, 65, 0.12);
  color: #f0c75e;
  border-bottom: 1px solid rgba(227, 179, 65, 0.3);
  text-align: center;
  font-size: 0.85rem;
  padding: 0.55rem 1rem;
  line-height: 1.5;
}

/* ---- Nav ---- */
.nav { background: var(--bg-elevated); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 10; }
.nav-inner { max-width: var(--max-width); margin: 0 auto; display: flex; align-items: center; justify-content: space-between; padding: 0.9rem 1.5rem; flex-wrap: wrap; gap: 0.5rem; }
.brand { font-weight: 700; font-size: 1.1rem; color: var(--text); letter-spacing: 0.01em; display: flex; align-items: center; gap: 0.55rem; }
.brand:hover { text-decoration: none; color: var(--accent); }
.brand-mark { display: block; flex-shrink: 0; border-radius: 6px; }
.brand-name { font-size: 0.92rem; font-weight: 500; color: var(--text-muted); white-space: nowrap; }
@media (max-width: 560px) { .brand-name { display: none; } }
.nav-links { display: flex; align-items: center; gap: 1.25rem; flex-wrap: wrap; }
.nav-links a { color: var(--text-muted); font-size: 0.93rem; }
.nav-links a:hover { color: var(--text); text-decoration: none; }
.nav-cta { background: var(--accent); color: #06201a !important; padding: 0.45rem 0.9rem; border-radius: 6px; font-weight: 600; }
.nav-cta:hover { background: var(--accent-strong); text-decoration: none; }

/* ---- Layout ---- */
.main { max-width: var(--max-width); margin: 0 auto; padding: 1.5rem; min-height: 70vh; }
.section { margin-bottom: 2rem; }
.section.narrow { max-width: 480px; margin: 2rem auto; }
.section.narrow-wide { max-width: 720px; margin: 2rem auto; }

/* ---- Hero ---- */
.hero { text-align: center; padding: 4rem 1rem 3rem; }
.hero h1 { font-size: 2.3rem; max-width: 760px; margin: 0 auto 0.7em; }
.hero-sub { max-width: 620px; margin: 0 auto 1.6em; color: var(--text-muted); font-size: 1.05rem; }
.hero-actions { display: flex; gap: 0.8rem; justify-content: center; flex-wrap: wrap; }
.cta-section { text-align: center; background: var(--bg-elevated); border-radius: var(--radius); padding: 2.5rem 1rem; }

/* ---- Grid / cards ---- */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
@media (max-width: 760px) { .grid-3 { grid-template-columns: 1fr; } }

.card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25rem; }

/* ---- Buttons ---- */
.btn { display: inline-block; padding: 0.65rem 1.3rem; border-radius: 6px; font-weight: 600; border: none; cursor: pointer; font-size: 0.95rem; }
.btn-primary { background: var(--accent); color: #06201a; }
.btn-primary:hover { background: var(--accent-strong); text-decoration: none; }
.btn-secondary { background: transparent; color: var(--text); border: 1px solid var(--border); }
.btn-secondary:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }
.btn-block { width: 100%; }
.btn-sm { padding: 0.35rem 0.7rem; font-size: 0.85rem; }
.link-button { background: none; border: none; color: var(--text-muted); cursor: pointer; font-size: 0.93rem; padding: 0; }
.link-button:hover { color: var(--text); text-decoration: underline; }
.inline-form { display: inline-flex; gap: 0.4rem; align-items: center; }

/* ---- Forms ---- */
.stacked-form { display: flex; flex-direction: column; gap: 0.9rem; }
.field { display: flex; flex-direction: column; gap: 0.3rem; font-size: 0.9rem; }
.field span { font-weight: 600; }
input, select, textarea {
  background: var(--bg-elevated); border: 1px solid var(--border); color: var(--text);
  padding: 0.55rem 0.7rem; border-radius: 6px; font-size: 0.95rem; font-family: inherit;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.auth-card { max-width: 460px; margin: 0 auto; }
.form-footer { text-align: center; margin-top: 1rem; }
.form-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.8rem; }
@media (max-width: 700px) { .form-row { grid-template-columns: 1fr; } }
.fund-form { display: flex; gap: 0.4rem; align-items: center; flex-wrap: wrap; }
.fund-form input { width: 120px; }

.ack-list { display: flex; flex-direction: column; gap: 0.7rem; background: var(--bg-elevated); border: 1px solid var(--border); border-radius: 8px; padding: 0.9rem; }
.checkbox-field { display: flex; align-items: flex-start; gap: 0.6rem; font-size: 0.86rem; color: var(--text-muted); cursor: pointer; }
.checkbox-field input { width: auto; margin-top: 0.2rem; flex-shrink: 0; }

/* ---- Dashboard ---- */
.dash-header { display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: 1rem; margin-bottom: 1rem; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin: 1rem 0 2rem; }
@media (max-width: 760px) { .stats-grid { grid-template-columns: repeat(2, 1fr); } }
.stat-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem; text-align: center; }
.stat-value { display: block; font-size: 1.7rem; font-weight: 700; color: var(--accent); }
.stat-label { display: block; color: var(--text-muted); font-size: 0.82rem; margin-top: 0.2rem; }

.pct-pos { color: var(--green); font-weight: 600; }
.pct-neg { color: var(--red); font-weight: 600; }

/* ---- Tables ---- */
.trades-table-wrap { overflow-x: auto; margin: 0.8rem 0 1.5rem; }
.trades-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.trades-table th, .trades-table td { padding: 0.55rem 0.7rem; border-bottom: 1px solid var(--border); text-align: left; white-space: nowrap; }
.trades-table th { color: var(--text-muted); font-weight: 600; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.03em; }

.status { font-weight: 700; font-size: 0.78rem; padding: 0.1rem 0.45rem; border-radius: 4px; margin-left: 0.4rem; vertical-align: middle; }
.status-pending { background: rgba(79,140,240,0.15); color: var(--blue); }
.status-approved { background: rgba(63,182,160,0.15); color: var(--green); }
.status-declined { background: rgba(227,88,76,0.15); color: var(--red); }
.status-halted { background: rgba(227,88,76,0.18); color: var(--red); }
.status-closed { background: #2a3142; color: var(--text-muted); }

/* ---- Drawdown halt ---- */
.card-halted { border-color: rgba(227,88,76,0.5); }
.halt-banner {
  background: rgba(227,88,76,0.08);
  border: 1px solid rgba(227,88,76,0.3);
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 1.2rem;
}

/* ---- Flash messages ---- */
.flash { padding: 0.75rem 1rem; border-radius: 6px; margin-bottom: 1.2rem; font-size: 0.92rem; }
.flash-success { background: rgba(63,182,160,0.12); color: var(--green); border: 1px solid rgba(63,182,160,0.3); }
.flash-error { background: rgba(227,88,76,0.12); color: var(--red); border: 1px solid rgba(227,88,76,0.3); }
.flash-info { background: rgba(79,140,240,0.12); color: var(--blue); border: 1px solid rgba(79,140,240,0.3); }

/* ---- Footer ---- */
.footer { border-top: 1px solid var(--border); margin-top: 3rem; }
.footer-inner { max-width: var(--max-width); margin: 0 auto; padding: 1.5rem; }
.disclaimer-text { color: var(--text-muted); font-size: 0.8rem; line-height: 1.6; }
.footer-meta { color: var(--text-muted); font-size: 0.78rem; margin: 0; }
