/* =========================================================================
   GuinRank V7 — YouTube Relationship & Knowledge Graph Suite
   File: wwwroot/style/pages/youtube/relationship-graph.css
   Standards: Canonical YouTube Suite Architecture (_agent/YOUTUBE.md)
   Zero-Regression Engineering Standards:
     1. Strict :root theme variables (Zero hardcoded colors)
     2. Dropup Pagination Footer (.crd-menu with bottom: calc(100% + 8px) !important)
     3. In-Row Miniature ApexCharts Sparklines & Microscopic Glass Tooltip (.gr-spark-pill)
     4. Zero-Scroll Trap Modals (Root-level, dual programmatic locks on html/body)
     5. Strict Lucide icon sizing targeting both i and svg
   ========================================================================= */

#relationship-graph-app {
    width: 100%;
    position: relative;
}

.relationship-graph-container {
    position: relative;
    width: 100%;
    max-width: 1320px;
    margin: 0 auto;
    padding: 24px 20px 80px;
    font-family: inherit;
    transition: max-width 0.3s ease;
}

.relationship-graph-container.is-wide-mode {
    max-width: 100% !important;
    width: 100% !important;
    padding-left: clamp(12px, 2vw, 36px) !important;
    padding-right: clamp(12px, 2vw, 36px) !important;
}

.relationship-graph-container.is-wide-mode .cra-data-wrapper,
.relationship-graph-container.is-wide-mode .console-features,
.relationship-graph-container.is-wide-mode .unified-search-container,
.relationship-graph-container.is-wide-mode .cra-channel-banner,
.relationship-graph-container.is-wide-mode .cra-kpi-grid,
.relationship-graph-container.is-wide-mode .charts-split-grid,
.relationship-graph-container.is-wide-mode .opportunities-cluster,
.relationship-graph-container.is-wide-mode .opportunities-grid,
.relationship-graph-container.is-wide-mode .audit-hub-container,
.relationship-graph-container.is-wide-mode .table-card,
.relationship-graph-container.is-wide-mode .table-responsive-wrapper,
.relationship-graph-container.is-wide-mode .car-table-quantum {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

.relationship-graph-container.is-wide-mode .col-title,
.relationship-graph-container.is-wide-mode .quantum-video-cell {
    max-width: 480px !important;
}

.relationship-graph-container.is-wide-mode .col-rec,
.relationship-graph-container.is-wide-mode .action-plan-pill {
    max-width: 440px !important;
}

.relationship-graph-container.rtl {
    direction: rtl;
    text-align: right;
}

.relationship-graph-container.ltr {
    direction: ltr;
    text-align: left;
}

[v-cloak] {
    display: none !important;
}

/* Strict Lucide Containment Standard */
#relationship-graph-app svg.lucide,
.relationship-graph-container svg.lucide {
    width: 1em;
    height: 1em;
    display: inline-block;
    vertical-align: middle;
    flex-shrink: 0;
}

/* --- Ambient Glow --- */
.hero-ambient-glow {
    position: absolute;
    top: -120px;
    left: 50%;
    transform: translateX(-50%);
    width: 800px;
    height: 380px;
    background: radial-gradient(circle, color-mix(in srgb, var(--primary-color) 15%, transparent) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
    filter: blur(50px);
}

/* --- Top Compliance Micro Badge --- */
.hero-compliance-row {
    display: flex;
    justify-content: center;
    margin-bottom: 14px;
    position: relative;
    z-index: 2;
}

.yt-compliance-micro-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 5px 14px;
    background: var(--bg-body, rgba(0, 0, 0, 0.04));
    border: 1px solid var(--border-color);
    border-radius: 999px;
    font-size: 11.5px;
    font-weight: 700;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.03);
}

.yt-compliance-micro-pill:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-1px);
}

.yt-compliance-micro-pill i,
.yt-compliance-micro-pill svg {
    width: 13px !important;
    height: 13px !important;
    color: var(--primary-color);
}

.micro-info-icon {
    opacity: 0.6;
}

/* --- Presentation Hero (console-hero) --- */
.console-hero {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 860px;
    margin: 0 auto 32px;
    padding-top: 6px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    background: color-mix(in srgb, var(--primary-color) 12%, transparent);
    border: 1px solid color-mix(in srgb, var(--primary-color) 30%, transparent);
    border-radius: 999px;
    color: var(--primary-color);
    font-size: 12.5px;
    font-weight: 800;
    margin-bottom: 16px;
    letter-spacing: 0.03em;
    box-shadow: 0 4px 14px color-mix(in srgb, var(--primary-color) 15%, transparent);
}

.hero-badge i,
.hero-badge svg {
    width: 14px !important;
    height: 14px !important;
}

.hero-title {
    font-size: clamp(28px, 4vw, 42px);
    font-weight: 900;
    line-height: 1.25;
    color: var(--text-main);
    margin: 0 0 16px;
    letter-spacing: -0.02em;
}

.hero-title em,
.hero-title .gradient-text,
.gradient-text {
    font-style: normal;
    background: linear-gradient(135deg, var(--primary-color), color-mix(in srgb, var(--primary-color) 65%, var(--blue, #25aff4)));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

.hero-description {
    font-size: clamp(14px, 1.4vw, 16px);
    line-height: 1.6;
    color: var(--text-muted);
    max-width: 760px;
    margin: 0 auto 24px;
}

/* Hero Features Belt */
.hero-features-belt {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    margin: 0 auto;
}

.hfb-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    font-size: 12.5px;
    font-weight: 700;
    color: var(--text-main);
    box-shadow: var(--shadow-sm);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.hfb-item:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 6px 18px var(--primary-glow);
}

.hfb-icon {
    width: 15px !important;
    height: 15px !important;
    color: var(--primary-color);
}

/* --- UNIFIED SEARCH BAR --- */
.unified-search-container {
    position: relative;
    z-index: 20;
    max-width: 980px;
    margin: 0 auto 36px;
    padding: 4px;
    background: var(--card-bg);
    border: 1.5px solid var(--border-color);
    border-radius: 20px;
    box-shadow: var(--shadow-md), 0 8px 28px rgba(0, 0, 0, 0.04);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.unified-search-container.is-focused {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-lg), 0 10px 32px var(--primary-glow);
}

.unified-search-bar {
    display: flex;
    align-items: center;
    gap: 6px;
    width: 100%;
}

.search-segment {
    position: relative;
    display: flex;
    align-items: center;
}

.search-divider {
    width: 1px;
    height: 32px;
    background: var(--border-color);
    flex-shrink: 0;
}

/* Dropdown Segments */
.dropdown-segment {
    cursor: pointer;
    user-select: none;
}

.segment-content {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 14px;
    transition: background 0.2s ease;
}

.segment-content:hover {
    background: var(--bg-body, rgba(0, 0, 0, 0.03));
}

.channel-avatar-sm {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    border: 1.5px solid var(--border-color);
    flex-shrink: 0;
}

.channel-meta-inline {
    display: flex;
    flex-direction: column;
    min-width: 90px;
    max-width: 140px;
    line-height: 1.2;
}

.segment-text {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.channel-handle-sub {
    font-size: 10.5px;
    color: var(--text-muted);
    font-family: monospace;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chevron-icon,
.range-icon {
    width: 14px !important;
    height: 14px !important;
    color: var(--text-muted);
    flex-shrink: 0;
}

/* Glass Menu Dropdown */
.segment-dropdown.glass-menu {
    position: absolute;
    top: calc(100% + 10px);
    inset-inline-start: 0;
    min-width: 240px;
    background: var(--card-bg) !important;
    border: 1.5px solid var(--border-color) !important;
    border-radius: 16px;
    box-shadow: var(--shadow-lg), 0 16px 40px rgba(0, 0, 0, 0.12) !important;
    padding: 8px;
    z-index: 10000;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.dropdown-header {
    padding: 8px 12px 6px;
    font-size: 11px;
    font-weight: 800;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 4px;
}

.dropdown-list {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 260px;
    overflow-y: auto;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.18s ease;
    color: var(--text-main);
    font-size: 13px;
    font-weight: 600;
}

.dropdown-item:hover,
.dropdown-item.selected {
    background: var(--primary-light, color-mix(in srgb, var(--primary-color) 10%, transparent));
    color: var(--primary-color);
}

.dropdown-item.selected .check-icon {
    margin-inline-start: auto;
    color: var(--primary-color);
}

.dropdown-add-channel {
    border-top: 1px solid var(--border-color);
    margin-top: 6px;
    padding-top: 8px;
}

.add-channel-link {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--primary-color);
    text-decoration: none;
    font-size: 12.5px;
    font-weight: 700;
    width: 100%;
}

/* Input Segment */
.input-segment {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 12px;
}

.search-icon {
    width: 17px !important;
    height: 17px !important;
    color: var(--text-muted);
    flex-shrink: 0;
}

.unified-input {
    width: 100%;
    border: none;
    outline: none;
    background: transparent;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-main);
    font-family: inherit;
    padding: 10px 0;
}

.unified-input::placeholder {
    color: var(--text-muted);
    opacity: 0.7;
}

.sync-btn,
.input-clear-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: none;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.sync-btn:hover,
.input-clear-btn:hover {
    background: var(--bg-body, rgba(0, 0, 0, 0.05));
    color: var(--primary-color);
}

.anim-spin {
    display: inline-block;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Action Segment */
.action-segment {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-inline-end: 4px;
}

.count-credit-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    background: color-mix(in srgb, var(--primary-color) 8%, transparent);
    border: 1px solid color-mix(in srgb, var(--primary-color) 22%, transparent);
    border-radius: 999px;
    font-size: 11.5px;
    font-weight: 800;
    color: var(--primary-color);
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.cc-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--primary-color);
}

.cc-icon {
    width: 12px !important;
    height: 12px !important;
}

.round-search-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover, #ff8442));
    color: #ffffff;
    cursor: pointer;
    box-shadow: 0 4px 14px var(--primary-glow);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    flex-shrink: 0;
}

.round-search-btn:hover:not(:disabled) {
    transform: scale(1.06);
    box-shadow: 0 6px 20px var(--primary-glow);
}

.round-search-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.arrow-icon {
    width: 18px !important;
    height: 18px !important;
}

.btn-spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* --- FETCHING PROGRESS OVERLAY --- */
.car-fetching-overlay {
    max-width: 980px;
    margin: 0 auto 36px;
    padding: 16px 22px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
}

.car-fetching-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 10px;
}

.car-progress-bg {
    width: 100%;
    height: 8px;
    background: var(--bg-body, rgba(0, 0, 0, 0.06));
    border-radius: 999px;
    overflow: hidden;
}

.car-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--blue, #25aff4));
    border-radius: 999px;
    transition: width 0.3s ease;
}

/* --- CANONICAL 6 BENTO FEATURES CLUSTERS --- */
.console-features {
    position: relative;
    z-index: 1;
    max-width: 1180px;
    margin: 0 auto 40px;
}

.bento-features-cluster {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.bento-card {
    position: relative;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 24px;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
}

.bento-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-3px);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.08), 0 0 0 1px var(--primary-border-light);
}

.bc-wide-top {
    grid-column: span 2;
}

.bc-tall {
    grid-row: span 2;
}

.bc-wide-mid {
    grid-column: span 2;
}

.bento-decor-icon {
    position: absolute;
    top: -15px;
    inset-inline-end: -15px;
    font-size: 70px;
    color: var(--primary-color);
    opacity: 0.05;
    pointer-events: none;
}

.dashed-ring-wrapper {
    position: relative;
    width: 48px;
    height: 48px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dashed-ring-wrapper::before {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    border: 1.5px dashed color-mix(in srgb, var(--primary-color) 40%, transparent);
    animation: spin 16s linear infinite;
}

.bc-icon-wrapper {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: color-mix(in srgb, var(--primary-color) 10%, transparent);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
}

.bc-icon-wrapper i,
.bc-icon-wrapper svg {
    width: 20px !important;
    height: 20px !important;
}

.bc-title {
    font-size: 16px;
    font-weight: 800;
    color: var(--text-main);
    margin: 0 0 8px;
    line-height: 1.35;
}

.bc-desc {
    font-size: 13.5px;
    color: var(--text-muted);
    line-height: 1.55;
    margin: 0;
}

/* Animations */
.anim-pulse { animation: pulse 3s infinite; }
.anim-tilt { animation: tilt 5s ease-in-out infinite alternate; }
.anim-float { animation: float 4s ease-in-out infinite alternate; }
.anim-bounce { animation: bounce 4s infinite; }
.anim-glow { animation: glow 3s ease-in-out infinite alternate; }

@keyframes pulse { 0%, 100% { opacity: 0.05; } 50% { opacity: 0.12; } }
@keyframes tilt { 0% { transform: rotate(-5deg); } 100% { transform: rotate(8deg); } }
@keyframes float { 0% { transform: translateY(0); } 100% { transform: translateY(-8px); } }
@keyframes bounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
@keyframes glow { 0% { opacity: 0.04; } 100% { opacity: 0.15; } }

/* --- ACTIVE DATA RESULTS WRAPPER --- */
.cra-data-wrapper {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 32px;
}

/* Channel Header Banner */
.cra-channel-banner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--card-bg);
    border: 1.5px solid var(--border-color);
    border-radius: 20px;
    padding: 22px 28px;
    box-shadow: var(--shadow-sm);
    gap: 20px;
}

.channel-info-box {
    display: flex;
    align-items: center;
    gap: 18px;
}

.channel-banner-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary-color);
    box-shadow: 0 4px 14px var(--primary-glow);
}

.channel-name-badge {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 6px;
    flex-wrap: wrap;
}

.channel-banner-title {
    font-size: 20px;
    font-weight: 900;
    color: var(--text-main);
    margin: 0;
}

.audit-success-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    background: color-mix(in srgb, var(--success, #22c33c) 12%, transparent);
    color: var(--success, #22c33c);
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
}

.vip-exclusive-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    background: linear-gradient(135deg, color-mix(in srgb, var(--primary-color) 15%, transparent), color-mix(in srgb, #f59e0b 20%, transparent));
    border: 1px solid color-mix(in srgb, var(--primary-color) 35%, transparent);
    color: var(--primary-color);
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
}

.channel-sub-details {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-muted);
}

.channel-handle-tag {
    font-family: monospace;
    font-weight: 700;
    color: var(--text-main);
}

.dot-separator {
    opacity: 0.5;
}

/* Flow Score Circle */
.freshness-banner-card {
    display: flex;
    align-items: center;
    gap: 16px;
    background: var(--bg-body, rgba(0, 0, 0, 0.03));
    padding: 12px 20px;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    flex-shrink: 0;
}

.freshness-score-circle {
    display: flex;
    align-items: baseline;
    justify-content: center;
    width: 62px;
    height: 62px;
    border-radius: 50%;
    background: var(--card-bg);
    border: 3px solid var(--primary-color);
    font-weight: 900;
    padding-top: 15px;
    box-shadow: 0 4px 12px var(--primary-glow);
}

.freshness-score-circle.flow-high {
    border-color: var(--success, #22c33c);
    color: var(--success, #22c33c);
    box-shadow: 0 4px 12px color-mix(in srgb, var(--success, #22c33c) 25%, transparent);
}

.freshness-score-circle.flow-mid {
    border-color: var(--warning, #f59e0b);
    color: var(--warning, #f59e0b);
}

.freshness-score-circle.flow-low {
    border-color: var(--danger, #f42525);
    color: var(--danger, #f42525);
}

.score-number {
    font-size: 20px;
    line-height: 1;
}

.score-max {
    font-size: 12px;
    opacity: 0.7;
}

.freshness-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
    max-width: 220px;
}

.freshness-label {
    font-size: 11px;
    font-weight: 800;
    color: var(--text-muted);
    text-transform: uppercase;
}

.freshness-status-text {
    font-size: 12px;
    font-weight: 700;
    line-height: 1.35;
    color: var(--text-main);
}

/* Executive KPIs Grid */
.cra-kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
}

.kpi-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 18px;
    padding: 20px;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    transition: all 0.25s ease;
}

.kpi-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.kpi-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.kpi-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 10px;
}

.kpi-icon i,
.kpi-icon svg {
    width: 18px !important;
    height: 18px !important;
}

.icon-urgent { background: color-mix(in srgb, var(--danger, #f42525) 12%, transparent); color: var(--danger, #f42525); }
.icon-golden { background: color-mix(in srgb, var(--warning, #f59e0b) 12%, transparent); color: var(--warning, #f59e0b); }
.icon-lift { background: color-mix(in srgb, var(--success, #22c33c) 12%, transparent); color: var(--success, #22c33c); }
.icon-calendar { background: color-mix(in srgb, var(--blue, #25aff4) 12%, transparent); color: var(--blue, #25aff4); }

.kpi-tag {
    font-size: 11px;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: 999px;
}

.tag-urgent { background: color-mix(in srgb, var(--danger, #f42525) 10%, transparent); color: var(--danger, #f42525); }
.tag-golden { background: color-mix(in srgb, var(--warning, #f59e0b) 10%, transparent); color: var(--warning, #f59e0b); }
.tag-lift { background: color-mix(in srgb, var(--success, #22c33c) 10%, transparent); color: var(--success, #22c33c); }
.tag-calendar { background: color-mix(in srgb, var(--blue, #25aff4) 10%, transparent); color: var(--blue, #25aff4); }

.kpi-value-row {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 6px;
}

.kpi-main-number {
    font-size: 28px;
    font-weight: 900;
    font-family: monospace;
    color: var(--text-main);
    line-height: 1;
}

.kpi-sub-unit {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-muted);
}

.kpi-title {
    font-size: 14.5px;
    font-weight: 800;
    color: var(--text-main);
    margin: 0 0 4px;
}

.kpi-desc {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.45;
    margin: 0;
}

/* --- TWIN CHARTS SECTION --- */
.cra-charts-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.cra-twin-charts-grid {
    display: grid;
    grid-template-columns: 3fr 2fr;
    gap: 20px;
}

.chart-card-full {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 24px;
    box-shadow: var(--shadow-sm);
}

.chart-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
    flex-wrap: wrap;
    gap: 12px;
}

.chart-title-box {
    display: flex;
    align-items: center;
    gap: 12px;
}

.chart-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: color-mix(in srgb, var(--primary-color) 10%, transparent);
    color: var(--primary-color);
}

.chart-icon i,
.chart-icon svg {
    width: 20px !important;
    height: 20px !important;
}

.chart-main-title {
    font-size: 16px;
    font-weight: 800;
    color: var(--text-main);
    margin: 0 0 3px;
}

.chart-subtitle {
    font-size: 12px;
    color: var(--text-muted);
    margin: 0;
}

.chart-legend-box {
    display: flex;
    align-items: center;
    gap: 12px;
}

.legend-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 700;
    color: var(--text-muted);
}

.legend-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.dot-hub { background: #f59e0b; }
.dot-cluster { background: #3b82f6; }
.dot-orphan { background: #ef4444; }
.dot-purple { background: var(--primary-color); }

.chart-render-stage {
    min-height: 290px;
}

.apexcharts-container {
    width: 100%;
}

/* Insight Box */
.chart-insight-box {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 18px;
    background: color-mix(in srgb, var(--primary-color) 6%, transparent);
    border: 1px dashed color-mix(in srgb, var(--primary-color) 25%, transparent);
    border-radius: 14px;
}

.insight-icon {
    color: var(--primary-color);
    margin-top: 1px;
}

.insight-icon i,
.insight-icon svg {
    width: 18px !important;
    height: 18px !important;
}

.insight-text {
    font-size: 13px;
    font-weight: 600;
    line-height: 1.5;
    color: var(--text-main);
}

/* --- SMART LINKING OPPORTUNITIES SECTION --- */
.linking-opportunities-section {
    background: var(--card-bg);
    border: 1.5px solid var(--border-color);
    border-radius: 20px;
    padding: 24px;
    box-shadow: var(--shadow-sm);
}

.lo-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 12px;
}

.lo-title-box {
    display: flex;
    align-items: center;
    gap: 12px;
}

.lo-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: color-mix(in srgb, var(--primary-color) 12%, transparent);
    color: var(--primary-color);
}

.lo-icon i,
.lo-icon svg {
    width: 20px !important;
    height: 20px !important;
}

.lo-main-title {
    font-size: 17px;
    font-weight: 800;
    color: var(--text-main);
    margin: 0 0 3px;
}

.lo-subtitle {
    font-size: 12.5px;
    color: var(--text-muted);
    margin: 0;
}

.lo-export-all-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--bg-body, rgba(0, 0, 0, 0.04));
    border: 1px solid var(--border-color);
    border-radius: 12px;
    font-size: 12.5px;
    font-weight: 700;
    color: var(--text-main);
    cursor: pointer;
    transition: all 0.2s ease;
}

.lo-export-all-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.lo-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 18px;
}

.lo-card {
    background: var(--bg-body, rgba(0, 0, 0, 0.02));
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    transition: all 0.25s ease;
}

.lo-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}

.lo-card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.bridge-type-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    background: color-mix(in srgb, var(--primary-color) 12%, transparent);
    color: var(--primary-color);
    border-radius: 999px;
    font-size: 11.5px;
    font-weight: 800;
}

.bridge-type-badge i,
.bridge-type-badge svg {
    width: 12px !important;
    height: 12px !important;
}

.projected-lift-tag {
    font-size: 11px;
    font-weight: 800;
    color: var(--success, #22c33c);
    background: color-mix(in srgb, var(--success, #22c33c) 10%, transparent);
    padding: 3px 8px;
    border-radius: 8px;
}

.lo-videos-flow {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 10px 12px;
}

.flow-video-node {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 0;
}

.fvn-thumb {
    width: 44px;
    height: 32px;
    border-radius: 6px;
    object-fit: cover;
    flex-shrink: 0;
}

.fvn-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
    line-height: 1.25;
}

.fvn-role {
    font-size: 9.5px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 2px;
}

.role-hub { color: #f59e0b; }
.role-orphan { color: #ef4444; }

.fvn-title {
    font-size: 11.5px;
    font-weight: 700;
    color: var(--text-main);
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.fvn-views {
    font-size: 10px;
    color: var(--text-muted);
    font-family: monospace;
}

.flow-arrow-indicator {
    color: var(--text-muted);
    flex-shrink: 0;
}

.bridge-arrow-icon i,
.bridge-arrow-icon svg {
    width: 16px !important;
    height: 16px !important;
}

.lo-strategy-box {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 10px 12px;
}

.strategy-text {
    font-size: 12px;
    line-height: 1.45;
    color: var(--text-muted);
    margin: 0;
}

.lo-card-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: auto;
}

.btn-copy-comment {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 7px 12px;
    background: color-mix(in srgb, var(--primary-color) 10%, transparent);
    border: 1px solid color-mix(in srgb, var(--primary-color) 25%, transparent);
    border-radius: 10px;
    font-size: 11.5px;
    font-weight: 700;
    color: var(--primary-color);
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-copy-comment:hover {
    background: var(--primary-color);
    color: #ffffff;
}

.btn-inspect-opp {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 7px 12px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    font-size: 11.5px;
    font-weight: 700;
    color: var(--text-main);
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-inspect-opp:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* --- AUDIT HUB CONTAINER & TOOLBAR --- */
.audit-hub-container .table-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 24px;
    box-shadow: var(--shadow-sm);
}

.audit-hub-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 16px;
}

.hub-header-titles .car-card-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 18px;
    font-weight: 900;
    color: var(--text-main);
}

.hub-live-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 9px;
    background: color-mix(in srgb, var(--success, #22c33c) 12%, transparent);
    color: var(--success, #22c33c);
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
}

.pulse-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--success, #22c33c);
    box-shadow: 0 0 8px var(--success, #22c33c);
}

.hub-subtitle {
    font-size: 12.5px;
    color: var(--text-muted);
    margin: 4px 0 0;
}

/* Coverage Card */
.audit-coverage-card {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 200px;
}

.acc-info {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--text-muted);
}

.acc-numbers strong {
    color: var(--text-main);
}

.acc-pct {
    color: var(--primary-color);
    font-weight: 800;
}

.acc-bar-track {
    width: 100%;
    height: 6px;
    background: var(--bg-body, rgba(0, 0, 0, 0.06));
    border-radius: 999px;
    overflow: hidden;
}

.acc-bar-fill {
    height: 100%;
    background: var(--primary-color);
    border-radius: 999px;
    transition: width 0.3s ease;
}

/* Hub Toolbar */
.audit-hub-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.hub-filter-tabs {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.hub-tab-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    background: var(--bg-body, rgba(0, 0, 0, 0.03));
    border: 1px solid var(--border-color);
    border-radius: 12px;
    font-size: 12.5px;
    font-weight: 700;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s ease;
}

.hub-tab-btn:hover {
    color: var(--text-main);
    border-color: var(--primary-color);
}

.hub-tab-btn.active {
    background: var(--card-bg);
    color: var(--primary-color);
    border-color: var(--primary-color);
    box-shadow: 0 2px 10px var(--primary-glow);
}

.hub-tab-btn.is-golden.active { color: #f59e0b; border-color: #f59e0b; }
.hub-tab-btn.is-prime.active { color: #3b82f6; border-color: #3b82f6; }
.hub-tab-btn.is-urgent.active { color: #ef4444; border-color: #ef4444; }

.capsule-count {
    font-family: monospace;
    font-size: 11px;
    opacity: 0.8;
}

.hub-toolbar-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.hub-search-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.hub-search-icon {
    position: absolute;
    inset-inline-start: 10px;
    width: 14px !important;
    height: 14px !important;
    color: var(--text-muted);
}

.hub-search-input {
    padding: 7px 10px 7px 32px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background: var(--bg-body, rgba(0, 0, 0, 0.03));
    color: var(--text-main);
    font-size: 12.5px;
    outline: none;
    transition: border 0.2s ease;
    width: 180px;
}

.relationship-graph-container.rtl .hub-search-input {
    padding: 7px 32px 7px 10px;
}

.hub-search-input:focus {
    border-color: var(--primary-color);
}

.hub-search-clear {
    position: absolute;
    inset-inline-end: 8px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0;
}

/* Sort Dropdown */
.hub-sort-wrapper {
    position: relative;
}

.hub-sort-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 12px;
    background: var(--bg-body, rgba(0, 0, 0, 0.03));
    border: 1px solid var(--border-color);
    border-radius: 10px;
    font-size: 12.5px;
    font-weight: 700;
    color: var(--text-main);
    cursor: pointer;
}

.sort-chevron {
    width: 13px !important;
    height: 13px !important;
    color: var(--text-muted);
}

.hub-sort-menu.glass-menu {
    position: absolute;
    top: calc(100% + 6px);
    inset-inline-end: 0;
    min-width: 170px;
    background: var(--card-bg) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 12px;
    box-shadow: var(--shadow-lg) !important;
    padding: 6px;
    z-index: 10000;
    backdrop-filter: blur(12px);
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.hub-sort-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 7px 10px;
    border: none;
    background: transparent;
    border-radius: 8px;
    color: var(--text-main);
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
    text-align: inherit;
    transition: all 0.15s ease;
}

.hub-sort-item:hover,
.hub-sort-item.active {
    background: color-mix(in srgb, var(--primary-color) 10%, transparent);
    color: var(--primary-color);
}

/* View Toggle */
.hub-view-toggle {
    display: flex;
    align-items: center;
    background: var(--bg-body, rgba(0, 0, 0, 0.04));
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 2px;
}

.hvt-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 30px;
    border-radius: 8px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s ease;
}

.hvt-btn.active {
    background: var(--card-bg);
    color: var(--primary-color);
    box-shadow: var(--shadow-xs);
}

.hub-export-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 12px;
    background: var(--bg-body, rgba(0, 0, 0, 0.03));
    border: 1px solid var(--border-color);
    border-radius: 10px;
    font-size: 12.5px;
    font-weight: 700;
    color: var(--text-main);
    cursor: pointer;
    transition: all 0.2s ease;
}

.hub-export-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* --- QUANTUM TABLE STYLES --- */
.table-scroll-container {
    width: 100%;
    overflow-x: auto;
}

.cra-matrix-table.car-table-quantum {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 13px;
}

.car-table-quantum thead tr th {
    padding: 12px 14px;
    font-size: 11.5px;
    font-weight: 800;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border-bottom: 1.5px solid var(--border-color);
    white-space: nowrap;
    background: var(--card-bg);
}

.sortable-th {
    cursor: pointer;
    user-select: none;
}

.th-sort-inner {
    display: flex;
    align-items: center;
    gap: 6px;
}

.th-sort-icon-box {
    color: var(--text-muted);
    display: flex;
}

.th-sort-icon {
    width: 13px !important;
    height: 13px !important;
}

.quantum-row {
    transition: background 0.15s ease;
}

.quantum-row:hover {
    background: var(--bg-body, rgba(0, 0, 0, 0.02));
}

.quantum-row td {
    padding: 14px 14px;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
}

.vid-index-badge {
    font-family: monospace;
    font-size: 12px;
    font-weight: 800;
    color: var(--text-muted);
}

/* Video Cell */
.vid-cell {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 280px;
}

.vid-thumb-wrap {
    position: relative;
    width: 64px;
    height: 44px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
}

.vid-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.vid-play-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.vid-thumb-wrap:hover .vid-play-overlay {
    opacity: 1;
}

.vid-play-overlay i,
.vid-play-overlay svg {
    width: 16px !important;
    height: 16px !important;
}

.vid-meta-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.vid-title-link {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-main);
    text-decoration: none;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.15s ease;
}

.vid-title-link:hover {
    color: var(--primary-color);
}

.vid-meta-chips {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    color: var(--text-muted);
}

.vm-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.vm-chip i,
.vm-chip svg {
    width: 11px !important;
    height: 11px !important;
}

/* Sparklines */
.sparkline-container {
    width: 90px;
    height: 30px;
}

/* Node Type Badges */
.node-type-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 9px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    white-space: nowrap;
}

.node-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

.type-hub { background: color-mix(in srgb, #f59e0b 12%, transparent); color: #f59e0b; }
.type-hub .node-dot { background: #f59e0b; }

.type-cluster_member { background: color-mix(in srgb, #3b82f6 12%, transparent); color: #3b82f6; }
.type-cluster_member .node-dot { background: #3b82f6; }

.type-orphan { background: color-mix(in srgb, #ef4444 12%, transparent); color: #ef4444; }
.type-orphan .node-dot { background: #ef4444; }

.cluster-tag {
    font-size: 11.5px;
    font-weight: 700;
    color: var(--text-main);
    border-inline-start: 3px solid #3b82f6;
    padding-inline-start: 6px;
    white-space: nowrap;
}

.conn-count {
    font-weight: 800;
    font-size: 12.5px;
}

.in-count { color: var(--success, #22c33c); }
.out-count { color: var(--primary-color); }

/* Flow Score Cell */
.flow-score-cell {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 70px;
}

.flow-num {
    font-size: 12.5px;
    font-weight: 900;
    color: var(--text-main);
}

.flow-bar-track {
    width: 100%;
    height: 4px;
    background: var(--bg-body, rgba(0, 0, 0, 0.08));
    border-radius: 999px;
    overflow: hidden;
}

.flow-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--success, #22c33c));
    border-radius: 999px;
}

/* Action Box */
.table-rec-box {
    background: var(--bg-body, rgba(0, 0, 0, 0.03));
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 8px 10px;
    min-width: 220px;
}

.trb-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.trb-type {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 10.5px;
    font-weight: 800;
    color: var(--primary-color);
}

.trb-type i,
.trb-type svg {
    width: 11px !important;
    height: 11px !important;
}

.trb-copy-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    border: none;
    background: transparent;
    font-size: 10.5px;
    font-weight: 700;
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.15s ease;
}

.trb-copy-btn:hover {
    color: var(--primary-color);
}

.trb-copy-btn i,
.trb-copy-btn svg {
    width: 11px !important;
    height: 11px !important;
}

.copied-badge {
    color: var(--success, #22c33c);
}

.trb-text {
    font-size: 11.5px;
    line-height: 1.4;
    color: var(--text-main);
    margin: 0;
}

/* Inspect Button */
.row-act-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 12px;
    background: color-mix(in srgb, var(--primary-color) 8%, transparent);
    border: 1px solid color-mix(in srgb, var(--primary-color) 25%, transparent);
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
    color: var(--primary-color);
    cursor: pointer;
    transition: all 0.2s ease;
}

.row-act-btn:hover {
    background: var(--primary-color);
    color: #ffffff;
}

.row-act-btn i,
.row-act-btn svg {
    width: 13px !important;
    height: 13px !important;
}

/* --- STUDIO CARDS GRID --- */
.studio-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 18px;
}

.studio-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: all 0.2s ease;
}

.studio-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.sc-header {
    display: flex;
    gap: 12px;
}

.sc-thumb-box {
    position: relative;
    width: 80px;
    height: 56px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
}

.sc-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sc-num-badge {
    position: absolute;
    top: 4px;
    inset-inline-start: 4px;
    background: rgba(0, 0, 0, 0.7);
    color: #ffffff;
    font-size: 9.5px;
    font-weight: 800;
    padding: 1px 4px;
    border-radius: 4px;
    font-family: monospace;
}

.sc-type-pill {
    position: absolute;
    bottom: 4px;
    inset-inline-start: 4px;
    font-size: 9px;
    padding: 2px 6px;
}

.sc-meta-box {
    display: flex;
    flex-direction: column;
    min-width: 0;
    gap: 4px;
}

.sc-title {
    font-size: 13px;
    font-weight: 800;
    color: var(--text-main);
    margin: 0;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.sc-stats-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    color: var(--text-muted);
}

.sc-cluster-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sc-conn-badges {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 800;
    font-family: monospace;
}

.sc-conn-in { color: var(--success, #22c33c); }
.sc-conn-out { color: var(--primary-color); }

.sc-rec-box {
    background: var(--bg-body, rgba(0, 0, 0, 0.03));
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 10px;
}

.sc-rec-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.sc-rec-title {
    font-size: 11px;
    font-weight: 800;
    color: var(--primary-color);
}

.sc-rec-text {
    font-size: 11.5px;
    line-height: 1.4;
    color: var(--text-main);
    margin: 0;
}

.sc-footer {
    display: flex;
    justify-content: flex-end;
    margin-top: auto;
}

.sc-inspect-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: color-mix(in srgb, var(--primary-color) 8%, transparent);
    border: 1px solid color-mix(in srgb, var(--primary-color) 25%, transparent);
    border-radius: 8px;
    font-size: 11.5px;
    font-weight: 700;
    color: var(--primary-color);
    cursor: pointer;
}

.sc-inspect-btn:hover {
    background: var(--primary-color);
    color: #ffffff;
}

/* --- LOAD MORE PROTOCOL --- */
.table-load-more-container {
    display: flex;
    justify-content: center;
    padding: 20px 0 10px;
}

.btn-load-more-uploads {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    background: var(--card-bg);
    border: 1.5px solid var(--border-color);
    border-radius: 12px;
    font-size: 13px;
    font-weight: 700;
    color: var(--text-main);
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: all 0.2s ease;
}

.btn-load-more-uploads:hover:not(:disabled) {
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.load-more-spinner {
    width: 14px;
    height: 14px;
    border: 2px solid var(--primary-color);
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* --- CANONICAL DROPUP PAGINATION FOOTER --- */
.table-pagination-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 20px;
    margin-top: 10px;
    border-top: 1px solid var(--border-color);
    flex-wrap: wrap;
    gap: 14px;
}

.tpf-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.tpf-info-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    background: var(--bg-body, rgba(0, 0, 0, 0.03));
    border: 1px solid var(--border-color);
    border-radius: 999px;
    font-size: 12px;
    color: var(--text-muted);
}

.tpf-info-pill strong {
    color: var(--text-main);
}

/* Dropup Menu */
.custom-rows-dropdown {
    position: relative;
}

.crd-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: var(--bg-body, rgba(0, 0, 0, 0.03));
    border: 1px solid var(--border-color);
    border-radius: 10px;
    font-size: 12px;
    font-weight: 700;
    color: var(--text-main);
    cursor: pointer;
}

.crd-chevron {
    width: 12px !important;
    height: 12px !important;
    color: var(--text-muted);
}

.custom-rows-dropdown .crd-menu,
.crd-menu.glass-menu,
.crd-menu {
    position: absolute !important;
    bottom: calc(100% + 8px) !important;
    top: auto !important;
    inset-inline-start: 0 !important;
    min-width: 80px !important;
    max-width: 100px !important;
    background: var(--card-bg) !important;
    background-color: var(--card-bg) !important;
    border: 1.5px solid var(--border-color) !important;
    border-radius: 10px !important;
    box-shadow: var(--shadow-lg), 0 0 0 1px var(--primary-border-light) !important;
    z-index: 100000 !important;
    padding: 4px !important;
    backdrop-filter: blur(16px) !important;
    -webkit-backdrop-filter: blur(16px) !important;
}

.crd-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 6px 8px;
    background: transparent;
    border: none;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
    color: var(--text-main) !important;
    cursor: pointer;
    transition: background 0.15s ease;
}

.crd-item:hover,
.crd-item.selected {
    background: var(--primary-light, color-mix(in srgb, var(--primary-color) 12%, transparent)) !important;
    color: var(--primary-color) !important;
}

.crd-check {
    color: var(--primary-color) !important;
}

.tpf-pages {
    display: flex;
    align-items: center;
    gap: 8px;
}

.page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: var(--bg-body, rgba(0, 0, 0, 0.03));
    color: var(--text-main);
    cursor: pointer;
    transition: all 0.2s ease;
}

.page-btn:hover:not(:disabled) {
    background: var(--primary-color);
    color: #ffffff;
    border-color: var(--primary-color);
}

.page-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.page-current-pill {
    padding: 6px 12px;
    background: var(--bg-body, rgba(0, 0, 0, 0.03));
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 12px;
    font-weight: 800;
    color: var(--text-main);
    font-family: monospace;
}

/* --- SUBTLE YOUTUBE COMPLIANCE FOOTNOTE --- */
.yt-disclaimer-subtle {
    text-align: center;
    padding: 20px;
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.6;
}

.yt-disclaimer-subtle p {
    margin: 0 0 10px;
}

.yt-disclaimer-subtle-links {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 11.5px;
}

.yt-disclaimer-subtle-links a {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.15s ease;
}

.yt-disclaimer-subtle-links a:hover {
    color: var(--primary-color);
}

.yt-disclaimer-subtle-links i,
.yt-disclaimer-subtle-links svg {
    width: 11px !important;
    height: 11px !important;
}

/* --- ZERO-SCROLL TRAP MODALS (ROOT DOM LEVEL) --- */
html.modal-open,
body.modal-open {
    overflow: hidden !important;
    height: 100vh !important;
}

.custom-modal-backdrop {
    position: fixed !important;
    inset: 0 !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 999999 !important;
    margin: 0 !important;
    padding: 20px !important;
    background: rgba(0, 0, 0, 0.65) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-sizing: border-box !important;
}

.custom-modal-card {
    background: var(--card-bg) !important;
    border: 1.5px solid var(--border-color) !important;
    border-radius: 20px !important;
    box-shadow: var(--shadow-lg), 0 20px 60px rgba(0, 0, 0, 0.25) !important;
    width: 100%;
    max-width: 680px;
    max-height: 85vh !important;
    display: flex;
    flex-direction: column;
    overflow: hidden !important;
    animation: modalPop 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.custom-modal-card-sm {
    max-width: 520px;
}

@keyframes modalPop {
    from { opacity: 0; transform: scale(0.96) translateY(8px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.custom-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
    background: var(--card-bg);
}

.modal-badge-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.badge-priority {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 9px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
}

.badge-lift {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 9px;
    background: color-mix(in srgb, var(--primary-color) 12%, transparent);
    color: var(--primary-color);
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
}

.modal-title {
    font-size: 18px;
    font-weight: 900;
    color: var(--text-main);
    margin: 0;
}

.btn-close-modal {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: var(--bg-body, rgba(0, 0, 0, 0.05));
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.18s ease;
}

.btn-close-modal:hover {
    background: color-mix(in srgb, var(--danger, #f42525) 12%, transparent);
    color: var(--danger, #f42525);
}

.custom-modal-body {
    padding: 22px 24px;
    overflow-y: auto !important;
    display: flex;
    flex-direction: column;
    gap: 18px;
    max-height: calc(85vh - 140px);
}

.modal-video-preview {
    display: flex;
    gap: 14px;
    background: var(--bg-body, rgba(0, 0, 0, 0.02));
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 12px;
}

.modal-video-thumb {
    width: 100px;
    height: 68px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
}

.modal-video-details {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
    gap: 6px;
}

.modal-current-title {
    font-size: 13.5px;
    font-weight: 800;
    color: var(--text-main);
    margin: 0;
    line-height: 1.35;
}

.modal-stats-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 11.5px;
    color: var(--text-muted);
    flex-wrap: wrap;
}

.mstat-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* Modern Title Card in Modal */
.modal-modern-title-card {
    background: color-mix(in srgb, var(--primary-color) 6%, transparent);
    border: 1px solid color-mix(in srgb, var(--primary-color) 25%, transparent);
    border-radius: 14px;
    padding: 14px 16px;
}

.modern-card-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.card-icon {
    color: var(--primary-color);
}

.card-title {
    font-size: 12.5px;
    font-weight: 800;
    color: var(--primary-color);
}

.badge-target-year {
    margin-inline-start: auto;
    font-size: 10.5px;
    font-weight: 800;
    padding: 2px 8px;
    background: var(--card-bg);
    border-radius: 6px;
    color: var(--text-main);
}

.modern-title-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.modern-title-text {
    font-size: 13.5px;
    font-weight: 700;
    line-height: 1.45;
    color: var(--text-main);
}

.btn-copy-modal-title {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    background: var(--card-bg);
    border: 1px solid color-mix(in srgb, var(--primary-color) 30%, transparent);
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
    color: var(--primary-color);
    cursor: pointer;
    flex-shrink: 0;
}

.btn-copy-modal-title:hover {
    background: var(--primary-color);
    color: #ffffff;
}

/* Why Box */
.modal-why-box {
    background: var(--bg-body, rgba(0, 0, 0, 0.03));
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 14px;
}

.why-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.why-icon {
    color: var(--warning, #f59e0b);
}

.why-title {
    font-size: 12px;
    font-weight: 800;
    color: var(--text-main);
}

.why-body {
    font-size: 12.5px;
    line-height: 1.5;
    color: var(--text-muted);
    margin: 0;
}

/* Checklist in Modal */
.modal-checklist-wrapper {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.checklist-section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 800;
    color: var(--text-main);
    margin: 0;
}

.checklist-items-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.checklist-card {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 10px 14px;
}

.check-step-num {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: color-mix(in srgb, var(--primary-color) 12%, transparent);
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 800;
    flex-shrink: 0;
}

.step-text {
    font-size: 12.5px;
    color: var(--text-main);
    line-height: 1.4;
}

.custom-modal-footer {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 12px;
    padding: 16px 24px;
    border-top: 1px solid var(--border-color);
    flex-shrink: 0;
    background: var(--card-bg);
}

.btn-open-studio {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: var(--bg-body, rgba(0, 0, 0, 0.04));
    border: 1px solid var(--border-color);
    border-radius: 10px;
    font-size: 12.5px;
    font-weight: 700;
    color: var(--text-main);
    text-decoration: none;
    transition: all 0.18s ease;
}

.btn-open-studio:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.btn-close-modal-main {
    padding: 8px 20px;
    background: var(--primary-color);
    border: none;
    border-radius: 10px;
    font-size: 12.5px;
    font-weight: 700;
    color: #ffffff;
    cursor: pointer;
    transition: opacity 0.18s ease;
}

.btn-close-modal-main:hover {
    opacity: 0.9;
}

/* Legal Paragraph Box */
.legal-modal-content {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.legal-paragraph-box {
    background: var(--bg-body, rgba(0, 0, 0, 0.03));
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 12px 14px;
}

.legal-paragraph-box p {
    font-size: 12.5px;
    line-height: 1.6;
    color: var(--text-muted);
    margin: 0;
}

/* Sparkline Microscopic Glass Tooltip */
.spark-tooltip-quantum {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    background: var(--card-bg) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 8px;
    box-shadow: var(--shadow-sm), 0 4px 12px var(--primary-glow) !important;
    font-size: 11px;
    font-weight: 700;
    color: var(--text-main) !important;
    font-family: monospace;
    pointer-events: none;
    white-space: nowrap;
}

.spark-tooltip-quantum .stq-time { color: var(--text-muted) !important; }
.spark-tooltip-quantum .stq-val { color: var(--primary-color) !important; }

/* ApexCharts Neutralization */
#relationship-graph-app .apexcharts-tooltip,
#rgTopologyChart .apexcharts-tooltip,
#rgCtrChart .apexcharts-tooltip {
    background: var(--card-bg) !important;
    border: 1.5px solid var(--border-color) !important;
    border-radius: 12px !important;
    box-shadow: var(--shadow-lg) !important;
    color: var(--text-main) !important;
    padding: 8px 12px !important;
}

#relationship-graph-app .apexcharts-xaxistooltip,
#relationship-graph-app .apexcharts-yaxistooltip {
    display: none !important;
}

/* Responsive adjustments */
@media (max-width: 992px) {
    .bento-features-cluster { grid-template-columns: 1fr; }
    .bc-wide-top, .bc-tall, .bc-wide-mid { grid-column: span 1; grid-row: span 1; }
    .cra-kpi-grid { grid-template-columns: repeat(2, 1fr); }
    .cra-twin-charts-grid { grid-template-columns: 1fr; }
    .cra-channel-banner { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 640px) {
    .unified-search-bar { flex-direction: column; align-items: stretch; }
    .search-divider { display: none; }
    .cra-kpi-grid { grid-template-columns: 1fr; }
    .lo-cards-grid { grid-template-columns: 1fr; }
    .btn-text-hide-mobile { display: none; }
}
