:root { --bg: #0b0c10; --fg: #e5e7eb; --muted: #9aa0a6; --card: #111827; --accent: #60a5fa; }
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--fg); font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial; }
.container { max-width: 1200px; margin: 0 auto; padding: 16px; }
h1 { font-size: 20px; font-weight: 600; margin: 0 0 12px; }
.filters { display: flex; gap: 12px; align-items: center; padding: 0 16px 16px; }
input[type=number] { background: #111; color: var(--fg); border: 1px solid #333; padding: 6px 8px; border-radius: 6px; width: 90px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(540px, 1fr)); gap: 16px; padding: 0 16px 16px; }
.card { background: var(--card); border: 1px solid #1f2937; border-radius: 12px; padding: 14px; }
.card-header { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; }
.symbol { font-weight: 700; letter-spacing: 0.5px; }
.meta { color: var(--muted); font-size: 12px; }
.empty { color: var(--muted); padding: 32px; text-align: center; grid-column: 1 / -1; }

/* Constrain chart height so cards don't expand massively */
.card canvas { width: 100% !important; height: 270px !important; display: block; }
.legend { display: flex; gap: 16px; align-items: center; padding: 0 16px 24px; color: var(--muted); }
.legend-item { display: inline-flex; gap: 6px; align-items: center; font-size: 12px; }
.legend-swatch { width: 18px; height: 6px; border-radius: 6px; display: inline-block; }
.sw-line { background: #60a5fa; }
.sw-pos { background: #22c55e; }
.sw-neg { background: #ef4444; }
.sw-neu { background: #f59e0b; }

/* Zoom modal */
.modal { position: fixed; inset: 0; display: none; align-items: center; justify-content: center; background: rgba(0,0,0,0.6); z-index: 50; }
.modal.open { display: flex; }
.modal-card { background: var(--card); border: 1px solid #1f2937; border-radius: 12px; width: min(92vw, 1100px); padding: 16px; }
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.modal-title { font-weight: 700; }
.btn { background: #111; color: var(--fg); border: 1px solid #333; border-radius: 6px; padding: 6px 10px; cursor: pointer; }
.btn:hover { border-color: #555; }
.modal canvas { width: 100% !important; height: 420px !important; }

/* Auth pages */
.auth { max-width: 420px; margin: 10vh auto; background: var(--card); border: 1px solid #1f2937; border-radius: 14px; padding: 20px; }
.auth h1 { margin: 0 0 6px; font-size: 22px; font-weight: 700; }
.auth .sub { color: var(--muted); margin-bottom: 16px; font-size: 13px; }
.auth form { display: flex; flex-direction: column; gap: 10px; }
.auth input[type=email], .auth input[type=password], .auth input[type=text] { background: #0f172a; color: var(--fg); border: 1px solid #334155; padding: 10px 12px; border-radius: 8px; width: 100%; }
.auth .actions { display: flex; gap: 10px; align-items: center; margin-top: 6px; }
.auth .muted { color: var(--muted); font-size: 12px; }
.auth .links { display: flex; justify-content: space-between; margin-top: 12px; font-size: 13px; }
.auth .links a { color: #93c5fd; text-decoration: none; }
.auth .links a:hover { text-decoration: underline; }


/* --- Polishing tweaks: typography, cards, buttons, forms --- */
:root {
  --border: #1f2937;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow-sm: 0 4px 14px rgba(0,0,0,0.18);
  --shadow: 0 10px 30px rgba(0,0,0,0.28);
}

/* Typography & rhythm */
body { line-height: 1.5; font-size: 15px; }
h1 { font-size: 22px; letter-spacing: 0.2px; }
.symbol { font-size: 14px; }

/* Cards */
.card {
  border-color: var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: box-shadow 160ms ease, transform 160ms ease, border-color 160ms ease;
}
.card:hover { box-shadow: var(--shadow); transform: translateY(-1px); }

/* Buttons */
.btn {
  background: #0e1218;
  border-color: #2a3442;
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  transition: background 140ms ease, border-color 140ms ease, transform 60ms ease;
}
.btn:hover { background: #101723; border-color: #3a4658; }
.btn:active { transform: translateY(1px); }
.btn:focus { outline: 2px solid rgba(96,165,250,0.35); outline-offset: 2px; }

/* Primary look using existing accent */
.btn {
  background: linear-gradient(180deg, rgba(96,165,250,0.18), rgba(96,165,250,0.12));
  border-color: rgba(96,165,250,0.35);
}
.btn:hover {
  background: linear-gradient(180deg, rgba(96,165,250,0.24), rgba(96,165,250,0.16));
  border-color: rgba(96,165,250,0.55);
}

/* Inputs */
input[type=number],
input[type=text],
input[type=password],
input[type=email] {
  background: #0f172a;
  border: 1px solid #334155;
  color: var(--fg);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
}
input:focus {
  outline: 2px solid rgba(96,165,250,0.35);
  outline-offset: 2px;
  border-color: rgba(96,165,250,0.55);
}

/* Form layout */
.filters { gap: 14px; }
.filters label { gap: 8px; }

/* Subtle dividers and meta text */
.meta { line-height: 1.4; }
.card-header { margin-bottom: 10px; }

