:root{
  --bg:#0e1217; --panel:#10151d; --text:#f7fafc; --muted:#A6B0BF;
  --accent:#21D07A; --ring: rgba(33,208,122,0.35);
}

body {
  margin: 0;
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;
  color: #191a1a;
  background: linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.02));
  min-height: 100dvh;
}

/* Container */
.ipf-auth {
  display:flex; align-items:center; justify-content:center;
  padding:clamp(16px,4vw,40px);
  color:var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;
}

.ipf-auth__container{ width:min(880px, 94vw); }

/* Glass card */
.ipf-auth__card {
  background: linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.02));
  border:1px solid rgba(255,255,255,0.08);
  border-radius:28px;
  padding:clamp(24px,4vw,40px);
  box-shadow: 0 16px 50px rgba(0,0,0,0.45), inset 0 0 0 1px rgba(255,255,255,0.04);
}

.ipf-auth__logo {
  display:inline-block; background:#fff; border-radius:24px; padding:14px;
  margin-bottom:20px; box-shadow: 0 16px 40px rgba(33,208,122,0.4);
}
.ipf-auth__logo img {
  width:130px; height:auto; display:block;
  filter: drop-shadow(0 0 12px rgba(33,208,122,0.55));
}

/* Headers */
.ipf-auth__card_header { text-align:center; margin-bottom:20px; }
h2 { margin:0 0 12px; font-size:clamp(22px, 3vw, 28px); font-weight:700; }
.muted { color:var(--muted); font-size:14px; }

/* Login form */
.login-form { display:grid; gap:14px; margin-top:12px; }
.login-form label span { display:block; font-size:13px; color:var(--muted); margin-bottom:6px; }

.login-form input[type="text"],
.login-form input[type="email"],
.login-form input[type="password"] {
  width:100% !important; max-width:100% !important; height:48px; padding:12px 14px;
  background:var(--panel);
  border:1px solid rgba(255,255,255,0.1);
  border-radius:14px; color:var(--text);
  transition:border-color .2s, box-shadow .2s; outline:none;
  box-sizing:border-box !important;
}
.login-form input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--ring);
}

/* Actions */
.login-actions { display:flex; align-items:center; justify-content:space-between; margin-top:4px; }
.login-actions .left { display:flex; align-items:center; gap:8px; }
.login-actions input[type="checkbox"] { accent-color:var(--accent); }

/* Buttons */
.btn-pill,
#btn-login, #btn-verify {
  border:0; cursor:pointer; padding:12px 18px; border-radius:14px;
  font-weight:800; font-size:16px; color:#052214;
  background: linear-gradient(180deg, var(--accent), #1ab86b);
  box-shadow: 0 14px 28px rgba(33,208,122,0.38);
  transition: transform .06s, box-shadow .2s, filter .2s;
}
.action-bar .btn-pill {
  box-shadow: 0 14px 28px rgba(33,208,122,0);
}
.action-bar {
  margin-bottom: 12px;
}
.table-wrapper.action-bar {
  max-width: 100%;
  box-sizing: border-box;
}
  .table-wrapper.action-bar table {
    margin: 1px;
  }

.btn-pill:hover,
#btn-login:hover, #btn-verify:hover { filter:brightness(1.02); box-shadow:0 16px 36px rgba(33,208,122,0.48); }
.btn-pill:active,
#btn-login:active, #btn-verify:active { transform:translateY(1px); }

/* Error messages */
.alert-error {
  padding:10px 12px; background:rgba(220,60,60,.12);
  border:1px solid rgba(220,60,60,.35); color:#ffd6d6;
  border-radius:12px; margin:12px 0;
}

/* Forgot links */
.login-forgot {
  margin-top:32px; border-top:1px dashed rgba(255,255,255,0.08);
  padding-top:18px; color:var(--muted); font-size:14px;
  display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:12px;
}

/* Add New Symbol form */
#add-symbol-form {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

#add-symbol-form label {
  font-size: 14px;
  color: var(--muted);
}

/* Add Symbol input */
#add-symbol-form input[type="text"] {
  height: 42px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(0,0,0,0.1);
  background: #f1f1f1;      /* light grey for light mode */
  color: #111;
  font-size: 15px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

#add-symbol-form input[type="text"]:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--ring);
  outline: none;
}

/* Dark mode override */
.dark-mode #add-symbol-form input[type="text"] {
  background: var(--panel);
  border: 1px solid rgba(255,255,255,0.1);
  color: var(--text);
}

/* Add button */
#add-symbol-form input[type="submit"] {
  border: 0;
  cursor: pointer;
  padding: 12px 18px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 15px;
  background: linear-gradient(180deg, var(--accent), #1ab86b);
  color: #052214;
  box-shadow: 0 12px 24px rgba(33,208,122,0.35);
  transition: transform .06s ease, box-shadow .2s ease, filter .2s ease;
}
#add-symbol-form input[type="submit"]:hover {
  filter: brightness(1.05);
  box-shadow: 0 14px 28px rgba(33,208,122,0.45);
}
#add-symbol-form input[type="submit"]:active {
  transform: translateY(1px);
}

.table-actions button {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .2s, transform .1s;
}

/* --- Ribbon container --- */
.sip-ribbon {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  margin: 8px 0 12px;
  border-radius: 8px;
  background: var(--panel, #0b1220);
  border: 1px solid rgba(0,0,0,.08);
  box-shadow: 0 1px 2px rgba(0,0,0,.05);
}

/* Light/Dark subtle border */
body.dark-mode .sip-ribbon {
  border-color: rgba(255,255,255,.08);
}

/* Left/Right clusters */
.sip-ribbon__left, .sip-ribbon__right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* IN PLAY label */

/* Theme tokens */
:root {
  --inplay-on-bg:   #16a34a; /* green */
  --inplay-on-text: #ffffff;
  --inplay-on-dot:  #bbf7d0;

  --inplay-off-bg:  #e5e7eb; /* gray-200 */
  --inplay-off-text:#111827; /* gray-900 */
  --inplay-off-dot: #9ca3af; /* gray-400 */
}

body.dark-mode :root,
[data-theme="dark"] {
  --inplay-on-bg:   #16a34a;
  --inplay-on-text: #eafff0;
  --inplay-on-dot:  #d1fae5;

  --inplay-off-bg:  #1f2937; /* gray-800 */
  --inplay-off-text:#d1d5db; /* gray-300 */
  --inplay-off-dot: #6b7280; /* gray-500 */
}

/* Base chip */
.inplay-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 9999px;                 /* pill */
  font: 700 12px/1.1 system-ui, sans-serif;
  letter-spacing: .02em;
  text-transform: uppercase;
  user-select: none;
  white-space: nowrap;
}

/* States */
.inplay-chip.is-on {
  background: var(--inplay-on-bg);
  color: var(--inplay-on-text);
  box-shadow: 0 0 0 1px rgba(255,255,255,.06) inset;
}

.inplay-chip.is-off {
  background: var(--inplay-off-bg);
  color: var(--inplay-off-text);
}

/* Dot + pulse */
.inplay-chip .chip-dot {
  position: relative;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: currentColor;
  display: inline-block;
}

/* Glow ring */
.inplay-chip.is-on .chip-dot::after {
  content: "";
  position: absolute; inset: -4px;
  border-radius: 50%;
  background: var(--inplay-on-dot);
  opacity: .35;
  animation: inplay-pulse 1.6s ease-out infinite;
}

.inplay-chip.is-off .chip-dot::after {
  content: "";
  position: absolute; inset: -4px;
  border-radius: 50%;
  background: var(--inplay-off-dot);
  opacity: .2;
}

/* Small size variant */
.inplay-chip--sm {
  padding: 4px 9px;
  font-weight: 700;
  font-size: 11px;
}
.inplay-chip--sm .chip-dot { width: 6px; height: 6px; }
.inplay-chip--sm .chip-dot::after { inset: -3px; }

/* When chip is placed inside/next to an H1 */

h1 .inplay-chip--sm {
  position: relative;
  top: -10px;       /* nudge upward */
  margin-left: 8px; /* breathing space after the text */
}

.sym-ticker-inplay {
  opacity: 0;
  transform: scale(0.9);
  transition: opacity 0.25s ease, transform 0.25s ease;
  display: inline-block; /* keep its spot reserved */
}

.sym-ticker-inplay.active {
  opacity: 1;
  transform: scale(1);
}

.card.sym-alerts {
  margin-top: 1.5rem; /* adjust as needed */
}
.tbl.alerts-table td,
.tbl.alerts-table th { text-align: right; }
.tbl.alerts-table td.t,
.tbl.alerts-table th.t { text-align: left; }

.btn-xs { padding: 4px 8px; font-size: 12px; line-height: 1.2; }

.tbl.alerts-table td,
.tbl.alerts-table th { text-align: right; word-break: normal}
.tbl.alerts-table td.t,
.tbl.alerts-table th.t { text-align: left; }

.btn-xs { padding: 4px 8px; font-size: 12px; line-height: 1.2; }
.table-wrap { overflow-x: auto; }

/* Card spacing so it breathes below prior section */
.sym-related { margin-top: 24px; }
.sym-related > h2 { margin-bottom: 10px; }

/* Alerts card */
.alerts-card {
  position: relative;
  border-radius: 10px;
  background: var(--panel);
  border: 1px solid var(--hairline);
  padding: 12px;
}

/* Header */
.alerts-head {
  display: flex; align-items: baseline; gap: 10px;
  margin-bottom: 10px;
}
.alerts-title { font-weight: 600; }
.alerts-sub { font-size: 0.9rem; color: var(--muted); }

/* Table (CSS grid) */
.alerts-table {
  display: grid;
  grid-template-columns: 120px 1fr 1fr 1fr 70px;
  gap: 8px;
}
.alerts-row { display: contents; }
.alerts-row > div {
  padding: 8px 10px;
  border-bottom: 1px dashed var(--hairline);
  white-space: nowrap;
}
.alerts-row--head > div {
  font-size: 0.82rem; color: var(--muted);
  text-transform: uppercase; letter-spacing: .02em;
  border-bottom: 1px solid var(--hairline);
}

.alerts-row--msg .alerts-message {
  grid-column: 1 / -1;      /* spans all columns */
  font-size: 0.9em;
  line-height: 1.4;
  color: var(--muted-text, #999);
  padding: 0.25rem 0.5rem 0.5rem;
  border-bottom: 1px solid rgba(255,255,255,0.05); /* subtle divider */
  white-space: pre-line;
}

/* Blurred state */
.teaser-locked .is-blurred {
  filter: blur(4px);
  user-select: none;
  pointer-events: none;
}

/* Overlay */
.alerts-locked-overlay {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  background: linear-gradient(to bottom, rgba(0,0,0,0.35), rgba(0,0,0,0.55));
  border-radius: 10px;
  backdrop-filter: blur(1px);
}
:root:not(.dark-mode) .alerts-locked-overlay {
  background: linear-gradient(to bottom, rgba(255,255,255,0.6), rgba(255,255,255,0.85));
}
.al-content {
  text-align: center;
  max-width: 520px;
  padding: 14px 16px;
}
.al-badge {
  display: inline-block;
  font-size: 0.8rem;
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--chip, rgba(0,0,0,0.1));
  color: var(--text);
  margin-bottom: 8px;
}
.dark-mode .al-badge { background: rgba(255,255,255,0.12); color: var(--text); }
.al-text { margin-bottom: 12px; font-size: 0.95rem; }
.al-foot { margin-top: 6px; font-size: 0.9rem; color: var(--muted); }

/* CTA */
.btn-upgrade {
  display: inline-block;
  margin-top: 4px;
  background: var(--accent, #16a34a);
  color: #fff;
  padding: 8px 14px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(0,0,0,.15);
}
.btn-upgrade:hover { opacity: .95; }

/* Small pill button (disabled in teaser) */
.btn-pill-ghost[disabled] { opacity: .5; cursor: not-allowed; }

/* Pulse keyframes */
@keyframes inplay-pulse {
  0%   { transform: scale(0.6); opacity: .45; }
  50%  { transform: scale(1.15); opacity: .10; }
  100% { transform: scale(1.6); opacity: 0; }
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  .inplay-chip .chip-dot::after { animation: none; }
}
