/* ---------- Alerts ---------- */
.alerts-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 26px;
  margin-bottom: 20px;
  box-shadow: var(--shadow);
}
.alerts-header { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.alerts-title { font-family: var(--font-body); font-size: 15px; font-weight: 600; }
.telegram-connect-btn {
  font-size: 12px; font-weight: 600; color: var(--accent);
  background: rgba(56,189,248,0.08); border: 1px solid rgba(56,189,248,0.3);
  border-radius: 999px; padding: 7px 14px; cursor: pointer; transition: all 0.22s;
}
.telegram-connect-btn:hover { border-color: rgba(56,189,248,0.6); background: rgba(56,189,248,0.14); }
.telegram-connect-btn.linked { color: var(--bullish); background: rgba(52,211,153,0.08); border-color: rgba(52,211,153,0.35); cursor: default; }

.telegram-link-info { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.telegram-link-info a { color: var(--accent); font-weight: 600; }
.telegram-link-info code {
  font-family: var(--font-mono); font-size: 12.5px; font-weight: 700; color: var(--accent);
  background: rgba(56,189,248,0.1); padding: 3px 9px; border-radius: 6px;
}
.telegram-link-expiry { font-size: 11px; color: var(--muted); }

.alert-form { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; margin-bottom: 18px; }
.alert-form select, .alert-form input[type="text"], .alert-form input[type="number"] {
  background: var(--surface-hi);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 13px; font-weight: 600;
  padding: 10px 12px;
  width: 120px;
  outline: none;
}
/* The dropdown *popup* is a separate native surface that doesn't composite
   with the page — a translucent background there shows through as
   whatever the browser's own default popup color is (usually white), so
   the options need an explicit opaque dark background of their own.
   color-scheme:dark (see tokens.css) handles most browsers already; this
   is the fallback for the ones that still show light option rows. */
.alert-form select option {
  background: var(--surface-hi);
  color: var(--text);
}
.alert-form label.checkbox-label {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; color: var(--muted-2); cursor: pointer;
}
.alert-add-btn {
  background: var(--accent);
  border: none; border-radius: var(--radius-sm);
  color: #04121c; cursor: pointer;
  font-family: var(--font-body); font-size: 13px; font-weight: 700;
  padding: 10px 20px;
  transition: background 0.15s, opacity 0.15s;
}
.alert-add-btn:hover:not(:disabled) { background: #56c8fb; }
.alert-add-btn:disabled { opacity: 0.5; cursor: default; }

.alert-list { display: flex; flex-direction: column; gap: 10px; }
.alert-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 14px; background: var(--surface-hi);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  font-size: 12.5px; flex-wrap: wrap;
}
.alert-row-desc { color: var(--muted-2); font-family: var(--font-mono); }
.alert-row-meta { color: var(--muted); font-size: 11px; }
.alert-remove { background: none; border: none; cursor: pointer; color: var(--muted); font-size: 11px; }
.alert-remove:hover { color: var(--bearish); }
.alerts-empty { font-size: 13px; color: var(--muted); font-style: italic; }
