/* ==========================================================================
   GuinRank V7 — YouTube Competitor Watch & Real-Time Velocity Radar
   File: wwwroot/style/pages/youtube/competitor-watch.css
   Standards: Zero-Scroll Trap Modal, 100% Theme Variables, Quantum Tooltips
   ========================================================================== */

/* --- Container & Ambient Atmosphere --- */
.competitor-watch-container {
    max-width: 1360px;
    margin: 0 auto;
    padding: 24px 20px 80px;
    position: relative;
    transition: max-width 0.3s ease;
}

.competitor-watch-container.is-wide-mode {
    max-width: 100% !important;
    width: 100% !important;
}

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

/* --- Global Lucide SVG alignment & sizing --- */
#competitor-watch-app svg.lucide {
    width: 1em;
    height: 1em;
    display: inline-block;
    vertical-align: middle;
    flex-shrink: 0;
}

.hero-ambient-glow {
    position: absolute;
    top: -60px;
    left: 50%;
    transform: translateX(-50%);
    width: 720px;
    height: 340px;
    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. Presentation Hero (console-hero) --- */
.console-hero {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 880px;
    margin: 0 auto 32px;
    padding-top: 6px;
}

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

.hero-badge i,
.hero-badge svg {
    width: 15px !important;
    height: 15px !important;
    max-width: 15px !important;
    max-height: 15px !important;
    flex-shrink: 0;
}

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

.hero-title .gradient-text {
    background: linear-gradient(135deg, var(--primary-color) 0%, #38bdf8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

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

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

.belt-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 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);
}

.belt-item i,
.belt-item svg {
    width: 14px !important;
    height: 14px !important;
    max-width: 14px !important;
    max-height: 14px !important;
    color: var(--primary-color);
    flex-shrink: 0;
}

/* --- 2. Command Hub / Control Section --- */
.cw-search-section {
    position: relative;
    z-index: 10;
    margin-bottom: 32px;
}

.cw-search-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    max-width: 1040px;
    margin-inline: auto;
}

.cw-search-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 800;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.cw-search-title i,
.cw-search-title svg {
    width: 15px !important;
    height: 15px !important;
    max-width: 15px !important;
    max-height: 15px !important;
    color: var(--primary-color);
    flex-shrink: 0;
}

.btn-tool-action {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 700;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.btn-tool-action:hover {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 15px;
    height: 15px;
}

.btn-icon i,
.btn-icon svg {
    width: 15px !important;
    height: 15px !important;
    max-width: 15px !important;
    max-height: 15px !important;
    flex-shrink: 0;
}

/* =========================================================================
   Unified Search Bar & Channel Switcher Standard
   ========================================================================= */
.unified-search-container {
    max-width: 1040px;
    margin: 0 auto;
    position: relative;
    z-index: 40;
}

.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;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.unified-search-bar:focus-within {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-md), 0 0 0 3px var(--primary-light);
}

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

.dropdown-segment {
    cursor: pointer;
}

.channel-segment {
    flex-shrink: 0;
}

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

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

.channel-avatar-wrapper {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    overflow: hidden;
    border: 1.5px solid var(--primary-border-light);
    flex-shrink: 0;
    background: var(--bg-body);
}

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

.segment-label-group {
    display: flex;
    flex-direction: column;
    text-align: start;
    min-width: 90px;
    max-width: 160px;
}

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

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

.chevron-icon {
    font-size: 14px;
    color: var(--text-muted);
    display: inline-flex;
    align-items: center;
    transition: transform 0.2s ease;
}

.chevron-icon i,
.chevron-icon svg {
    width: 14px !important;
    height: 14px !important;
    max-width: 14px !important;
    max-height: 14px !important;
    flex-shrink: 0;
}

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

.input-segment {
    flex: 1;
    min-width: 180px;
    padding: 0 8px;
    gap: 8px;
}

.input-icon {
    color: var(--text-muted);
    font-size: 16px;
    display: inline-flex;
    align-items: center;
}

.input-icon i,
.input-icon svg {
    width: 16px !important;
    height: 16px !important;
    max-width: 16px !important;
    max-height: 16px !important;
    flex-shrink: 0;
}

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

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

.input-clear-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.input-clear-btn i,
.input-clear-btn svg {
    width: 14px !important;
    height: 14px !important;
    max-width: 14px !important;
    max-height: 14px !important;
    flex-shrink: 0;
}

.round-search-btn {
    background: linear-gradient(135deg, var(--primary-color) 0%, color-mix(in srgb, var(--primary-color) 85%, #000) 100%);
    color: #fff;
    border: none;
    border-radius: 14px;
    padding: 10px 22px;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    box-shadow: 0 4px 14px color-mix(in srgb, var(--primary-color) 40%, transparent);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    font-family: inherit;
}

.round-search-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px color-mix(in srgb, var(--primary-color) 50%, transparent);
}

.round-search-btn:active:not(:disabled) {
    transform: translateY(0);
}

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

.round-search-btn i,
.round-search-btn svg {
    width: 16px !important;
    height: 16px !important;
    max-width: 16px !important;
    max-height: 16px !important;
    flex-shrink: 0;
}

.btn-content {
    display: flex;
    align-items: center;
    gap: 8px;
}

.credit-badge {
    background: rgba(255, 255, 255, 0.2);
    padding: 2px 7px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.credit-badge i,
.credit-badge svg {
    width: 12px !important;
    height: 12px !important;
    max-width: 12px !important;
    max-height: 12px !important;
    flex-shrink: 0;
}

/* Glass Menus for Channel Dropdown */
.glass-menu {
    position: absolute;
    top: calc(100% + 10px);
    inset-inline-start: 0;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    box-shadow: var(--shadow-lg), 0 0 0 1px var(--primary-border-light);
    min-width: 270px;
    max-height: 320px;
    overflow-y: auto;
    z-index: 1000;
    padding: 8px;
    backdrop-filter: blur(16px);
}

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

.dropdown-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 4px 0;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.15s ease;
}

.dropdown-item:hover {
    background: var(--primary-light);
}

.dropdown-item.is-selected {
    background: color-mix(in srgb, var(--primary-light) 75%, transparent);
    font-weight: 700;
}

.dropdown-empty {
    padding: 16px 12px;
    text-align: center;
    font-size: 12px;
    color: var(--text-muted);
}

.item-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.item-info {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

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

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

.check-icon {
    color: var(--primary-color);
    font-size: 14px;
    margin-inline-start: auto;
    display: inline-flex;
    align-items: center;
}

.check-icon i,
.check-icon svg {
    width: 14px !important;
    height: 14px !important;
    max-width: 14px !important;
    max-height: 14px !important;
    flex-shrink: 0;
}

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

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

.add-channel-link:hover {
    text-decoration: underline;
}

.add-channel-link i,
.add-channel-link svg {
    width: 14px !important;
    height: 14px !important;
    max-width: 14px !important;
    max-height: 14px !important;
    flex-shrink: 0;
}

/* Progress Overlay */
.cw-fetching-overlay {
    display: none;
    background: var(--primary-light);
    border: 1px dashed var(--primary-border-light);
    border-radius: 14px;
    padding: 18px 20px;
    margin-top: 18px;
    flex-direction: column;
    gap: 10px;
    animation: fadeInProgress 0.3s ease;
}

.cw-fetching-overlay.active {
    display: flex;
}

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

.cw-fetching-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cw-fetching-title {
    font-size: 14px;
    font-weight: 800;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

.cw-fetching-title i,
.cw-fetching-title svg {
    width: 18px !important;
    height: 18px !important;
    max-width: 18px !important;
    max-height: 18px !important;
    flex-shrink: 0;
}

.cw-fetching-pct {
    font-size: 18px;
    font-weight: 900;
    color: var(--primary-color);
    font-family: monospace;
}

.cw-progress-bg {
    width: 100%;
    height: 8px;
    background: color-mix(in srgb, var(--primary-color) 15%, transparent);
    border-radius: 10px;
    overflow: hidden;
}

.cw-progress-fill {
    height: 100%;
    background: var(--primary-color);
    border-radius: 10px;
    transition: width 0.4s ease;
}

.error-banner {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 12px;
    color: #ef4444;
    font-size: 14px;
    font-weight: 700;
    margin-top: 16px;
}

.error-banner i,
.error-banner svg {
    width: 18px !important;
    height: 18px !important;
    max-width: 18px !important;
    max-height: 18px !important;
    flex-shrink: 0;
}

.btn-close-error {
    margin-inline-start: auto;
    background: transparent;
    border: none;
    color: inherit;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-close-error i,
.btn-close-error svg {
    width: 16px !important;
    height: 16px !important;
    max-width: 16px !important;
    max-height: 16px !important;
    flex-shrink: 0;
}

/* =========================================================================
   Standard GuinRank Bento Features Cluster (6 Cards - console-features)
   ========================================================================= */
.console-features {
    max-width: 1040px;
    margin: 36px auto 0;
    position: relative;
    z-index: 1;
}

.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 ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

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

.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;
    flex-shrink: 0;
}

.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 !important;
    height: 20px !important;
    max-width: 20px !important;
    max-height: 20px !important;
    flex-shrink: 0;
}

.bc-content {
    position: relative;
    z-index: 2;
}

.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;
    margin: 0;
}

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

.bento-decor-icon i,
.bento-decor-icon svg {
    width: 80px !important;
    height: 80px !important;
    max-width: 80px !important;
    max-height: 80px !important;
    flex-shrink: 0;
}

[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;
}

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

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

/* Wide Mode & Responsive Adaptations */
.competitor-watch-container.is-wide-mode .unified-search-container,
.competitor-watch-container.is-wide-mode .console-features {
    max-width: 100% !important;
}

@media (max-width: 900px) {
    .bento-features-cluster {
        grid-template-columns: repeat(2, 1fr);
    }
    .bc-wide-top,
    .bc-wide-mid {
        grid-column: span 2;
    }
    .bc-tall {
        grid-row: span 1;
    }
}

@media (max-width: 680px) {
    .unified-search-bar {
        flex-direction: column;
        align-items: stretch;
        padding: 12px;
        border-radius: 16px;
    }
    .search-divider {
        display: none;
    }
    .channel-segment {
        width: 100%;
    }
    .segment-trigger {
        width: 100%;
        justify-content: space-between;
    }
    .input-segment {
        width: 100%;
        padding: 4px 0;
    }
    .round-search-btn {
        width: 100%;
        justify-content: center;
    }
    .bento-features-cluster {
        grid-template-columns: 1fr;
    }
    .bc-wide-top,
    .bc-wide-mid {
        grid-column: span 1;
    }
}

/* =========================================================================
   4. Active Analysis Studio (cw-data-wrapper)
   ========================================================================= */
.cw-data-wrapper {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Competitor Watchlist Bar */
.cw-watchlist-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--card-bg);
    border: 1.5px solid var(--border-color);
    border-radius: 18px;
    padding: 14px 20px;
    gap: 16px;
    flex-wrap: wrap;
    box-shadow: var(--shadow-sm);
}

.cw-bar-left {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    flex: 1;
}

.cw-watchlist-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 800;
    color: var(--text-main);
    white-space: nowrap;
}

.cw-watchlist-title i,
.cw-watchlist-title svg {
    width: 16px !important;
    height: 16px !important;
    max-width: 16px !important;
    max-height: 16px !important;
    color: var(--primary-color);
    flex-shrink: 0;
}

.cw-watchlist-pills {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.comp-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: 999px;
    background: var(--bg-body);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
    position: relative;
}

.comp-pill:hover {
    border-color: var(--primary-color);
    color: var(--text-main);
}

.comp-pill.active {
    background: var(--primary-light);
    border-color: var(--primary-color);
    color: var(--primary-color);
    box-shadow: 0 2px 8px var(--primary-glow);
}

.comp-pill.has-breakout {
    border-color: #ef4444;
}

.comp-pill-avatar {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    object-fit: cover;
}

.breakout-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #ef4444;
    box-shadow: 0 0 6px #ef4444;
    animation: bento-pulse 1.5s infinite;
}

.cw-bar-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Viral Velocity Alert Banner */
.cw-viral-alert-card {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px 24px;
    border-radius: 20px;
    background: linear-gradient(135deg, color-mix(in srgb, #ef4444 14%, var(--card-bg)) 0%, var(--card-bg) 100%);
    border: 1.5px solid color-mix(in srgb, #ef4444 40%, var(--border-color));
    box-shadow: 0 8px 30px rgba(239, 68, 68, 0.12);
    position: relative;
    overflow: hidden;
}

.alert-flame-wrapper {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ef4444;
    flex-shrink: 0;
    box-shadow: 0 0 16px rgba(239, 68, 68, 0.3);
}

.alert-flame-icon i,
.alert-flame-icon svg {
    width: 28px !important;
    height: 28px !important;
    max-width: 28px !important;
    max-height: 28px !important;
    flex-shrink: 0;
}

.alert-card-content {
    flex: 1;
    min-width: 0;
}

.alert-badge-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
    flex-wrap: wrap;
}

.alert-tag {
    background: #ef4444;
    color: #fff;
    font-size: 10px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 3px 8px;
    border-radius: 6px;
}

.alert-channel {
    font-size: 13px;
    font-weight: 800;
    color: var(--text-main);
}

.alert-time {
    font-size: 12px;
    color: var(--text-muted);
}

.alert-video-title {
    font-size: 17px;
    font-weight: 800;
    color: var(--text-main);
    margin: 0 0 6px;
    line-height: 1.35;
}

.alert-summary-text {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.5;
    margin: 0 0 10px;
}

.alert-stats-strip {
    display: flex;
    align-items: center;
    gap: 12px;
}

.stat-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
}

.stat-num {
    font-weight: 800;
}

.text-danger { color: #ef4444 !important; }
.text-warning { color: #f59e0b !important; }
.text-success { color: #10b981 !important; }

.alert-action-side {
    flex-shrink: 0;
}

.btn-open-blueprint {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border-radius: 14px;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: #fff;
    border: none;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(239, 68, 68, 0.35);
    transition: transform 0.2s, box-shadow 0.2s;
    font-family: inherit;
    white-space: nowrap;
}

.btn-open-blueprint:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.45);
}

.btn-open-blueprint i,
.btn-open-blueprint svg {
    width: 16px !important;
    height: 16px !important;
    max-width: 16px !important;
    max-height: 16px !important;
    flex-shrink: 0;
}

/* Overview KPI Grid */
.cw-kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

@media (max-width: 992px) {
    .cw-kpi-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 540px) {
    .cw-kpi-grid { grid-template-columns: 1fr; }
}

.cw-kpi-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 18px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: var(--shadow-sm);
}

.kpi-icon-wrap {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.bg-primary-soft { background: var(--primary-light); color: var(--primary-color); border: 1px solid var(--primary-border-light); }
.bg-blue-soft { background: rgba(59, 130, 246, 0.12); color: #3b82f6; border: 1px solid rgba(59, 130, 246, 0.25); }
.bg-red-soft { background: rgba(239, 68, 68, 0.12); color: #ef4444; border: 1px solid rgba(239, 68, 68, 0.25); }
.bg-emerald-soft { background: rgba(16, 185, 129, 0.12); color: #10b981; border: 1px solid rgba(16, 185, 129, 0.25); }

.kpi-icon-wrap i,
.kpi-icon-wrap svg {
    width: 22px !important;
    height: 22px !important;
    max-width: 22px !important;
    max-height: 22px !important;
    flex-shrink: 0;
}

.kpi-data {
    display: flex;
    flex-direction: column;
}

.kpi-label {
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.kpi-val {
    font-size: 22px;
    font-weight: 900;
    color: var(--text-main);
    line-height: 1.1;
}

/* 48-Hour Velocity Timeline Chart */
.cw-chart-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 24px;
    box-shadow: var(--shadow-sm);
}

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

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

.chart-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: var(--primary-light);
    border: 1px solid var(--primary-border-light);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    flex-shrink: 0;
}

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

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

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

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

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

.dot-primary { background: var(--primary-color); }
.dot-muted { background: var(--text-muted); opacity: 0.5; }

/* Monitored Videos Radar Table */
.cw-table-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 24px;
    box-shadow: var(--shadow-sm);
}

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

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

.table-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: var(--primary-light);
    border: 1px solid var(--primary-border-light);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    flex-shrink: 0;
}

.table-icon i,
.table-icon svg {
    width: 20px !important;
    height: 20px !important;
    max-width: 20px !important;
    max-height: 20px !important;
    flex-shrink: 0;
}

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

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

.table-controls-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.table-search-input {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-body);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 6px 12px;
    font-size: 13px;
    color: var(--text-main);
}

.table-search-input i,
.table-search-input svg {
    width: 14px !important;
    height: 14px !important;
    max-width: 14px !important;
    max-height: 14px !important;
    color: var(--text-muted);
    flex-shrink: 0;
}

.table-search-input input {
    border: none;
    outline: none;
    background: transparent;
    font-size: 13px;
    color: var(--text-main);
    font-family: inherit;
    width: 160px;
}

.table-clear-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    padding: 0;
}

.table-clear-btn i,
.table-clear-btn svg {
    width: 12px !important;
    height: 12px !important;
    max-width: 12px !important;
    max-height: 12px !important;
    flex-shrink: 0;
}

.table-status-tabs {
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--bg-body);
    padding: 4px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.tab-btn {
    border: none;
    background: transparent;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

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

.tab-btn.active {
    background: var(--card-bg);
    color: var(--primary-color);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.tab-btn.tab-danger.active { color: #ef4444; }
.tab-btn.tab-warning.active { color: #f59e0b; }
.tab-btn.tab-success.active { color: #10b981; }

.table-responsive-container {
    overflow-x: auto;
}

.cw-data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.cw-data-table th {
    text-align: start;
    padding: 12px 14px;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--text-muted);
    border-bottom: 1.5px solid var(--border-color);
    letter-spacing: 0.5px;
}

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

.table-video-row:hover {
    background: var(--primary-light);
}

.video-cell-flex {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 260px;
    max-width: 380px;
}

.video-thumb-wrap {
    position: relative;
    width: 86px;
    height: 48px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    background: #000;
}

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

.video-age-badge {
    position: absolute;
    bottom: 3px;
    inset-inline-end: 3px;
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    padding: 1px 4px;
    border-radius: 4px;
}

.video-title-col {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.video-title-link {
    font-size: 13px;
    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;
}

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

.video-code-tag {
    font-size: 10px;
    color: var(--text-muted);
    font-family: monospace;
    margin-top: 2px;
}

.channel-cell-flex {
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.channel-mini-avatar {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.channel-mini-title {
    font-weight: 700;
    color: var(--text-main);
}

.val-num {
    font-weight: 800;
    color: var(--text-main);
    font-family: monospace;
}

.vph-num-wrap {
    display: flex;
    flex-direction: column;
}

.vph-primary {
    font-weight: 900;
    color: var(--text-main);
    font-family: monospace;
}

.vph-base {
    font-size: 10px;
    color: var(--text-muted);
}

.velocity-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 800;
    white-space: nowrap;
}

.velocity-status-badge i,
.velocity-status-badge svg {
    width: 12px !important;
    height: 12px !important;
    max-width: 12px !important;
    max-height: 12px !important;
    flex-shrink: 0;
}

.badge-breakout {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.badge-surging {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.badge-steady {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-slow {
    background: rgba(107, 114, 128, 0.15);
    color: #6b7280;
    border: 1px solid rgba(107, 114, 128, 0.3);
}

.btn-action-blueprint {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 12px;
    background: var(--primary-light);
    border: 1px solid var(--primary-border-light);
    border-radius: 10px;
    color: var(--primary-color);
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
    white-space: nowrap;
}

.btn-action-blueprint:hover {
    background: var(--primary-color);
    color: #fff;
    box-shadow: 0 4px 12px var(--primary-glow);
}

.btn-action-blueprint i,
.btn-action-blueprint svg {
    width: 13px !important;
    height: 13px !important;
    max-width: 13px !important;
    max-height: 13px !important;
    flex-shrink: 0;
}

.table-empty-row {
    text-align: center;
    padding: 36px 16px !important;
    color: var(--text-muted);
}

.table-empty-row i,
.table-empty-row svg {
    width: 32px !important;
    height: 32px !important;
    max-width: 32px !important;
    max-height: 32px !important;
    margin-bottom: 8px;
    opacity: 0.5;
}

/* Compliance Notice Callout */
.compliance-callout-card {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 18px 20px;
    border-radius: 16px;
    background: var(--bg-body);
    border: 1px dashed var(--border-color);
}

.cmp-icon i,
.cmp-icon svg {
    width: 20px !important;
    height: 20px !important;
    max-width: 20px !important;
    max-height: 20px !important;
    color: var(--primary-color);
    flex-shrink: 0;
}

.cmp-badge {
    font-size: 11px;
    font-weight: 800;
    color: var(--primary-color);
    text-transform: uppercase;
    display: block;
    margin-bottom: 4px;
}

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

/* =========================================================================
   5. Zero-Scroll Trap Modal Architecture
   ========================================================================= */
html.modal-open,
body.modal-open {
    overflow: hidden !important;
    height: 100vh !important;
}

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

@keyframes fadeInModal {
    from { opacity: 0; }
    to { opacity: 1; }
}

.custom-modal-dialog {
    width: 100%;
    max-width: 620px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
}

.modal-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.35);
    display: flex;
    flex-direction: column;
    overflow: hidden !important;
    max-height: 85vh;
}

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

.modal-header-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.modal-icon-badge {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: var(--primary-light);
    border: 1px solid var(--primary-border-light);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    flex-shrink: 0;
}

.modal-icon-badge i,
.modal-icon-badge svg {
    width: 20px !important;
    height: 20px !important;
    max-width: 20px !important;
    max-height: 20px !important;
    flex-shrink: 0;
}

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

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

.btn-modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 6px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.btn-modal-close:hover {
    color: var(--text-main);
    background: var(--bg-body);
}

.btn-modal-close i,
.btn-modal-close svg {
    width: 18px !important;
    height: 18px !important;
    max-width: 18px !important;
    max-height: 18px !important;
    flex-shrink: 0;
}

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

.modal-video-card {
    display: flex;
    gap: 16px;
    padding: 16px;
    background: var(--bg-body);
    border-radius: 16px;
    border: 1px solid var(--border-color);
    align-items: center;
}

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

.modal-video-details {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}

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

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

.chip-item {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
}

.chip-item i,
.chip-item svg {
    width: 12px !important;
    height: 12px !important;
    max-width: 12px !important;
    max-height: 12px !important;
    flex-shrink: 0;
}

.modal-action-box,
.modal-hook-box {
    padding: 16px 18px;
    border-radius: 16px;
    background: var(--bg-body);
    border: 1px solid var(--border-color);
}

.m-box-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--primary-color);
    margin-bottom: 8px;
}

.m-box-title i,
.m-box-title svg {
    width: 14px !important;
    height: 14px !important;
    max-width: 14px !important;
    max-height: 14px !important;
    flex-shrink: 0;
}

.m-box-desc {
    font-size: 13px;
    line-height: 1.6;
    color: var(--text-main);
    margin: 0;
    font-weight: 600;
}

.hook-quote-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: var(--card-bg);
    border: 1px dashed var(--primary-border-light);
    border-radius: 12px;
    padding: 14px;
}

.hook-text {
    font-size: 13px;
    line-height: 1.6;
    color: var(--text-main);
    font-style: italic;
    margin: 0;
}

.btn-copy-hook {
    align-self: flex-end;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    background: var(--primary-light);
    border: 1px solid var(--primary-border-light);
    border-radius: 8px;
    color: var(--primary-color);
    font-size: 11px;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

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

.btn-copy-hook i,
.btn-copy-hook svg {
    width: 12px !important;
    height: 12px !important;
    max-width: 12px !important;
    max-height: 12px !important;
    flex-shrink: 0;
}

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

.btn-view-on-yt {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
}

.btn-view-on-yt:hover {
    text-decoration: underline;
}

.btn-view-on-yt i,
.btn-view-on-yt svg {
    width: 14px !important;
    height: 14px !important;
    max-width: 14px !important;
    max-height: 14px !important;
    flex-shrink: 0;
}

.btn-close-modal-main {
    padding: 8px 18px;
    border-radius: 10px;
    background: var(--bg-body);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s;
}

.btn-close-modal-main:hover {
    background: var(--border-color);
}

