
:root {
  --bg: #0f1117; --bg2: #1a1d2e; --bg3: #252843;
  --accent: #38bdf8; --accent2: #818cf8;
  --text: #e2e8f0; --muted: #64748b; --border: #2d3148;
  --danger: #f87171; --success: #4ade80;
  --radius: 10px; --radius-sm: 6px;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; }
body { background: var(--bg); color: var(--text); font-family: 'Inter', system-ui, sans-serif;
       min-height: 100vh; }

/* ── auth ── */
.auth-body { display: flex; align-items: center; justify-content: center; min-height: 100vh;
             background: radial-gradient(ellipse at 60% 20%, #1e2d5a 0%, var(--bg) 60%); }
.auth-card { width: 100%; max-width: 420px; background: var(--bg2); border: 1px solid var(--border);
             border-radius: 16px; padding: 2.5rem 2rem; }
.auth-logo  { font-size: 2.8rem; text-align: center; margin-bottom: .5rem; }
.auth-title { text-align: center; font-size: 1.6rem; font-weight: 700; }
.auth-title .v3 { color: var(--accent); }
.auth-sub   { text-align: center; color: var(--muted); margin: .4rem 0 1.8rem; font-size: .9rem; }

/* ── fields ── */
.field-label { display: block; font-size: .82rem; font-weight: 600; color: var(--muted);
               text-transform: uppercase; letter-spacing: .05em; margin-bottom: .4rem; }
.field-input { width: 100%; background: var(--bg3); border: 1px solid var(--border);
               border-radius: var(--radius-sm); padding: .7rem 1rem; color: var(--text);
               font-size: 1rem; outline: none; transition: border .2s; }
.field-input:focus { border-color: var(--accent); }
.field-input::placeholder { color: var(--muted); }

/* ── buttons ── */
.btn-primary { display: block; width: 100%; margin-top: .8rem; padding: .75rem 1.2rem;
               background: var(--accent); color: #0f1117; font-weight: 700; font-size: 1rem;
               border: none; border-radius: var(--radius-sm); cursor: pointer;
               transition: opacity .15s, transform .1s; }
.btn-primary:hover:not(:disabled) { opacity: .9; transform: translateY(-1px); }
.btn-primary:disabled { opacity: .5; cursor: not-allowed; }
.btn-ghost   { background: none; border: 1px solid var(--border); color: var(--text);
               padding: .55rem 1rem; border-radius: var(--radius-sm); cursor: pointer;
               font-size: .9rem; transition: border-color .2s; }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-ghost-sm { font-size: .82rem; padding: .35rem .8rem; background: none;
                border: 1px solid var(--border); border-radius: var(--radius-sm);
                color: var(--muted); cursor: pointer; text-decoration: none;
                transition: border-color .2s, color .2s; }
.btn-ghost-sm:hover { border-color: var(--accent); color: var(--accent); }
.btn-sm { padding: .4rem .9rem; background: var(--accent); color: #0f1117; font-weight: 600;
          font-size: .85rem; border: none; border-radius: var(--radius-sm); cursor: pointer;
          transition: opacity .15s; }
.btn-sm:hover { opacity: .85; }

/* ── states ── */
.hidden { display: none !important; }
.err-msg { color: var(--danger); font-size: .87rem; margin-top: .5rem; }
.spinner { display: inline-block; width: 14px; height: 14px; border: 2px solid #0f1117;
           border-top-color: transparent; border-radius: 50%; animation: spin .6s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── sent state ── */
.sent-icon  { font-size: 3rem; text-align: center; margin-bottom: .8rem; }
.sent-title { text-align: center; font-size: 1.3rem; font-weight: 700; margin-bottom: .5rem; }
.sent-body  { text-align: center; color: var(--muted); font-size: .9rem; line-height: 1.6; }
.sent-body strong { color: var(--text); }

/* ── dev box ── */
.dev-box { margin-top: 1.2rem; padding: .9rem 1rem; background: #1a2a1a; border: 1px solid #2a4a2a;
           border-radius: var(--radius-sm); font-size: .85rem; }
.dev-box p { color: #4ade80; margin-bottom: .4rem; }
.dev-link { color: var(--accent); word-break: break-all; }

/* ── topbar ── */
.topbar { display: flex; align-items: center; justify-content: space-between;
          padding: .8rem 1.5rem; background: var(--bg2); border-bottom: 1px solid var(--border);
          position: sticky; top: 0; z-index: 100; }
.topbar-brand { font-weight: 700; font-size: 1.1rem; }
.topbar-brand .v3 { color: var(--accent); }
.topbar-right { display: flex; align-items: center; gap: .8rem; }
.topbar-email { font-size: .82rem; color: var(--muted); }

/* ── layout ── */
.main { max-width: 960px; margin: 0 auto; padding: 1.5rem 1rem 3rem; }
.section { margin-bottom: 2rem; }
.section-head { display: flex; align-items: center; justify-content: space-between;
                margin-bottom: 1rem; }
.section-title { font-size: 1.05rem; font-weight: 700; }
.badge { display: inline-flex; align-items: center; justify-content: center;
         width: 22px; height: 22px; background: var(--bg3); border-radius: 50%;
         font-size: .75rem; color: var(--accent); margin-left: .4rem; }
.empty-hint { color: var(--muted); font-size: .9rem; padding: .5rem 0; }

/* ── ticker grid ── */
.ticker-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: .6rem; }
.ticker-card { display: flex; align-items: center; gap: .5rem; background: var(--bg2);
               border: 1px solid var(--border); border-radius: var(--radius); padding: .65rem .8rem;
               cursor: grab; transition: border-color .2s, transform .15s; position: relative; }
.ticker-card:hover { border-color: var(--accent); }
.ticker-card.dragging { opacity: .5; transform: scale(.97); }
.ticker-sym  { font-weight: 700; font-size: .92rem; color: var(--accent); white-space: nowrap; }
.ticker-naam { font-size: .78rem; color: var(--muted); flex: 1; overflow: hidden;
               text-overflow: ellipsis; white-space: nowrap; }
.ticker-del  { background: none; border: none; color: var(--muted); cursor: pointer;
               font-size: .9rem; padding: 2px 4px; border-radius: 4px; transition: color .2s; }
.ticker-del:hover { color: var(--danger); }

/* ── modal ── */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.65); z-index: 200;
                 display: flex; align-items: center; justify-content: center; padding: 1rem; }
.modal { background: var(--bg2); border: 1px solid var(--border); border-radius: 14px;
         width: 100%; max-width: 520px; padding: 1.5rem; }
.modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; }
.modal-head h3 { font-size: 1rem; font-weight: 700; }
.modal-close { background: none; border: none; color: var(--muted); font-size: 1.1rem;
               cursor: pointer; transition: color .2s; }
.modal-close:hover { color: var(--text); }
.modal .field-input { margin-bottom: .8rem; }
.modal-hint { font-size: .78rem; color: var(--muted); margin-top: .5rem; }

/* ── search results ── */
.search-results { max-height: 320px; overflow-y: auto; border: 1px solid var(--border);
                  border-radius: var(--radius-sm); }
.search-row { display: flex; align-items: center; gap: .6rem; padding: .6rem .8rem;
              cursor: pointer; transition: background .15s; border-bottom: 1px solid var(--border); }
.search-row:last-child { border-bottom: none; }
.search-row:hover { background: var(--bg3); }
.search-row.custom-row { background: #1a2a1a; }
.search-sym  { font-weight: 700; font-size: .88rem; color: var(--accent); min-width: 80px; }
.search-naam { font-size: .85rem; flex: 1; }
.search-cat  { font-size: .75rem; color: var(--muted); white-space: nowrap; }

/* ── reports ── */
.reports-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: .5rem; }
.report-card { display: flex; flex-direction: column; align-items: flex-start; gap: .25rem;
               background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius);
               padding: .7rem .9rem; text-decoration: none; color: var(--text);
               transition: border-color .2s; }
.report-card:hover { border-color: var(--accent); }
.report-date { font-size: .82rem; font-weight: 600; }
.report-hour { font-size: .75rem; color: var(--muted); }
.report-ai   { font-size: .7rem; background: linear-gradient(90deg,var(--accent),var(--accent2));
               color: #0f1117; padding: 1px 6px; border-radius: 99px; font-weight: 700; margin-top: .1rem; }

/* ── scrollbar ── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg2); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
