/* ============================================================
   app-ux.css — تحسينات تجربة المستخدم
   رصد الحرب · الإصدار 2.0
   ============================================================ */

/* ════════════════════════════════════════════════════════════
   1. VIEW MODE BAR — شريط أوضاع العرض
   ════════════════════════════════════════════════════════════ */
.ux-view-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px 8px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
}
.ux-view-bar::-webkit-scrollbar { display: none; }

.ux-view-group {
    display: flex;
    gap: 2px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 22px;
    padding: 3px;
    flex-shrink: 0;
}

.ux-view-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 13px;
    border-radius: 18px;
    font-size: 11.5px;
    font-weight: 600;
    font-family: inherit;
    border: none;
    background: transparent;
    color: var(--fg2);
    cursor: pointer;
    transition: background 0.18s, color 0.18s;
    white-space: nowrap;
    position: relative;
}

.ux-view-btn.ux-view-active {
    background: var(--accent);
    color: #fff;
}

.ux-view-btn:not(.ux-view-active):active {
    background: var(--bg-card2);
}

/* Unread filter button — separate style */
.ux-unread-btn {
    background: var(--bg-card);
    border: 1px solid var(--border) !important;
    border-radius: 22px;
    padding: 6px 14px;
    flex-shrink: 0;
}
.ux-unread-btn.ux-view-active {
    background: rgba(198,40,40,0.1);
    border-color: rgba(198,40,40,0.3) !important;
    color: var(--accent);
}

.ux-unread-badge {
    position: absolute;
    top: -5px;
    right: -4px;
    background: var(--accent);
    color: #fff;
    font-size: 9px;
    font-weight: 800;
    min-width: 17px;
    height: 17px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    border: 1.5px solid var(--bg);
}

/* ════════════════════════════════════════════════════════════
   2. NEWS READ STATE — حالة المقروء
   ════════════════════════════════════════════════════════════ */
[data-news-id].news-read {
    opacity: 0.62;
}
[data-news-id].news-read .news-card-title {
    color: var(--fg2);
}

/* ════════════════════════════════════════════════════════════
   3. STORY CLUSTER CARDS — بطاقات تجميع الأحداث
   ════════════════════════════════════════════════════════════ */
.story-cluster {
    border-radius: 14px;
    overflow: hidden;
    margin-bottom: 10px;
    border: 1.5px solid var(--border);
    background: var(--bg-card);
    box-shadow: var(--shadow);
    /* Virtualization للعرض المُجمّع */
    content-visibility: auto;
    contain-intrinsic-size: 320px;
}

.story-cluster.cluster-exceptional {
    border-color: rgba(183, 28, 28, 0.45);
    background: var(--exceptional-bg, rgba(183,28,28,0.04));
}
.story-cluster.cluster-urgent {
    border-color: rgba(198, 40, 40, 0.3);
    background: var(--very-urgent-bg, rgba(198,40,40,0.03));
}

.sc-lead {
    padding: 12px 14px 10px;
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    transition: background 0.15s;
}
.sc-lead:active { background: var(--bg-card2); }

.sc-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 7px;
}
.sc-icon { font-size: 14px; }
.sc-label {
    font-size: 10px;
    font-weight: 700;
    color: var(--fg3);
    letter-spacing: 0.2px;
    flex: 1;
}
.sc-arr {
    font-size: 11px;
    color: var(--fg3);
    transition: transform 0.2s;
    font-weight: 700;
}
.sc-open .sc-arr { transform: rotate(90deg); }

.sc-title {
    font-size: 14px;
    font-weight: 700;
    line-height: 1.55;
    color: var(--fg);
    margin-bottom: 8px;
}

.sc-previews {
    display: flex;
    flex-direction: column;
    gap: 3px;
    margin-bottom: 8px;
}
.sc-preview-item {
    font-size: 11.5px;
    color: var(--fg2);
    line-height: 1.5;
    padding-right: 4px;
    border-right: 2px solid var(--border);
}
.sc-preview-more {
    font-size: 10px;
    color: var(--accent);
    font-weight: 700;
    margin-top: 2px;
}

.sc-sources {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}
.sc-source-chip {
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 10px;
    background: var(--bg);
    color: var(--fg3);
    border: 1px solid var(--border);
    font-weight: 600;
}

.sc-desktop-hint {
    margin-top: 8px;
    font-size: 10px;
    color: var(--accent);
    font-weight: 700;
}

.sc-items {
    border-top: 1px solid var(--border);
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: var(--bg);
    animation: fadeIn 0.2s ease;
}

.cluster-desktop-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 10020;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 14px;
}

.cluster-desktop-modal.show {
    display: flex;
}

.cluster-desktop-dialog {
    width: min(1040px, 98vw);
    max-height: 92vh;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.35);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* حجم النص في صفحة الحدث مرتبط بنفس إعداد حجم الخط */
.cluster-desktop-title {
    font-size: calc(14px * var(--user-font-scale, 1));
}
.cluster-timeline-title {
    font-size: calc(13px * var(--user-font-scale, 1));
}
.cluster-timeline-meta {
    font-size: calc(11px * var(--user-font-scale, 1));
}

.cluster-desktop-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    background: var(--bg-card2);
}

.cluster-desktop-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--fg);
    line-height: 1.7;
}

.cluster-desktop-meta {
    font-size: 11px;
    color: var(--fg3);
    margin-top: 3px;
}

.cluster-desktop-close {
    width: 30px;
    height: 30px;
    border: 1px solid var(--border);
    border-radius: 50%;
    background: var(--bg-card);
    color: var(--fg2);
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
    flex-shrink: 0;
}

.cluster-desktop-body {
    overflow-y: auto;
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.cluster-timeline-item {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 10px 12px;
    background: var(--bg-card);
    content-visibility: auto;
    contain-intrinsic-size: 90px;
}

.cluster-timeline-item.clickable {
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s, transform 0.12s;
}

.cluster-timeline-item.clickable:hover {
    border-color: color-mix(in srgb, var(--accent) 35%, var(--border));
    background: color-mix(in srgb, var(--accent-light) 25%, var(--bg-card));
}

.cluster-timeline-item.clickable:active {
    transform: scale(0.995);
}

.cluster-timeline-index {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--accent-light);
    color: var(--accent);
    font-size: 11px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.cluster-timeline-content {
    min-width: 0;
}

.cluster-timeline-title {
    font-size: 13px;
    line-height: 1.75;
    color: var(--fg);
    font-weight: 600;
}

.cluster-timeline-meta {
    font-size: 11px;
    color: var(--fg3);
    margin-top: 3px;
}

/* ════════════════════════════════════════════════════════════
   4. TIMELINE VIEW — العرض الزمني
   ════════════════════════════════════════════════════════════ */
.tl-block {
    margin-bottom: 20px;
}

.tl-marker {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 4px;
    margin-bottom: 10px;
    position: relative;
}

.tl-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
    position: relative;
    z-index: 2;
    border: 2px solid var(--bg);
}

/* Vertical line connecting dots */
.tl-block:not(:last-child) .tl-marker::after {
    content: '';
    position: absolute;
    right: 8px; /* aligns with dot center (RTL) */
    top: 12px;
    bottom: -22px;
    width: 2px;
    background: linear-gradient(to bottom, var(--border), transparent);
    z-index: 1;
}

.tl-time {
    display: flex;
    flex-direction: column;
    gap: 1px;
}
.tl-date-lbl {
    font-size: 10px;
    color: var(--fg3);
    font-weight: 600;
}
.tl-hour-lbl {
    font-size: 14px;
    font-weight: 800;
    color: var(--fg);
    font-variant-numeric: tabular-nums;
    direction: ltr;
    text-align: right;
}

.tl-count {
    margin-right: auto;
    font-size: 10px;
    font-weight: 700;
    padding: 3px 9px;
    border-radius: 10px;
    background: var(--bg-card);
    color: var(--fg3);
    border: 1px solid var(--border);
}

.tl-items {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-right: 20px; /* indent under dot */
    position: relative;
}

/* ════════════════════════════════════════════════════════════
   5. NIGHT MODE INDICATOR — مؤشر الوضع الليلي
   ════════════════════════════════════════════════════════════ */
.night-indicator {
    position: fixed;
    top: 14px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9100;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    font-family: inherit;
    pointer-events: none;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    animation: slideDownFade 0.3s ease;
    background: rgba(26, 35, 126, 0.12);
    color: #7986CB;
    border: 1px solid rgba(121, 134, 203, 0.25);
}

body[data-night-mode="standby"] .night-indicator {
    background: rgba(245, 124, 0, 0.12);
    color: #FB8C00;
    border-color: rgba(251, 140, 0, 0.25);
}

/* ════════════════════════════════════════════════════════════
   6. MISC ANIMATIONS
   ════════════════════════════════════════════════════════════ */
@keyframes slideDownFade {
    from { opacity: 0; transform: translateX(-50%) translateY(-8px); }
    to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

@keyframes pulseRing {
    0%,100% { box-shadow: 0 0 0 0 rgba(198,40,40,0); }
    50%      { box-shadow: 0 0 0 12px rgba(198,40,40,0.25); }
}

/* ════════════════════════════════════════════════════════════
   7. DARK MODE ADJUSTMENTS
   ════════════════════════════════════════════════════════════ */
@media (prefers-color-scheme: dark) {
    .story-cluster {
        border-color: rgba(255,255,255,0.08);
    }
    .story-cluster.cluster-exceptional {
        border-color: rgba(239, 83, 80, 0.4);
        background: rgba(183,28,28,0.08);
    }
    .story-cluster.cluster-urgent {
        border-color: rgba(239, 83, 80, 0.25);
        background: rgba(183,28,28,0.05);
    }
    .sc-source-chip {
        background: var(--bg-card2);
    }
}

/* ════════════════════════════════════════════════════════════
   8. DESKTOP LAYOUT ADJUSTMENTS
   ════════════════════════════════════════════════════════════ */
@media (min-width: 769px) {
    .ux-view-bar {
        padding: 6px 20px 8px;
    }
    .tl-items {
        padding-right: 28px;
    }
    .story-cluster {
        max-width: 680px;
    }

    .sc-items {
        display: none !important;
    }
}
/* ════════════════════════════════════════════════════════════
   FEATURE PACK v3.0 — إشارات · مناطق · لوحة تحكم · محلل TV · ثيمات
   ════════════════════════════════════════════════════════════ */

/* ── 1. SIGNALS BAR ─────────────────────────────────────── */
.signals-bar {
    display: flex;
    gap: 4px;
    padding: 6px 10px 4px;
    border-top: 1px solid var(--border);
    margin-top: 4px;
}

.signals-bar.signals-inline {
    border-top: none;
    margin-top: 0;
    padding: 0;
    justify-content: flex-start;
}

.signal-btn {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    border: 1.5px solid var(--border);
    background: var(--bg);
    color: var(--fg2);
    cursor: pointer;
    transition: all 0.18s;
    font-family: inherit;
    line-height: 1;
}

.signals-inline .signal-btn {
    padding: 5px 11px;
    font-size: 13px;
    border-radius: 16px;
}

.signal-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 15px;
    height: 15px;
    color: var(--sig-color, var(--accent));
}

.signal-icon svg {
    width: 15px;
    height: 15px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.signals-inline .signal-count {
    min-width: 14px;
    height: 14px;
    font-size: 9px;
}

.signal-btn:hover {
    border-color: var(--sig-color, var(--accent));
    color: var(--sig-color, var(--accent));
    background: color-mix(in srgb, var(--sig-color, var(--accent)) 8%, transparent);
}

.signal-btn.signal-active {
    border-color: var(--sig-color, var(--accent));
    background: color-mix(in srgb, var(--sig-color, var(--accent)) 14%, transparent);
    color: var(--sig-color, var(--accent));
}

.signal-count {
    font-size: 10px;
    font-weight: 800;
    background: var(--sig-color, var(--accent));
    color: #fff;
    border-radius: 8px;
    min-width: 16px;
    height: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
}

/* Trending Signals Panel */
.signals-trending-panel {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 10px 14px;
    margin: 8px 12px;
}

.signals-trending-title {
    font-size: 11px;
    font-weight: 700;
    color: var(--fg2);
    margin-bottom: 8px;
}

.signals-trending-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.signals-trending-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
}

.signals-trending-type { font-size: 14px; flex-shrink: 0; }
.signals-trending-text { flex: 1; color: var(--fg); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.signals-trending-count {
    font-size: 10px;
    font-weight: 800;
    background: var(--bg);
    border: 1px solid var(--border);
    color: var(--fg3);
    border-radius: 8px;
    padding: 1px 7px;
    flex-shrink: 0;
}

/* ── 2. REGION FILTER BAR ─────────────────────────────── */
.region-filter-bar {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px 8px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
}
.region-filter-bar::-webkit-scrollbar { display: none; }
.region-filter-inline {
    border-bottom: none;
    padding: 0;
    margin-inline-start: auto;
    background: transparent;
    max-width: 62vw;
}

.region-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 11.5px;
    font-weight: 600;
    font-family: inherit;
    border: 1.5px solid var(--border);
    background: var(--bg-card);
    color: var(--fg2);
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
    transition: all 0.18s;
}

.region-chip:active { opacity: 0.8; }

.region-chip.region-active {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

.region-emoji { font-size: 13px; }
.region-label { font-size: 11px; }

/* ── 3. DASHBOARD MODAL ───────────────────────────────── */
.dashboard-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 9500;
    background: rgba(0,0,0,0.65);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    animation: fadeIn 0.2s ease;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.dashboard-modal {
    background: var(--bg-card);
    border-radius: 20px 20px 0 0;
    padding: 20px 16px 32px;
    width: 100%;
    max-width: 480px;
    border-top: 1px solid var(--border);
    animation: slideUp 0.25s cubic-bezier(.34,1.56,.64,1);
}

@keyframes slideUp {
    from { transform: translateY(100%); }
    to   { transform: translateY(0); }
}

.dashboard-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 15px;
    font-weight: 700;
    color: var(--fg);
    margin-bottom: 6px;
}

.dashboard-close-btn {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--fg2);
    font-size: 14px;
}

.dashboard-modal-hint {
    font-size: 11px;
    color: var(--fg3);
    margin-bottom: 14px;
}

.dashboard-sort-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 18px;
    user-select: none;
}

.dashboard-sort-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: var(--bg);
    border: 1.5px solid var(--border);
    border-radius: 12px;
    cursor: grab;
    transition: box-shadow 0.15s, background 0.15s;
}

.dashboard-sort-item.dragging {
    opacity: 0.5;
    box-shadow: 0 8px 24px rgba(0,0,0,.25);
}

.drag-handle { font-size: 16px; color: var(--fg3); }
.section-icon { font-size: 16px; }
.section-label { font-size: 13px; font-weight: 600; color: var(--fg); flex: 1; }

.dashboard-save-btn {
    width: 100%;
    padding: 13px;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 14px;
    font-size: 14px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: opacity 0.15s;
}
.dashboard-save-btn:active { opacity: 0.85; }

.dashboard-toast {
    position: fixed;
    bottom: 90px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    background: rgba(30,30,30,0.93);
    color: #fff;
    padding: 10px 22px;
    border-radius: 24px;
    font-size: 13px;
    font-weight: 600;
    animation: slideDownFade 0.3s ease;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

/* ── 4. TV ANALYST COLUMN ─────────────────────────────── */
#tvAnalystCol {
    display: flex;
    flex-direction: column;
    background: var(--tv-col-bg, rgba(22,27,34,0.92));
    border-right: 1px solid var(--tv-border, rgba(255,255,255,0.08));
    overflow: hidden;
    position: relative;
}

#tvBody.tv-analyst-inline-mode #tvMediaCol {
    position: relative;
}

.tv-analyst-inline {
    border-right: none !important;
    border-top: 1px solid var(--tv-border, rgba(255,255,255,0.1));
    max-height: 38%;
    min-height: 140px;
}

.tv-analyst-content {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,.12) transparent;
}

.tv-analyst-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    gap: 12px;
    color: rgba(255,255,255,.65);
    font-size: 13px;
    font-weight: 700;
}

.tv-analyst-pulse {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 3px solid rgba(255,255,255,.14);
    border-top-color: var(--tv-accent, #E53935);
    animation: tvAnalystSpin .9s linear infinite;
}
@keyframes tvAnalystSpin { to { transform: rotate(360deg); } }

.tv-analyst-body {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.tv-analyst-para {
    font-size: 13px;
    line-height: 1.7;
    color: var(--tv-text, rgba(255,255,255,.88));
    background: rgba(255,255,255,.04);
    border-radius: 8px;
    padding: 8px 12px;
    border-right: 2px solid rgba(255,255,255,.12);
}

.tv-analyst-error {
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 8px;
    color: rgba(255,255,255,.8);
}

.tv-analyst-error-icon {
    width: 34px;
    height: 34px;
    color: #ffb74d;
}

.tv-analyst-error-icon svg {
    width: 100%;
    height: 100%;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.tv-analyst-error-title {
    font-size: 13px;
    font-weight: 800;
}

.tv-analyst-error-msg {
    font-size: 11px;
    color: rgba(255,255,255,.55);
    max-width: 90%;
    line-height: 1.6;
}

.tv-analyst-tension {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    font-size: 11px;
    color: rgba(255,255,255,.5);
}

.tv-tension-bar {
    flex: 1;
    height: 6px;
    background: rgba(255,255,255,.1);
    border-radius: 3px;
    overflow: hidden;
}

.tv-tension-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 1s ease;
}

.tv-tension-val {
    font-weight: 700;
    font-size: 12px;
    color: rgba(255,255,255,.7);
}

/* زر تبديل وضع المحلل */
.tv-analyst-toggle-btn {
    padding: 6px 12px;
    border-radius: 20px;
    border: 1px solid rgba(100,255,180,.4);
    background: rgba(100,255,180,.08);
    color: rgba(100,255,180,.85);
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    font-family: inherit;
    transition: all 0.18s;
}

.tv-analyst-toggle-btn.tv-analyst-active {
    background: rgba(100,255,180,.18);
    border-color: rgba(100,255,180,.7);
    color: #6fffc0;
}

/* ── 5. TV THEMES ─────────────────────────────────────── */
/* المتغيرات الافتراضية للـ TV overlay */
#tvOverlay {
    --tv-bg:         linear-gradient(135deg,#0d1117 0%,#161b22 100%);
    --tv-header-bg:  rgba(13,17,23,0.95);
    --tv-col-bg:     rgba(22,27,34,0.92);
    --tv-accent:     #E53935;
    --tv-text:       rgba(255,255,255,0.92);
    --tv-border:     rgba(255,255,255,0.08);
    background: var(--tv-bg) !important;
    transition: background 0.5s ease;
}

.tv-theme-chip {
    padding: 5px 12px;
    border-radius: 18px;
    border: 1.5px solid rgba(255,255,255,.18);
    background: rgba(255,255,255,.07);
    color: rgba(255,255,255,.7);
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.18s;
    white-space: nowrap;
}

.tv-theme-chip:hover {
    background: rgba(255,255,255,.14);
    color: #fff;
}

.tv-theme-chip.tv-theme-active {
    background: rgba(255,255,255,.2);
    border-color: rgba(255,255,255,.5);
    color: #fff;
}

/* ── DARK MODE ────────────────────────────────────────── */
@media (prefers-color-scheme: dark) {
    .signal-btn {
        background: var(--bg-card);
    }
    .region-chip {
        background: var(--bg-card2);
    }
    .dashboard-sort-item {
        background: var(--bg-card2);
    }
}

/* ── DESKTOP ──────────────────────────────────────────── */
@media (min-width: 769px) {
    .region-filter-bar { padding: 6px 20px 8px; }
    .dashboard-modal {
        border-radius: 20px;
        margin-bottom: 40px;
    }
    .signals-bar { padding: 6px 14px 6px; }
    .region-filter-inline { max-width: 55vw; }
}

@media (max-width: 768px) {
    .region-filter-inline {
        max-width: 100%;
        width: 100%;
        margin-inline-start: 0;
        margin-top: 6px;
        padding-bottom: 2px;
    }
}