/* =============================================================================
   ALERTS / WATCHLIST PAGE
   Uses shared .panel, .btn, .badge, .input-base, .select-base and auth-modal styles.
   ============================================================================= */

/* ── Page shell ──────────────────────────────────────────────────────────── */
.alerts-page { padding-top: 10px; }
.alerts-hero { display:flex; align-items:flex-end; justify-content:space-between; gap:18px; margin-bottom:22px; flex-wrap:wrap; }
.alerts-hero__copy { display:grid; gap:8px; }
.alerts-hero__copy .badge { width:fit-content; min-height:26px; }
.alerts-hero__actions { display:flex; align-items:center; justify-content:flex-end; gap:10px; flex-wrap:wrap; }

/* ── Stat cards ──────────────────────────────────────────────────────────── */
.alerts-stats { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:14px; margin-bottom:18px; }

.alert-stat { padding:18px; display:flex; align-items:center; gap:14px; min-height:112px; overflow:hidden; }

.alert-stat__icon { width:54px; height:54px; flex:0 0 54px; border-radius:18px; display:grid; place-items:center; background:rgba(250,204,21,.10); border:1px solid rgba(250,204,21,.18); font-size:25px; box-shadow:inset 0 1px 0 rgba(255,255,255,.06); }

.alert-stat__label { display:block; font-size:12px; font-weight:800; color:#94a3b8; text-transform:uppercase; letter-spacing:.04em; }
.alert-stat__value { display:block; margin-top:4px; font-size:26px; line-height:1.05; font-weight:900; color:#f8fafc; letter-spacing:-.03em; }
.alert-stat__sub { display:block; margin-top:5px; font-size:12px; color:#64748b; font-weight:700; }

/* ── Tabs row ────────────────────────────────────────────────────────────── */
.alerts-tabs-row { display:flex; align-items:center; justify-content:space-between; gap:14px; margin:8px 0 16px; flex-wrap:wrap; }
.alerts-tabs { display:flex; align-items:center; gap:0; border-bottom:2px solid rgba(255,255,255,.06); flex:1; min-width:280px; overflow-x:auto; scrollbar-width:none; }
.alerts-tabs::-webkit-scrollbar { display:none; }
.alerts-tab { position:relative; padding:11px 16px 13px; color:#94a3b8; font-weight:800; font-size:14px; cursor:pointer; white-space:nowrap; border:0; background:none; letter-spacing:-.01em; transition:color .15s; }
.alerts-tab:hover { color:#cbd5e1; }
.alerts-tab.is-active { color:#f8fafc; }
.alerts-tab.is-active::after { content:""; position:absolute; left:0; right:0; bottom:-2px; height:3px; border-radius:999px 999px 0 0; background:linear-gradient(180deg,#fde047,#facc15); }
.alerts-count { min-width:22px; height:22px; padding:0 6px; border-radius:999px; background:rgba(148,163,184,.13); display:inline-flex; align-items:center; justify-content:center; font-size:11px; font-weight:900; color:#94a3b8; margin-left:6px; vertical-align:middle; }
.alerts-tab.is-active .alerts-count { background:rgba(250,204,21,.14); color:#facc15; }

/* ── Layout ──────────────────────────────────────────────────────────────── */
.alerts-layout { display:grid; grid-template-columns:minmax(0,1fr) 400px; gap:18px; align-items:start; }
.alerts-main { display:grid; gap:14px; min-width:0; }
.alerts-side { display:grid; gap:14px; min-width:0; position:sticky; top:16px; }

/* ── Panels ──────────────────────────────────────────────────────────────── */
.alerts-panel { padding:20px; }
.alerts-panel__head { display:flex; align-items:flex-start; justify-content:space-between; gap:12px; margin-bottom:16px; }
.alerts-panel__title { font-size:17px; font-weight:900; color:#f8fafc; letter-spacing:-.02em; display:flex; align-items:center; gap:8px; }
.alerts-panel__sub { font-size:13px; color:#94a3b8; margin-top:3px; }

/* ── Alert list rows ─────────────────────────────────────────────────────── */
.alert-list { display:grid; }
.alert-row { display:grid; grid-template-columns:72px minmax(0,1fr) 200px 120px; gap:14px; align-items:center; padding:13px 0; border-top:1px solid rgba(255,255,255,.05); }
.alert-row:first-child { border-top:0; }

.alert-row__image { width:72px; height:58px; border-radius:12px; background:#fff; display:grid; place-items:center; overflow:hidden; flex-shrink:0; }
.alert-row__image img { width:100%; height:100%; object-fit:contain; padding:4px; display:block; }
a.alert-row__image { text-decoration:none; transition:opacity .15s; }
a.alert-row__image:hover { opacity:.82; }
.alert-row__body { min-width:0; }
.alert-row__title { font-size:14px; font-weight:900; color:#f8fafc; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; line-height:1.3; overflow-wrap:anywhere; word-break:break-word; }
.alert-row__meta { font-size:12px; color:#64748b; font-weight:700; margin-top:2px; }
.alert-row__chips { display:flex; gap:5px; flex-wrap:wrap; margin-top:6px; }
.alert-chip { min-height:24px; padding:0 10px; border-radius:999px; border:1px solid rgba(148,163,184,.18); background:rgba(255,255,255,.04); font-size:12px; font-weight:800; color:#94a3b8; display:inline-flex; align-items:center; }

.alert-row__target { display:grid; gap:3px; }
.alert-row__price { font-size:12px; color:#94a3b8; font-weight:700; }

.alert-row__diff { font-size:12px; font-weight:900; border-radius:999px; min-height:24px; padding:0 8px; display:inline-flex; align-items:center; justify-content:center; width:fit-content; }
.alert-row__diff.is-good { color:#4ade80; background:rgba(34,197,94,.12); border:1px solid rgba(34,197,94,.22); }
.alert-row__diff.is-bad  { color:#fb7185; background:rgba(244,63,94,.14); border:1px solid rgba(244,63,94,.22); }

.alert-row__actions { display:flex; justify-content:flex-end; align-items:center; gap:8px; }

/* Edit button inside rows */
.alerts-edit-btn { min-height:32px !important; padding:0 12px !important; font-size:12px !important; border-radius:10px !important; }

/* History time */
.alert-history-time { font-size:12px; color:#64748b; white-space:nowrap; text-align:right; align-self:center; }

/* ── Toggle switch ───────────────────────────────────────────────────────── */
.alert-switch { width:48px; height:26px; flex:0 0 48px; border-radius:999px; background:rgba(148,163,184,.18); border:1px solid rgba(148,163,184,.22); position:relative; cursor:pointer; transition:.18s; }
.alert-switch::before { content:""; position:absolute; width:20px; height:20px; left:3px; top:2px; border-radius:50%; background:#94a3b8; transition:left .18s, background .18s; }
.alert-switch.is-on,
.alert-switch[aria-pressed="true"] { background:rgba(250,204,21,.18); border-color:rgba(250,204,21,.35); }
.alert-switch.is-on::before,
.alert-switch[aria-pressed="true"]::before { left:23px; background:#facc15; }

/* ── Delete / menu button ────────────────────────────────────────────────── */
.alert-menu-btn { width:34px; height:34px; border-radius:10px; border:1px solid rgba(148,163,184,.16); color:#94a3b8; cursor:pointer; display:inline-flex; align-items:center; justify-content:center; font-size:14px; transition:color .15s, border-color .15s, background .15s; }
.alert-menu-btn:hover { color:#fb7185; border-color:rgba(244,63,94,.24); background:rgba(244,63,94,.08); }

/* ── Create alert cards ──────────────────────────────────────────────────── */
.alert-create-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; }
.alert-create-card { padding:16px; border-radius:18px; border:1px solid rgba(255,255,255,.07); background:rgba(255,255,255,.025); display:flex; align-items:center; gap:12px; cursor:pointer; text-align:left; color:inherit; min-height:84px; transition:border-color .18s, background .18s; }
.alert-create-card:hover { border-color:rgba(250,204,21,.28); background:rgba(250,204,21,.06); }
.alert-create-card__icon { font-size:26px; flex:0 0 auto; }
.alert-create-card__title { display:block; font-size:14px; font-weight:900; color:#f8fafc; }
.alert-create-card__text { display:block; font-size:12px; color:#94a3b8; margin-top:3px; line-height:1.45; }

/* ── Global settings section ─────────────────────────────────────────────── */
.alerts-global-settings { margin-top:20px; padding-top:20px; border-top:1px solid rgba(255,255,255,.06); }
.alerts-settings-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; }

/* ── Sidebar: Recent alerts ──────────────────────────────────────────────── */
.recent-alert { display:grid; grid-template-columns:52px minmax(0,1fr) auto; gap:10px; align-items:center; padding:9px; border-radius:14px; background:rgba(255,255,255,.025); border:1px solid rgba(255,255,255,.05); margin-bottom:8px; }
.recent-alert:last-child { margin-bottom:0; }
.recent-alert__img { width:52px; height:44px; border-radius:10px; background:#fff; display:grid; place-items:center; overflow:hidden; }
.recent-alert__img img { width:100%; height:100%; object-fit:contain; padding:3px; }
.recent-alert__title { font-size:13px; font-weight:900; color:#f8fafc; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.recent-alert__sub { font-size:12px; color:#94a3b8; }
.recent-alert__time { font-size:11px; color:#64748b; white-space:nowrap; }

/* ── Sidebar: Chart ──────────────────────────────────────────────────────── */
.alerts-chart-wrap { height:220px; border-radius:14px; padding:12px; border:1px solid rgba(255,255,255,.06); background:linear-gradient(180deg,rgba(255,255,255,.03),rgba(255,255,255,.01)); }
.alerts-chart-wrap canvas { width:100% !important; height:100% !important; }

/* ── Empty state ─────────────────────────────────────────────────────────── */
.alert-empty { padding:28px 0; text-align:center; color:#64748b; font-size:14px; }

/* ── Utility ─────────────────────────────────────────────────────────────── */
.is-hidden { display:none !important; }

/* =============================================================================
   ALERT MODAL — rule-select cards, price fields, product preview
   ============================================================================= */

/* Dialog overrides: taller max, wider for product preview */
.alert-modal .auth-modal__dialog { width:min(100% - 24px,600px); }

/* Product preview card in modal */
.alert-product-preview { display:flex; gap:0; align-items:stretch; border-radius:18px; border:1px solid rgba(255,255,255,.1); background:radial-gradient(circle at top right,rgba(250,204,21,.14),transparent 42%),rgba(255,255,255,.04); overflow:hidden; }

.alert-product-preview__img { width:120px; height:120px; flex:0 0 120px; background:#fff; display:grid; place-items:center; overflow:hidden; }
.alert-product-preview__img img { width:100%; height:100%; object-fit:contain; padding:8px; }

.alert-product-preview__body { flex:1; min-width:0; padding:14px 16px; display:flex; flex-direction:column; justify-content:center; gap:4px; }
.alert-product-preview__eyebrow { font-size:10px; font-weight:900; letter-spacing:.1em; text-transform:uppercase; color:#facc15; }
.alert-product-preview__title { font-size:16px; font-weight:900; color:#f8fafc; letter-spacing:-.02em; line-height:1.2; }
.alert-product-preview__meta { font-size:12px; color:#94a3b8; font-weight:700; }

/* Badges on preview */
.alert-product-preview__badge { display:flex; gap:6px; flex-wrap:wrap; margin-top:4px; }

/* Rule selector cards */
.alert-option-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; }
.alert-option-card { padding:12px 14px; border-radius:14px; border:1px solid rgba(255,255,255,.08); background:rgba(255,255,255,.03); display:flex; flex-direction:column; gap:6px; cursor:pointer; text-align:left; color:inherit; transition:border-color .18s, background .18s, box-shadow .18s; }
.alert-option-card:hover { border-color:rgba(250,204,21,.25); background:rgba(250,204,21,.05); }
.alert-option-card.is-active { border-color:rgba(250,204,21,.5); background:rgba(250,204,21,.08); box-shadow:0 0 0 1px rgba(250,204,21,.12) inset; }
.alert-option-card__icon { font-size:22px; line-height:1; }
.alert-option-card strong { display:block; font-size:13px; font-weight:900; color:#f8fafc; }
.alert-option-card small { display:block; font-size:11px; color:#94a3b8; line-height:1.45; margin-top:1px; }

/* Price fields row */
.alert-price-fields { }

/* Mode info notes */
.alert-mode-note { padding:12px 16px; border-radius:12px; background:rgba(99,102,241,.08); border:1px solid rgba(99,102,241,.18); font-size:13px; color:#a5b4fc; font-weight:700; }

/* Extra checkboxes (theme mode) */
.alert-extra-checks { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; }
.alert-extra-checks label { min-height:44px; border-radius:12px; border:1px solid rgba(255,255,255,.08); background:rgba(255,255,255,.03); display:flex; align-items:center; gap:8px; padding:0 12px; font-weight:800; font-size:13px; color:#cbd5e1; cursor:pointer; }
.alert-extra-checks input { accent-color:#facc15; }

/* Modal actions row */
.alert-modal__actions { display:flex; gap:10px; justify-content:flex-end; margin-top:4px; }
.alert-modal__actions .btn { min-width:120px; }

/* =============================================================================
   LIGHT THEME
   ============================================================================= */
html[data-theme="light"] .alert-stat__value,
html[data-theme="light"] .alerts-panel__title,
html[data-theme="light"] .alert-row__title,
html[data-theme="light"] .recent-alert__title,
html[data-theme="light"] .alert-create-card__title,
html[data-theme="light"] .alert-product-preview__title,
html[data-theme="light"] .alert-option-card strong { color:#0f172a; }

html[data-theme="light"] .alert-stat__label { color:#64748b; }
html[data-theme="light"] .alert-row { border-color:rgba(148,163,184,.14); }
html[data-theme="light"] .alert-create-card,
html[data-theme="light"] .recent-alert,
html[data-theme="light"] .alert-option-card { background:#fff; border-color:rgba(148,163,184,.18); }
html[data-theme="light"] .alert-option-card.is-active { background:#fffbeb; border-color:rgba(234,179,8,.45); }
html[data-theme="light"] .alerts-tabs { border-color:rgba(148,163,184,.2); }
html[data-theme="light"] .alerts-tab { color:#64748b; }
html[data-theme="light"] .alerts-tab.is-active { color:#0f172a; }
html[data-theme="light"] .alert-product-preview { background:radial-gradient(circle at top right,rgba(250,204,21,.12),transparent 42%),rgba(248,250,252,0.96); border-color:rgba(148,163,184,.22); }
html[data-theme="light"] .alert-mode-note { background:rgba(99,102,241,.06); border-color:rgba(99,102,241,.18); }

/* =============================================================================
   RESPONSIVE
   ============================================================================= */
@media(max-width:1440px) { .alerts-stats { grid-template-columns:repeat(5,minmax(0,1fr)); } }
@media(max-width:1280px) { .alerts-stats { grid-template-columns:repeat(3,minmax(0,1fr)); } .alerts-layout { grid-template-columns:1fr; } .alerts-side { grid-template-columns:1fr 1fr; position:static; } }
@media(max-width:1024px) { .alerts-stats { grid-template-columns:repeat(3,minmax(0,1fr)); } }
@media(max-width:900px) { .alerts-stats { grid-template-columns:1fr 1fr; } .alerts-side { grid-template-columns:1fr; } .alert-create-grid,.alerts-settings-grid,.alert-extra-checks { grid-template-columns:1fr; } .alert-option-grid { grid-template-columns:1fr; } }
@media(max-width:760px) {
  .alerts-hero__actions { width:100%; }
  .alerts-hero__actions .btn { flex:1; }
  .alerts-stats { grid-template-columns:1fr 1fr; gap:10px; }
  .alert-stat { min-height:90px; gap:10px; }
  .alert-stat__value { font-size:22px; }
  .alert-stat__icon { width:44px; height:44px; flex:0 0 44px; font-size:20px; }
  .alert-row { grid-template-columns:58px minmax(0,1fr); gap:10px; }
  .alert-row__image { width:58px; height:48px; }
  .alert-row__target,.alert-row__actions { grid-column:2; }
  .alert-row__actions { justify-content:flex-start; }
  .alerts-panel { padding:14px; }
  .alert-option-grid { grid-template-columns:1fr; }
  .alert-extra-checks { grid-template-columns:1fr; }
}
@media(max-width:480px) { .alerts-stats { grid-template-columns:1fr; } }

/* =============================================================================
   PRODUCT SEARCH (in alert modal)
   ============================================================================= */
.alert-search-wrap { position:relative; }
.alert-search-results { position:absolute; top:calc(100% + 6px); left:0; right:0; z-index:200; border-radius:16px; border:1px solid rgba(255,255,255,.10); background:linear-gradient(180deg,#141b2d,#0f1525); box-shadow:0 20px 50px rgba(0,0,0,.5); overflow:hidden; max-height:320px; overflow-y:auto; scrollbar-width:thin; }
.alert-search-result { display:flex; align-items:center; gap:12px; padding:10px 14px; cursor:pointer; border-bottom:1px solid rgba(255,255,255,.05); transition:background .15s; }
.alert-search-result:last-child { border-bottom:0; }
.alert-search-result:hover { background:rgba(250,204,21,.07); }
.alert-search-result__img { width:46px; height:38px; flex:0 0 46px; border-radius:8px; background:#fff; display:grid; place-items:center; overflow:hidden; }
.alert-search-result__img img { width:100%; height:100%; object-fit:contain; padding:3px; }
.alert-search-result__body { min-width:0; }
.alert-search-result__name { font-size:13px; font-weight:800; color:#f1f5f9; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.alert-search-result__meta { font-size:11px; color:#64748b; font-weight:700; margin-top:2px; }
.alert-search-loading { padding:12px 16px; font-size:13px; color:#64748b; font-weight:700; }
.alert-search-empty   { padding:12px 16px; font-size:13px; color:#64748b; }

/* Change product button */
.alert-change-product-btn { appearance:none; border:1px solid rgba(148,163,184,.18); background:rgba(255,255,255,.03); color:#94a3b8; font-size:12px; font-weight:800; border-radius:10px; padding:6px 12px; cursor:pointer; margin-top:4px; transition:color .15s, border-color .15s; }
.alert-change-product-btn:hover { color:#facc15; border-color:rgba(250,204,21,.3); }

/* Light theme search */
html[data-theme="light"] .alert-search-results { background:#fff; border-color:rgba(148,163,184,.2); box-shadow:0 16px 40px rgba(15,23,42,.12); }
html[data-theme="light"] .alert-search-result { border-color:rgba(148,163,184,.1); }
html[data-theme="light"] .alert-search-result:hover { background:rgba(250,204,21,.07); }
html[data-theme="light"] .alert-search-result__name { color:#0f172a; }

/* =============================================================================
   DELETE CONFIRMATION MODAL
   ============================================================================= */
.alert-delete-dialog { max-width:400px; text-align:center; }
.alert-delete-icon { font-size:48px; line-height:1; margin-bottom:8px; filter:grayscale(0.2); }
.alert-delete-actions { display:grid; grid-template-columns:1fr 1fr; gap:10px; margin-top:12px; }
.alert-delete-actions .btn { width:100%; }

.btn-danger { background:linear-gradient(180deg,#f87171,#ef4444); color:#fff; border:1px solid rgba(239,68,68,.4); box-shadow:0 8px 20px rgba(239,68,68,.25); }
.btn-danger:hover { background:linear-gradient(180deg,#fca5a5,#f87171); box-shadow:0 12px 28px rgba(239,68,68,.35); }

/* =============================================================================
   ALERT MODAL — shared overrides
   ============================================================================= */
/* Make all alert modals scrollable on small screens */
.alert-modal .auth-modal__dialog { max-height:calc(100dvh - 32px); display:flex; flex-direction:column; }
.alert-modal .auth-modal__content { overflow-y:auto; flex:1; padding-right:2px; scrollbar-width:thin; }
.alert-modal .auth-modal__content::-webkit-scrollbar { width:6px; }
.alert-modal .auth-modal__content::-webkit-scrollbar-thumb { background:rgba(255,255,255,.12); border-radius:999px; }
html[data-theme="light"] .alert-modal .auth-modal__content::-webkit-scrollbar-thumb { background:rgba(148,163,184,.4); }

/* Wider product alert modal to show search results */
#alertProductModal .auth-modal__dialog { width:min(100% - 24px, 620px); }

/* Clickable product image + title in alert rows */
a.alert-row__image { text-decoration:none; transition:opacity .15s; }
a.alert-row__image:hover { opacity:.82; }
a.alert-row__title { text-decoration:none; color:inherit; }
a.alert-row__title:hover { color:#facc15; }
html[data-theme="light"] a.alert-row__title:hover { color:#ca8a04; }

/* =============================================================================
   MULTI-SELECT OPTION CARDS (5-column variant for theme / global modals)
   ============================================================================= */
.alert-option-grid--5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
@media (max-width: 640px) { .alert-option-grid--5 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .alert-option-grid--5 { grid-template-columns: 1fr; } }

/* Option card — make the text tighter so 5 fit */
.alert-option-grid--5 .alert-option-card { padding: 10px 10px; min-height: 76px; }
.alert-option-grid--5 .alert-option-card__icon { font-size: 18px; }
.alert-option-grid--5 .alert-option-card strong { font-size: 12px; }
.alert-option-grid--5 .alert-option-card small  { font-size: 10px; }

/* =============================================================================
   NOTIFICATION CHANNEL CARDS
   ============================================================================= */
.alert-channels-label { font-size: 12px; font-weight: 800; color: #94a3b8; text-transform: uppercase; letter-spacing: .06em; margin: 4px 0 10px; }
.alert-channel-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-bottom: 4px; }
.alert-channel-card { padding: 10px 8px; border-radius: 12px; border: 1px solid rgba(255,255,255,.07); background: rgba(255,255,255,.025); display: flex; flex-direction: column; align-items: center; gap: 5px; cursor: pointer; text-align: center; color: inherit; transition: border-color .18s, background .18s, box-shadow .18s; }
.alert-channel-card:hover { border-color: rgba(250,204,21,.22); background: rgba(250,204,21,.04); }
.alert-channel-card.is-active { border-color: rgba(250,204,21,.45); background: rgba(250,204,21,.08); box-shadow: 0 0 0 1px rgba(250,204,21,.10) inset; }
.alert-channel-card__icon { font-size: 20px; line-height: 1; }
.alert-channel-card strong { display: block; font-size: 11px; font-weight: 900; color: #cbd5e1; white-space: nowrap; }
.alert-channel-card.is-active strong { color: #f8fafc; }

html[data-theme="light"] .alert-channel-card { background: #fff; border-color: rgba(148,163,184,.18); }
html[data-theme="light"] .alert-channel-card.is-active { background: #fffbeb; border-color: rgba(234,179,8,.45); }
html[data-theme="light"] .alert-channel-card strong { color: #475569; }
html[data-theme="light"] .alert-channel-card.is-active strong { color: #0f172a; }

@media (max-width: 480px) { .alert-channel-grid { grid-template-columns: repeat(2, 1fr); } }

/* =============================================================================
   PREVIEW LINK (clickable image in product modal)
   ============================================================================= */
.alert-product-preview__img { display: block; width: 120px; height: 120px; flex: 0 0 120px; background: #fff; overflow: hidden; border-radius: 14px 0 0 14px; text-decoration: none; transition: opacity .15s; }
.alert-product-preview__img:hover { opacity: .85; }

/* =============================================================================
   CHANNEL CARDS — compact inline row (matching Image 3 style)
   ============================================================================= */
.alert-channels-label { font-size:12px; font-weight:800; color:#94a3b8; text-transform:uppercase; letter-spacing:.06em; margin:16px 0 8px; display:block; }

/* Override: compact inline row instead of big 4-column grid */
.alert-channel-grid { display:flex; flex-wrap:wrap; gap:8px; }
.alert-channel-card { padding:6px 12px; border-radius:999px; border:1px solid rgba(255,255,255,.12); background:rgba(255,255,255,.04); display:inline-flex; align-items:center; gap:6px; cursor:pointer; transition:border-color .18s, background .18s; flex-direction:row; min-height:36px; height:auto; }
.alert-channel-card:hover { border-color:rgba(250,204,21,.3); background:rgba(250,204,21,.06); }
.alert-channel-card.is-active { border-color:rgba(250,204,21,.55); background:rgba(250,204,21,.10); }
.alert-channel-card__icon { font-size:15px; line-height:1; }
.alert-channel-card strong { font-size:13px; font-weight:800; color:#cbd5e1; white-space:nowrap; }
.alert-channel-card.is-active strong { color:#f8fafc; }

html[data-theme="light"] .alert-channel-card { background:#fff; border-color:rgba(148,163,184,.2); }
html[data-theme="light"] .alert-channel-card.is-active { background:#fffbeb; border-color:rgba(234,179,8,.5); }
html[data-theme="light"] .alert-channel-card strong { color:#475569; }
html[data-theme="light"] .alert-channel-card.is-active strong { color:#0f172a; }

/* =============================================================================
   THEME LIVE SEARCH ADDITIONS
   ============================================================================= */
.alert-theme-selected { display:flex; align-items:center; justify-content:space-between; gap:8px; min-height:44px; padding:0 14px; border-radius:12px; border:1px solid rgba(250,204,21,.35); background:rgba(250,204,21,.07); font-size:14px; font-weight:800; color:#f8fafc; }
.alert-theme-clear { width:24px; height:24px; border-radius:50%; border:1px solid rgba(255,255,255,.15); background:rgba(255,255,255,.06); color:#94a3b8; cursor:pointer; display:grid; place-items:center; font-size:16px; line-height:1; flex-shrink:0; transition:color .15s, background .15s; }
.alert-theme-clear:hover { color:#fb7185; background:rgba(244,63,94,.12); }
html[data-theme="light"] .alert-theme-selected { background:#fffbeb; border-color:rgba(234,179,8,.45); color:#0f172a; }

/* Safety: prevent CSS display rules overriding the HTML hidden attribute */
[hidden] { display: none !important; }
/* ── Product alert filter bar ─────────────────────────────────────────────── */
.alert-filter-row { display:flex; align-items:center; gap:12px; margin-bottom:12px; flex-wrap:wrap; }
.alert-filter-wrap { position:relative; flex:1; min-width:180px; }
.alert-filter-icon { position:absolute; left:12px; top:50%; transform:translateY(-50%); font-size:14px; pointer-events:none; }
.alert-filter-input { padding-left:34px !important; height:38px !important; font-size:13px !important; }
.alert-filter-count { font-size:12px; font-weight:800; color:#64748b; white-space:nowrap; }
.alert-row--hidden { display:none !important; }
/* =============================================================================
   ALERT MODAL VISIBILITY FIX
   =============================================================================
   Some alert JS toggles .is-hidden but leaves the HTML hidden attribute in place.
   The global [hidden] rule then keeps the chosen product/theme preview invisible.
   These rules let the modal sections show again when JS removes .is-hidden.
*/
#alertProductSearch:not(.is-hidden)[hidden],
#alertProductPreview:not(.is-hidden)[hidden],
#alertThemeSelected:not(.is-hidden)[hidden],
#alertThemeSearchInput:not(.is-hidden)[hidden],
#alertThemeResults:not(.is-hidden)[hidden] {
  display: block !important;
}

#alertProductPreview:not(.is-hidden)[hidden] {
  display: block !important;
}

#alertThemeSelected:not(.is-hidden)[hidden] {
  display: flex !important;
}

#alertThemeResults:not(.is-hidden)[hidden],
#alertSearchResults:not(.is-hidden)[hidden] {
  display: block !important;
}

/* Keep intentional hidden states hidden. */
#alertProductSearch.is-hidden,
#alertProductPreview.is-hidden,
#alertThemeSelected.is-hidden,
#alertThemeSearchInput.is-hidden,
#alertThemeResults.is-hidden,
#alertSearchResults.is-hidden {
  display: none !important;
}

/* Give live-search dropdowns room above the option cards. */
.alert-search-wrap {
  z-index: 20;
}

.alert-search-results {
  z-index: 9999;
}

/* Add spacing when the selected product preview is visible. */
#alertProductPreview:not(.is-hidden) {
  margin-bottom: 12px;
}

/* =============================================================================
   LOAD MORE + ALERT EVENT DETAILS
   ============================================================================= */
.alert-load-more-wrap { display:flex; justify-content:center; margin-top:14px; padding-top:12px; border-top:1px solid rgba(255,255,255,.06); }
.alert-load-more-wrap--side { border-top:0; padding-top:4px; }
.alert-load-more-wrap .btn[disabled] { opacity:.72; cursor:wait; }

.alert-channel-error { margin:-2px 0 10px; padding:10px 12px; border-radius:12px; border:1px solid rgba(244,63,94,.24); background:rgba(244,63,94,.10); color:#fecdd3; font-size:12px; font-weight:800; line-height:1.45; }
.alert-channel-error a { color:#facc15; text-decoration:none; }
.alert-channel-error a:hover { text-decoration:underline; }
.alert-channel-card.is-disabled { opacity:.55; }
.alert-channel-card.is-disabled:not(.is-active) { filter:grayscale(.35); }

.alert-history-row,
.recent-alert[data-alert-event-open] { cursor:pointer; transition:transform .15s, border-color .15s, background .15s, box-shadow .15s; }
.alert-history-row:hover,
.recent-alert[data-alert-event-open]:hover { transform:translateY(-1px); border-color:rgba(250,204,21,.26); background:rgba(250,204,21,.055); box-shadow:0 10px 24px rgba(15,23,42,.10); }
.alert-chip--strong { color:#facc15; border-color:rgba(250,204,21,.28); background:rgba(250,204,21,.09); }

html[data-theme="light"] .alert-channel-error { background:#fff1f2; border-color:#fecdd3; color:#be123c; }
html[data-theme="light"] .alert-history-row:hover,
html[data-theme="light"] .recent-alert[data-alert-event-open]:hover { background:#fffbeb; border-color:rgba(234,179,8,.35); }


/* (old V1/V2/V4 alert-event modal CSS removed — replaced by the clean
    "ALERT EVENT MODAL — REDESIGNED" section near the end of this file.) */


/* =============================================================================
   ALERT HISTORY + RECENT TRIGGERED POLISH
   ============================================================================= */
.alerts-panel__head--stack { display:grid; grid-template-columns:1fr; gap:14px; }
.alert-history-tools { display:grid; grid-template-columns:minmax(220px,1fr) 170px 150px 140px; gap:10px; align-items:center; }
.alert-history-search { position:relative; }
.alert-history-search span { position:absolute; left:13px; top:50%; transform:translateY(-50%); font-size:13px; opacity:.75; pointer-events:none; }
.alert-history-search .input-base { padding-left:36px; }
.alert-history-count { margin:-2px 0 10px; font-size:12px; font-weight:900; color:#94a3b8; }
.alert-history-list { display:grid; gap:10px; }
.alert-history-card { display:grid; grid-template-columns:70px minmax(0,1fr) auto; gap:14px; align-items:center; padding:12px 14px; border-radius:18px; border:1px solid rgba(255,255,255,.06); background:rgba(255,255,255,.025); cursor:pointer; transition:transform .16s ease,border-color .16s ease,background .16s ease,box-shadow .16s ease; }
.alert-history-card:hover { transform:translateY(-1px); border-color:rgba(250,204,21,.32); background:rgba(250,204,21,.055); box-shadow:0 14px 30px rgba(15,23,42,.10); }
.alert-history-card__image { width:70px; height:58px; border-radius:14px; background:#fff; border:1px solid rgba(148,163,184,.14); display:grid; place-items:center; overflow:hidden; }
.alert-history-card__image img { width:100%; height:100%; object-fit:contain; padding:4px; }
.alert-history-card__body { min-width:0; }
.alert-history-card__title { font-size:15px; font-weight:900; color:#f8fafc; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; line-height:1.25; overflow-wrap:anywhere; word-break:break-word; }
.alert-history-card__meta { display:flex; flex-wrap:wrap; gap:6px; margin-top:3px; color:#94a3b8; font-size:12px; font-weight:800; }
.alert-history-card__note { margin-top:6px; color:#64748b; font-size:12px; font-weight:700; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.alert-history-card__badges { display:flex; align-items:center; justify-content:flex-end; gap:8px; flex-wrap:wrap; }
.alert-pill { min-height:28px; padding:0 10px; display:inline-flex; align-items:center; justify-content:center; border-radius:999px; font-size:12px; font-weight:900; white-space:nowrap; }
.alert-pill--green { color:#16a34a; background:rgba(34,197,94,.14); border:1px solid rgba(34,197,94,.25); }
.alert-pill--yellow { color:#ca8a04; background:rgba(250,204,21,.16); border:1px solid rgba(250,204,21,.28); }
.alert-pill--muted { color:#94a3b8; background:rgba(148,163,184,.10); border:1px solid rgba(148,163,184,.18); }
.recent-alert-list { display:grid; gap:9px; }
.recent-alert-card { display:grid; grid-template-columns:58px minmax(0,1fr) auto; gap:12px; align-items:center; min-height:64px; padding:8px 10px; border-radius:18px; border:1px solid rgba(255,255,255,.06); background:rgba(255,255,255,.025); cursor:pointer; transition:transform .16s ease,border-color .16s ease,background .16s ease,box-shadow .16s ease; }
.recent-alert-card:hover { transform:translateY(-1px); border-color:rgba(250,204,21,.30); background:rgba(250,204,21,.055); box-shadow:0 12px 26px rgba(15,23,42,.10); }
.recent-alert-card__img { width:58px; height:48px; border-radius:14px; background:#fff; display:grid; place-items:center; overflow:hidden; border:1px solid rgba(148,163,184,.14); }
.recent-alert-card__img img { width:100%; height:100%; object-fit:contain; padding:4px; }
.recent-alert-card__body { min-width:0; }
.recent-alert-card__title { color:#f8fafc; font-size:13px; line-height:1.2; font-weight:900; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.recent-alert-card__sub { margin-top:3px; color:#94a3b8; font-size:12px; font-weight:800; }
.recent-alert-card__time { color:#64748b; font-size:12px; font-weight:800; white-space:nowrap; }
html[data-theme="light"] .alert-history-card, html[data-theme="light"] .recent-alert-card { background:#fff; border-color:rgba(148,163,184,.18); }
html[data-theme="light"] .alert-history-card:hover, html[data-theme="light"] .recent-alert-card:hover { background:#fffbeb; border-color:rgba(234,179,8,.35); }
html[data-theme="light"] .alert-history-card__title, html[data-theme="light"] .recent-alert-card__title { color:#0f172a; }
html[data-theme="light"] .alert-history-card__note, html[data-theme="light"] .recent-alert-card__time { color:#64748b; }
@media(max-width:980px){ .alert-history-tools{grid-template-columns:1fr 1fr;} .alert-history-card{grid-template-columns:58px minmax(0,1fr);} .alert-history-card__image{width:58px;height:50px;} .alert-history-card__badges{grid-column:2;justify-content:flex-start;} }
@media(max-width:560px){ .alert-history-tools{grid-template-columns:1fr;} .recent-alert-card{grid-template-columns:52px minmax(0,1fr);} .recent-alert-card__time{grid-column:2;} }
/* =============================================================================
   ALERT EVENT BADGES + POLISHED RECENT/HISTORY/MODAL
   ============================================================================= */
.alert-pill--blue {
  color: #2563eb;
  background: rgba(59,130,246,.14);
  border: 1px solid rgba(59,130,246,.26);
}
.alert-pill--purple {
  color: #7c3aed;
  background: rgba(139,92,246,.14);
  border: 1px solid rgba(139,92,246,.26);
}
.alert-history-card__badges .alert-pill {
  min-width: 96px;
}
.recent-alert-card {
  grid-template-columns: 58px minmax(0,1fr) auto;
  padding: 10px 12px;
  border-radius: 18px;
}
.recent-alert-card__sub {
  max-width: 230px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.recent-alert-card__side {
  display: grid;
  justify-items: end;
  gap: 5px;
  min-width: 92px;
}
.recent-alert-card__side .alert-pill {
  min-height: 26px;
  font-size: 11px;
  padding-inline: 9px;
}
.alert-event-type-badge--target {
  color: #16a34a;
  background: rgba(34,197,94,.14);
  border-color: rgba(34,197,94,.28);
}
.alert-event-type-badge--drop {
  color: #2563eb;
  background: rgba(59,130,246,.14);
  border-color: rgba(59,130,246,.28);
}
.alert-event-type-badge--lowest {
  color: #ca8a04;
  background: rgba(250,204,21,.18);
  border-color: rgba(250,204,21,.34);
}
.alert-event-type-badge--stock {
  color: #7c3aed;
  background: rgba(139,92,246,.14);
  border-color: rgba(139,92,246,.28);
}
html[data-theme="light"] .alert-pill--blue {
  color: #2563eb;
  background: #eff6ff;
  border-color: #bfdbfe;
}
html[data-theme="light"] .alert-pill--purple {
  color: #7c3aed;
  background: #f5f3ff;
  border-color: #ddd6fe;
}
@media(max-width:640px){
  .recent-alert-card{grid-template-columns:52px minmax(0,1fr)}
  .recent-alert-card__side{grid-column:2;justify-items:start;display:flex;align-items:center;gap:8px}
}


/* =============================================================================
   ALERT EVENT MODAL — REDESIGNED
   Matches the watchlist/product alert modal pattern:
   topline pills → auth-modal__title → auth-modal__text → .alert-product-preview
   → rule card → metrics grid → note → actions.
   ============================================================================= */
#alertEventModal .alert-event-dialog {
  width: min(100% - 24px, 640px);
  max-width: 640px;
  padding: 28px;
  border-radius: 26px;
}
#alertEventModal .auth-modal__content { gap: 14px; }

/* Topline pills (above the H2) */
.alert-event-topline {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding-right: 56px; /* leave room for the close button */
}
.alert-event-source-pill {
  font-size: 13px;
  font-weight: 900;
  color: var(--text);
}

/* Title spacing tweaks so the H2/headline pair sits tight */
#alertEventModal .auth-modal__title { margin: 2px 0 0; font-size: 26px; line-height: 1.1; }
#alertEventModal .auth-modal__text  { margin: 0 0 4px; }

/* Product preview reuses .alert-product-preview from the watchlist modal.
   Keep the body padding consistent and make the meta a full address line. */
.alert-event-preview .alert-product-preview__body { padding: 14px 16px; gap: 4px; }
.alert-event-preview .alert-product-preview__meta { color: var(--text-soft); font-size: 12px; }

/* Triggered-by / Event card */
.alert-event-rule {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  gap: 16px;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid rgba(148,163,184,.18);
  background: rgba(255,255,255,.035);
}
.alert-event-rule__main { min-width: 0; }
.alert-event-rule__id { text-align: right; min-width: 76px; }
.alert-event-rule span,
.alert-event-metrics span {
  display: block;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #94a3b8;
  margin-bottom: 6px;
}
.alert-event-rule strong,
.alert-event-metrics strong {
  display: block;
  color: var(--text);
  font-size: 15px;
  font-weight: 900;
  line-height: 1.2;
}
.alert-event-rule small {
  display: block;
  margin-top: 4px;
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
}

/* 4-up metrics grid (Old / New / Discount / Triggered) */
.alert-event-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0,1fr));
  gap: 10px;
}
.alert-event-metrics > div {
  padding: 14px;
  border-radius: 14px;
  border: 1px solid rgba(148,163,184,.18);
  background: rgba(255,255,255,.035);
  min-width: 0;
}
.alert-event-metrics strong { font-size: 14px; }
[data-event-discount].is-good { color: #16a34a; }

/* Yellow event note */
.alert-event-note {
  padding: 13px 15px;
  border-radius: 14px;
  border: 1px solid rgba(250,204,21,.30);
  background: rgba(250,204,21,.08);
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.5;
}
.alert-event-note:empty { display: none; }

/* Actions row — slightly tighter than default */
.alert-event-actions { margin-top: 6px; }
.alert-event-actions .btn { min-width: 120px; }

/* Light theme */
html[data-theme="light"] .alert-event-rule,
html[data-theme="light"] .alert-event-metrics > div {
  background: #fff;
  border-color: rgba(148,163,184,.20);
}
html[data-theme="light"] .alert-event-note {
  background: #fffbeb;
  border-color: rgba(234,179,8,.34);
  color: #475569;
}

/* Mobile */
@media (max-width: 640px) {
  #alertEventModal .alert-event-dialog { padding: 20px; border-radius: 22px; }
  #alertEventModal .auth-modal__title { font-size: 22px; }
  .alert-event-topline { padding-right: 44px; gap: 8px; }
  .alert-event-rule { grid-template-columns: 1fr; gap: 10px; }
  .alert-event-rule__id { text-align: left; }
  .alert-event-metrics { grid-template-columns: 1fr 1fr; }
  .alert-event-actions .btn { min-width: 0; flex: 1; }
}


/* =============================================================================
   MOBILE BOTTOM-NAV CLEARANCE FOR ALL ALERT MODALS
   The mobile bottom nav uses --bt-mobile-nav-height (defined in layout.css);
   pad the modal so the action row never sits behind the nav.
   ============================================================================= */
@media (max-width: 900px) {
  /* `.auth-modal.alert-modal` has higher specificity than the bare `.auth-modal`
     padding shorthand from auth.css, regardless of file load order. */
  .auth-modal.alert-modal {
    padding-bottom: calc(var(--bt-mobile-nav-height, 80px) + 16px);
  }
  /* The dialog has its own max-height; subtract the nav so it scrolls in view. */
  .auth-modal.alert-modal .auth-modal__dialog {
    max-height: calc(100dvh - var(--bt-mobile-nav-height, 80px) - 32px);
  }
}


/* =============================================================================
   MOBILE-PROOFING FOR TABS, PANELS, FILTERS, RESULT CARDS
   ============================================================================= */
@media (max-width: 760px) {
  /* Tabs: condense, allow horizontal scroll, smaller pill counts */
  .alerts-tabs-row { margin: 4px 0 12px; gap: 8px; }
  .alerts-tabs { gap: 0; padding-bottom: 2px; -webkit-overflow-scrolling: touch; min-width: 0; }
  .alerts-tab { padding: 10px 12px 12px; font-size: 13px; }
  .alerts-count { min-width: 20px; height: 20px; font-size: 10px; padding: 0 5px; margin-left: 4px; }

  /* Prevent panels from causing horizontal page scroll when long titles wrap */
  .alerts-panel { overflow: hidden; }
  .alerts-main { min-width: 0; }

  /* Panel head: stack title + action button on small screens */
  .alerts-panel__head { flex-direction: column; align-items: stretch; gap: 10px; }
  .alerts-panel__head .btn { width: 100%; }

  /* Alert row: tighter padding, two-column layout already handled */
  .alert-row { padding: 12px 0; }
  .alert-row__title { font-size: 13.5px; }
  .alert-row__meta { font-size: 11.5px; }
  .alert-row__price { font-size: 11.5px; }

  /* History card mirrors row behaviour */
  .alert-history-card { padding: 10px 12px; grid-template-columns: 56px minmax(0,1fr); }
  .alert-history-card__image { width: 56px; height: 50px; }
  .alert-history-card__title { font-size: 14px; }
  .alert-history-card__note { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .alert-history-card__badges { grid-column: 2; justify-content: flex-start; }

  /* Recent alert card: keep image + body + side compact */
  .recent-alert-card__sub { max-width: none; white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

  /* Discount badge inside notes */
  .alert-discount-badge { font-size: 11px; padding: 1px 7px; }
}

@media (max-width: 480px) {
  .alerts-tab { padding: 9px 10px 11px; font-size: 12.5px; }
  .alert-row__chips { gap: 4px; }
  .alert-chip { font-size: 10.5px; padding: 0 6px; }
}
/* =============================================================================
   ALERT SOURCE TYPE SELECTOR + BADGES
   ============================================================================= */
.alert-source-select .auth-form__hint {
  display: block;
  margin-top: 4px;
}
.alert-chip--source {
  border-radius: 999px;
  font-weight: 900;
}
.alert-chip--source-shop {
  color: #2563eb;
  background: rgba(59,130,246,.12);
  border-color: rgba(59,130,246,.24);
}
.alert-chip--source-marketplace {
  color: #7c3aed;
  background: rgba(139,92,246,.12);
  border-color: rgba(139,92,246,.24);
}
html[data-theme="light"] .alert-chip--source-shop {
  color: #2563eb;
  background: #eff6ff;
  border-color: #bfdbfe;
}
html[data-theme="light"] .alert-chip--source-marketplace {
  color: #7c3aed;
  background: #f5f3ff;
  border-color: #ddd6fe;
}

/* =============================================================================
   FINAL MOBILE ALERTS REDESIGN — STATS, CATEGORY SELECTOR, ALERT ROWS
   ============================================================================= */
   
  .alerts-mobile-tabs { display: none; }
@media (max-width: 760px) {
  /* 5 summary boxes: 50/50, last full width */
  .alerts-page .alerts-stats,
  [data-alerts-root] .alerts-stats {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px !important;
    margin-bottom: 14px !important;
  }
  .alerts-page .alerts-stats .alert-stat,
  [data-alerts-root] .alerts-stats .alert-stat {
    min-height: 86px !important;
    padding: 13px 14px !important;
    gap: 10px !important;
    border-radius: 18px !important;
    align-items: center !important;
  }
  .alerts-page .alerts-stats .alert-stat:last-child,
  [data-alerts-root] .alerts-stats .alert-stat:last-child {
    grid-column: 1 / -1 !important;
  }
  .alerts-page .alert-stat__icon,
  [data-alerts-root] .alert-stat__icon {
    width: 42px !important;
    height: 42px !important;
    flex: 0 0 42px !important;
    border-radius: 15px !important;
    font-size: 19px !important;
  }
  .alerts-page .alert-stat__label,
  [data-alerts-root] .alert-stat__label {
    font-size: 11px !important;
    line-height: 1.15 !important;
  }
  .alerts-page .alert-stat__value,
  [data-alerts-root] .alert-stat__value {
    font-size: 22px !important;
    line-height: 1 !important;
    margin-top: 3px !important;
  }
  .alerts-page .alert-stat__sub,
  [data-alerts-root] .alert-stat__sub {
    font-size: 11px !important;
    line-height: 1.2 !important;
    margin-top: 4px !important;
  }

  /* Alert category: same full-width menu pattern as account menu */
  .alerts-tabs-row {
    display: block !important;
    width: 100% !important;
    margin: 8px 0 16px !important;
  }
  .alerts-tabs { display: none !important; }
  .alerts-mobile-tabs {
    position: relative !important;
    display: grid !important;
    grid-template-columns: 42px minmax(0, 1fr) 44px !important;
    align-items: center !important;
    width: 100% !important;
    min-height: 68px !important;
    padding: 10px 12px !important;
    border-radius: 18px !important;
    border: 1px solid rgba(234,179,8,.28) !important;
    background: linear-gradient(180deg, rgba(255,251,235,.98), rgba(255,255,255,.96)) !important;
    box-shadow: 0 10px 28px rgba(15,23,42,.07) !important;
    overflow: hidden !important;
  }
  .alerts-mobile-tabs__icon {
    width: 42px !important;
    height: 42px !important;
    display: grid !important;
    place-items: center !important;
    border-radius: 14px !important;
    border: 1px solid rgba(250,204,21,.32) !important;
    background: rgba(250,204,21,.10) !important;
    font-size: 18px !important;
    position: static !important;
    transform: none !important;
  }
  .alerts-mobile-tabs__body { min-width: 0 !important; padding-left: 8px !important; }
  .alerts-mobile-tabs__label {
    display: block !important;
    margin: 0 0 2px !important;
    color: #64748b !important;
    font-size: 11px !important;
    font-weight: 900 !important;
    line-height: 1 !important;
    letter-spacing: .055em !important;
    text-transform: uppercase !important;
  }
  .alerts-mobile-tabs__label::before { content: none !important; }
  .alerts-mobile-tabs__current {
    display: block !important;
    min-width: 0 !important;
    color: #0f172a !important;
    font-size: 16px !important;
    font-weight: 950 !important;
    line-height: 1.1 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }
  .alerts-mobile-tabs__select {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    opacity: 0 !important;
    cursor: pointer !important;
    z-index: 3 !important;
  }
  .alerts-mobile-tabs__chevron {
    width: 38px !important;
    height: 38px !important;
    display: grid !important;
    place-items: center !important;
    justify-self: end !important;
    border-radius: 999px !important;
    background: rgba(250,204,21,.13) !important;
    color: #64748b !important;
    font-size: 17px !important;
    font-weight: 900 !important;
    line-height: 1 !important;
    pointer-events: none !important;
  }
  .alerts-mobile-tabs__select-wrap,
  .alerts-mobile-tabs__select-wrap::after { display: contents !important; content: none !important; }

  /* Mobile alert cards: readable, structured, consistent across product/theme/global */
  .alert-list { gap: 0 !important; }
  .alert-row {
    display: grid !important;
    grid-template-columns: 64px minmax(0,1fr) !important;
    gap: 9px 12px !important;
    align-items: start !important;
    padding: 14px 0 !important;
    border-top: 1px solid rgba(148,163,184,.16) !important;
  }
  .alert-row__image {
    grid-column: 1 !important;
    grid-row: 1 !important;
    width: 64px !important;
    height: 58px !important;
    border-radius: 13px !important;
    margin: 0 !important;
  }
  .alert-row__image--theme {
    border: 1px solid rgba(250,204,21,.20) !important;
    background: rgba(250,204,21,.07) !important;
  }
  .alert-row__body {
    grid-column: 2 !important;
    grid-row: 1 !important;
    min-width: 0 !important;
  }
  .alert-row__title {
    font-size: 14.5px !important;
    line-height: 1.22 !important;
    font-weight: 950 !important;
    -webkit-line-clamp: 2 !important;
  }
  .alert-row__meta {
    display: block !important;
    margin-top: 2px !important;
    color: #64748b !important;
    font-size: 12px !important;
    line-height: 1.2 !important;
    font-weight: 750 !important;
  }
  .alert-row__chips,
  .alert-row__chips[style] {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    gap: 5px !important;
    margin-top: 7px !important;
  }
  .alert-chip {
    min-height: 24px !important;
    padding: 0 10px !important;
    border-radius: 999px !important;
    border: 1px solid rgba(148,163,184,.22) !important;
    background: rgba(148,163,184,.08) !important;
    color: #64748b !important;
    font-size: 12px !important;
    font-weight: 900 !important;
    line-height: 1 !important;
    white-space: nowrap !important;
    opacity: 1 !important;
  }
  .alert-chip--source-shop {
    color: #2563eb !important;
    background: #eff6ff !important;
    border-color: #bfdbfe !important;
  }
  .alert-chip--source-marketplace {
    color: #7c3aed !important;
    background: #f5f3ff !important;
    border-color: #ddd6fe !important;
  }
  .alert-chip--rule {
    color: #64748b !important;
    background: #f8fafc !important;
    border-color: #e2e8f0 !important;
  }
  .alert-chip--ch {
    color: #be123c !important;
    background: #fff1f2 !important;
    border-color: #fecdd3 !important;
  }

  .alert-row__target {
    grid-column: 1 / -1 !important;
    display: grid !important;
    grid-template-columns: minmax(0,1fr) minmax(0,1fr) auto !important;
    align-items: center !important;
    gap: 8px !important;
    margin-top: 1px !important;
    padding: 8px 0 0 !important;
  }
  .alert-row__price {
    color: #64748b !important;
    font-size: 12px !important;
    line-height: 1.15 !important;
    font-weight: 850 !important;
    white-space: nowrap !important;
  }
  .alert-row__diff {
    justify-self: end !important;
    min-height: 24px !important;
    padding: 0 9px !important;
    border-radius: 999px !important;
    font-size: 12px !important;
    font-weight: 950 !important;
  }
  .alert-row__actions {
    grid-column: 1 / -1 !important;
    display: grid !important;
    grid-template-columns: 1fr auto 1fr !important;
    align-items: center !important;
    gap: 10px !important;
    margin-top: 0 !important;
    padding-top: 2px !important;
  }
  .alert-switch {
    justify-self: start !important;
    width: 46px !important;
    height: 26px !important;
    flex: 0 0 auto !important;
  }
  .alert-switch::before {
    width: 20px !important;
    height: 20px !important;
    left: 3px !important;
    top: 2px !important;
  }
  .alert-switch.is-on::before,
  .alert-switch[aria-pressed="true"]::before { left: 21px !important; }
  .alerts-edit-btn {
    justify-self: center !important;
    min-height: 32px !important;
    padding: 0 16px !important;
    border-radius: 12px !important;
    font-size: 12px !important;
    font-weight: 900 !important;
  }
  .alert-menu-btn {
    justify-self: end !important;
    width: 32px !important;
    height: 32px !important;
    margin-left: 0 !important;
    border-radius: 12px !important;
  }
}

@media (max-width: 380px) {
  .alert-row__target {
    grid-template-columns: 1fr !important;
    gap: 5px !important;
  }
  .alert-row__diff { justify-self: start !important; }
}

html[data-theme="dark"] .alerts-mobile-tabs {
  background: linear-gradient(180deg, rgba(30,41,59,.96), rgba(15,23,42,.96)) !important;
  border-color: rgba(250,204,21,.22) !important;
}
html[data-theme="dark"] .alerts-mobile-tabs__current { color: #f8fafc !important; }
html[data-theme="dark"] .alerts-mobile-tabs__label { color: #94a3b8 !important; }
html[data-theme="dark"] .alerts-mobile-tabs__chevron { color: #facc15 !important; background: rgba(250,204,21,.10) !important; }
html[data-theme="dark"] .alert-chip--rule { color:#cbd5e1 !important; background:rgba(255,255,255,.04) !important; border-color:rgba(148,163,184,.20) !important; }
html[data-theme="dark"] .alert-chip--ch { color:#fda4af !important; background:rgba(244,63,94,.10) !important; border-color:rgba(244,63,94,.22) !important; }
