/* =========================================================================
   GuinRank V7 — YouTube Playlist Intelligence & Binge-Watching Optimizer
   Standard: _agent/YOUTUBE.md (Sections 1.4, 1.9, 3.2, 7, 8, 9)
   100% Theme Variables (:root) — Zero Hardcoded Hex Overrides
   ========================================================================= */

#playlist-intelligence-app {
    position: relative;
    width: 100%;
    min-height: 100vh;
    padding: 0 16px 80px;
    color: var(--text-main);
    box-sizing: border-box;
}

#playlist-intelligence-app.is-wide-mode {
    max-width: 100% !important;
    width: 100% !important;
    padding-left: clamp(16px, 2.5vw, 40px) !important;
    padding-right: clamp(16px, 2.5vw, 40px) !important;
}

#playlist-intelligence-app.is-wide-mode .results-dashboard {
    max-width: 100% !important;
    width: 100% !important;
}

#playlist-intelligence-app.is-wide-mode .audit-hub-container {
    max-width: 100% !important;
    width: 100% !important;
}

#playlist-intelligence-app.is-wide-mode .console-features {
    max-width: 100% !important;
}

#playlist-intelligence-app.is-wide-mode .unified-search-container {
    max-width: 100% !important;
}

/* --- Global Fallback for Lucide SVGs --- */
#playlist-intelligence-app svg.lucide {
    width: 1em;
    height: 1em;
    display: inline-block;
    vertical-align: middle;
}

/* --- Ambient Glow & Loading --- */
.hero-ambient-glow {
    position: absolute;
    top: -60px;
    left: 50%;
    transform: translateX(-50%);
    width: 700px;
    height: 350px;
    background: radial-gradient(circle, var(--primary-light) 0%, transparent 70%);
    opacity: 0.5;
    pointer-events: none;
    z-index: 0;
    filter: blur(60px);
}

.tool-loading-state {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 380px;
}

.tool-content-state {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.tool-content-state.show {
    opacity: 1;
}

/* --- Presentation Hero --- */
.console-hero {
    text-align: center;
    max-width: 840px;
    margin: 20px auto 32px;
    position: relative;
    z-index: 1;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: 999px;
    background: var(--primary-light);
    border: 1px solid var(--primary-border-light);
    color: var(--primary-color);
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 16px;
}

.hero-title {
    font-size: 38px;
    font-weight: 900;
    line-height: 1.25;
    margin-bottom: 14px;
    color: var(--text-main);
}

.gradient-text {
    background: linear-gradient(135deg, var(--primary-color), var(--blue));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-description {
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-muted);
    max-width: 680px;
    margin: 0 auto 24px;
}

.hero-features-belt {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
}

.belt-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-main);
    box-shadow: var(--shadow-sm);
}

.belt-item span i, .belt-item span svg {
    color: var(--primary-color);
}

/* --- Compliance Micro-Pill --- */
.yt-compliance-micro-pill {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 6px 16px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 999px;
    max-width: fit-content;
    margin: 0 auto 20px;
    font-size: 12px;
    color: var(--text-muted);
    box-shadow: var(--shadow-sm);
    position: relative;
    z-index: 1;
}

.cmp-icon i, .cmp-icon svg {
    color: var(--primary-color);
}

.cmp-action-btn {
    background: transparent;
    border: none;
    color: var(--primary-color);
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: underline;
    padding: 0;
}

/* --- Unified Control & Action Bar --- */
.unified-search-container {
    max-width: 980px;
    margin: 0 auto 32px;
    position: relative;
    z-index: 20;
}

.unified-search-bar {
    display: flex;
    align-items: center;
    background: var(--card-bg);
    border: 1.5px solid var(--border-color);
    border-radius: 20px;
    padding: 6px 10px;
    box-shadow: var(--shadow-md), 0 0 0 1px var(--primary-border-light);
    gap: 6px;
}

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

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

.segment-trigger {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: 12px;
    cursor: pointer;
    transition: background 0.2s;
    user-select: none;
}

.segment-trigger:hover {
    background: var(--primary-light);
}

.channel-avatar-wrapper {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    overflow: hidden;
    background: var(--border-color);
    flex-shrink: 0;
}

.channel-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.segment-label-group {
    display: flex;
    flex-direction: column;
    text-align: start;
    line-height: 1.2;
}

.segment-title {
    font-size: 10.5px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
}

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

.range-icon i, .range-icon svg,
.chevron-icon i, .chevron-icon svg {
    color: var(--text-muted);
}

.chevron-icon {
    font-size: 14px;
}

.segment-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    inset-inline-start: 0;
    min-width: 260px;
    background: var(--card-bg);
    border: 1.5px solid var(--border-color);
    border-radius: 14px;
    box-shadow: var(--shadow-lg), 0 0 0 1px var(--primary-border-light);
    z-index: 1000;
    padding: 6px;
    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;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 4px;
}

.dropdown-list {
    max-height: 240px;
    overflow-y: auto;
}

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

.dropdown-item:hover, .dropdown-item.is-selected {
    background: var(--primary-light);
    color: var(--primary-color);
}

.item-avatar {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    object-fit: cover;
}

.item-info {
    display: flex;
    flex-direction: column;
    text-align: start;
    flex-grow: 1;
}

.item-name {
    font-weight: 800;
}

.item-sub {
    font-size: 10.5px;
    color: var(--text-muted);
    font-family: monospace;
}

.dropdown-footer {
    padding: 6px;
    border-top: 1px solid var(--border-color);
    margin-top: 4px;
}

.add-channel-link {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 10px;
    border-radius: 8px;
    color: var(--primary-color);
    font-size: 12px;
    font-weight: 800;
    text-decoration: none;
    transition: background 0.15s;
}

.add-channel-link:hover {
    background: var(--primary-light);
}

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

.input-icon i, .input-icon svg {
    color: var(--text-muted);
    width: 18px;
    height: 18px;
}

.search-input-field {
    width: 100%;
    background: transparent;
    border: none;
    outline: none;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-main);
}

.input-clear-btn, .sync-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 6px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: 0.15s;
}

.input-clear-btn:hover, .sync-btn:hover {
    background: var(--primary-light);
    color: var(--primary-color);
}

.credit-segment {
    padding: 0 4px;
}

.count-credit-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    background: var(--bg-body);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    font-size: 12px;
    font-weight: 800;
    color: var(--text-muted);
}

.credit-icon i, .credit-icon svg {
    color: var(--warning);
}

.credit-val {
    color: var(--text-main);
    font-family: monospace;
    font-size: 13px;
}

.round-search-btn {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-gradient-end, var(--primary-color)));
    border: none;
    color: #ffffff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 14px var(--primary-shadow);
    transition: transform 0.2s, filter 0.2s;
    flex-shrink: 0;
}

.round-search-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    filter: brightness(1.08);
}

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

.round-search-btn i, .round-search-btn svg {
    width: 20px;
    height: 20px;
}

/* RTL Auto-Flip for Search Button Arrow */
[dir="rtl"] .round-search-btn i,
[dir="rtl"] .round-search-btn svg,
html[dir="rtl"] .round-search-btn i,
html[dir="rtl"] .round-search-btn svg {
    transform: scaleX(-1);
}

/* --- Bento Features Cluster --- */
.console-features {
    max-width: 980px;
    margin: 0 auto 40px;
}

.bento-features-cluster {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: minmax(140px, auto);
    gap: 16px;
}

.bento-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 18px;
    padding: 22px;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s, border-color 0.2s;
}

.bento-card:hover {
    transform: translateY(-2px);
    border-color: var(--primary-border-light);
}

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

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

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

.dashed-ring-wrapper {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    border: 1.5px dashed var(--primary-color);
    padding: 3px;
    margin-bottom: 14px;
}

.bc-icon-wrapper {
    width: 100%;
    height: 100%;
    border-radius: 10px;
    background: var(--primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
}

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

.bc-title {
    font-size: 16px;
    font-weight: 800;
    margin-bottom: 6px;
    color: var(--text-main);
}

.bc-desc {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.5;
}

.bento-decor-icon {
    position: absolute;
    bottom: -10px;
    opacity: 0.08;
    color: var(--text-main);
    pointer-events: none;
}

.bento-decor-icon i, .bento-decor-icon svg {
    width: 80px;
    height: 80px;
}

/* RTL / LTR Decor Icon Positioning */
[dir="rtl"] .bento-decor-icon, html[dir="rtl"] .bento-decor-icon {
    left: 18px;
    right: auto;
}

[dir="ltr"] .bento-decor-icon, html[dir="ltr"] .bento-decor-icon {
    right: 18px;
    left: auto;
}

/* CSS Keyframe Animations */
.anim-spin { animation: spin 2s linear infinite; }
.anim-pulse { animation: pulse 2s ease-in-out infinite; }
.anim-float { animation: float 3s ease-in-out infinite; }
.anim-glow { animation: glow 2s alternate infinite; }
.anim-tilt { animation: tilt 3s ease-in-out infinite; }
.anim-bounce { animation: bounce 2s infinite; }

@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
@keyframes pulse { 0%, 100% { transform: scale(1); opacity: 0.08; } 50% { transform: scale(1.08); opacity: 0.16; } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes glow { from { filter: drop-shadow(0 0 2px var(--primary-color)); } to { filter: drop-shadow(0 0 12px var(--primary-color)); } }
@keyframes tilt { 0%, 100% { transform: rotate(0deg); } 50% { transform: rotate(8deg); } }
@keyframes bounce { 0%, 20%, 50%, 80%, 100% { transform: translateY(0); } 40% { transform: translateY(-10px); } 60% { transform: translateY(-5px); } }

/* --- Fetching Progress Overlay --- */
.car-fetching-overlay {
    max-width: 680px;
    margin: 30px auto;
}

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

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

.cpi-fetching-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 700;
    color: var(--text-main);
}

.loader-spin {
    animation: spin 1.5s linear infinite;
    color: var(--primary-color);
}

.cpi-fetching-pct {
    font-size: 14px;
    font-weight: 800;
    color: var(--primary-color);
    font-family: monospace;
}

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

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

/* --- Results Dashboard --- */
.results-dashboard {
    max-width: 1180px;
    margin: 0 auto;
    animation: fadeIn 0.4s ease;
}

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

/* --- Master KPIs Grid --- */
.cpi-master-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
    margin-bottom: 24px;
}

.cpi-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;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
}

.cpi-card-title {
    font-size: 13.5px;
    font-weight: 800;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.cpi-card-title.no-border {
    margin: 0;
}

.icon-pie-primary { color: var(--primary-color); }
.icon-stat-blue { color: var(--blue); }
.icon-forward-blue { color: var(--blue); }
.icon-stat-orange { color: var(--warning); }
.icon-chart-blue { color: var(--blue); }
.icon-chart-success { color: var(--success); }

.cpi-metric-hero {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.cpi-metric-val {
    font-size: 32px;
    font-weight: 900;
    color: var(--text-main);
    font-family: monospace;
    line-height: 1;
}

.cpi-metric-sub {
    font-size: 11.5px;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.sub-good {
    background: var(--success-light);
    color: var(--success);
    border: 1px solid rgba(34, 195, 60, 0.2);
}

.sub-warn {
    background: var(--icon-orange-bg);
    color: var(--warning);
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.sub-blue {
    background: var(--icon-blue-bg);
    color: var(--blue);
    border: 1px solid rgba(37, 175, 244, 0.2);
}

.sub-danger {
    background: var(--icon-danger-bg);
    color: var(--danger);
    border: 1px solid rgba(244, 37, 37, 0.2);
}

.cpi-tier-chips {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 6px;
}

.tier-chip {
    font-size: 10.5px;
    font-weight: 800;
    padding: 2px 7px;
    border-radius: 6px;
}

.tier-crit { background: var(--icon-danger-bg); color: var(--danger); }
.tier-warn { background: var(--icon-orange-bg); color: var(--warning); }
.tier-good { background: var(--success-light); color: var(--success); }

.cpi-cov-bar-wrapper {
    width: 100%;
    height: 6px;
    background: var(--bg-body);
    border-radius: 999px;
    overflow: hidden;
    margin: 8px 0;
}

.cpi-cov-bar-fill {
    height: 100%;
    background: var(--blue);
    border-radius: 999px;
    transition: width 0.4s ease;
}

.cpi-metric-desc {
    font-size: 11.5px;
    color: var(--text-muted);
    line-height: 1.4;
}

/* LED Segments Bar (Spatial Bounds Standard) */
.tc-led-segments-bar {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 4px;
    margin-top: 10px;
    overflow: hidden;
}

.tc-led-seg {
    height: 6px;
    border-radius: 3px;
    background: var(--border-color);
    transition: opacity 0.2s, box-shadow 0.2s;
    opacity: 0.35;
}

.tc-led-seg.seg-crit { background: var(--danger); }
.tc-led-seg.seg-warn { background: var(--warning); }
.tc-led-seg.seg-mod { background: var(--blue); }
.tc-led-seg.seg-good { background: var(--success); }
.tc-led-seg.seg-opt { background: var(--primary-color); }

.tc-led-seg.is-active {
    opacity: 1 !important;
    box-shadow: 0 0 8px currentColor;
}

/* --- Charts Grid --- */
.cpi-charts-grid {
    display: grid;
    grid-template-columns: 1.6fr 1.1fr;
    gap: 20px;
    margin-bottom: 24px;
}

.cpi-chart-section {
    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;
}

.cpi-chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.chart-subtitle-pill {
    font-size: 11px;
    font-weight: 800;
    color: var(--text-muted);
    background: var(--bg-body);
    padding: 3px 8px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
}

.chart-container {
    width: 100%;
    min-height: 240px;
}

.cpi-insight-box {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    background: var(--primary-light);
    border: 1px solid var(--primary-border-light);
    border-radius: 12px;
    margin-top: 14px;
    font-size: 12.5px;
    line-height: 1.5;
    color: var(--text-main);
}

.cpi-insight-icon i, .cpi-insight-icon svg {
    color: var(--primary-color);
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    margin-top: 2px;
}

.cpi-traffic-pills {
    display: flex;
    justify-content: center;
    gap: 18px;
    margin-top: 14px;
    padding-top: 10px;
    border-top: 1px solid var(--border-color);
}

.ct-pill {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12.5px;
}

.ct-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.dot-primary { background: var(--primary-color); }
.dot-danger { background: var(--danger); }

/* --- Table Hub & Command Toolbar --- */
.cpi-table-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 18px;
    padding: 24px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 28px;
}

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

.hub-title-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.hub-title-icon i, .hub-title-icon svg {
    color: var(--primary-color);
    width: 22px;
    height: 22px;
}

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

.hub-live-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    background: var(--bg-body);
    border: 1px solid var(--border-color);
    font-size: 11.5px;
    font-weight: 700;
    color: var(--text-muted);
}

.pulse-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--success);
    box-shadow: 0 0 6px var(--success);
    animation: pulse 1.8s infinite;
}

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

.hub-search-wrapper {
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--bg-body);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 6px 10px;
}

.search-ico i, .search-ico svg {
    color: var(--text-muted);
    width: 14px;
    height: 14px;
}

.hub-search-input {
    background: transparent;
    border: none;
    outline: none;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text-main);
    width: 160px;
}

.clear-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0;
}

.hub-view-toggle {
    display: flex;
    background: var(--bg-body);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 2px;
}

.hvt-btn {
    background: transparent;
    border: none;
    padding: 6px 9px;
    border-radius: 8px;
    color: var(--text-muted);
    cursor: pointer;
    transition: 0.15s;
    display: flex;
    align-items: center;
}

.hvt-btn.is-active, .hvt-btn:hover {
    background: var(--card-bg);
    color: var(--primary-color);
    box-shadow: var(--shadow-sm);
}

.hub-wide-toggle-btn, .hub-export-btn {
    background: var(--bg-body);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 700;
    color: var(--text-main);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: 0.15s;
}

.hub-wide-toggle-btn.active {
    background: var(--primary-light);
    color: var(--primary-color);
    border-color: var(--primary-border-light);
    box-shadow: 0 0 0 1px var(--primary-border-light);
}

.hub-wide-toggle-btn:hover, .hub-export-btn:hover {
    background: var(--primary-light);
    color: var(--primary-color);
    border-color: var(--primary-border-light);
}

/* Filter Pills Bar */
.filter-pills-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 18px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
}

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

.hft-pill {
    background: var(--bg-body);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 5px 12px;
    font-size: 12px;
    font-weight: 700;
    color: var(--text-muted);
    cursor: pointer;
    transition: 0.15s;
}

.hft-pill:hover, .hft-pill.is-active {
    background: var(--primary-light);
    color: var(--primary-color);
    border-color: var(--primary-border-light);
}

.hub-sort-wrapper {
    display: flex;
    align-items: center;
    gap: 6px;
    position: relative;
}

.sort-lbl {
    font-size: 11.5px;
    font-weight: 700;
    color: var(--text-muted);
}

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

/* --- Table Styling --- */
.cpi-table-wrap {
    overflow-x: auto;
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.cpi-table {
    width: 100%;
    border-collapse: collapse;
    text-align: start;
    font-size: 13px;
}

.cpi-table th {
    background: var(--bg-body);
    padding: 12px 14px;
    font-weight: 800;
    color: var(--text-muted);
    border-bottom: 1.5px solid var(--border-color);
    white-space: nowrap;
}

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

.sortable-th:hover {
    color: var(--primary-color);
}

.sortable-th i, .sortable-th svg {
    margin-inline-start: 4px;
    width: 12px;
    height: 12px;
}

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

.cpi-table tbody tr:hover {
    background: var(--primary-light);
}

.col-num {
    width: 44px;
    text-align: center;
}

.vid-index-badge {
    font-size: 11px;
    font-weight: 800;
    font-family: monospace;
    color: var(--text-muted);
    background: var(--bg-body);
    padding: 2px 6px;
    border-radius: 6px;
}

.pl-title-cell {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 260px;
}

.pl-thumb-mini {
    width: 52px;
    height: 38px;
    border-radius: 8px;
    object-fit: cover;
    background: var(--border-color);
    flex-shrink: 0;
}

.pl-meta-wrap {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.pl-title-link {
    font-weight: 800;
    color: var(--text-main);
    text-decoration: none;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

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

.pl-date-sub {
    font-size: 11px;
    color: var(--text-muted);
    font-family: monospace;
}

.pl-count-badge {
    font-family: monospace;
    font-size: 12.5px;
    font-weight: 700;
    color: var(--text-main);
    background: var(--bg-body);
    padding: 4px 8px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
}

.pl-binge-cell {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.binge-val {
    font-size: 15px;
    font-weight: 900;
    color: var(--primary-color);
    font-family: monospace;
}

.binge-sub {
    font-size: 11px;
    color: var(--text-muted);
    font-family: monospace;
}

.pl-status-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-items: flex-start;
}

.cpi-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
}

.badge-optimized { background: var(--success-light); color: var(--success); }
.badge-warning { background: var(--icon-orange-bg); color: var(--warning); }
.badge-critical { background: var(--icon-danger-bg); color: var(--danger); }
.badge-good { background: var(--icon-blue-bg); color: var(--blue); }

.meta-tag {
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
}

.tag-good { color: var(--success); }
.tag-warn { color: var(--warning); }

.table-rec-box {
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-ai-action {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-gradient-end, var(--primary-color)));
    color: #ffffff;
    border: none;
    padding: 7px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: 0.15s;
    white-space: nowrap;
}

.btn-ai-action:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
}

.trb-copy-btn {
    background: var(--bg-body);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    border-radius: 8px;
    padding: 7px 9px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: 0.15s;
}

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

/* Cards Grid View Mode */
.cpi-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.pl-grid-card {
    background: var(--bg-body);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 12px;
}

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

.pgc-thumb {
    width: 60px;
    height: 45px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
}

.pgc-title-box {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

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

.pgc-stats-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 8px;
    text-align: center;
}

.pgc-stat-lbl {
    font-size: 10px;
    color: var(--text-muted);
    font-weight: 700;
    display: block;
}

.pgc-stat-val {
    font-size: 13px;
    font-weight: 800;
    font-family: monospace;
}

.btn-ai-action.full-width {
    width: 100%;
    justify-content: center;
}

/* --- Dropup Pagination Footer (Standard 7) --- */
.table-pagination-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
}

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

.tpf-info-pill {
    background: var(--bg-body) !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-muted) !important;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
}

.custom-rows-dropdown {
    position: relative;
}

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

/* Mandatory Dropup Positioning */
.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: 90px !important;
    max-width: 120px !important;
    background: 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;
    align-items: center;
    justify-content: space-between;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
    color: var(--text-main) !important;
    cursor: pointer;
    transition: 0.15s;
}

.crd-item:hover, .crd-item.selected {
    background: var(--primary-light) !important;
    color: var(--primary-color) !important;
}

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

.tpf-right {
    display: flex;
    align-items: center;
    gap: 6px;
}

.page-btn {
    background: var(--bg-body) !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-main) !important;
    padding: 6px 10px;
    border-radius: 8px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: 0.15s;
}

.page-btn:hover:not(:disabled) {
    background: var(--primary-color) !important;
    color: #ffffff !important;
    border-color: var(--primary-color) !important;
    box-shadow: 0 4px 12px var(--primary-shadow) !important;
}

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

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

/* --- Orphaned Videos Hub --- */
.orphaned-hub-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 18px;
    padding: 24px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 28px;
}

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

.oh-title-group {
    display: flex;
    align-items: center;
    gap: 12px;
}

.oh-icon i, .oh-icon svg {
    width: 28px;
    height: 28px;
}

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

.oh-desc {
    font-size: 13px;
    color: var(--text-muted);
    margin: 0;
}

.orphaned-counter-pill {
    padding: 6px 14px;
    border-radius: 999px;
    background: var(--icon-danger-bg);
    border: 1px solid rgba(244, 37, 37, 0.3);
    color: var(--danger);
    font-size: 13px;
    font-weight: 700;
}

.topic-clusters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.tc-card {
    background: var(--bg-body);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 12px;
}

.tc-header {
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

.tc-icon-wrap {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: var(--primary-light);
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.tc-badge {
    font-size: 10.5px;
    font-weight: 800;
    color: var(--primary-color);
    background: var(--primary-light);
    padding: 2px 6px;
    border-radius: 4px;
}

.tc-name {
    font-size: 14px;
    font-weight: 800;
    color: var(--text-main);
    margin: 4px 0 0;
}

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

.tc-thumbs-belt {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding-bottom: 4px;
}

.tc-thumb {
    width: 50px;
    height: 34px;
    border-radius: 6px;
    object-fit: cover;
    flex-shrink: 0;
    background: var(--border-color);
}

.btn-create-cluster {
    width: 100%;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 8px;
    font-size: 12px;
    font-weight: 800;
    color: var(--text-main);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: 0.15s;
}

.btn-create-cluster:hover {
    background: var(--primary-light);
    color: var(--primary-color);
    border-color: var(--primary-border-light);
}

.orphaned-list-collapsible {
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
}

.olc-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: var(--bg-body);
    cursor: pointer;
    font-size: 13px;
    font-weight: 700;
    color: var(--text-main);
}

.olc-body {
    padding: 14px;
    background: var(--card-bg);
    border-top: 1px solid var(--border-color);
}

.orphaned-items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 12px;
}

.orphaned-item-card {
    display: flex;
    gap: 10px;
    align-items: center;
    background: var(--bg-body);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 8px;
}

.oic-thumb {
    width: 54px;
    height: 38px;
    border-radius: 6px;
    object-fit: cover;
    flex-shrink: 0;
}

.oic-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
    overflow: hidden;
}

.oic-title {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-main);
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

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

.oic-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 10.5px;
    color: var(--text-muted);
}

.oic-cluster-tag {
    background: var(--card-bg);
    padding: 1px 5px;
    border-radius: 4px;
    font-weight: 700;
}

/* --- Modals (Standard 9: Zero Scroll Contamination) --- */
body.modal-open {
    overflow: hidden !important;
}

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

.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 0 0 1px var(--primary-border-light) !important;
    width: 100%;
    max-width: 680px;
    max-height: 85vh !important;
    display: flex;
    flex-direction: column;
    overflow: hidden !important;
}

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

.mh-title-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
}

.mh-icon i, .mh-icon svg {
    width: 22px;
    height: 22px;
    color: var(--primary-color);
}

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

.modal-sub {
    font-size: 11.5px;
    color: var(--text-muted);
}

.modal-close-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 6px;
    border-radius: 8px;
    display: flex;
}

.modal-close-btn:hover {
    background: var(--primary-light);
    color: var(--primary-color);
}

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

/* Modal Purpose & Value Proposition Banner */
.cpi-modal-banner {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 14px 18px;
    background: linear-gradient(135deg, color-mix(in srgb, var(--primary-color) 12%, var(--card-bg)), color-mix(in srgb, var(--blue) 8%, var(--card-bg)));
    border: 1px solid var(--primary-border-light);
    border-radius: 14px;
}

.cmb-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: var(--primary-color);
    color: #ffffff;
    flex-shrink: 0;
}

.cmb-icon i, .cmb-icon svg {
    width: 18px;
    height: 18px;
}

.cmb-content h4 {
    margin: 0 0 4px;
    font-size: 13.5px;
    font-weight: 800;
    color: var(--text-main);
}

.cmb-content p {
    margin: 0;
    font-size: 12px;
    line-height: 1.55;
    color: var(--text-muted);
}

/* Strategic Advice Box */
.modal-advice-box {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: var(--primary-light);
    border: 1px solid var(--primary-border-light);
    border-radius: 12px;
    padding: 14px;
}

.mab-icon i, .mab-icon svg {
    color: var(--primary-color);
    width: 20px;
    height: 20px;
    margin-top: 2px;
    flex-shrink: 0;
}

.mab-text strong {
    font-size: 13px;
    color: var(--primary-color);
    display: block;
    margin-bottom: 4px;
}

.mab-text p {
    font-size: 12.5px;
    line-height: 1.5;
    color: var(--text-main);
    margin: 0;
}

/* Sequence List Optimizer */
.sequence-list-wrap {
    display: flex;
    flex-direction: column;
}

.sl-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

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

.sl-count-badge {
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 6px;
    background: var(--primary-light);
    color: var(--primary-color);
    border: 1px solid var(--primary-border-light);
}

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

.sl-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    background: var(--bg-body);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    transition: border-color 0.15s, background-color 0.15s;
}

.sl-item:hover {
    border-color: var(--primary-border-light);
    background: color-mix(in srgb, var(--primary-light) 30%, var(--bg-body));
}

.sl-pos {
    font-size: 11px;
    font-weight: 900;
    font-family: monospace;
    padding: 3px 7px;
    border-radius: 6px;
    background: var(--card-bg);
    color: var(--text-muted);
    border: 1px solid var(--border-color);
    flex-shrink: 0;
}

.sl-pos.pos-hook {
    background: var(--primary-color);
    color: #ffffff;
    border-color: var(--primary-color);
}

.sl-pos.pos-cta {
    background: color-mix(in srgb, var(--success) 15%, transparent);
    color: var(--success);
    border: 1px solid color-mix(in srgb, var(--success) 35%, transparent);
}

.sl-item-info {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 3px;
    overflow: hidden;
}

.sl-title-row {
    display: flex;
    align-items: center;
}

.sl-item-title {
    font-size: 12.5px;
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 700;
}

.sl-meta-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.sl-item-role {
    font-size: 10px;
    font-weight: 800;
    padding: 1px 6px;
    border-radius: 4px;
    text-transform: uppercase;
}

.role-hook_intro {
    background: var(--primary-light);
    color: var(--primary-color);
    border: 1px solid var(--primary-border-light);
}

.role-core_content {
    background: color-mix(in srgb, var(--blue) 12%, transparent);
    color: var(--blue);
    border: 1px solid color-mix(in srgb, var(--blue) 25%, transparent);
}

.role-binge_cta {
    background: color-mix(in srgb, var(--success) 12%, transparent);
    color: var(--success);
    border: 1px solid color-mix(in srgb, var(--success) 25%, transparent);
}

.sl-views-tag {
    font-size: 10.5px;
    color: var(--text-muted);
    font-family: monospace;
}

.sl-item-actions {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
}

.btn-seq-move {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 5px 7px;
    color: var(--text-muted);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: 0.15s;
}

.btn-seq-move:hover:not(:disabled) {
    background: var(--primary-light);
    color: var(--primary-color);
    border-color: var(--primary-border-light);
}

.btn-seq-move:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.modal-footer {
    flex-shrink: 0;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 16px 22px;
    border-top: 1px solid var(--border-color);
    background: var(--card-bg);
}

.btn-secondary {
    background: var(--bg-body);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 700;
    color: var(--text-main);
    cursor: pointer;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-gradient-end, var(--primary-color)));
    border: none;
    border-radius: 10px;
    padding: 8px 18px;
    font-size: 13px;
    font-weight: 800;
    color: #ffffff;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.legal-clause-card {
    background: var(--bg-body);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 14px;
}

.legal-clause-card h4 {
    margin: 0 0 6px;
    font-size: 13px;
    color: var(--text-main);
    font-weight: 800;
}

.legal-clause-card p {
    margin: 0;
    font-size: 12px;
    line-height: 1.5;
    color: var(--text-muted);
}

/* --- Disclaimer Subtle Footer --- */
.yt-disclaimer-subtle {
    max-width: 860px;
    margin: 40px auto 0;
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.yt-disc-text {
    font-size: 11.5px;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 8px;
}

.yt-disc-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    font-size: 11px;
}

.yt-disc-links a {
    color: var(--text-muted);
    text-decoration: underline;
}

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

.disc-sep {
    color: var(--border-color);
}

/* --- ApexCharts Tooltip Neutralization & Quantum Tooltips (Standard 8) --- */
#chart-cpi-binge .apexcharts-tooltip,
#chart-cpi-traffic .apexcharts-tooltip,
.apexcharts-tooltip {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
}

#chart-cpi-binge .apexcharts-tooltip::before,
#chart-cpi-binge .apexcharts-tooltip::after,
#chart-cpi-traffic .apexcharts-tooltip::before,
#chart-cpi-traffic .apexcharts-tooltip::after,
.apexcharts-tooltip::before,
.apexcharts-tooltip::after {
    display: none !important;
}

.apexcharts-xaxistooltip,
.apexcharts-yaxistooltip {
    display: none !important;
}

.cpi-tooltip-quantum {
    position: relative;
    padding: 10px 14px;
    background: color-mix(in srgb, var(--card-bg, #ffffff) 96%, transparent) !important;
    backdrop-filter: blur(14px) !important;
    -webkit-backdrop-filter: blur(14px) !important;
    border: 1px solid color-mix(in srgb, var(--primary-color) 25%, var(--border-color)) !important;
    border-radius: 12px !important;
    box-shadow: 0 10px 26px -6px rgba(0, 0, 0, 0.25), 0 0 0 1px color-mix(in srgb, var(--primary-color) 12%, transparent) !important;
    min-width: 200px;
    max-width: 260px;
    font-family: inherit;
    text-align: right;
    pointer-events: none !important;
    user-select: none;
    box-sizing: border-box;
}

[dir="ltr"] .cpi-tooltip-quantum,
.ltr .cpi-tooltip-quantum {
    text-align: left;
}

.cpi-tt-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    padding-bottom: 6px;
    border-bottom: 1px solid color-mix(in srgb, var(--border-color) 70%, transparent);
}

.cpi-tt-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--primary-color);
    flex-shrink: 0;
    box-shadow: 0 0 8px var(--primary-color);
}

.cpi-tt-dot.dot-primary {
    background: var(--primary-color);
    box-shadow: 0 0 8px var(--primary-color);
}

.cpi-tt-dot.dot-danger {
    background: var(--danger, #ef4444);
    box-shadow: 0 0 8px var(--danger, #ef4444);
}

.cpi-tt-title {
    font-size: 12px;
    font-weight: 800;
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
}

.cpi-tt-body {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-bottom: 8px;
}

.cpi-tt-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    font-size: 11px;
}

.cpi-tt-label {
    color: var(--text-muted);
}

.cpi-tt-val {
    font-weight: 700;
    color: var(--text-main);
    font-family: monospace;
}

.cpi-tt-val.text-primary {
    color: var(--primary-color) !important;
}

.cpi-tt-val small {
    font-size: 9.5px;
    font-weight: normal;
    color: var(--text-muted);
}

.cpi-tt-footer {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding-top: 6px;
    border-top: 1px dashed color-mix(in srgb, var(--border-color) 60%, transparent);
}

.cpi-tt-badge {
    display: inline-block;
    font-size: 10px;
    font-weight: 800;
    padding: 2px 7px;
    border-radius: 6px;
    line-height: 1.3;
}

.tt-badge-high {
    background: color-mix(in srgb, var(--success) 15%, transparent);
    color: var(--success);
    border: 1px solid color-mix(in srgb, var(--success) 30%, transparent);
}

.tt-badge-avg {
    background: color-mix(in srgb, var(--blue) 15%, transparent);
    color: var(--blue);
    border: 1px solid color-mix(in srgb, var(--blue) 30%, transparent);
}

.tt-badge-low {
    background: color-mix(in srgb, var(--danger, #ef4444) 15%, transparent);
    color: var(--danger, #ef4444);
    border: 1px solid color-mix(in srgb, var(--danger, #ef4444) 30%, transparent);
}

.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-shadow) !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; }

/* Responsive Media Queries */
@media (max-width: 1024px) {
    .cpi-master-grid { grid-template-columns: repeat(2, 1fr); }
    .cpi-charts-grid { grid-template-columns: 1fr; }
    .bento-features-cluster { grid-template-columns: repeat(2, 1fr); }
    .bc-wide-top, .bc-wide-mid { grid-column: span 2; }
}

@media (max-width: 768px) {
    .cpi-master-grid { grid-template-columns: 1fr; }
    .bento-features-cluster { grid-template-columns: 1fr; }
    .bc-wide-top, .bc-wide-mid, .bc-tall { grid-column: span 1; grid-row: span 1; }
    .hero-title { font-size: 28px; }
    .unified-search-bar { flex-direction: column; align-items: stretch; }
    .search-divider { display: none; }
    .round-search-btn { width: 100%; border-radius: 12px; }
    .audit-hub-header { flex-direction: column; align-items: stretch; }
    .hub-header-actions { justify-content: space-between; }
}

