﻿/* =======================================================================
   ops-shared.css
   Single shared stylesheet for ALL Vectris feeds admin + view pages.
   Reference in wwwroot/app.css or MainLayout so it loads globally.

   Pages covered:
     Admin (ro- prefix):  EventOps · RiskOps · RiskKeywords · ComplOps
     Views (vp- prefix):  FeedOps · MarketOps · Market · News · NewsIntelligent
   ======================================================================= */

/* ── CSS variables ──────────────────────────────────────────────────── */
:root {
    --c-bg: #f7f8fa;
    --c-surface: #ffffff;
    --c-surface2: #f9fafb;
    --c-border: #e5e7eb;
    --c-border2: #d1d5db;
    --c-text: #111827;
    --c-muted: #6b7280;
    --c-blue: #2563eb;
    --c-blue-lt: #eff6ff;
    --c-blue-md: #bfdbfe;
    --c-green: #16a34a;
    --c-green-lt: #f0fdf4;
    --c-amber: #d97706;
    --c-amber-lt: #fffbeb;
    --c-red: #dc2626;
    --c-red-lt: #fef2f2;
}

/* ═══════════════════════════════════════════════════════════════════════
   LAYOUT
═══════════════════════════════════════════════════════════════════════ */

.ro-page {
    background: var(--c-bg);
    color: var(--c-text);
    font-family: 'Inter', -apple-system, system-ui, sans-serif;
    padding: 28px 28px 48px;
    min-height: 100vh;
}

.vp-page {
    background: var(--c-bg);
    color: var(--c-text);
    font-family: 'Inter', -apple-system, system-ui, sans-serif;
    padding: 24px 28px 48px;
    min-height: 100vh;
}

/* ── Page header ──────────────────────────────────────────────────── */
.ro-header, .vp-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 24px;
    gap: 16px;
    flex-wrap: wrap;
}

.ro-title, .vp-title {
    font-size: 22px;
    font-weight: 800;
    color: var(--c-text);
    margin: 0 0 4px;
    letter-spacing: -0.3px;
}

.ro-sub, .vp-sub {
    font-size: 12px;
    color: var(--c-muted);
    margin: 0;
}

.ro-header-actions, .vp-header-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

/* ── Section card ─────────────────────────────────────────────────── */
.ro-section {
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: 14px;
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.ro-sec-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 8px;
}

.ro-sec-label {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--c-muted);
    display: flex;
    align-items: center;
    gap: 8px;
}

.ro-sec-meta {
    font-size: 11px;
    color: var(--c-muted);
    font-style: italic;
}

/* ═══════════════════════════════════════════════════════════════════════
   BUTTONS
═══════════════════════════════════════════════════════════════════════ */
.ro-btn {
    font-size: 12px;
    font-weight: 600;
    padding: 7px 14px;
    border-radius: 7px;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.15s;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
    line-height: 1;
    min-height: 36px;
    text-decoration: none;
}

    .ro-btn:disabled {
        opacity: 0.45;
        cursor: not-allowed;
    }

.ro-btn-primary {
    background: var(--c-blue);
    color: #fff;
    border-color: var(--c-blue);
}

.ro-btn-secondary {
    background: var(--c-blue-lt);
    color: var(--c-blue);
    border-color: var(--c-blue-md);
}

.ro-btn-ghost {
    background: var(--c-surface);
    color: var(--c-muted);
    border-color: var(--c-border2);
}

.ro-btn-danger {
    background: var(--c-red-lt);
    color: var(--c-red);
    border-color: #fecaca;
}

.ro-btn-primary:hover:not(:disabled) {
    background: #1d4ed8;
}

.ro-btn-secondary:hover:not(:disabled) {
    background: #dbeafe;
}

.ro-btn-ghost:hover:not(:disabled) {
    color: var(--c-text);
    border-color: #9ca3af;
    background: var(--c-surface2);
}

.ro-btn-danger:hover:not(:disabled) {
    background: #fee2e2;
}

.ro-btn-sm {
    font-size: 11px;
    padding: 4px 10px;
    min-height: 30px;
}

.ro-btn-lg {
    font-size: 13px;
    padding: 9px 18px;
    min-height: 40px;
}

/* ═══════════════════════════════════════════════════════════════════════
   FORMS
═══════════════════════════════════════════════════════════════════════ */
.ro-form-card {
    background: var(--c-surface2);
    border: 1px solid var(--c-border);
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 16px;
}

.ro-form-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.ro-form-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.ro-field {
    display: flex;
    flex-direction: column;
    gap: 5px;
    flex: 1;
    min-width: 150px;
}

.ro-field-sm {
    min-width: 110px;
    max-width: 160px;
}

.ro-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--c-muted);
}

.ro-input {
    background: var(--c-surface);
    border: 1px solid var(--c-border2);
    border-radius: 7px;
    color: var(--c-text);
    font-size: 13px;
    padding: 7px 10px;
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
    width: 100%;
    box-sizing: border-box;
}

    .ro-input:focus {
        border-color: var(--c-blue);
        box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
    }

    .ro-input::placeholder {
        color: var(--c-muted);
        opacity: 0.65;
    }

.ro-input-sm {
    font-size: 12px;
    padding: 5px 8px;
}

.ro-input-date {
    width: auto;
}

.ro-w80 {
    width: 80px;
    flex: none;
}

.ro-w60 {
    width: 60px;
    flex: none;
}

.ro-select {
    background: var(--c-surface);
    border: 1px solid var(--c-border2);
    border-radius: 7px;
    color: var(--c-text);
    font-size: 13px;
    padding: 7px 10px;
    outline: none;
    width: 100%;
    cursor: pointer;
    box-sizing: border-box;
    transition: border-color 0.15s;
}

    .ro-select:focus {
        border-color: var(--c-blue);
    }

.ro-select-sm {
    font-size: 12px;
    padding: 5px 8px;
}

.ro-toggle-label {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    color: var(--c-muted);
    cursor: pointer;
    white-space: nowrap;
}

.ro-hint {
    font-size: 11px;
    color: var(--c-muted);
    margin: 4px 0 0;
    line-height: 1.55;
}

.ro-hint-block {
    background: var(--c-surface2);
    border: 1px solid var(--c-border);
    border-radius: 7px;
    padding: 10px 14px;
    margin-bottom: 14px;
}

/* ═══════════════════════════════════════════════════════════════════════
   FEEDBACK
═══════════════════════════════════════════════════════════════════════ */
.ro-toast {
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 14px;
    border: 1px solid transparent;
}

.ro-toast-ok {
    background: var(--c-green-lt);
    border-color: #bbf7d0;
    color: #15803d;
}

.ro-toast-warn {
    background: var(--c-amber-lt);
    border-color: #fde68a;
    color: #92400e;
}

.ro-toast-err {
    background: var(--c-red-lt);
    border-color: #fecaca;
    color: #b91c1c;
}

.ro-result-banner {
    background: var(--c-blue-lt);
    border: 1px solid var(--c-blue-md);
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 12px;
    color: var(--c-blue);
    margin-bottom: 14px;
}

.ro-loader {
    display: flex;
    justify-content: center;
    padding: 80px 0;
}

.ro-empty {
    font-size: 13px;
    color: var(--c-muted);
    padding: 24px 0;
    text-align: center;
    font-style: italic;
}

.ro-empty-state {
    text-align: center;
    padding: 80px 24px;
}

.ro-empty-icon {
    font-size: 48px;
    margin-bottom: 12px;
}

.ro-empty-text {
    font-size: 17px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 6px;
}

.ro-empty-sub {
    font-size: 13px;
    color: var(--c-muted);
    max-width: 320px;
    margin: 0 auto;
    line-height: 1.5;
}

/* ═══════════════════════════════════════════════════════════════════════
   NAVIGATION  (tabs, pills, segments)
═══════════════════════════════════════════════════════════════════════ */

/* Segmented tab bar — admin pages */
.ro-tabs {
    display: flex;
    gap: 2px;
    margin-bottom: 18px;
    background: var(--c-surface2);
    border: 1px solid var(--c-border);
    border-radius: 10px;
    padding: 4px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.ro-tab {
    font-size: 12px;
    font-weight: 600;
    padding: 6px 18px;
    border-radius: 7px;
    cursor: pointer;
    border: 1px solid transparent;
    background: transparent;
    color: var(--c-muted);
    transition: all 0.15s;
    min-height: 34px;
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    flex: 0 0 auto;
}

    .ro-tab.active {
        background: var(--c-surface);
        color: var(--c-blue);
        border-color: var(--c-border);
        box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    }

        .ro-tab.active .ro-badge-count {
            background: #dbeafe;
            color: var(--c-blue);
        }

/* Pill filter row */
.ro-pill-row {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

.ro-pill {
    font-size: 11px;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 999px;
    cursor: pointer;
    border: 1px solid var(--c-border2);
    background: var(--c-surface);
    color: var(--c-muted);
    transition: all 0.15s;
    min-height: 30px;
    display: flex;
    align-items: center;
}

    .ro-pill.active {
        background: var(--c-blue-lt);
        color: var(--c-blue);
        border-color: var(--c-blue-md);
    }

    .ro-pill:hover:not(.active) {
        border-color: #9ca3af;
        color: var(--c-text);
    }

/* Segmented filter (All / Manual / Auto) */
.ro-seg {
    display: flex;
    gap: 3px;
    flex-wrap: wrap;
}

.ro-seg-btn {
    font-size: 10px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 6px;
    cursor: pointer;
    border: 1px solid var(--c-border2);
    background: var(--c-surface);
    color: var(--c-muted);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    transition: all 0.15s;
    min-height: 30px;
    display: flex;
    align-items: center;
}

    .ro-seg-btn.active {
        background: var(--c-blue);
        color: white;
        border-color: var(--c-blue);
    }

/* View tab bar — news / market pages */
.vp-tabs-bar {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    white-space: nowrap;
    padding-bottom: 8px;
    padding-right: 12px;
    margin-bottom: 14px;
    scrollbar-width: none;
}

    .vp-tabs-bar::-webkit-scrollbar {
        display: none;
    }

.vp-tab {
    flex: 0 0 auto;
    border: 1px solid var(--c-border);
    background: var(--c-surface);
    color: #4b5563;
    padding: 5px 14px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
    min-height: 36px;
    display: flex;
    align-items: center;
    gap: 5px;
}

    .vp-tab:hover {
        background: var(--c-blue-lt);
        color: var(--c-blue);
        border-color: var(--c-blue-md);
    }

    .vp-tab.active {
        background: var(--c-blue);
        color: white;
        border-color: var(--c-blue);
    }

.vp-tab-count {
    background: rgba(0,0,0,0.1);
    border-radius: 999px;
    font-size: 10px;
    padding: 1px 6px;
    font-weight: 600;
}

.vp-tab.active .vp-tab-count {
    background: rgba(255,255,255,0.25);
}

.vp-filter-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    color: #9ca3af;
    margin-bottom: 6px;
}

/* ═══════════════════════════════════════════════════════════════════════
   BADGES & CHIPS
═══════════════════════════════════════════════════════════════════════ */
.ro-badge-count {
    font-size: 10px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 999px;
    background: #f3f4f6;
    color: var(--c-muted);
}

.ro-badge-auto {
    font-size: 9px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 5px;
    background: var(--c-blue-lt);
    color: var(--c-blue);
    letter-spacing: 0.05em;
    flex-shrink: 0;
}

.ro-badge-manual {
    font-size: 9px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 5px;
    background: #f3f4f6;
    color: var(--c-muted);
    letter-spacing: 0.05em;
    flex-shrink: 0;
}

.ro-badge-inactive {
    font-size: 9px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 5px;
    background: var(--c-red-lt);
    color: var(--c-red);
    letter-spacing: 0.05em;
}

.vp-status-badge {
    font-size: 11px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 999px;
}

.vp-status--active {
    background: #dcfce7;
    color: #15803d;
}

.vp-status--disabled {
    background: #f3f4f6;
    color: #9ca3af;
}

.ro-tag-chip {
    display: inline-block;
    background: var(--c-blue-lt);
    color: #1d4ed8;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 9px;
    border-radius: 999px;
    letter-spacing: 0.2px;
    white-space: nowrap;
}

.ro-tag-star {
    color: var(--c-amber);
    font-size: 14px;
    line-height: 1;
}

.ro-score-badge {
    display: inline-block;
    background: var(--c-amber-lt);
    color: #92400e;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 999px;
    border: 1px solid #fde68a;
}

.vp-meta-chip {
    font-size: 11px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 999px;
    background: #f3f4f6;
    color: var(--c-muted);
}

.vp-meta-chip--active {
    background: #dcfce7;
    color: #15803d;
}

.vp-meta-chip--off {
    background: var(--c-red-lt);
    color: #b91c1c;
}

/* ═══════════════════════════════════════════════════════════════════════
   STATUS DOTS
═══════════════════════════════════════════════════════════════════════ */
.ro-dot-green {
    display: block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--c-green);
    box-shadow: 0 0 0 2px #dcfce7;
}

.ro-dot-grey {
    display: block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #d1d5db;
    box-shadow: 0 0 0 2px #f3f4f6;
}

/* ═══════════════════════════════════════════════════════════════════════
   ICON BUTTONS
═══════════════════════════════════════════════════════════════════════ */
.ro-icon-btn {
    background: transparent;
    border: 1px solid var(--c-border);
    color: var(--c-muted);
    cursor: pointer;
    padding: 6px 9px;
    border-radius: 6px;
    font-size: 13px;
    transition: all 0.15s;
    line-height: 1;
    min-height: 32px;
    display: inline-flex;
    align-items: center;
}

    .ro-icon-btn:hover {
        background: var(--c-surface2);
        color: var(--c-text);
        border-color: var(--c-border2);
    }

.ro-icon-danger:hover {
    background: var(--c-red-lt);
    color: var(--c-red);
    border-color: #fecaca;
}

/* ═══════════════════════════════════════════════════════════════════════
   KEYWORD TABLE  (admin pages)
═══════════════════════════════════════════════════════════════════════ */
.ro-kw-table {
    display: flex;
    flex-direction: column;
    gap: 3px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.ro-kw-header {
    display: grid;
    grid-template-columns: 1fr 1.5fr 60px 60px 80px;
    gap: 8px;
    padding: 7px 12px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--c-muted);
    background: var(--c-surface2);
    border-radius: 8px 8px 0 0;
    border: 1px solid var(--c-border);
    border-bottom: none;
    min-width: 400px;
}

.ro-kw-row {
    display: grid;
    grid-template-columns: 1fr 1.5fr 60px 60px 80px;
    gap: 8px;
    padding: 9px 12px;
    align-items: center;
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-top: none;
    border-left: 3px solid var(--c-green);
    transition: background 0.1s;
    min-width: 400px;
}

    .ro-kw-row:last-child {
        border-radius: 0 0 8px 8px;
    }

    .ro-kw-row:hover {
        background: #fafafa;
    }

.ro-inactive {
    border-left-color: #fca5a5 !important;
    background: #fefefe !important;
}

    .ro-inactive .ro-kw-domain,
    .ro-inactive .ro-kw-word,
    .ro-inactive .ro-kw-weight,
    .ro-inactive .ro-ev-tag,
    .ro-inactive .ro-tag-chip,
    .ro-inactive .ro-score-badge,
    .ro-inactive .ro-tag-star {
        opacity: 0.4;
    }

/* Column overrides */
.ro-kw-table-etm .ro-kw-header,
.ro-kw-table-etm .ro-kw-row-etm {
    grid-template-columns: 1.4fr 1.2fr 60px 1.4fr 60px 60px 80px;
    min-width: 620px;
}

.ro-kw-table-tag .ro-kw-header,
.ro-kw-table-tag .ro-kw-row-tag {
    grid-template-columns: 1.6fr 1.2fr 70px 60px 60px 80px;
}

.ro-kw-table-rules .ro-kw-header,
.ro-kw-table-rules .ro-kw-row {
    grid-template-columns: 2fr 1fr 1.5fr 50px 50px 80px;
}

.ro-kw-table-std .ro-kw-header,
.ro-kw-table-std .ro-kw-row {
    grid-template-columns: 120px 1fr 60px;
    min-width: 280px;
}

.ro-kw-table-ctrl .ro-kw-header,
.ro-kw-table-ctrl .ro-kw-row {
    grid-template-columns: 100px 120px 1fr 60px;
    min-width: 400px;
}

.ro-kw-domain {
    font-size: 12px;
    font-weight: 600;
    color: var(--c-text);
}

.ro-kw-word {
    font-size: 12px;
    color: var(--c-muted);
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    background: var(--c-surface2);
    padding: 1px 6px;
    border-radius: 4px;
    border: 1px solid var(--c-border);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ro-kw-weight {
    font-size: 13px;
    font-weight: 700;
    color: var(--c-text);
}

.ro-kw-desc {
    font-size: 12px;
    color: var(--c-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ro-kw-actions {
    display: flex;
    gap: 4px;
    justify-content: flex-end;
}

.ro-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ═══════════════════════════════════════════════════════════════════════
   FEED / SYMBOL TABLE ROWS  (FeedOps, MarketOps)
═══════════════════════════════════════════════════════════════════════ */
.vp-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.vp-table-header {
    display: grid;
    gap: 8px;
    padding: 7px 12px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--c-muted);
    background: var(--c-surface2);
    border-radius: 8px 8px 0 0;
    border: 1px solid var(--c-border);
    border-bottom: none;
}

.vp-table-row {
    display: grid;
    gap: 8px;
    padding: 10px 12px;
    align-items: center;
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-top: none;
    transition: background 0.1s;
}

    .vp-table-row:last-child {
        border-radius: 0 0 8px 8px;
    }

    .vp-table-row:hover {
        background: #fafafa;
    }

.vp-table--feeds.vp-table-header,
.vp-table--feeds.vp-table-row {
    grid-template-columns: 1.4fr 2fr 90px 120px 100px;
    min-width: 560px;
}

.vp-table--symbols.vp-table-header,
.vp-table--symbols.vp-table-row {
    grid-template-columns: 120px 120px 100px 1fr 60px 80px 100px;
    min-width: 640px;
}

.vp-feed-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--c-text);
}

.vp-feed-url {
    font-size: 11px;
    color: #9ca3af;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.vp-feed-date {
    font-size: 12px;
    color: var(--c-muted);
}

.vp-row-actions {
    display: flex;
    gap: 4px;
    justify-content: flex-end;
}

.vp-group-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
    flex-wrap: wrap;
    gap: 8px;
}

.vp-group-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--c-text);
}

.vp-group-meta {
    display: flex;
    gap: 6px;
}

.vp-last-fetch {
    color: #9ca3af;
    display: block;
    font-size: 11px;
    margin-top: 8px;
}

/* ═══════════════════════════════════════════════════════════════════════
   EVENT LIST  (EventOps)
═══════════════════════════════════════════════════════════════════════ */
.ro-event-list {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-top: 8px;
}

.ro-event-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: 10px;
    flex-wrap: wrap;
    transition: box-shadow 0.15s;
}

    .ro-event-row:hover {
        box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    }

.ro-ev-time {
    font-size: 12px;
    font-variant-numeric: tabular-nums;
    color: var(--c-muted);
    min-width: 40px;
    flex-shrink: 0;
    font-weight: 500;
}

.ro-ev-text {
    font-size: 13px;
    flex: 1;
    min-width: 160px;
    color: var(--c-text);
}

.ro-ev-tag {
    font-size: 10px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 5px;
    letter-spacing: 0.04em;
    flex-shrink: 0;
}

    .ro-ev-tag.market {
        background: var(--c-amber-lt);
        color: #92400e;
    }

    .ro-ev-tag.regulatory {
        background: var(--c-blue-lt);
        color: #1d4ed8;
    }

    .ro-ev-tag.bcm {
        background: var(--c-green-lt);
        color: #15803d;
    }

    .ro-ev-tag.governance {
        background: #f3f4f6;
        color: var(--c-muted);
    }

.ro-ev-dot {
    display: block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

    .ro-ev-dot.red {
        background: var(--c-red);
        box-shadow: 0 0 0 2px #fee2e2;
    }

    .ro-ev-dot.amber {
        background: #f59e0b;
        box-shadow: 0 0 0 2px #fef3c7;
    }

    .ro-ev-dot.green {
        background: var(--c-green);
        box-shadow: 0 0 0 2px #dcfce7;
    }

.ro-date-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.ro-edit-form {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
    width: 100%;
}

/* ═══════════════════════════════════════════════════════════════════════
   DOMAIN / RISK SCORES  (RiskOps)
═══════════════════════════════════════════════════════════════════════ */
.ro-composite-card {
    display: flex;
    gap: 28px;
    align-items: center;
    flex-wrap: wrap;
}

.ro-gauge-wrap {
    position: relative;
    width: 100px;
    height: 100px;
    flex-shrink: 0;
}

.ro-gauge-num {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    font-weight: 800;
    color: var(--c-text);
}

.ro-composite-controls {
    flex: 1;
    min-width: 220px;
}

.ro-composite-row {
    display: flex;
    gap: 10px;
    align-items: center;
    margin: 8px 0;
}

.ro-slider {
    flex: 1;
    accent-color: var(--c-blue);
}

.ro-slider-val {
    font-size: 14px;
    font-weight: 700;
    min-width: 28px;
    text-align: center;
    color: var(--c-text);
}

.ro-domain-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.ro-domain-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: 10px;
    background: var(--c-surface2);
    border: 1px solid var(--c-border);
    transition: box-shadow 0.15s;
    flex-wrap: wrap;
}

    .ro-domain-row:hover {
        box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    }

.ro-domain-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    flex-shrink: 0;
}

.ro-domain-name {
    font-size: 13px;
    font-weight: 600;
    min-width: 120px;
    color: var(--c-text);
}

.ro-domain-bar-wrap {
    flex: 1;
    height: 6px;
    background: var(--c-border);
    border-radius: 999px;
    overflow: hidden;
    min-width: 60px;
}

.ro-domain-bar-fill {
    height: 100%;
    border-radius: 999px;
    transition: width 0.3s ease;
}

.ro-domain-score {
    font-size: 13px;
    font-weight: 700;
    min-width: 32px;
    text-align: right;
}

.ro-domain-actions {
    display: flex;
    gap: 4px;
    margin-left: auto;
}

/* ═══════════════════════════════════════════════════════════════════════
   SCORE BARS  (EventOps result banner)
═══════════════════════════════════════════════════════════════════════ */
.ro-result-summary {
    margin-bottom: 10px;
    font-size: 12px;
}

.ro-result-items {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.ro-score-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
    min-width: 480px;
}

    .ro-score-table thead tr {
        background: rgba(37,99,235,0.06);
    }

    .ro-score-table th {
        font-size: 10px;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.07em;
        color: var(--c-blue);
        padding: 6px 10px;
        text-align: left;
        white-space: nowrap;
    }

    .ro-score-table td {
        padding: 6px 10px;
        border-top: 1px solid rgba(37,99,235,0.1);
        vertical-align: middle;
    }

.ro-score-time {
    font-size: 11px;
    color: var(--c-muted);
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.ro-score-title {
    max-width: 260px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--c-text);
}

.ro-score-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 3px;
}

.ro-score-bar-row {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 80px;
}

.ro-score-bar-track {
    flex: 1;
    height: 6px;
    background: var(--c-border);
    border-radius: 999px;
    overflow: hidden;
}

.ro-score-bar-track--sm {
    width: 48px;
    flex: none;
    height: 4px;
}

.ro-score-bar-fill {
    height: 100%;
    border-radius: 999px;
    transition: width 0.3s ease;
}

    .ro-score-bar-fill.score-high {
        background: var(--c-red);
    }

    .ro-score-bar-fill.score-mid {
        background: #f59e0b;
    }

    .ro-score-bar-fill.score-low {
        background: #34d399;
    }

.ro-score-num {
    font-size: 11px;
    font-weight: 700;
    color: var(--c-text);
    min-width: 20px;
    text-align: right;
}

.ro-score-num-sm {
    font-size: 10px;
    font-weight: 700;
    color: var(--c-muted);
    min-width: 16px;
}

.ro-ev-score {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

.ro-tag-chip-sm {
    display: inline-block;
    background: var(--c-blue-lt);
    color: #1d4ed8;
    font-size: 10px;
    font-weight: 600;
    padding: 1px 6px;
    border-radius: 999px;
    white-space: nowrap;
}

/* ═══════════════════════════════════════════════════════════════════════
   NEWS / ARTICLE CARDS  (News, NewsIntelligent)
═══════════════════════════════════════════════════════════════════════ */
.vp-news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 18px;
}

.vp-news-card {
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid var(--c-border);
    background: var(--c-surface);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

    .vp-news-card:hover {
        transform: translateY(-4px);
        box-shadow: 0 12px 28px rgba(0,0,0,0.09);
    }

.vp-news-img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    display: block;
}

.vp-news-placeholder {
    width: 100%;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--c-blue-lt) 0%, #dbeafe 100%);
    color: var(--c-blue);
    font-size: 24px;
    font-weight: 700;
}

.vp-news-body {
    padding: 14px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.vp-news-source-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 6px;
}

.vp-news-source {
    font-size: 11px;
    font-weight: 700;
    color: var(--c-blue);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.vp-news-cat-badge {
    font-size: 10px;
    font-weight: 600;
    color: var(--c-muted);
    background: #f3f4f6;
    border-radius: 4px;
    padding: 2px 7px;
    white-space: nowrap;
}

.vp-news-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--c-text);
    margin-bottom: 8px;
    line-height: 1.4;
}

.vp-news-summary {
    font-size: 13px;
    color: var(--c-muted);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.5;
    flex: 1;
}

.vp-news-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: 10px;
    border-top: 1px solid #f3f4f6;
}

.vp-news-date {
    font-size: 11px;
    color: #9ca3af;
}

.vp-news-link {
    font-size: 12px;
    font-weight: 600;
    color: var(--c-blue);
    text-decoration: none;
}

    .vp-news-link:hover {
        text-decoration: underline;
    }

.vp-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 8px;
}

.vp-tag-chip {
    display: inline-block;
    background: var(--c-blue-lt);
    color: #1d4ed8;
    font-size: 10px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 999px;
    transition: background 0.12s;
    cursor: pointer;
}

    .vp-tag-chip:hover {
        background: #dbeafe;
    }

.vp-tag-chip--active {
    background: var(--c-blue);
    color: white;
}

.vp-ctrl-chip {
    display: inline-block;
    background: var(--c-green-lt);
    color: #065f46;
    font-size: 10px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 999px;
    transition: background 0.12s;
    cursor: pointer;
}

    .vp-ctrl-chip:hover {
        background: #d1fae5;
    }

.vp-ctrl-chip--active {
    background: #059669;
    color: white;
}

.vp-explain-box {
    font-size: 12px;
    color: #374151;
    margin-top: 10px;
    padding: 10px 12px;
    border-radius: 8px;
    background: var(--c-surface2);
    border: 1px solid var(--c-border);
}

.vp-explain-head {
    font-weight: 700;
    font-size: 11px;
    color: #374151;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.vp-explain-list {
    margin: 0;
    padding-left: 16px;
    line-height: 1.6;
    color: var(--c-muted);
}

    .vp-explain-list li {
        margin-bottom: 2px;
    }

.vp-score-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
}

.vp-score-label {
    font-size: 10px;
    color: #9ca3af;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.vp-score-track {
    flex: 1;
    height: 4px;
    background: var(--c-border);
    border-radius: 999px;
    overflow: hidden;
}

.vp-score-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--c-blue), #7c3aed);
    border-radius: 999px;
    transition: width 0.4s ease;
}

.vp-score-val {
    font-size: 11px;
    font-weight: 700;
    color: #374151;
    min-width: 24px;
    text-align: right;
}

.vp-search-row {
    margin-bottom: 16px;
}

.vp-search-input {
    width: 100%;
    max-width: 420px;
    padding: 8px 14px;
    font-size: 13px;
    border: 1px solid var(--c-border);
    border-radius: 999px;
    outline: none;
    background: var(--c-surface);
    color: var(--c-text);
    transition: border-color 0.15s, box-shadow 0.15s;
}

    .vp-search-input:focus {
        border-color: var(--c-blue);
        box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
    }

    .vp-search-input::placeholder {
        color: #9ca3af;
    }

.vp-clear-btn {
    font-size: 12px;
    font-weight: 600;
    color: var(--c-muted);
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: 999px;
    padding: 5px 13px;
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
    min-height: 36px;
    display: flex;
    align-items: center;
}

    .vp-clear-btn:hover {
        background: var(--c-red-lt);
        color: #b91c1c;
        border-color: #fecaca;
    }

.vp-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-top: 32px;
    padding-bottom: 24px;
}

.vp-page-btn {
    font-size: 13px;
    font-weight: 600;
    color: #4b5563;
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: 8px;
    padding: 7px 18px;
    cursor: pointer;
    transition: all 0.15s;
    min-height: 36px;
}

    .vp-page-btn:hover:not(:disabled) {
        background: var(--c-blue-lt);
        color: var(--c-blue);
        border-color: var(--c-blue-md);
    }

    .vp-page-btn:disabled {
        opacity: 0.35;
        cursor: not-allowed;
    }

.vp-page-info {
    font-size: 13px;
    color: var(--c-muted);
    font-weight: 500;
    min-width: 100px;
    text-align: center;
}

/* ═══════════════════════════════════════════════════════════════════════
   MARKET CARDS
═══════════════════════════════════════════════════════════════════════ */
.vp-market-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 14px;
}

.vp-market-card {
    border-radius: 12px;
    border: 1px solid var(--c-border);
    background: var(--c-surface);
    padding: 16px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

    .vp-market-card:hover {
        transform: translateY(-3px);
        box-shadow: 0 10px 24px rgba(0,0,0,0.08);
    }

    .vp-market-card.card-up {
        border-left: 3px solid var(--c-green);
    }

    .vp-market-card.card-down {
        border-left: 3px solid var(--c-red);
    }

    .vp-market-card.card-fx {
        border-left: 3px solid var(--c-blue);
    }

.vp-mc-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
}

.vp-mc-symbol {
    font-size: 15px;
    font-weight: 700;
    color: var(--c-text);
}

.vp-mc-label {
    font-size: 11px;
    color: var(--c-muted);
    margin-top: 2px;
}

.vp-mc-badge {
    font-size: 10px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

    .vp-mc-badge.badge-up {
        background: #dcfce7;
        color: #15803d;
    }

    .vp-mc-badge.badge-down {
        background: #fee2e2;
        color: #b91c1c;
    }

    .vp-mc-badge.badge-fx {
        background: var(--c-blue-lt);
        color: #1d4ed8;
    }

.vp-mc-price {
    font-size: 24px;
    font-weight: 700;
    color: var(--c-text);
    margin-bottom: 4px;
    letter-spacing: -0.5px;
}

.vp-mc-unit {
    font-size: 13px;
    font-weight: 400;
    color: var(--c-muted);
}

.vp-mc-change {
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 10px;
}

    .vp-mc-change.text-up {
        color: var(--c-green);
    }

    .vp-mc-change.text-down {
        color: var(--c-red);
    }

.vp-mc-spark {
    width: 100%;
    height: 36px;
    display: block;
}

.vp-fx-track {
    background: #f3f4f6;
    border-radius: 999px;
    height: 6px;
    margin-bottom: 8px;
    overflow: hidden;
}

.vp-fx-fill {
    background: var(--c-blue);
    height: 100%;
    border-radius: 999px;
    transition: width 0.4s ease;
}

/* ═══════════════════════════════════════════════════════════════════════
   MISC
═══════════════════════════════════════════════════════════════════════ */
.ro-tag-check-field {
    justify-content: flex-end;
}

.ro-edit-tag-col {
    display: flex;
    flex-direction: column;
    gap: 0;
    min-width: 0;
}

.ro-spinner-sm {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.35);
    border-top-color: #fff;
    animation: ro-spin 0.65s linear infinite;
}

@keyframes ro-spin {
    to {
        transform: rotate(360deg);
    }
}

/* ═══════════════════════════════════════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════════════════════════════════════ */
@media (max-width: 900px) {
    .vp-table--feeds.vp-table-header,
    .vp-table--feeds.vp-table-row {
        grid-template-columns: 1.2fr 90px 100px 100px;
        min-width: 420px;
    }

    .vp-table--symbols.vp-table-header,
    .vp-table--symbols.vp-table-row {
        grid-template-columns: 100px 100px 80px 1fr 70px 90px;
        min-width: 520px;
    }

    .ro-kw-table-rules .ro-kw-header,
    .ro-kw-table-rules .ro-kw-row {
        grid-template-columns: 1.5fr 80px 80px 44px 44px 72px;
    }
}

@media (max-width: 640px) {
    .ro-page, .vp-page {
        padding: 16px 14px 48px;
    }

    .ro-title, .vp-title {
        font-size: 18px;
    }

    .ro-header, .vp-header {
        flex-direction: column;
        gap: 12px;
        margin-bottom: 16px;
    }

    .ro-header-actions, .vp-header-actions {
        width: 100%;
    }

    .ro-btn {
        flex: 1 1 auto;
        justify-content: center;
    }

    .ro-section {
        padding: 14px 12px;
    }

    .ro-field, .ro-field-sm {
        min-width: 100%;
        max-width: 100%;
    }

    .ro-w80, .ro-w60 {
        width: 100%;
        flex: 1;
    }

    .ro-tabs {
        flex-wrap: nowrap;
        padding-right: 8px;
    }

    .ro-tab {
        flex: 0 0 auto;
        white-space: nowrap;
        padding: 6px 14px;
    }

    .ro-event-row {
        gap: 8px;
        padding: 10px 12px;
    }

    .ro-ev-text {
        min-width: 0;
        width: 100%;
    }

    .ro-domain-bar-wrap {
        display: none;
    }

    .ro-domain-name {
        min-width: 0;
        flex: 1;
    }

    .ro-composite-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .ro-composite-controls {
        min-width: 0;
        width: 100%;
    }

    .vp-news-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .vp-news-card:hover {
        transform: none;
        box-shadow: none;
    }

    .vp-news-img {
        height: 130px;
    }

    .vp-news-placeholder {
        height: 90px;
    }

    .vp-news-body {
        padding: 12px;
    }

    .vp-news-title {
        font-size: 13px;
    }

    .vp-market-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .vp-market-card {
        padding: 12px;
        transition: none;
    }

        .vp-market-card:hover {
            transform: none;
            box-shadow: none;
        }

    .vp-mc-price {
        font-size: 20px;
    }

    .vp-search-input {
        max-width: 100%;
    }

    .vp-pagination {
        gap: 10px;
    }

    .vp-page-btn {
        padding: 7px 12px;
        font-size: 12px;
    }

    .ro-kw-table-rules .ro-kw-header,
    .ro-kw-table-rules .ro-kw-row {
        grid-template-columns: 1fr 70px 44px 64px;
    }
}
