/*
 * Diverz — shared design tokens + base styles for app-style pages
 * (login, dashboard, portfolio, transact, reports, admin, profile).
 *
 * The marketing pages (diverz-home.html etc.) keep their own inline
 * <style> blocks with a transparent hero nav; this file is for the
 * authenticated/utility pages, which share a plain solid nav instead.
 * Values below are copied from diverz-home.html's :root so the two
 * families of pages still look like one product.
 */
:root {
  --ink: #09090b;
  --ink-2: #0f0f1a;
  --ink-3: #141428;
  --paper: #0c0c14;
  --paper-2: #111120;
  --line: rgba(255, 255, 255, 0.09);
  --line-ink: rgba(255, 255, 255, 0.07);
  --gold: #f0a030;
  --gold-2: #fbbf24;
  --gold-soft: rgba(240, 160, 48, 0.12);
  --green: #10b981;
  --red: #ef4444;
  --cyan: #06b6d4;
  --cyan-2: #22d3ee;
  --cyan-dim: rgba(6, 182, 212, 0.14);
  --cyan-glow: rgba(6, 182, 212, 0.22);
  --text: #e4e4e7;
  --text-soft: #a1a1aa;
  --text-faint: #52525b;
  --text-inv: #fafafa;
  --text-inv-soft: #a1a1aa;
  --radius: 14px;
  --radius-sm: 10px;
  --maxw: 1180px;
  --font-display: "Fraunces", Georgia, serif;
  --font-ui: "Hanken Grotesk", system-ui, -apple-system, sans-serif;
  --font-num: "Space Grotesk", ui-monospace, monospace;
}

* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
a {
  color: inherit;
  text-decoration: none;
}
img {
  max-width: 100%;
  display: block;
}
h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.15;
  margin: 0 0 8px;
  letter-spacing: -0.01em;
}
p {
  margin: 0 0 12px;
}
.num {
  font-family: var(--font-num);
  font-variant-numeric: tabular-nums lining-nums;
}
.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 28px;
}
:focus-visible {
  outline: 2.5px solid var(--gold);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 15.5px;
  padding: 13px 24px;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition:
    transform 0.15s ease,
    background 0.2s ease,
    border-color 0.2s ease;
}
.btn:active {
  transform: translateY(1px);
}
.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.btn-gold {
  background: var(--gold);
  color: #1a1402;
  border-color: var(--gold);
  box-shadow:
    0 4px 20px rgba(201, 162, 39, 0.35),
    0 2px 8px rgba(0, 0, 0, 0.4);
}
.btn-gold:hover:not(:disabled) {
  background: var(--gold-2);
  box-shadow:
    0 8px 32px rgba(201, 162, 39, 0.5),
    0 0 0 1px rgba(230, 190, 85, 0.3);
}
.btn-ghost {
  background: transparent;
  color: var(--text-inv);
  border-color: rgba(255, 255, 255, 0.22);
}
.btn-ghost:hover:not(:disabled) {
  border-color: var(--cyan);
  color: var(--cyan);
}
.btn-block {
  width: 100%;
}
.arrow {
  transition: transform 0.2s ease;
}
.btn:hover .arrow {
  transform: translateX(3px);
}

/* ---------- app nav (solid, non-hero) ---------- */
header.app-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(9, 9, 11, 0.94);
  backdrop-filter: blur(24px) saturate(160%);
  -webkit-backdrop-filter: blur(24px) saturate(160%);
  border-bottom: 1px solid rgba(6, 182, 212, 0.08);
}
header.app-nav .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 24px;
}
.brand {
  display: flex;
  align-items: center;
  color: var(--text-inv);
}
.brand-logo {
  height: 34px;
  width: auto;
  display: block;
}
nav.app-links {
  display: flex;
  gap: 26px;
  flex: 1;
  margin-left: 32px;
}
nav.app-links a {
  color: var(--text-inv-soft);
  font-size: 14.5px;
  font-weight: 500;
  padding: 6px 0;
  transition: color 0.2s;
}
nav.app-links a:hover,
nav.app-links a.active {
  color: var(--gold-2);
}
.app-nav-cta {
  display: flex;
  align-items: center;
  gap: 14px;
}
.app-user-chip {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  font-size: 12.5px;
  color: var(--text-soft);
  line-height: 1.3;
}
.app-user-chip strong {
  color: var(--text-inv);
  font-size: 13.5px;
}
.app-burger {
  display: none;
  background: none;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 8px;
  color: var(--text-inv);
  width: 40px;
  height: 36px;
  font-size: 18px;
  cursor: pointer;
}
.app-mobile-menu {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 100;
  background: var(--ink);
  padding: 20px 24px;
}
.app-mobile-menu.open {
  display: block;
}
.app-mobile-menu .mm-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 28px;
}
.app-mobile-menu nav {
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.app-mobile-menu nav a {
  font-size: 19px;
  color: var(--text-inv);
}
.app-mobile-menu .mm-cta {
  margin-top: 28px;
}
@media (max-width: 900px) {
  nav.app-links {
    display: none;
  }
  .app-user-chip {
    display: none;
  }
  .app-nav-advisor {
    display: none;
  }
  .app-burger {
    display: block;
  }
}

/* ---------- app footer (compact) ---------- */
footer.app-footer {
  margin-top: auto;
  border-top: 1px solid var(--line-ink);
  background: var(--ink);
  padding: 28px 0;
}
footer.app-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
}
footer.app-footer .foot-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  font-size: 13px;
  color: var(--text-soft);
}
footer.app-footer .foot-links a:hover {
  color: var(--gold-2);
}
footer.app-footer .foot-meta {
  font-size: 12px;
  color: var(--text-faint);
}

/* ---------- shared loading / empty states ---------- */
.report-loading,
.report-empty {
  padding: 48px 20px;
  text-align: center;
  color: var(--text-faint);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  margin-bottom: 20px;
}

/* ---------- shared card / form primitives ---------- */
.card {
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
}
.field {
  margin-bottom: 18px;
}
.field label {
  display: block;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-soft);
  margin-bottom: 7px;
}
.field input,
.field select {
  width: 100%;
  background: var(--ink-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--text-inv);
  font-family: var(--font-ui);
  font-size: 15.5px;
  padding: 12px 14px;
  transition: border-color 0.2s;
}
.field input:focus,
.field select:focus {
  outline: none;
  border-color: var(--gold);
}
.field .hint {
  font-size: 12.5px;
  color: var(--text-faint);
  margin-top: 6px;
}
.form-msg {
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-size: 14px;
  margin-bottom: 18px;
  display: none;
}
.form-msg.show {
  display: block;
}
.form-msg.error {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #fca5a5;
}
.form-msg.success {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #6ee7b7;
}
.spinner {
  display: inline-block;
  width: 15px;
  height: 15px;
  border: 2px solid rgba(0, 0, 0, 0.25);
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ---------- auth page centering shell ---------- */
.auth-shell {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 20px;
}
.auth-card {
  width: 100%;
  max-width: 420px;
}
.auth-card h1 {
  font-size: 30px;
}
.auth-card .sub {
  color: var(--text-soft);
  font-size: 14.5px;
  margin-bottom: 26px;
}
.auth-links {
  display: flex;
  justify-content: space-between;
  margin-top: 18px;
  font-size: 13.5px;
}
.auth-links a {
  color: var(--text-soft);
}
.auth-links a:hover {
  color: var(--gold-2);
}

/* ---------- static/legal content pages ---------- */
.legal-shell {
  flex: 1;
  padding: 40px 0 72px;
}
.legal-shell .wrap {
  max-width: 760px;
}
.legal-shell .eyebrow {
  font-family: var(--font-num);
  font-size: 12.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
}
.legal-shell h1 {
  font-size: 32px;
  margin-top: 8px;
  margin-bottom: 6px;
}
.legal-shell .updated {
  font-size: 13px;
  color: var(--text-faint);
  margin-bottom: 36px;
}
.legal-content h2 {
  font-size: 20px;
  margin-top: 34px;
  margin-bottom: 12px;
}
.legal-content h2:first-child {
  margin-top: 0;
}
.legal-content p {
  color: var(--text-soft);
  font-size: 15px;
  line-height: 1.75;
  margin-bottom: 14px;
}
.legal-content ul,
.legal-content ol {
  color: var(--text-soft);
  font-size: 15px;
  line-height: 1.75;
  margin: 0 0 14px;
  padding-left: 22px;
}
.legal-content li {
  margin-bottom: 6px;
}
.legal-content a {
  color: var(--gold-2);
  text-decoration: underline;
}
.legal-content strong {
  color: var(--text-inv);
}
.legal-note {
  background: var(--gold-soft);
  border: 1px solid rgba(240, 160, 48, 0.3);
  border-radius: var(--radius);
  padding: 14px 18px;
  font-size: 13.5px;
  color: var(--text-soft);
  margin-bottom: 32px;
}
