/* =========================================================================
   GuinRank V7 — Audience Retention Insights (Tool 03)
   Standard: _agent/tools_architecture.md & YouTube Developer Policies
   Benchmarked against: keyword-analyzer layout & feature console hierarchy
   ========================================================================= */

.analyzer-container {
    position: relative;
    width: 100%;
    max-width: 1450px;
    margin: 0 auto;
    padding: 16px 20px 80px;
    font-family: inherit;
    transition: all 0.3s ease;
}

/* --- 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) 16%, transparent) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
    filter: blur(50px);
}

/* --- 1. Targeted Tool Loading State --- */
.tool-loading-state {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 300px;
    width: 100%;
}

.tool-content-state.none {
    display: none;
}
.tool-content-state.show {
    display: block;
}

/* --- 2. Presentation Hero (console-hero) --- */
.console-hero {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 860px;
    margin: 0 auto 32px;
    padding-top: 10px;
}
.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    background: color-mix(in srgb, var(--primary-color) 10%, transparent);
    border: 1px solid color-mix(in srgb, var(--primary-color) 25%, transparent);
    border-radius: 999px;
    color: var(--primary-color);
    font-size: 13px;
    font-weight: 800;
    margin-bottom: 18px;
    box-shadow: 0 4px 14px color-mix(in srgb, var(--primary-color) 12%, transparent);
}
.hero-badge .badge-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--primary-color);
    box-shadow: 0 0 8px var(--primary-color);
}
.hero-badge-icon {
    width: 15px;
    height: 15px;
}
.hero-title {
    font-size: 36px;
    font-weight: 900;
    line-height: 1.25;
    color: var(--text-main);
    margin-bottom: 14px;
    letter-spacing: -0.5px;
}
.hero-title em {
    font-style: normal;
    background: linear-gradient(135deg, var(--primary-color), color-mix(in srgb, var(--primary-color) 65%, #25aff4));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.hero-desc {
    font-size: 15px;
    line-height: 1.7;
    color: var(--text-muted);
    margin: 0 auto 24px;
    max-width: 740px;
}
.hero-features-belt {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
}
.hfb-item {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 14px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    font-size: 12px;
    font-weight: 700;
    color: var(--text-main);
    box-shadow: var(--shadow-sm);
}
.hfb-icon {
    width: 14px;
    height: 14px;
    color: var(--primary-color);
}

/* --- 3. Unified Search Bar (Matching keyword-analyzer) --- */
.unified-search-container {
    position: relative;
    z-index: 50;
    width: 100%;
    max-width: 980px;
    margin: 0 auto 36px;
    transition: all 0.3s ease;
}
.unified-search-container.is-focused {
    z-index: 100;
}
.analyzer-container.has-data .unified-search-container {
    max-width: 980px;
    margin-bottom: 28px;
}

.unified-search-bar {
    display: flex;
    align-items: center;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 40px;
    padding: 6px 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    z-index: 2;
}
.unified-search-container.is-focused .unified-search-bar {
    border-color: var(--primary-color);
    box-shadow: 0 15px 40px var(--primary-shadow);
    transform: translateY(-2px);
}

.search-divider {
    width: 1px;
    height: 24px;
    background: var(--border-color);
    margin: 0 8px;
    flex-shrink: 0;
}

.search-segment {
    display: flex;
    align-items: center;
    height: 100%;
}

.dropdown-segment {
    position: relative;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 20px;
    transition: background 0.2s;
    user-select: none;
}
.dropdown-segment:hover {
    background: var(--bg-body);
}

.channel-segment {
    min-width: 180px;
    max-width: 260px;
}
.range-segment {
    min-width: 120px;
}

.segment-content {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
}

.segment-text {
    font-size: 13.5px;
    font-weight: 700;
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.channel-avatar-sm {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--border-color);
    flex-shrink: 0;
}

.chevron-icon {
    width: 14px;
    height: 14px;
    color: var(--text-muted);
    flex-shrink: 0;
}

/* Dropdown Menus */
.segment-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 240px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    box-shadow: 0 18px 45px rgba(0,0,0,0.18);
    z-index: 120;
    padding: 6px;
    overflow: hidden;
}
[dir="ltr"] .segment-dropdown {
    right: auto;
    left: 0;
}
.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: 9px 12px;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.2s;
    font-size: 13px;
    font-weight: 700;
    color: var(--text-main);
}
.dropdown-item:hover {
    background: var(--bg-body);
}
.dropdown-item.selected {
    background: color-mix(in srgb, var(--primary-color) 12%, transparent);
    color: var(--primary-color);
}
.dropdown-item .check-icon {
    width: 14px;
    height: 14px;
    margin-inline-start: auto;
    color: var(--primary-color);
}

/* Input Segment */
.input-segment {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
    padding: 0 4px;
}
.input-search-icon {
    width: 18px;
    height: 18px;
    color: var(--primary-color);
    margin-inline-end: 10px;
    flex-shrink: 0;
}
.main-keyword-input {
    width: 100%;
    background: transparent;
    border: none;
    font-size: 14.5px;
    font-weight: 600;
    color: var(--text-main);
    outline: none;
    padding: 10px 0;
}
.main-keyword-input::placeholder {
    color: var(--text-muted);
    opacity: 0.75;
}

/* Count / Credit Pill */
.count-credit-pill {
    font-size: 11.5px;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: 8px;
    background: color-mix(in srgb, var(--primary-color) 12%, transparent);
    color: var(--primary-color);
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

/* Circular Search Button */
.round-search-btn {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: linear-gradient(135deg, color-mix(in srgb, var(--primary-color) 90%, #fff) 0%, var(--primary-color) 100%);
    color: #fff;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 14px var(--primary-shadow);
    flex-shrink: 0;
    margin-inline-start: 6px;
}
.round-search-btn:hover:not(:disabled) {
    transform: scale(1.06);
    box-shadow: 0 8px 22px var(--primary-shadow);
}
.round-search-btn:disabled {
    opacity: 0.65;
    cursor: not-allowed;
    transform: none;
}
.round-search-btn i {
    width: 20px;
    height: 20px;
}
.spin-icon {
    animation: bentoSpin 1.4s linear infinite;
}

/* Progress overlay during fetch */
.car-fetching-overlay {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 16px 20px;
    margin-bottom: 28px;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.car-fetching-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    font-weight: 800;
    color: var(--primary-color);
}
.car-progress-bg {
    width: 100%;
    height: 7px;
    background: color-mix(in srgb, var(--primary-color) 15%, transparent);
    border-radius: 10px;
    overflow: hidden;
}
.car-progress-fill {
    height: 100%;
    background: var(--primary-color);
    border-radius: 10px;
    transition: width 0.4s ease;
}

/* --- 4. Bento Features Clusters (console-features) --- */
.console-features {
    margin-top: 10px;
    width: 100%;
    position: relative;
    z-index: 2;
    margin-bottom: 30px;
}
.bento-features-cluster {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 20px !important;
    width: 100% !important;
    position: relative !important;
    z-index: 2 !important;
    grid-auto-flow: dense !important;
}
.bento-card {
    background: var(--card-bg) !important;
    backdrop-filter: blur(16px) !important;
    -webkit-backdrop-filter: blur(16px) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 20px !important;
    padding: 24px !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    position: relative !important;
    overflow: hidden !important;
    min-height: 200px !important;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1) !important;
    box-shadow: 0 4px 20px rgba(0,0,0,0.02) !important;
}
.bento-card:hover {
    transform: translateY(-4px) scale(1.01) !important;
    border-color: var(--primary-color) !important;
    box-shadow: 0 12px 30px rgba(0,0,0,0.08) !important;
}
.bc-wide-top { grid-column: span 2 !important; }
.bc-tall { grid-row: span 2 !important; min-height: 420px !important; }
.bc-wide-mid { grid-column: span 2 !important; }

@@media (max-width: 900px) {
    .bento-features-cluster { grid-template-columns: repeat(2, 1fr) !important; }
    .bc-wide-top, .bc-wide-mid { grid-column: span 2 !important; }
    .bc-tall { grid-row: span 1 !important; grid-column: span 1 !important; min-height: 200px !important; }
}
@@media (max-width: 600px) {
    .bento-features-cluster { grid-template-columns: 1fr !important; }
    .bc-wide-top, .bc-wide-mid, .bc-tall { grid-column: span 1 !important; }
}

.bento-decor-icon {
    position: absolute;
    top: 16px;
    left: 18px;
    right: auto;
    opacity: 0.12;
    transition: all 0.4s ease;
    pointer-events: none;
}
[dir="ltr"] .bento-decor-icon {
    right: 18px;
    left: auto;
}
[dir="rtl"] .bento-decor-icon {
    left: 18px;
    right: auto;
}
.bento-card:hover .bento-decor-icon {
    opacity: 0.32;
    transform: scale(1.15);
}
.bento-decor-icon i {
    width: 64px;
    height: 64px;
    color: var(--primary-color);
}

.bento-card-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    height: 100%;
    gap: 10px;
}
.dashed-ring-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
    width: 44px;
    height: 44px;
}
.dashed-ring-wrapper::before {
    content: "";
    position: absolute;
    top: -5px;
    left: -5px;
    right: -5px;
    bottom: -5px;
    border: 1px dashed var(--border-color);
    border-radius: 16px;
    opacity: 0.5;
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 0;
    transform-origin: center center;
}
.bento-card:hover .dashed-ring-wrapper::before {
    opacity: 1;
    transform: scale(1.1) rotate(180deg);
    border-color: var(--primary-color);
}
.bc-icon-wrapper {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--bg-body);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    transition: all 0.4s ease;
    position: relative;
    z-index: 1;
}
.bento-card:hover .bc-icon-wrapper {
    background: linear-gradient(135deg, var(--primary-color), var(--border-color));
    color: #fff;
    border-color: transparent;
    transform: scale(1.08) rotate(4deg);
}
.bc-icon-wrapper i {
    width: 20px;
    height: 20px;
}
.bc-title {
    font-size: 16px;
    font-weight: 800;
    color: var(--text-main);
    margin: 0;
}
.bc-desc {
    font-size: 13.5px;
    color: var(--text-muted);
    line-height: 1.6;
    margin: 0;
    font-weight: 500;
}

/* Animations */
.anim-float { animation: bentoFloat 3s ease-in-out infinite; }
.anim-pulse { animation: bentoPulse 2.4s ease-in-out infinite; }
.anim-spin { animation: bentoSpin 8s linear infinite; }
.anim-tilt { animation: bentoTilt 4s ease-in-out infinite; }
.anim-bounce { animation: bentoBounce 2s ease-in-out infinite; }
.anim-glow { animation: bentoGlow 2.5s ease-in-out infinite; }

@@keyframes bentoFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
@@keyframes bentoPulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.08); } }
@@keyframes bentoSpin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
@@keyframes bentoTilt { 0%, 100% { transform: rotate(0deg); } 50% { transform: rotate(8deg); } }
@@keyframes bentoBounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }
@@keyframes bentoGlow { 0%, 100% { filter: drop-shadow(0 0 2px color-mix(in srgb, var(--primary-color) 20%, transparent)); } 50% { filter: drop-shadow(0 0 8px color-mix(in srgb, var(--primary-color) 60%, transparent)); } }

/* --- 5. Results Dashboard --- */
.results-dashboard {
    margin-top: 10px;
}

/* Master KPI Cards */
.car-master-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
    margin-bottom: 24px;
}
@@media (max-width: 992px) {
    .car-master-grid { grid-template-columns: repeat(2, 1fr); }
}
@@media (max-width: 600px) {
    .car-master-grid { grid-template-columns: 1fr; }
}

.car-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 18px;
    padding: 22px;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
}
.car-card-title {
    font-size: 14px;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.car-metric-val {
    font-size: 28px;
    font-weight: 900;
    color: var(--text-main);
    font-family: monospace;
    line-height: 1;
    margin-bottom: 8px;
}
.car-metric-sub {
    font-size: 12px;
    font-weight: 800;
    padding: 4px 8px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    width: fit-content;
}
.sub-good { background: var(--success-light); color: var(--success); }
.sub-warn { background: var(--icon-orange-bg); color: var(--warning); }
.sub-bad { background: var(--icon-danger-bg); color: var(--danger); }
.car-metric-desc {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.5;
    margin-top: 10px;
}

/* Charts Grid */
.car-charts-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 20px;
    margin-bottom: 24px;
}
@@media (max-width: 992px) {
    .car-charts-grid { grid-template-columns: 1fr; }
}

/* AI Insights Box */
.ai-insight-box {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 18px;
    padding: 22px;
    box-shadow: var(--shadow-sm);
}
.ai-insight-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 900;
    color: var(--primary-color);
    margin-bottom: 12px;
}
.ai-insight-header i { width: 18px; height: 18px; }
.ai-recommendations {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 14px;
}
.ai-rec-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 14px;
    background: var(--bg-body);
    border: 1px solid var(--border-color);
    border-radius: 12px;
}
.ai-rec-item i {
    width: 18px;
    height: 18px;
    color: var(--primary-color);
    flex-shrink: 0;
    margin-top: 2px;
}
.ai-rec-text strong {
    display: block;
    font-size: 13px;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 3px;
}
.ai-rec-text span {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.5;
}

/* Table Card */
.car-table-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 18px;
    padding: 22px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 24px;
    overflow-x: auto;
}
.car-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.car-table th {
    padding: 14px 16px;
    text-align: right;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-muted);
    font-weight: 800;
    font-size: 12px;
    letter-spacing: 0.3px;
    white-space: nowrap;
}
[dir="ltr"] .car-table th,
.ltr .car-table th {
    text-align: left;
}
.car-table td {
    padding: 16px;
    border-bottom: 1px solid color-mix(in srgb, var(--border-color) 40%, transparent);
    color: var(--text-main);
    vertical-align: middle;
}
.car-table tr:hover td {
    background: color-mix(in srgb, var(--primary-color) 2.5%, transparent);
}
.car-table tr:last-child td { border-bottom: none; }

.vid-cell {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 280px;
    max-width: 420px;
}
.vid-thumb {
    width: 76px;
    height: 46px;
    border-radius: 8px;
    object-fit: cover;
    background: var(--bg-body);
    border: 1px solid var(--border-color);
    flex-shrink: 0;
}
.vid-thumb.placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
}
.vid-details {
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-width: 0;
}
.vid-title {
    font-weight: 800;
    font-size: 13px;
    line-height: 1.4;
    color: var(--text-main);
    text-decoration: none;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
.vid-title:hover {
    color: var(--primary-color);
}
.vid-meta-chips {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.vid-views-chip {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.vid-views-chip i { width: 12px; height: 12px; }

.tag-badge {
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 800;
    display: inline-block;
    white-space: nowrap;
}
.tag-success { background: var(--success-light); color: var(--success); }
.tag-warning { background: var(--icon-orange-bg); color: var(--warning); }
.tag-danger { background: var(--icon-danger-bg); color: var(--danger); }

/* Sparkline Cell */
.sparkline-container {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    min-width: 125px;
}
[dir="rtl"] .sparkline-container,
.rtl .sparkline-container {
    align-items: flex-start;
}
.spark-ret-el {
    width: 120px;
    height: 38px;
}
.spark-avg-badge {
    font-size: 10.5px;
    color: var(--text-muted);
    font-weight: 700;
    white-space: nowrap;
}
.spark-avg-badge strong {
    color: var(--text-main);
    font-family: monospace;
}

/* Table Recommendation Box */
.table-rec-box {
    background: var(--bg-body);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 10px 14px;
    min-width: 320px;
    max-width: 520px;
    transition: all 0.2s ease;
}
.table-rec-box:hover {
    border-color: color-mix(in srgb, var(--primary-color) 40%, transparent);
}
.trb-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 6px;
}
.trb-time {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    font-weight: 800;
    color: var(--primary-color);
    background: color-mix(in srgb, var(--primary-color) 10%, transparent);
    padding: 2px 8px;
    border-radius: 6px;
    font-family: monospace;
}
.trb-time i { width: 12px; height: 12px; }
.trb-copy-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    color: var(--text-main);
    cursor: pointer;
    transition: all 0.2s ease;
}
.trb-copy-btn:hover {
    color: var(--primary-color);
    border-color: var(--primary-color);
    background: color-mix(in srgb, var(--primary-color) 8%, transparent);
}
.trb-copy-btn i { width: 12px; height: 12px; }
.trb-body {
    font-size: 12px;
    line-height: 1.55;
    color: var(--text-muted);
}

/* YouTube Compliance Notice Box */
.yt-compliance-box {
    margin-top: 32px;
    padding: 20px;
    background: var(--bg-body);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    text-align: right;
    font-size: 12.5px;
    line-height: 1.7;
    color: var(--text-muted);
}
[dir="ltr"] .yt-compliance-box {
    text-align: left;
}
.yt-compliance-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 8px;
}
.yt-compliance-header i {
    width: 16px;
    height: 16px;
    color: var(--primary-color);
}
.yt-compliance-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px dashed var(--border-color);
}
.yt-comp-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 700;
    font-size: 12px;
}
.yt-comp-link:hover { text-decoration: underline; }
.yt-comp-link i { width: 13px; height: 13px; }

/* =========================================================================
   ApexCharts Quantum Tooltip Global Reset & Luxury Glassmorphic Styling
   ========================================================================= */

.analyzer-container .apexcharts-tooltip,
.analyzer-container .apexcharts-tooltip.apexcharts-theme-light,
.analyzer-container .apexcharts-tooltip.apexcharts-theme-dark,
.car-card .apexcharts-tooltip,
.car-table-card .apexcharts-tooltip,
.sparkline-container .apexcharts-tooltip,
#chart-car-benchmark .apexcharts-tooltip {
    background: transparent !important;
    background-color: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    overflow: visible !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    pointer-events: none !important;
}

/* Hide ApexCharts ugly default tooltip arrows */
.analyzer-container .apexcharts-tooltip::before,
.analyzer-container .apexcharts-tooltip::after,
#chart-car-benchmark .apexcharts-tooltip::before,
#chart-car-benchmark .apexcharts-tooltip::after,
.car-card .apexcharts-tooltip::before,
.car-card .apexcharts-tooltip::after {
    display: none !important;
}

/* Enable native page scrolling when hovering over charts */
.analyzer-container .apexcharts-canvas,
.sparkline-container .apexcharts-canvas,
.car-table-card .apexcharts-canvas {
    touch-action: pan-y !important;
}

/* Main Luxury Quantum Tooltip Card (Compact, Non-Intrusive, Fixed Docked) */
.retention-tooltip-quantum {
    position: relative;
    padding: 8px 12px;
    background: color-mix(in srgb, var(--card-bg, #ffffff) 96%, transparent);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid color-mix(in srgb, var(--primary-color) 25%, var(--border-color));
    border-radius: 10px;
    box-shadow: 0 10px 26px -6px rgba(0, 0, 0, 0.22), 0 0 0 1px color-mix(in srgb, var(--primary-color) 10%, transparent);
    min-width: 215px;
    max-width: 245px;
    font-family: inherit;
    text-align: right;
    pointer-events: none !important;
    user-select: none;
}

[dir="ltr"] .retention-tooltip-quantum,
.ltr .retention-tooltip-quantum {
    text-align: left;
}

/* Header Row: Timecode + Storytelling Phase Tag */
.rtq-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    margin-bottom: 6px;
    padding-bottom: 5px;
    border-bottom: 1px solid color-mix(in srgb, var(--border-color) 70%, transparent);
}

.rtq-time-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-family: monospace;
    font-size: 11px;
    font-weight: 900;
    color: var(--text-main);
    background: color-mix(in srgb, var(--primary-color) 8%, var(--bg-body));
    border: 1px solid color-mix(in srgb, var(--primary-color) 18%, transparent);
    padding: 1px 6px;
    border-radius: 4px;
}

.rtq-time-pill svg {
    width: 10px;
    height: 10px;
    color: var(--primary-color);
    flex-shrink: 0;
}

.rtq-phase-tag {
    font-size: 9.5px;
    font-weight: 800;
    color: var(--text-muted);
    background: var(--bg-body);
    border: 1px solid var(--border-color);
    padding: 1px 6px;
    border-radius: 4px;
    white-space: nowrap;
}

/* Metric Data Rows */
.rtq-rows {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 6px;
}

.rtq-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 3px 7px;
    background: var(--bg-body);
    border: 1px solid color-mix(in srgb, var(--border-color) 50%, transparent);
    border-radius: 6px;
    transition: background 0.15s ease;
}

.rtq-row.is-channel {
    background: color-mix(in srgb, var(--primary-color) 7%, var(--bg-body));
    border-color: color-mix(in srgb, var(--primary-color) 25%, transparent);
}

.rtq-row.is-benchmark {
    border-style: dashed;
}

.rtq-row-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
}

.rtq-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
}

.rtq-dot.channel-dot {
    background: var(--primary-color);
    box-shadow: 0 0 6px var(--primary-color);
}

.rtq-dot.bench-dot {
    background: #f59e0b;
    box-shadow: 0 0 6px #f59e0b;
}

.rtq-dot.comp-dot {
    background: #8b5cf6;
    box-shadow: 0 0 6px #8b5cf6;
}

.rtq-name {
    font-size: 10.5px;
    font-weight: 800;
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rtq-row-val {
    display: inline-flex;
    align-items: baseline;
    gap: 3px;
    flex-shrink: 0;
}

.rtq-num {
    font-family: monospace;
    font-size: 12px;
    font-weight: 900;
    color: var(--text-main);
}

.rtq-row.is-channel .rtq-num {
    color: var(--primary-color);
}

.rtq-row.is-benchmark .rtq-num {
    color: #f59e0b;
}

.rtq-row.is-compare .rtq-num {
    color: #8b5cf6;
}

/* Comparative Footer Verdict */
.rtq-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 800;
    text-align: center;
}

.rtq-footer.is-lead {
    background: var(--success-light);
    color: var(--success);
    border: 1px solid color-mix(in srgb, var(--success) 25%, transparent);
}

.rtq-footer.is-below {
    background: var(--icon-orange-bg);
    color: var(--warning);
    border: 1px solid color-mix(in srgb, var(--warning) 25%, transparent);
}

.rtq-trend-icon svg {
    width: 11px;
    height: 11px;
    vertical-align: middle;
}

/* Sleek Micro-Pill Tooltip for Table Retention Sparklines */
.gr-spark-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: color-mix(in srgb, var(--card-bg, #0f172a) 95%, transparent);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: var(--text-main, #ffffff);
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 10.5px;
    font-weight: 800;
    font-family: monospace;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.22);
    border: 1px solid var(--border-color);
    pointer-events: none !important;
    white-space: nowrap;
}
.gr-spark-pill strong {
    color: var(--primary-color);
}



/* --- Ultra-Sleek Compliance Micro-Badge --- */
.yt-compliance-micro-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 5px 14px;
    background: color-mix(in srgb, var(--primary-color) 8%, var(--bg-card, #ffffff));
    border: 1px solid color-mix(in srgb, var(--primary-color) 25%, transparent);
    border-radius: 999px;
    font-size: 11.5px;
    font-weight: 700;
    color: var(--primary-color);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 2px 8px color-mix(in srgb, var(--primary-color) 8%, transparent);
    user-select: none;
    margin-bottom: 16px;
}
.yt-compliance-micro-pill:hover {
    background: color-mix(in srgb, var(--primary-color) 15%, var(--bg-card, #ffffff));
    border-color: var(--primary-color);
    transform: translateY(-1px);
    box-shadow: 0 4px 14px color-mix(in srgb, var(--primary-color) 18%, transparent);
}
.yt-compliance-micro-pill .shield-icon {
    width: 14px;
    height: 14px;
    color: var(--primary-color);
}
.yt-compliance-micro-pill .info-icon {
    width: 12px;
    height: 12px;
    opacity: 0.7;
    margin-inline-start: 4px;
}

/* --- Subtle Footer Disclaimer --- */
.yt-disclaimer-subtle {
    text-align: center;
    font-size: 11.5px;
    color: var(--text-muted);
    padding: 24px 16px 12px;
    margin-top: 24px;
    border-top: 1px dashed var(--border-color);
    line-height: 1.8;
}
.yt-disclaimer-subtle a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 700;
    transition: opacity 0.2s;
}
.yt-disclaimer-subtle a:hover {
    text-decoration: underline;
    opacity: 0.85;
}

/* --- Segmented Filter Pills Bar --- */
.filter-pills-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 16px 0 20px;
    flex-wrap: wrap;
}
.filter-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: var(--bg-body);
    border: 1px solid var(--border-color);
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}
.filter-pill .pill-icon {
    width: 13px;
    height: 13px;
    display: inline-block;
}
.filter-pill:hover {
    color: var(--text-main);
    border-color: color-mix(in srgb, var(--primary-color) 40%, var(--border-color));
}
.filter-pill.active {
    background: color-mix(in srgb, var(--primary-color) 12%, transparent);
    border-color: var(--primary-color);
    color: var(--primary-color);
    box-shadow: 0 2px 8px color-mix(in srgb, var(--primary-color) 15%, transparent);
}

/* --- Chart Actions Toolbar --- */
.chart-actions-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}
.chart-actions-group {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.btn-action-ghost {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: var(--bg-body);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-main);
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}
.btn-action-ghost:hover {
    background: color-mix(in srgb, var(--primary-color) 10%, var(--bg-body));
    border-color: var(--primary-color);
    color: var(--primary-color);
}
.btn-action-ghost i {
    width: 14px;
    height: 14px;
}
.btn-action-ghost.active {
    background: var(--primary-color);
    color: #ffffff;
    border-color: var(--primary-color);
}

/* --- Omnibox External Video Chip --- */
.omnibox-badge-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    background: color-mix(in srgb, var(--warning) 15%, transparent);
    border: 1px solid color-mix(in srgb, var(--warning) 30%, transparent);
    border-radius: 6px;
    color: var(--warning);
    font-size: 10.5px;
    font-weight: 800;
    margin-inline-end: 6px;
    white-space: nowrap;
}

/* --- Heuristic Micro-Chips --- */
.heuristic-chips-row {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 6px;
    flex-wrap: wrap;
}
.heuristic-chip {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 2px 7px;
    border-radius: 6px;
    font-size: 10.5px;
    font-weight: 800;
    background: var(--bg-body);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
}
.heuristic-chip.warn {
    color: #f43f5e;
    border-color: color-mix(in srgb, #f43f5e 30%, transparent);
    background: color-mix(in srgb, #f43f5e 8%, transparent);
}
.heuristic-chip.good {
    color: #10b981;
    border-color: color-mix(in srgb, #10b981 30%, transparent);
    background: color-mix(in srgb, #10b981 8%, transparent);
}

/* --- Modals (Legal, Cut Sheet, A/B Compare) --- */
.modal-quantum-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(8px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.2s ease;
}
.modal-quantum-card {
    background: var(--card-bg, #ffffff);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    width: 100%;
    max-width: 680px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
    padding: 24px;
    position: relative;
}
.modal-quantum-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
}
.modal-quantum-title {
    font-size: 16px;
    font-weight: 900;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 8px;
}
.modal-close-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 6px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.modal-close-btn:hover {
    background: var(--bg-body);
    color: var(--text-main);
}
.brief-timeline-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 16px 0;
}
.brief-timeline-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 14px;
    background: var(--bg-body);
    border: 1px solid var(--border-color);
    border-radius: 10px;
}
.brief-timecode {
    font-family: monospace;
    font-size: 13px;
    font-weight: 900;
    color: var(--primary-color);
    background: color-mix(in srgb, var(--primary-color) 10%, transparent);
    padding: 3px 8px;
    border-radius: 6px;
    white-space: nowrap;
}
.brief-action-text {
    font-size: 13px;
    color: var(--text-main);
    line-height: 1.6;
}
.modal-footer-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
}

/* =========================================================================
   LUCIDE ICONS MASTER HARMONIZATION & NORMALIZATION
   Targets both svg.lucide and fallback [data-lucide] to prevent 24px blowup
   ========================================================================= */

.analyzer-container svg.lucide,
.analyzer-container i[data-lucide],
.modal-quantum-backdrop svg.lucide,
.modal-quantum-backdrop i[data-lucide] {
    display: inline-block;
    vertical-align: middle;
    width: 15px !important;
    height: 15px !important;
    stroke-width: 2;
    flex-shrink: 0;
}

/* 1. Hero Belt & Badges */
.hero-badge-icon,
svg.hero-badge-icon {
    width: 14px !important;
    height: 14px !important;
}
.hfb-icon,
svg.hfb-icon {
    width: 13px !important;
    height: 13px !important;
}
.yt-compliance-micro-pill .shield-icon,
.yt-compliance-micro-pill svg.shield-icon {
    width: 13px !important;
    height: 13px !important;
}
.yt-compliance-micro-pill .info-icon,
.yt-compliance-micro-pill svg.info-icon {
    width: 11px !important;
    height: 11px !important;
}

/* 2. Unified Search Bar Elements */
.chevron-icon,
svg.chevron-icon {
    width: 12px !important;
    height: 12px !important;
}
.check-icon,
svg.check-icon {
    width: 13px !important;
    height: 13px !important;
}
.input-search-icon,
svg.input-search-icon {
    width: 16px !important;
    height: 16px !important;
}
.round-search-btn svg.lucide,
.round-search-btn i[data-lucide] {
    width: 18px !important;
    height: 18px !important;
}

/* 3. Pre-Search Bento Cards */
.bento-decor-icon svg.lucide,
.bento-decor-icon i[data-lucide] {
    width: 44px !important;
    height: 44px !important;
    opacity: 0.12;
}
.bc-icon-wrapper svg.lucide,
.bc-icon-wrapper i[data-lucide] {
    width: 20px !important;
    height: 20px !important;
}

/* 4. Results Dashboard: Filter Pills */
.filter-pill .pill-icon,
.filter-pill svg.pill-icon,
.filter-pill svg.lucide {
    width: 13px !important;
    height: 13px !important;
}

/* 5. Master KPI Cards */
.car-card-title svg.lucide,
.car-card-title i[data-lucide] {
    width: 16px !important;
    height: 16px !important;
}
.car-metric-sub svg.lucide,
.car-metric-sub i[data-lucide] {
    width: 11px !important;
    height: 11px !important;
}

/* 6. Chart Actions Toolbar & Ghost Buttons */
.btn-action-ghost svg.lucide,
.btn-action-ghost i[data-lucide] {
    width: 13px !important;
    height: 13px !important;
}

/* 7. AI Editor Recommendations */
.ai-insight-header svg.lucide,
.ai-insight-header i[data-lucide] {
    width: 16px !important;
    height: 16px !important;
}
.ai-rec-item svg.lucide,
.ai-rec-item i[data-lucide] {
    width: 15px !important;
    height: 15px !important;
    color: var(--primary-color);
}

/* 8. Table Elements & Meta Chips */
.vid-views-chip svg.lucide,
.vid-views-chip i[data-lucide] {
    width: 11px !important;
    height: 11px !important;
}
.trb-icon,
svg.trb-icon,
.trb-time svg.lucide,
.trb-copy-btn svg.lucide {
    width: 11px !important;
    height: 11px !important;
}

/* 9. Modals */
.modal-quantum-title svg.lucide,
.modal-quantum-title i[data-lucide] {
    width: 18px !important;
    height: 18px !important;
}
.modal-close-btn svg.lucide,
.modal-close-btn i[data-lucide] {
    width: 15px !important;
    height: 15px !important;
}

/* 10. Spin Animations */
.anim-spin,
.spin-icon,
svg.anim-spin,
svg.spin-icon {
    animation: lucideSpin 1s linear infinite;
}
@keyframes lucideSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* =========================================================================
   Uploads Playlist Statistics & Load More Pagination
   ========================================================================= */
.car-table-header-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}
.uploads-stat-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: var(--bg-body);
    border: 1px solid var(--border-color);
    border-radius: 30px;
    font-size: 12px;
    color: var(--text-muted);
}
.uploads-stat-icon,
svg.uploads-stat-icon {
    width: 13px !important;
    height: 13px !important;
    color: var(--primary-color);
}
.uploads-stat-txt strong {
    color: var(--text-main);
    font-family: monospace;
    font-size: 13px;
    margin: 0 3px;
}
.playlist-code-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: color-mix(in srgb, var(--primary-color) 10%, transparent);
    border: 1px solid color-mix(in srgb, var(--primary-color) 25%, transparent);
    border-radius: 6px;
    padding: 2px 8px;
    font-family: monospace;
    font-size: 11px;
    font-weight: 700;
    color: var(--primary-color);
    letter-spacing: 0.5px;
}
.playlist-code-badge svg.lucide {
    width: 11px !important;
    height: 11px !important;
}
.table-load-more-container {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 22px 0 8px;
}
.btn-load-more-uploads {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 24px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 30px;
    color: var(--text-main);
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: var(--shadow-sm);
}
.btn-load-more-uploads:hover:not(:disabled) {
    background: color-mix(in srgb, var(--primary-color) 8%, var(--card-bg));
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px color-mix(in srgb, var(--primary-color) 15%, transparent);
}
.btn-load-more-uploads:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}
.btn-load-more-uploads svg.lucide {
    width: 14px !important;
    height: 14px !important;
}

/* =========================================================================
   VIDEO-BY-VIDEO RETENTION AUDIT HUB & STUDIO MATRIX
   ========================================================================= */

.audit-hub-container {
    padding: 24px;
    margin-top: 24px;
    border-radius: 18px;
    position: relative;
    background: var(--card-bg, #ffffff);
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}

/* --- 1. Header & Live Indicator & Channel Progress --- */
.audit-hub-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
}
.hub-header-titles {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.hub-subtitle {
    font-size: 12.5px;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.5;
}
.hub-live-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 10px;
    background: color-mix(in srgb, #10b981 12%, transparent);
    border: 1px solid color-mix(in srgb, #10b981 30%, transparent);
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    color: #10b981;
    margin-inline-start: 10px;
    vertical-align: middle;
}
.pulse-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 0 rgba(16, 185, 129, 0.6);
    animation: hubPulse 2s infinite;
}
@keyframes hubPulse {
    0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
    70% { box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
    100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* Channel Coverage Card */
.audit-coverage-card {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 10px 14px;
    background: var(--bg-body);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    min-width: 220px;
}
.acc-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 11.5px;
}
.acc-label {
    color: var(--text-muted);
    font-weight: 700;
}
.acc-numbers strong {
    color: var(--primary-color);
    font-family: monospace;
    font-size: 12.5px;
}
.acc-pct {
    color: var(--text-muted);
    font-size: 11px;
    margin-inline-start: 3px;
}
.acc-bar-track {
    width: 100%;
    height: 6px;
    background: color-mix(in srgb, var(--border-color) 70%, transparent);
    border-radius: 999px;
    overflow: hidden;
}
.acc-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), #06b6d4);
    border-radius: 999px;
    transition: width 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

/* --- 2. Studio Command Toolbar --- */
.audit-hub-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    background: var(--bg-body);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 10px 14px;
    margin-bottom: 20px;
}
.hub-search-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--card-bg, #ffffff);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 6px 12px;
    min-width: 260px;
    flex: 1 1 240px;
    max-width: 380px;
    position: relative;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.hub-search-wrapper:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary-color) 12%, transparent);
}
.hub-search-icon {
    width: 14px !important;
    height: 14px !important;
    color: var(--text-muted);
    flex-shrink: 0;
}
.hub-search-input {
    border: none;
    outline: none;
    background: transparent;
    font-size: 12.5px;
    color: var(--text-main);
    width: 100%;
    font-family: inherit;
}
.hub-search-input::placeholder {
    color: var(--text-muted);
    opacity: 0.75;
}
.hub-search-clear {
    border: none;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    padding: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
}
.hub-search-clear:hover {
    color: var(--text-main);
}
.hub-search-clear svg.lucide {
    width: 12px !important;
    height: 12px !important;
}

/* Filter Segment Tabs */
.hub-filter-tabs {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}
.hub-tab-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: var(--card-bg, #ffffff);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 11.5px;
    font-weight: 700;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}
.hub-tab-btn svg.lucide {
    width: 12px !important;
    height: 12px !important;
}
.hub-tab-btn:hover {
    color: var(--text-main);
    border-color: color-mix(in srgb, var(--primary-color) 40%, var(--border-color));
}
.hub-tab-btn.active {
    background: color-mix(in srgb, var(--primary-color) 12%, var(--card-bg, #ffffff));
    border-color: var(--primary-color);
    color: var(--primary-color);
    box-shadow: 0 2px 6px color-mix(in srgb, var(--primary-color) 12%, transparent);
}
.hub-tab-btn.is-top.active {
    background: color-mix(in srgb, #10b981 12%, var(--card-bg, #ffffff));
    border-color: #10b981;
    color: #10b981;
}
.hub-tab-btn.is-drop.active {
    background: color-mix(in srgb, #f43f5e 12%, var(--card-bg, #ffffff));
    border-color: #f43f5e;
    color: #f43f5e;
}

/* Right Control Actions */
.hub-toolbar-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
/* --- Luxury Custom Sort Dropdown Component --- */
.hub-sort-wrapper {
    position: relative;
    display: inline-block;
}

.hub-sort-trigger {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 34px;
    padding: 0 12px;
    background: var(--card-bg, #ffffff);
    border: 1px solid var(--border-color);
    border-radius: 9px;
    color: var(--text-main);
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
    outline: none;
    user-select: none;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.hub-sort-trigger:hover {
    border-color: color-mix(in srgb, var(--primary-color) 60%, var(--border-color));
    color: var(--text-main);
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.06);
}

.hub-sort-wrapper.is-open .hub-sort-trigger {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary-color) 15%, transparent);
}

.hub-sort-icon-box {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.hub-sort-icon {
    width: 13px !important;
    height: 13px !important;
    color: var(--primary-color);
    flex-shrink: 0;
}

.hub-sort-current-text {
    max-width: 170px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hub-sort-chevron {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    transition: transform 0.25s ease;
}

.hub-sort-chevron svg.lucide {
    width: 12px !important;
    height: 12px !important;
}

.hub-sort-wrapper.is-open .hub-sort-chevron {
    transform: rotate(180deg);
    color: var(--primary-color);
}

/* Floating Luxury Dropdown Menu */
.hub-sort-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    inset-inline-end: 0;
    min-width: 240px;
    background: var(--card-bg, #ffffff);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: 0 14px 38px rgba(0, 0, 0, 0.14), 0 4px 12px rgba(0, 0, 0, 0.06);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    z-index: 120;
    padding: 6px;
    animation: hubSortMenuIn 0.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes hubSortMenuIn {
    from {
        opacity: 0;
        transform: translateY(-6px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.hub-sort-dropdown-title {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px 8px;
    font-size: 10.5px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    border-bottom: 1px solid color-mix(in srgb, var(--border-color) 70%, transparent);
    margin-bottom: 4px;
}

.hub-sort-dropdown-title svg.lucide {
    width: 11px !important;
    height: 11px !important;
}

.hub-sort-options-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
    max-height: 280px;
    overflow-y: auto;
}

.hub-sort-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 7px 10px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-main);
    transition: all 0.15s ease;
    user-select: none;
}

.hub-sort-option .hso-main {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.hub-sort-option .hso-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    transition: color 0.15s ease;
}

.hub-sort-option .hso-icon svg.lucide {
    width: 13px !important;
    height: 13px !important;
}

.hub-sort-option .hso-label {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hub-sort-option .hso-check {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
}

.hub-sort-option .hso-check svg.lucide {
    width: 13px !important;
    height: 13px !important;
}

.hub-sort-option:hover {
    background: color-mix(in srgb, var(--primary-color) 8%, var(--card-bg, #ffffff));
    color: var(--primary-color);
}

.hub-sort-option:hover .hso-icon {
    color: var(--primary-color);
}

.hub-sort-option.is-selected {
    background: color-mix(in srgb, var(--primary-color) 12%, var(--card-bg, #ffffff));
    color: var(--primary-color);
    font-weight: 800;
}

.hub-sort-option.is-selected .hso-icon {
    color: var(--primary-color);
}

.hub-view-toggle {
    display: inline-flex;
    align-items: center;
    background: var(--card-bg, #ffffff);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 2px;
}
.hub-view-btn {
    border: none;
    background: transparent;
    color: var(--text-muted);
    padding: 5px 8px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}
.hub-view-btn svg.lucide {
    width: 14px !important;
    height: 14px !important;
}
.hub-view-btn:hover {
    color: var(--text-main);
}
.hub-view-btn.active {
    background: var(--primary-color);
    color: #ffffff;
}

.hub-export-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 34px;
    padding: 0 12px;
    background: var(--card-bg, #ffffff);
    border: 1px solid var(--border-color);
    border-radius: 9px;
    font-size: 11.5px;
    font-weight: 700;
    color: var(--text-main);
    cursor: pointer;
    transition: all 0.2s ease;
}
.hub-export-btn svg.lucide {
    width: 13px !important;
    height: 13px !important;
}
.hub-export-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* Wide Screen Toggle Button */
.hub-wide-toggle-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 34px;
    padding: 0 11px;
    background: var(--card-bg, #ffffff);
    border: 1px solid var(--border-color);
    border-radius: 9px;
    font-size: 11.5px;
    font-weight: 700;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s ease;
    outline: none;
    user-select: none;
}
.hub-wide-toggle-btn svg.lucide {
    width: 13px !important;
    height: 13px !important;
}
.hub-wide-toggle-btn:hover {
    color: var(--primary-color);
    border-color: var(--primary-color);
    background: color-mix(in srgb, var(--primary-color) 6%, var(--card-bg, #ffffff));
}
.hub-wide-toggle-btn.active {
    background: color-mix(in srgb, var(--primary-color) 12%, var(--card-bg, #ffffff));
    border-color: var(--primary-color);
    color: var(--primary-color);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary-color) 15%, transparent);
}

/* --- 3. View Mode A: Quantum Table Styling --- */
.audit-table-wrapper {
    overflow-x: auto;
    border-radius: 12px;
    border: 1px solid var(--border-color);
}
.car-table-quantum {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 13px;
    text-align: start;
}
.car-table-quantum thead tr {
    background: color-mix(in srgb, var(--bg-body) 60%, var(--card-bg, #ffffff));
}
.car-table-quantum th {
    padding: 12px 14px;
    font-size: 11.5px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border-color);
    white-space: nowrap;
}
.car-table-quantum th.sortable-th {
    cursor: pointer;
    user-select: none;
    transition: color 0.2s;
}
.car-table-quantum th.sortable-th:hover {
    color: var(--primary-color);
}
.th-sort-inner {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.th-sort-icon {
    width: 12px !important;
    height: 12px !important;
}

.car-table-quantum tbody tr.audit-table-row {
    transition: background-color 0.2s ease, transform 0.2s ease;
}
.car-table-quantum tbody tr.audit-table-row:hover {
    background-color: color-mix(in srgb, var(--primary-color) 4%, var(--card-bg, #ffffff));
}
.car-table-quantum td {
    padding: 12px 14px;
    vertical-align: middle;
    border-bottom: 1px solid var(--border-color);
}
.car-table-quantum tbody tr:last-child td {
    border-bottom: none;
}

/* Column Dimensions & Details */
.th-num, .col-num { 
    width: 48px; 
    min-width: 44px; 
    max-width: 52px; 
    text-align: center; 
    padding-left: 6px !important;
    padding-right: 6px !important;
}
.vid-index-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: monospace;
    font-size: 11px;
    font-weight: 800;
    color: var(--text-muted);
    background: color-mix(in srgb, var(--border-color) 40%, var(--bg-body));
    padding: 2px 6px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    transition: all 0.2s ease;
}
tr.audit-table-row:hover .vid-index-badge {
    color: var(--primary-color);
    border-color: var(--primary-color);
    background: color-mix(in srgb, var(--primary-color) 10%, var(--card-bg, #ffffff));
}

.th-video, .col-title { min-width: 260px; max-width: 380px; }
.th-hook, .col-hook { min-width: 120px; }
.th-curve, .col-curve { min-width: 140px; }
.th-telemetry, .col-telemetry { min-width: 110px; }
.th-rec, .col-rec { min-width: 240px; }
.th-actions, .col-actions { 
    min-width: 120px !important; 
    white-space: nowrap !important; 
    text-align: center !important; 
}

/* Video Thumbnail Cell */
.vid-cell {
    display: flex;
    align-items: center;
    gap: 12px;
}
.vid-thumb-container {
    width: 96px;
    height: 54px;
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    background: #000;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}
.vid-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.vid-thumb.placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.4);
}
.vid-duration-badge {
    position: absolute;
    bottom: 3px;
    right: 4px;
    background: rgba(0, 0, 0, 0.82);
    backdrop-filter: blur(4px);
    color: #ffffff;
    font-size: 9.5px;
    font-weight: 800;
    font-family: monospace;
    padding: 1px 4px;
    border-radius: 3px;
    line-height: 1.2;
    pointer-events: none;
}
.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;
    text-decoration: none;
}
.vid-thumb-container:hover .vid-play-overlay {
    opacity: 1;
}
.vid-play-overlay svg.lucide {
    width: 18px !important;
    height: 18px !important;
}

.vid-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}
.vid-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-main);
    text-decoration: none;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.2s;
}
.vid-title:hover {
    color: var(--primary-color);
}
.vid-meta-chips {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}
.micro-tag {
    font-size: 10px !important;
    padding: 1px 6px !important;
}
.vid-views-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 10.5px;
    color: var(--text-muted);
    font-family: monospace;
}

/* Hook Rate Gauge */
.hook-gauge-cell {
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.hgc-val {
    font-size: 15px;
    font-weight: 900;
    font-family: monospace;
}
.hgc-val.c-success, .hgc-val.badge-success { color: #10b981; }
.hgc-val.c-warning, .hgc-val.badge-warning { color: #f59e0b; }
.hgc-val.c-danger, .hgc-val.badge-danger { color: #f43f5e; }

.hgc-progress-track {
    width: 100%;
    height: 6px;
    background: color-mix(in srgb, var(--border-color) 70%, transparent);
    border-radius: 999px;
    overflow: hidden;
    position: relative;
    margin: 4px 0;
}
.hgc-progress-fill {
    height: 100%;
    border-radius: 999px;
    transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    background: #10b981;
}
.hgc-progress-fill.c-success, .hgc-progress-fill.badge-success { 
    background: linear-gradient(90deg, #10b981, #34d399) !important; 
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.4);
}
.hgc-progress-fill.c-warning, .hgc-progress-fill.badge-warning { 
    background: linear-gradient(90deg, #f59e0b, #fbbf24) !important; 
    box-shadow: 0 0 8px rgba(245, 158, 11, 0.4);
}
.hgc-progress-fill.c-danger, .hgc-progress-fill.badge-danger { 
    background: linear-gradient(90deg, #f43f5e, #fb7185) !important; 
    box-shadow: 0 0 8px rgba(244, 63, 94, 0.4);
}

.hgc-caption {
    font-size: 11px;
    font-weight: 700;
}
.hgc-caption.c-success, .hgc-caption.badge-success { color: #10b981; }
.hgc-caption.c-warning, .hgc-caption.badge-warning { color: #f59e0b; }
.hgc-caption.c-danger, .hgc-caption.badge-danger { color: #f43f5e; }

/* Sparkline in Table */
.sparkline-container {
    width: 140px;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.spark-ret-el {
    width: 140px;
    height: 38px;
}
.spark-avg-badge {
    font-size: 10.5px;
    color: var(--text-muted);
    margin-top: 2px;
}
.spark-avg-badge strong {
    color: var(--text-main);
    font-family: monospace;
}

/* Telemetry Stack */
.telemetry-stack {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.telemetry-pill {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 2px 7px;
    border-radius: 6px;
    font-size: 10.5px;
    font-weight: 800;
    background: var(--bg-body);
    border: 1px solid var(--border-color);
}
.telemetry-pill .tel-label {
    color: var(--text-muted);
}
.telemetry-pill .tel-val {
    font-family: monospace;
    color: var(--text-main);
}
.telemetry-pill.warn {
    border-color: color-mix(in srgb, #f43f5e 30%, transparent);
    background: color-mix(in srgb, #f43f5e 8%, transparent);
}
.telemetry-pill.warn .tel-val {
    color: #f43f5e;
}
.telemetry-pill.good {
    border-color: color-mix(in srgb, #10b981 30%, transparent);
    background: color-mix(in srgb, #10b981 8%, transparent);
}
.telemetry-pill.good .tel-val {
    color: #10b981;
}

/* Table Recommendation Box */
.table-rec-box {
    background: var(--bg-body);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 7px 10px;
    font-size: 11.5px;
}
.trb-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 3px;
}
.trb-time {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-family: monospace;
    font-weight: 800;
    color: var(--primary-color);
    font-size: 10.5px;
}
.trb-copy-btn {
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-size: 10px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 1px 5px;
    border-radius: 4px;
    transition: all 0.2s;
}
.trb-copy-btn:hover {
    background: var(--card-bg, #ffffff);
    color: var(--text-main);
}
.trb-copy-btn.is-copied {
    color: #10b981;
    background: color-mix(in srgb, #10b981 12%, transparent);
}
.trb-body {
    color: var(--text-muted);
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Row Quick Actions */
.row-actions-group {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}
.row-act-btn {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    background: var(--card-bg, #ffffff);
    color: var(--text-muted);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}
.row-act-btn svg.lucide {
    width: 13px !important;
    height: 13px !important;
}
.row-act-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: color-mix(in srgb, var(--primary-color) 8%, var(--card-bg, #ffffff));
    transform: translateY(-1px);
}

/* --- 4. View Mode B: Visual Studio Cards Grid --- */
.studio-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
    gap: 18px;
}
.studio-card {
    background: var(--card-bg, #ffffff);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}
.studio-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    border-color: color-mix(in srgb, var(--primary-color) 35%, var(--border-color));
}

.sc-thumb-wrapper {
    position: relative;
    aspect-ratio: 16 / 9;
    background: #000;
    overflow: hidden;
}
.sc-thumb-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.35s ease;
}
.studio-card:hover .sc-thumb-img {
    transform: scale(1.04);
}
.sc-thumb-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.4);
}
.sc-duration-badge {
    position: absolute;
    bottom: 6px;
    right: 6px;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(4px);
    color: #ffffff;
    font-size: 10px;
    font-weight: 800;
    font-family: monospace;
    padding: 2px 6px;
    border-radius: 4px;
    pointer-events: none;
}
.sc-type-pill {
    position: absolute;
    top: 6px;
    left: 6px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 7px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 800;
    backdrop-filter: blur(6px);
}
.sc-type-pill.is-short {
    background: rgba(245, 158, 11, 0.9);
    color: #ffffff;
}
.sc-type-pill.is-long {
    background: rgba(16, 185, 129, 0.9);
    color: #ffffff;
}
.sc-type-pill svg.lucide {
    width: 11px !important;
    height: 11px !important;
}

.sc-thumb-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s ease;
}
.sc-thumb-wrapper:hover .sc-thumb-overlay {
    opacity: 1;
}
.sc-play-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    color: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
    transition: transform 0.2s ease;
}
.sc-play-btn:hover {
    transform: scale(1.1);
}
.sc-play-btn svg.lucide {
    width: 16px !important;
    height: 16px !important;
}

/* Card Body */
.sc-body {
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
}
.sc-title {
    font-size: 13.5px;
    font-weight: 800;
    color: var(--text-main);
    text-decoration: none;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.2s;
}
.sc-title:hover {
    color: var(--primary-color);
}

.sc-kpi-ribbon {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    background: var(--bg-body);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 6px;
    text-align: center;
}
.sc-kpi-box {
    display: flex;
    flex-direction: column;
    gap: 1px;
}
.sc-kpi-lbl {
    font-size: 9.5px;
    color: var(--text-muted);
    font-weight: 700;
    text-transform: uppercase;
}
.sc-kpi-val {
    font-size: 13px;
    font-weight: 900;
    font-family: monospace;
    color: var(--text-main);
}
.sc-kpi-val.c-success, .sc-kpi-val.badge-success { color: #10b981; }
.sc-kpi-val.c-warning, .sc-kpi-val.badge-warning { color: #f59e0b; }
.sc-kpi-val.c-danger, .sc-kpi-val.badge-danger { color: #f43f5e; }

.sc-sparkline-wrapper {
    height: 42px;
    width: 100%;
}
.sc-spark-el {
    width: 100%;
    height: 42px;
}

.sc-chips-row {
    display: flex;
    align-items: center;
    gap: 5px;
    flex-wrap: wrap;
}

.sc-rec-box {
    background: color-mix(in srgb, var(--primary-color) 4%, var(--bg-body));
    border: 1px dashed color-mix(in srgb, var(--primary-color) 25%, transparent);
    border-radius: 8px;
    padding: 8px 10px;
    font-size: 11.5px;
}
.sc-rec-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 4px;
}
.sc-rec-time {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-family: monospace;
    font-weight: 800;
    color: var(--primary-color);
    font-size: 10.5px;
}
.sc-rec-txt {
    color: var(--text-muted);
    margin: 0;
    line-height: 1.45;
    font-size: 11px;
}

.sc-footer-actions {
    margin-top: auto;
    padding-top: 10px;
    border-top: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 6px;
}
.sc-act-btn {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 7px 10px;
    border-radius: 8px;
    font-size: 11.5px;
    font-weight: 700;
    cursor: pointer;
    background: var(--primary-color);
    color: #ffffff;
    border: 1px solid var(--primary-color);
    transition: all 0.2s ease;
}
.sc-act-btn svg.lucide {
    width: 12px !important;
    height: 12px !important;
}
.sc-act-btn:hover {
    filter: brightness(1.08);
}
.sc-act-btn.is-ghost {
    background: var(--bg-body);
    color: var(--text-main);
    border-color: var(--border-color);
}
.sc-act-btn.is-ghost:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* --- 5. Empty State --- */
.hub-empty-state {
    padding: 48px 20px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    border: 1px dashed var(--border-color);
    border-radius: 12px;
    background: var(--bg-body);
}
.hes-icon {
    width: 44px !important;
    height: 44px !important;
    color: var(--text-muted);
    opacity: 0.5;
}
.hub-empty-state h4 {
    margin: 6px 0 0;
    font-size: 15px;
    font-weight: 800;
    color: var(--text-main);
}
.hub-empty-state p {
    margin: 0 0 10px;
    font-size: 12.5px;
    color: var(--text-muted);
    max-width: 420px;
}

/* --- 6. Load More Quantum Box --- */
.load-more-quantum-box {
    display: flex;
    justify-content: center;
    width: 100%;
}
.load-more-badge {
    font-size: 11px;
    font-family: monospace;
    font-weight: 700;
    background: color-mix(in srgb, var(--primary-color) 15%, transparent);
    color: var(--primary-color);
    padding: 2px 7px;
    border-radius: 6px;
    margin-inline-start: 6px;
}

/* --- Responsive Adaptations --- */
@media (max-width: 900px) {
    .audit-hub-header {
        flex-direction: column;
        align-items: stretch;
    }
    .audit-coverage-card {
        min-width: 100%;
    }
    .audit-hub-toolbar {
        flex-direction: column;
        align-items: stretch;
    }
    .hub-search-wrapper {
        max-width: 100%;
    }
    .hub-filter-tabs {
        overflow-x: auto;
        padding-bottom: 4px;
        flex-wrap: nowrap;
    }
    .hub-toolbar-actions {
        justify-content: space-between;
    }
/* --- Wide Screen Studio Mode --- */
#audience-retention-app.is-wide-mode {
    max-width: 100% !important;
    width: 100% !important;
}
#audience-retention-app.is-wide-mode .page-container.analyzer-container {
    max-width: 100% !important;
    width: 100% !important;
    padding-left: clamp(16px, 2.5vw, 40px) !important;
    padding-right: clamp(16px, 2.5vw, 40px) !important;
}
#audience-retention-app.is-wide-mode .results-dashboard {
    max-width: 100% !important;
    width: 100% !important;
}
#audience-retention-app.is-wide-mode .audit-hub-container {
    max-width: 100% !important;
    width: 100% !important;
}
#audience-retention-app.is-wide-mode .col-title {
    max-width: 460px;
}
#audience-retention-app.is-wide-mode .col-rec {
    max-width: 420px;
}

/* Studio Card Rank Badge */
.sc-rank-badge {
    position: absolute;
    top: 6px;
    inset-inline-end: 6px;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    color: #ffffff;
    font-size: 10px;
    font-weight: 900;
    font-family: monospace;
    padding: 2px 6px;
    border-radius: 5px;
    z-index: 2;
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}


