/* ── Base ──────────────────────────────────────── */
body { background: #f0f4f8; color: #1e293b; font-family: 'Inter', system-ui, sans-serif; }

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #e2e8f0; }
::-webkit-scrollbar-thumb { background: #94a3b8; border-radius: 3px; }

/* ── Earnings tile cards ─────────────────────── */
.tile {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
  transition: transform .15s, box-shadow .15s, border-color .15s;
  position: relative;
  overflow: hidden;
}
.tile:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(99,102,241,.12); border-color: #a5b4fc; }
.tile.in-watchlist { border-color: #f59e0b; border-width: 2px; }

/* ── Dormant / data-incoming state ───────────── */
.card-dormant { background: #f1f5f9 !important; border-color: #cbd5e1 !important; }
.data-incoming-stamp {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  border-radius: inherit;
  overflow: hidden;
  z-index: 2;
}
.data-incoming-stamp span {
  font-size: 1.1rem;
  font-weight: 900;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: rgba(22, 163, 74, 0.72);
  border: 3px solid rgba(22, 163, 74, 0.72);
  padding: 4px 12px;
  border-radius: 5px;
  line-height: 1.25;
  white-space: nowrap;
  transform: rotate(-18deg);
  display: inline-block;
  background: rgba(240, 253, 244, 0.55);
  box-shadow: 0 0 0 1px rgba(22, 163, 74, 0.18);
}

/* ── Day headings ─────────────────────────────── */
.day-heading {
  background: linear-gradient(90deg, #6366f1 0%, #818cf8 100%);
  color: white;
  border-radius: 10px;
  padding: 6px 16px;
  font-weight: 700;
  font-size: .85rem;
  letter-spacing: .04em;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 2px 8px rgba(99,102,241,.25);
}
.day-heading .date-sub { font-weight: 400; opacity: .85; font-size: .78rem; }

/* ── Page shell & layout ──────────────────────── */
.page-shell { display:flex; height:100vh; overflow:hidden; background:#f0f4f8; }

/* ── Left Navigation ─────────────────────────── */
.left-nav { width:228px; min-width:228px; background:#3437a1; display:flex; flex-direction:column; overflow-y:auto; z-index:20; }

.nav-logo { display:flex; align-items:center; gap:9px; padding:18px 16px 14px; border-bottom:1px solid rgba(255,255,255,.12); }
.nav-app-name { font-size:15px; font-weight:700; color:#f4f5f5; letter-spacing:.01em; }

.nav-section { padding:6px 0; }
.nav-section-label { font-size:10px; font-weight:700; text-transform:uppercase; letter-spacing:.08em; color:#b1becf; padding:8px 16px 3px; }

.nav-item { display:flex; align-items:center; gap:8px; width:100%; padding:9px 16px; text-align:left; font-size:14px; font-weight:500; color:#cbd5e1; background:transparent; border:none; cursor:pointer; transition:color .15s, background .15s; }
.nav-item:hover { background:rgba(255,255,255,.08); color:#f1f5f9; }
.nav-item.active { background:rgba(99,102,241,.28); color:#c7d2fe; }

.nav-sub-item { display:flex; align-items:center; justify-content:space-between; width:100%; padding:5px 16px 5px 34px; text-align:left; font-size:13px; color:#94a3b8; background:transparent; border:none; cursor:pointer; transition:color .15s, background .15s; }
.nav-sub-item:hover { color:#e2e8f0; background:rgba(255,255,255,.06); }
.nav-sub-item.active { color:#c7d2fe; font-weight:600; }

.nav-new-list { display:flex; align-items:center; gap:6px; width:100%; padding:5px 16px 5px 34px; text-align:left; font-size:13px; color:#818cf8; background:transparent; border:none; cursor:pointer; transition:color .15s; }
.nav-new-list:hover { color:#a5b4fc; }

.nav-footer { margin-top:auto; border-top:1px solid rgba(255,255,255,.12); }
.nav-footer .user-flex { display:flex; align-items:center; gap:8px; padding:12px 16px 8px; }
.nav-footer #userEmail { font-size:12px; color:#94a3b8; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.nav-footer #userAvatar { flex-shrink:0; }
.nav-sign-out {
  display:flex; align-items:center; gap:7px;
  width:100%; padding:8px 16px 12px;
  background:none; border:none; cursor:pointer;
  font-size:13px; font-weight:500; color:#94a3b8;
  transition:color .15s, background .15s;
  text-align:left;
}
.nav-sign-out:hover { color:#f87171; background:rgba(248,113,113,.08); }
.nav-sign-out .sign-out-icon { font-size:14px; opacity:.8; }

/* ── Watchlist filter dropdown ────────────────── */
.wl-filter-wrap { position:relative; }
.wl-filter-btn { display:flex; align-items:center; gap:5px; white-space:nowrap; }
.wl-filter-btn .wl-filter-badge { background:#6366f1; color:#fff; border-radius:999px; font-size:.65rem; font-weight:700; padding:1px 5px; margin-left:2px; }
.wl-filter-panel {
  position:absolute; top:calc(100% + 4px); left:0; z-index:40;
  background:#fff; border:1px solid #e2e8f0; border-radius:10px;
  box-shadow:0 8px 24px rgba(0,0,0,.1); min-width:180px; padding:6px 0;
  display:none;
}
.wl-filter-panel.open { display:block; }
.wl-filter-option { display:flex; align-items:center; gap:8px; padding:6px 12px; font-size:.8rem; color:#334155; cursor:pointer; transition:background .12s; }
.wl-filter-option:hover { background:#f8fafc; }
.wl-filter-option input[type=checkbox] { accent-color:#6366f1; width:13px; height:13px; cursor:pointer; flex-shrink:0; }
.wl-filter-divider { height:1px; background:#f1f5f9; margin:4px 0; }

/* ── Content area ─────────────────────────────── */
.content-area { flex:1; display:flex; flex-direction:column; overflow:hidden; min-width:0; }

.page-div { display:flex; flex-direction:column; flex:1; overflow:hidden; }
.page-div.hidden { display:none; }

.page-toolbar { background:white; border-bottom:1px solid #e2e8f0; flex-shrink:0; }
.page-scroll { flex:1; overflow-y:auto; padding:20px 24px 40px; }

/* ── EPS result badges ─────────────────────────── */
.beat      { background: #dcfce7; color: #166534; }
.big-beat  { background: #15803d; color: #dcfce7; }
.miss      { background: #fee2e2; color: #991b1b; }
.big-miss  { background: #b91c1c; color: #fee2e2; }
.in-line   { background: #dbeafe; color: #1e40af; }
.pending   { background: #f1f5f9; color: #64748b; }

.pill { border-radius: 999px; padding: 2px 10px; font-size: .7rem; font-weight: 600; letter-spacing: .03em; }

/* ── Modals ─────────────────────────────────────── */
.modal-bg { background: rgba(15,23,42,.5); backdrop-filter: blur(4px); }

/* ── Logo wrap ──────────────────────────────────── */
.logo-wrap { width: 38px; height: 38px; border-radius: 9px; background: #f1f5f9; border: 1px solid #e2e8f0; display:flex; align-items:center; justify-content:center; overflow:hidden; flex-shrink:0; }
.logo-wrap img { width:100%; height:100%; object-fit:contain; }

/* ── Spinner / animations ───────────────────────── */
.spinner { border: 3px solid #e2e8f0; border-top-color: #6366f1; border-radius: 50%; width: 32px; height: 32px; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }

/* ── Form inputs ─────────────────────────────────── */
input[type=date] { color-scheme: light; }

.hdr-input { background: white; border: 1px solid #cbd5e1; border-radius: 8px; padding: 4px 10px; font-size: .875rem; color: #1e293b; }
.hdr-input:focus { outline: none; border-color: #6366f1; box-shadow: 0 0 0 3px rgba(99,102,241,.1); }
select.hdr-input { cursor: pointer; }

/* ── Ticker detail modal ────────────────────────── */
.ticker-modal-table { width: 100%; border-collapse: collapse; font-size: .8rem; }
.ticker-modal-table th { text-align: left; padding: 6px 10px; background: #f8fafc; color: #94a3b8; font-weight: 600; text-transform: uppercase; font-size: .7rem; letter-spacing: .04em; border-bottom: 1px solid #e2e8f0; }
.ticker-modal-table td { padding: 7px 10px; border-bottom: 1px solid #f1f5f9; color: #334155; vertical-align: middle; }
.ticker-modal-table tr:last-child td { border-bottom: none; }
.ticker-modal-table tr:hover td { background: #f8fafc; }
.notes-textarea { width: 100%; border: 1px solid #cbd5e1; border-radius: 10px; padding: 10px 12px; font-size: .875rem; color: #1e293b; resize: vertical; min-height: 90px; font-family: inherit; }
.notes-textarea:focus { outline: none; border-color: #6366f1; box-shadow: 0 0 0 3px rgba(99,102,241,.1); }

/* ── Threaded notes (modal) ────────────────────── */
#tmThread { max-height: 280px; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; }
.note-bubble { background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 10px; padding: 9px 12px; position: relative; }
.note-bubble:hover .note-actions { opacity: 1; }
.note-ts { font-size: .68rem; color: #94a3b8; margin-bottom: 4px; }
.note-edited { font-size: .65rem; color: #cbd5e1; margin-left: 4px; }
.note-text { font-size: .85rem; color: #334155; word-break: break-word; line-height: 1.5; }
.note-text a { color: #6366f1; text-decoration: underline; }
.note-text a:hover { color: #4338ca; }
/* ── Rich formatting inside notes ─────────────────── */
.note-text p, .note-edit-area p { margin: 0 0 .5em; }
.note-text p:last-child, .note-edit-area p:last-child { margin-bottom: 0; }
.note-text ul, .note-text ol,
.note-edit-area ul, .note-edit-area ol { margin: .35em 0 .35em 1.4em; padding: 0; }
.note-text li, .note-edit-area li { margin-bottom: .15em; }
.note-text ul, .note-edit-area ul { list-style: disc; }
.note-text ol, .note-edit-area ol { list-style: decimal; }
.note-text blockquote, .note-edit-area blockquote {
  border-left: 3px solid #c7d2fe; margin: .5em 0; padding: .25em .75em;
  color: #475569; font-style: italic; }
.note-text h1,.note-text h2,.note-text h3,
.note-text h4,.note-text h5,.note-text h6,
.note-edit-area h1,.note-edit-area h2,.note-edit-area h3,
.note-edit-area h4,.note-edit-area h5,.note-edit-area h6 {
  font-weight: 700; margin: .4em 0 .25em; line-height: 1.2; color: #1e293b; }
.note-text h1,.note-edit-area h1 { font-size: 1.1rem; }
.note-text h2,.note-edit-area h2 { font-size: 1rem; }
.note-text h3,.note-text h4,.note-text h5,.note-text h6,
.note-edit-area h3,.note-edit-area h4,.note-edit-area h5,.note-edit-area h6 { font-size: .9rem; }
.note-text table, .note-edit-area table {
  border-collapse: collapse; width: 100%; margin: .5em 0; font-size: .8rem; }
.note-text th, .note-text td,
.note-edit-area th, .note-edit-area td {
  border: 1px solid #e2e8f0; padding: 4px 8px; text-align: left; }
.note-text th, .note-edit-area th { background: #f1f5f9; font-weight: 600; }
.note-actions { position: absolute; top: 7px; right: 8px; display: flex; gap: 4px; opacity: 0; transition: opacity .15s; }
.note-action-btn { background: #e2e8f0; border: none; border-radius: 5px; padding: 2px 6px; font-size: .7rem; color: #475569; cursor: pointer; transition: background .12s; }
.note-action-btn:hover { background: #c7d2fe; color: #3730a3; }
.note-action-btn.del:hover { background: #fecaca; color: #991b1b; }
.note-edit-area { width: 100%; border: 1px solid #a5b4fc; border-radius: 8px; padding: 7px 10px; font-size: .85rem; color: #1e293b; resize: vertical; min-height: 60px; font-family: inherit; margin-top: 4px; }
.note-edit-area:focus { outline: none; box-shadow: 0 0 0 3px rgba(99,102,241,.12); }

/* ── OG link-preview cards ──────────────────────── */
.og-card { display:flex; gap:0; border:1px solid #e2e8f0; border-radius:9px; overflow:hidden; margin-top:7px; background:#fff; text-decoration:none; transition:box-shadow .14s, border-color .14s; }
.og-card:hover { border-color:#a5b4fc; box-shadow:0 3px 12px rgba(99,102,241,.1); }
.og-card-img { width:88px; min-width:88px; height:72px; object-fit:cover; background:#f1f5f9; flex-shrink:0; }
.og-card-body { padding:8px 11px; min-width:0; display:flex; flex-direction:column; justify-content:center; }
.og-card-site { font-size:.64rem; color:#94a3b8; text-transform:uppercase; letter-spacing:.05em; margin-bottom:2px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.og-card-title { font-size:.8rem; font-weight:600; color:#1e293b; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.og-card-desc { font-size:.72rem; color:#64748b; margin-top:2px; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.og-card-loading { font-size:.72rem; color:#94a3b8; padding:6px 0; }

/* ── Notes page ──────────────────────────────────── */
.notes-card { background: #fff; border: 1px solid #e2e8f0; border-radius: 14px; padding: 1.75rem 2rem; cursor: pointer; transition: box-shadow .15s, border-color .15s; min-height: 220px; display: flex; flex-direction: column; }
.notes-card:hover { border-color: #a5b4fc; box-shadow: 0 4px 16px rgba(99,102,241,.1); }
.notes-preview { display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; font-size: .875rem; line-height: 1.45; color: #334155; margin-top: auto; background: #f1f5f9; border-radius: 10px; padding: 12px 14px; border: 1px solid #e2e8f0; max-height: 105px; }
.notes-preview a { color: #2563eb; text-decoration: underline; font-weight: 600; cursor: pointer; }
.notes-preview a:hover { color: #1d4ed8; text-decoration: underline; }

/* ── Notes filter pills ─────────────────────────── */
.notes-pill { padding:4px 13px; border-radius:999px; font-size:.75rem; font-weight:600; border:1px solid #e2e8f0; background:#fff; color:#64748b; cursor:pointer; transition:background .15s, border-color .15s, color .15s; white-space:nowrap; }
.notes-pill:hover { border-color:#a5b4fc; color:#6366f1; }
.notes-pill.active { background:#6366f1; border-color:#6366f1; color:#fff; }

/* ── Notes section heading ──────────────────────── */
.notes-section-heading { background: linear-gradient(90deg, #6366f1 0%, #818cf8 100%); color: white; border-radius: 10px; padding: 6px 16px; font-weight: 700; font-size: .85rem; letter-spacing: .04em; display: inline-flex; align-items: center; gap: 10px; box-shadow: 0 2px 8px rgba(99,102,241,.25); cursor: pointer; user-select: none; }

/* ── Today's Market cards ───────────────────────── */
.mover-card { background:#fff; border-radius:14px; padding:14px 16px; cursor:pointer; transition:box-shadow .15s, border-color .15s; display:flex; flex-direction:column; gap:8px; box-shadow:0 1px 4px rgba(0,0,0,.06); border:1.5px solid #e2e8f0; }
.mover-card:hover { box-shadow:0 4px 16px rgba(99,102,241,.12); border-color:#a5b4fc; }
.mover-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(180px,1fr)); gap:14px; }

/* ── Toast notifications ────────────────────────── */
#toastContainer { position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); z-index: 9999; display: flex; flex-direction: column; gap: .5rem; pointer-events: none; }
.toast { background: rgba(22, 163, 74, 0.88); color: #fff; padding: 2rem 3.5rem; border-radius: 20px; font-size: 2rem; font-weight: 700; box-shadow: 0 16px 64px rgba(0,0,0,.3); opacity: 0; transform: scale(.9); transition: opacity .2s, transform .2s; white-space: nowrap; text-align: center; }
.toast.show { opacity: 1; transform: scale(1); }
.toast.hide { opacity: 0; transform: scale(.9); }

/* ── Help page ──────────────────────────────────── */
.nav-help-btn { display:flex; align-items:center; justify-content:center; width:28px; height:28px; border-radius:50%; background:rgba(255,255,255,.08); border:1.5px solid rgba(255,255,255,.15); color:rgba(255,255,255,.55); font-size:.85rem; font-weight:800; cursor:pointer; margin:8px auto 4px; transition:background .15s, color .15s, border-color .15s; }
.nav-help-btn:hover, .nav-help-btn.active { background:rgba(99,102,241,.55); border-color:#818cf8; color:#fff; }
.help-hero { background:linear-gradient(135deg,#6366f1 0%,#818cf8 100%); border-radius:16px; padding:28px 32px; color:#fff; margin-bottom:28px; }
.help-hero h2 { font-size:1.35rem; font-weight:800; margin-bottom:6px; }
.help-hero p  { font-size:.875rem; opacity:.88; line-height:1.65; }
.help-section { margin-bottom:22px; }
.help-section h3 { font-size:.82rem; font-weight:700; color:#6366f1; margin-bottom:5px; text-transform:uppercase; letter-spacing:.06em; }
.help-section p  { font-size:.875rem; color:#475569; line-height:1.7; }
.word-count-note { font-size:.72rem; color:#94a3b8; text-align:right; margin-top:3px; transition:color .15s; }
.word-count-note.near { color:#f59e0b; }
.word-count-note.over { color:#ef4444; font-weight:700; }

/* ── Ticker search result modal ─────────────────── */
.tsrm-price-box { border-radius:12px; padding:14px 18px; display:flex; flex-direction:column; gap:2px; }
.tsrm-price-box .price { font-size:1.35rem; font-weight:800; }
.tsrm-price-box .chg   { font-size:.875rem; font-weight:600; }
.tsrm-star { background:none; border:none; cursor:pointer; font-size:1.5rem; line-height:1; padding:4px; transition:transform .15s, color .15s; }
.tsrm-star:hover { transform:scale(1.2); }

/* ── User chip — clickable / settings-active state ─ */
#userChip { cursor:pointer; border-radius:8px; transition:background .15s; text-align:left; background:none; border:none; width:100%; }
#userChip:hover { background:rgba(255,255,255,.1); }
#userChip.settings-active { background:rgba(99,102,241,.28); }

/* ── Settings page layout ───────────────────────── */
.settings-layout { display:flex; height:100%; overflow:hidden; }

.settings-sidebar {
  width:188px; min-width:188px; background:#fff;
  border-right:1px solid #e2e8f0; display:flex; flex-direction:column;
  padding:20px 0; gap:2px; overflow-y:auto; flex-shrink:0;
}
.settings-sidebar-title {
  font-size:.72rem; font-weight:800; text-transform:uppercase; letter-spacing:.08em;
  color:#94a3b8; padding:0 16px 12px;
}
.settings-nav-item {
  display:flex; align-items:center; gap:8px;
  width:100%; padding:9px 16px; text-align:left;
  font-size:.875rem; font-weight:500; color:#475569;
  background:transparent; border:none; cursor:pointer;
  transition:color .15s, background .15s; border-radius:0;
}
.settings-nav-item:hover { background:#f8fafc; color:#1e293b; }
.settings-nav-item.active { background:#eef2ff; color:#4338ca; font-weight:600;
  border-right:3px solid #6366f1; }

.settings-content { flex:1; overflow-y:auto; padding:32px 40px; background:#f8fafc; }

.settings-tab-content { max-width:640px; }

.settings-section-title { font-size:1.1rem; font-weight:800; color:#1e293b; margin-bottom:4px; }
.settings-section-desc  { font-size:.875rem; color:#64748b; margin-bottom:24px; line-height:1.6; }

.settings-field-group { margin-bottom:20px; }
.settings-label { display:block; font-size:.8rem; font-weight:700; color:#475569;
  text-transform:uppercase; letter-spacing:.05em; margin-bottom:6px; }
.settings-input { width:100%; max-width:360px; }
.settings-hint  { font-size:.78rem; color:#94a3b8; line-height:1.5; margin-top:4px; }
.settings-hint code { background:#f1f5f9; border-radius:4px; padding:1px 4px; font-size:.75rem; color:#475569; }
.settings-hint-inline { font-weight:400; color:#94a3b8; font-size:.75rem; text-transform:none; letter-spacing:0; }
.settings-readonly-value { font-size:.875rem; color:#334155; padding:6px 10px;
  background:#f1f5f9; border:1px solid #e2e8f0; border-radius:8px; max-width:360px; }

.settings-save-btn {
  padding:7px 20px; background:#6366f1; color:#fff; border:none; border-radius:8px;
  font-size:.875rem; font-weight:600; cursor:pointer; transition:background .15s;
}
.settings-save-btn:hover { background:#4f46e5; }
.settings-cancel-btn {
  padding:7px 16px; background:#f1f5f9; color:#475569; border:1px solid #e2e8f0;
  border-radius:8px; font-size:.875rem; font-weight:500; cursor:pointer; transition:background .15s;
}
.settings-cancel-btn:hover { background:#e2e8f0; }
.settings-add-btn {
  padding:7px 18px; background:#eef2ff; color:#4338ca; border:1.5px solid #c7d2fe;
  border-radius:8px; font-size:.875rem; font-weight:600; cursor:pointer; transition:background .15s, border-color .15s;
}
.settings-add-btn:hover { background:#e0e7ff; border-color:#a5b4fc; }
.settings-link-btn { background:none; border:none; color:#6366f1; font-size:.8rem; font-weight:600;
  cursor:pointer; padding:0; }
.settings-link-btn:hover { color:#4338ca; text-decoration:underline; }

/* ── Pill form card ───────────────────────────────── */
.settings-pill-form {
  margin-top:24px; background:#fff; border:1px solid #e2e8f0;
  border-radius:14px; padding:24px 28px;
}

/* ── Radio group ─────────────────────────────────── */
.settings-radio-group { display:flex; flex-direction:column; gap:10px; }
.settings-radio-label {
  display:flex; align-items:flex-start; gap:9px;
  font-size:.875rem; color:#334155; cursor:pointer; line-height:1.5;
}
.settings-radio-label input[type=radio] { flex-shrink:0; margin-top:3px; accent-color:#6366f1; cursor:pointer; }
.settings-radio-label code { background:#f1f5f9; border-radius:4px; padding:1px 4px; font-size:.75rem; color:#475569; }

/* ── Mapping table ───────────────────────────────── */
.settings-mapping-table { width:100%; border-collapse:collapse; font-size:.8rem; }
.settings-mapping-table th { text-align:left; padding:5px 8px; background:#f8fafc;
  color:#94a3b8; font-weight:700; text-transform:uppercase; font-size:.68rem;
  letter-spacing:.04em; border-bottom:1px solid #e2e8f0; }
.settings-mapping-table td { padding:4px 6px; border-bottom:1px solid #f1f5f9; }
.settings-mapping-table tr:last-child td { border-bottom:none; }

/* ── Existing pill list rows ─────────────────────── */
.pill-list-row {
  display:flex; align-items:center; justify-content:space-between; gap:12px;
  padding:10px 14px; background:#fff; border:1px solid #e2e8f0;
  border-radius:10px; margin-bottom:8px; transition:border-color .15s;
}
.pill-list-row:hover { border-color:#a5b4fc; }
.pill-list-info { display:flex; flex-direction:column; gap:2px; min-width:0; }
.pill-list-name { font-size:.875rem; font-weight:700; color:#1e293b; }
.pill-list-meta { font-size:.75rem; color:#94a3b8; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.pill-list-url  { font-family:monospace; font-size:.72rem; background:#f1f5f9;
  border-radius:4px; padding:0 4px; color:#475569; }
.pill-list-actions { display:flex; gap:6px; flex-shrink:0; }

/* ── Custom link pills in ticker modal ───────────── */
.custom-link-pill {
  background: #fdf4ff; color: #7e22ce;
  border: 1px solid #e9d5ff; border-radius: 999px;
  padding: 2px 10px; font-size: .7rem; font-weight: 600;
  letter-spacing: .03em; text-decoration: none; cursor: pointer;
  display: inline-block;
}
.custom-link-pill:hover { background: #f3e8ff; }

/* ── Pill form hint boxes ───────────────────────── */
.pill-hint-box {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  border: 1.5px solid #fcd34d;
  border-radius: 10px; padding: 12px 14px; margin-top: 8px;
  font-size: .8rem; color: #78350f; line-height: 1.5;
}
.pill-hint-box strong { font-weight: 700; color: #92400e; }
.pill-hint-box code {
  background: rgba(0,0,0,.08); border-radius: 5px; padding: 2px 5px;
  font-family: monospace; font-size: .75rem; color: #78350f;
}

/* ── Choose Pills tab ────────────────────────────── */
.pill-sources-group {
  background: #fff; border: 1px solid #e2e8f0; border-radius: 14px;
  overflow: hidden; margin-bottom: 18px;
}
.pill-sources-group-title {
  font-size: .72rem; font-weight: 800; text-transform: uppercase;
  letter-spacing: .07em; color: #94a3b8;
  padding: 10px 16px 8px; background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.pill-source-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 11px 16px; border-bottom: 1px solid #f1f5f9;
  transition: background .12s;
}
.pill-source-row:last-child { border-bottom: none; }
.pill-source-row:hover { background: #fafbff; }
.pill-source-label { font-size: .875rem; color: #334155; font-weight: 500; }

/* ── Toggle switch ───────────────────────────────── */
.toggle-switch { position: relative; display: inline-block; width: 40px; height: 23px; flex-shrink: 0; }
.toggle-switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.toggle-slider {
  position: absolute; cursor: pointer; inset: 0;
  background: #cbd5e1; border-radius: 999px;
  transition: background .2s;
}
.toggle-slider::before {
  content: ''; position: absolute;
  width: 17px; height: 17px; left: 3px; bottom: 3px;
  background: #fff; border-radius: 50%;
  transition: transform .2s;
  box-shadow: 0 1px 3px rgba(0,0,0,.18);
}
.toggle-switch input:checked + .toggle-slider { background: #6366f1; }
.toggle-switch input:checked + .toggle-slider::before { transform: translateX(17px); }
.toggle-switch input:focus-visible + .toggle-slider { outline: 2px solid #6366f1; outline-offset: 2px; }
/* Small variant for group headers */
.toggle-switch-sm { width: 32px; height: 18px; }
.toggle-switch-sm .toggle-slider::before { width: 14px; height: 14px; left: 2px; bottom: 2px; }
.toggle-switch-sm input:checked + .toggle-slider::before { transform: translateX(14px); }

/* ── AI Pilled! settings tab ─────────────────────────────── */
.ai-provider-section {
  background: #fff; border: 1px solid #e2e8f0; border-radius: 14px;
  overflow: hidden; margin-bottom: 24px;
}
.ai-provider-title {
  font-size: .875rem; font-weight: 700; color: #1e293b;
  padding: 12px 18px; background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  display: flex; align-items: center; gap: 8px;
}
.ai-provider-body { padding: 20px 18px 8px; }
.ai-url-row, .ai-prompt-row {
  display: flex; align-items: flex-start; gap: 8px; margin-top: 6px;
}
.ai-url-row .hdr-input  { flex: 1; }
.ai-prompt-row .hdr-input { flex: 1; }
.ai-prompt-textarea {
  width: 100%; resize: vertical; min-height: 82px;
  font-family: inherit; line-height: 1.55; font-size: .8rem; display: block;
}
.ai-reset-btn { flex-shrink: 0; white-space: nowrap; font-size: .73rem; padding: 5px 10px; margin-top: 1px; }
