/* ==========================================================================
   YouTube Opportunity Finder (Tool 29) - GuinRank V7 Canonical Suite
   Standard: Canonical YouTube Suite Standard (_agent/YOUTUBE.md)
   ========================================================================== */

.opportunity-finder-container {
    width: 100%;
    max-width: 1380px;
    margin: 0 auto;
    padding: 24px 20px 80px;
    font-family: inherit;
    color: var(--text-main, #1e293b);
    position: relative;
    transition: max-width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.opportunity-finder-container.is-wide-mode {
    max-width: 100% !important;
    width: 100% !important;
    padding-left: 32px;
    padding-right: 32px;
}

.opportunity-finder-container.is-wide-mode .console-features,
.opportunity-finder-container.is-wide-mode .unified-search-container,
.opportunity-finder-container.is-wide-mode .cof-workspace-container {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

#opportunity-finder-app svg.lucide,
.opportunity-finder-container svg.lucide {
    display: inline-block;
    vertical-align: middle;
    flex-shrink: 0;
}

/* Ambient Subtle Background Glow */
.cpg-ambient-glow {
    position: absolute;
    top: -50px;
    left: 50%;
    transform: translateX(-50%);
    width: 650px;
    height: 260px;
    background: radial-gradient(circle, var(--primary-light, rgba(249, 115, 22, 0.12)) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
    opacity: 0.8;
}

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

.yt-compliance-micro-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: 999px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: all 0.2s ease;
}

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

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

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

/* --- 2. Canonical Hero Header --- */
.console-hero {
    text-align: center;
    max-width: 840px;
    margin: 0 auto 32px;
    position: relative;
    z-index: 10;
    animation: cofFadeIn 0.4s ease;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    border-radius: 999px;
    background: var(--primary-light, rgba(249, 115, 22, 0.12));
    color: var(--primary-color);
    font-size: 12px;
    font-weight: 800;
    margin-bottom: 16px;
    border: 1px solid color-mix(in srgb, var(--primary-color) 25%, transparent);
}

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

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

.gradient-text {
    font-style: normal;
    background: linear-gradient(135deg, var(--primary-color) 0%, color-mix(in srgb, var(--primary-color) 65%, white 35%) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-description {
    font-size: 15px;
    line-height: 1.6;
    color: var(--text-muted);
    margin-bottom: 24px;
}

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

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

.hfb-item i,
.hfb-item svg {
    width: 14px !important;
    height: 14px !important;
    color: var(--primary-color);
}

/* --- 3. UNIFIED SEARCH & COMMAND BAR --- */
.unified-search-container {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 16px 20px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-sm);
    position: relative;
    z-index: 100;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.unified-search-container.is-focused {
    border-color: var(--primary-color);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
}

.unified-search-bar {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.search-segment {
    position: relative;
    user-select: none;
}

.dropdown-segment {
    cursor: pointer;
}

.channel-segment {
    min-width: 240px;
    flex: 0 1 auto;
}

.segment-content {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: var(--bg-body);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    font-size: 14px;
    font-weight: 700;
    color: var(--text-main);
    transition: 0.2s;
}

.segment-content:hover {
    border-color: var(--primary-color);
}

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

.channel-meta-inline {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.segment-text {
    font-size: 13px;
    font-weight: 800;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.channel-handle-sub {
    font-size: 11px;
    color: var(--text-muted);
    font-family: monospace;
    line-height: 1.1;
}

.chevron-icon {
    width: 16px;
    height: 16px;
    margin-inline-start: auto;
    color: var(--text-muted);
    transition: transform 0.2s;
}

.search-divider {
    width: 1px;
    height: 32px;
    background: var(--border-color);
    display: block;
}

@media (max-width: 768px) {
    .search-divider {
        display: none;
    }
}

.segment-dropdown.glass-menu {
    position: absolute;
    top: calc(100% + 8px);
    inset-inline-start: 0;
    min-width: 280px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    box-shadow: var(--shadow-lg, 0 16px 36px rgba(0, 0, 0, 0.2));
    backdrop-filter: blur(14px);
    overflow: hidden;
    z-index: 101;
    animation: cofFadeDown 0.2s ease;
}

.dropdown-header {
    padding: 10px 14px 6px;
    font-size: 11px;
    font-weight: 800;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border-color);
}

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

.dropdown-header-recent,
.dropdown-header-all {
    padding: 6px 12px;
    font-size: 11px;
    font-weight: 800;
    color: var(--text-muted);
    text-transform: uppercase;
    background: var(--bg-body);
    border-bottom: 1px solid var(--border-color);
    cursor: default;
    letter-spacing: 0.5px;
}

.dropdown-header-all {
    border-top: 1px solid var(--border-color);
    margin-top: 4px;
}

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

.dropdown-item:hover {
    background: var(--bg-body);
}

.dropdown-item.selected {
    background: var(--primary-light, rgba(249, 115, 22, 0.12));
}

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

.dropdown-item .check-icon i,
.dropdown-item .check-icon svg {
    width: 16px !important;
    height: 16px !important;
}

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

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

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

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

/* Input Segment */
.input-segment.topic-segment {
    flex: 1 1 260px;
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--bg-body);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 0 14px;
    transition: 0.2s;
}

.input-segment.topic-segment:focus-within {
    border-color: var(--primary-color);
}

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

.search-input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 12px 0;
    font-size: 14px;
    color: var(--text-main);
    font-family: inherit;
    outline: none;
}

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

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

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

.clear-btn i,
.clear-btn svg {
    width: 14px !important;
    height: 14px !important;
}

/* Country & Language Dropdown Segments (Designed like Keyword Analyzer) */
.country-segment, .lang-segment {
    flex: 0 0 auto;
}

.flag-icon-wrapper.sm {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    overflow: hidden;
    border: 1px solid var(--border-color);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.flag-icon-wrapper.sm img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.lang-code-text {
    font-weight: 800;
    color: var(--primary-color);
    letter-spacing: 0.5px;
}

.dropdown-search-box {
    position: relative;
    padding: 8px 10px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
}

.dropdown-search-box i,
.dropdown-search-box svg {
    position: absolute;
    inset-inline-start: 18px;
    width: 14px !important;
    height: 14px !important;
    color: var(--text-muted);
}

.dropdown-search-box input {
    width: 100%;
    background: var(--bg-body);
    border: 1px solid var(--border-color);
    padding: 7px 12px;
    padding-inline-start: 30px;
    border-radius: 8px;
    font-size: 12px;
    color: var(--text-main);
    outline: none;
    font-family: inherit;
    box-sizing: border-box;
}

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

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

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

/* Execute Button */
.btn-execute-audit {
    background: var(--primary-color);
    color: #ffffff;
    border: none;
    padding: 12px 24px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s ease;
    white-space: nowrap;
    box-shadow: 0 4px 12px color-mix(in srgb, var(--primary-color) 35%, transparent);
}

.btn-execute-audit:hover:not(:disabled) {
    background: var(--primary-hover, color-mix(in srgb, var(--primary-color) 85%, black));
    transform: translateY(-1px);
    box-shadow: 0 6px 18px color-mix(in srgb, var(--primary-color) 45%, transparent);
}

.btn-execute-audit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

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

.btn-inner i,
.btn-inner svg {
    width: 16px !important;
    height: 16px !important;
}

.credit-pill-badge {
    background: rgba(255, 255, 255, 0.2);
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.3px;
}

.loader-spin {
    animation: cofSpin 1s linear infinite;
    width: 14px !important;
    height: 14px !important;
}

/* Secondary Action Toolbar */
.cmo-action-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
    flex-wrap: wrap;
    gap: 10px;
}

.toolbar-left, .toolbar-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

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

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

.toolbar-btn i,
.toolbar-btn svg {
    width: 14px !important;
    height: 14px !important;
}

.toolbar-btn.btn-export {
    background: var(--primary-light, rgba(249, 115, 22, 0.12));
    border-color: color-mix(in srgb, var(--primary-color) 30%, transparent);
    color: var(--primary-color);
}

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

/* Fetching Progress Bar Box */
.cmo-fetching-box {
    margin-top: 16px;
    padding: 14px 18px;
    background: var(--bg-body);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    animation: cofFadeIn 0.3s ease;
}

.cmo-fetching-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    font-size: 13px;
    font-weight: 700;
}

.cmo-fetching-title {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-main);
}

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

.cmo-progress-bg {
    width: 100%;
    height: 6px;
    background: color-mix(in srgb, var(--primary-color) 20%, transparent);
    border-radius: 999px;
    overflow: hidden;
}

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

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

.err-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

/* --- 4. CANONICAL 6 BENTO FEATURES CLUSTERS (console-features) --- */
.console-features {
    position: relative;
    z-index: 1;
    max-width: 1180px;
    margin: 32px auto 40px;
    animation: cofFadeIn 0.4s ease;
}

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

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

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

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

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

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

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

.bento-decor-icon i,
.bento-decor-icon svg {
    width: 68px !important;
    height: 68px !important;
}

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

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

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

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

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

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

/* Animations for Bento Icons */
.anim-pulse { animation: cofPulse 3s ease-in-out infinite; }
.anim-bounce { animation: cofBounce 3s ease-in-out infinite; }
.anim-tilt { animation: cofTilt 4s ease-in-out infinite; }
.anim-float { animation: cofFloat 3.5s ease-in-out infinite; }
.anim-glow { animation: cofGlow 2.5s ease-in-out infinite; }

/* --- 5. RESULTS WORKSPACE (cof-workspace-container) --- */
.cof-workspace-container {
    animation: cofFadeIn 0.4s ease;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

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

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

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

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

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

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

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

.icon-blue { background: rgba(59, 130, 246, 0.12); color: #3b82f6; }
.icon-gold { background: rgba(245, 158, 11, 0.12); color: #f59e0b; }
.icon-green { background: rgba(16, 185, 129, 0.12); color: #10b981; }
.icon-purple { background: rgba(139, 92, 246, 0.12); color: #8b5cf6; }

.kpi-meta {
    overflow: hidden;
}

.kpi-label {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-muted);
    margin-bottom: 4px;
}

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

.kpi-value.highlight-gold {
    color: #f59e0b;
}

.kpi-unit {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 600;
}

.kpi-topic-text {
    font-size: 14px;
    font-weight: 800;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--primary-color);
}

/* 5.2 Dual Visual Analytics Section */
.analytics-row {
    display: grid;
    grid-template-columns: 2fr 1.2fr;
    gap: 20px;
}

@media (max-width: 992px) {
    .analytics-row {
        grid-template-columns: 1fr;
    }
}

.analytics-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 24px;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
}

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

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

.card-title-icon {
    width: 18px !important;
    height: 18px !important;
    color: var(--primary-color);
}

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

.matrix-legend-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.m-legend-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
}

.m-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
}

.pill-sweet { background: rgba(245, 158, 11, 0.12); color: #d97706; }
.pill-sweet .m-dot { background: #f59e0b; }

.pill-emerge { background: rgba(16, 185, 129, 0.12); color: #059669; }
.pill-emerge .m-dot { background: #10b981; }

.pill-trap { background: rgba(239, 68, 68, 0.12); color: #dc2626; }
.pill-trap .m-dot { background: #ef4444; }

.chart-wrapper {
    min-height: 310px;
    position: relative;
}

.format-card .chart-wrapper {
    min-height: 220px;
}

.analytics-card.format-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.donut-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
}

.format-ai-insight {
    margin-top: 16px;
    padding: 14px 16px;
    background: var(--bg-body);
    border: 1px solid var(--border-color);
    border-radius: 12px;
}

.insight-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11.5px;
    font-weight: 800;
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 0.4px;
    margin-bottom: 6px;
}

.insight-label i,
.insight-label svg {
    width: 14px !important;
    height: 14px !important;
}

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

/* 5.3 Opportunities Table */
.opportunities-table-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.table-control-bar {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
}

.tcb-header {
    margin-bottom: 16px;
}

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

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

.tcb-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
}

.table-search-box {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-body);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 0 12px;
    min-width: 220px;
}

.table-search-box i,
.table-search-box svg {
    width: 15px !important;
    height: 15px !important;
    color: var(--text-muted);
}

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

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

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

.filter-pills-row {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.pill-btn {
    padding: 6px 14px;
    border-radius: 999px;
    border: 1px solid var(--border-color);
    background: var(--bg-body);
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: 0.15s;
    font-family: inherit;
}

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

.pill-btn.active {
    background: var(--primary-color);
    color: #ffffff;
    border-color: var(--primary-color);
}

/* --- Luxury Custom Sort Dropdown Component (Canonical GuinRank Hub Standard) --- */
.hub-sort-wrapper {
    position: relative;
    display: inline-block;
    margin-inline-start: auto;
}

.hub-sort-trigger {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 36px;
    padding: 0 14px;
    background: var(--bg-body);
    border: 1.5px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-main);
    font-size: 12.5px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s ease;
    outline: none;
    user-select: none;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.hub-sort-trigger:hover {
    border-color: var(--primary-color);
    color: var(--text-main);
    transform: translateY(-1px);
    box-shadow: 0 3px 10px var(--primary-shadow);
}

.hub-sort-wrapper.is-open .hub-sort-trigger {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--primary-border-light);
}

.hub-sort-icon-box {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.hub-sort-icon {
    width: 14px !important;
    height: 14px !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 i,
.hub-sort-chevron svg {
    width: 13px !important;
    height: 13px !important;
}

.hub-sort-wrapper.is-open .hub-sort-chevron {
    transform: rotate(180deg);
    color: var(--primary-color);
}

/* Glassmorphic Dropdown Menu */
.hub-sort-dropdown.glass-menu {
    position: absolute;
    top: calc(100% + 8px);
    inset-inline-end: 0;
    min-width: 210px;
    background: var(--card-bg) !important;
    background-color: var(--card-bg) !important;
    border: 1.5px solid var(--border-color) !important;
    border-radius: 12px;
    box-shadow: var(--shadow-lg), 0 0 0 1px var(--primary-border-light);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    padding: 6px;
    z-index: 1000;
    animation: hubSortMenuFade 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes hubSortMenuFade {
    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: 8px 10px 6px;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 4px;
}

.hub-sort-dropdown-title i,
.hub-sort-dropdown-title svg {
    width: 12px !important;
    height: 12px !important;
    color: var(--primary-color);
}

.hub-sort-options-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.hub-sort-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 8px;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text-main);
    cursor: pointer;
    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 i,
.hub-sort-option .hso-icon svg {
    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 i,
.hub-sort-option .hso-check svg {
    width: 13px !important;
    height: 13px !important;
}

.hub-sort-option:hover {
    background: var(--primary-light) !important;
    color: var(--primary-color) !important;
}

.hub-sort-option:hover .hso-icon {
    color: var(--primary-color);
}

.hub-sort-option.is-selected {
    background: var(--primary-light) !important;
    color: var(--primary-color) !important;
    font-weight: 800;
}

.hub-sort-option.is-selected .hso-icon {
    color: var(--primary-color);
}

.table-responsive {
    overflow-x: auto;
    width: 100%;
}

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

.luxury-table thead th {
    background: var(--bg-body);
    padding: 14px 18px;
    font-size: 12px;
    font-weight: 800;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.4px;
    border-bottom: 1px solid var(--border-color);
    white-space: nowrap;
}

.luxury-table tbody tr {
    border-bottom: 1px solid var(--border-color);
    transition: background 0.15s;
}

.luxury-table tbody tr:hover {
    background: color-mix(in srgb, var(--primary-color) 4%, transparent);
}

.luxury-table tbody td {
    padding: 16px 18px;
    vertical-align: middle;
}

/* Cell Elements */
.keyword-cell-wrap {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    max-width: 480px;
}

.kw-tags-row {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.kw-main-title {
    font-size: 14.5px;
    font-weight: 800;
    color: var(--text-main);
    cursor: pointer;
    line-height: 1.4;
    transition: color 0.15s ease;
}

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

.kw-why-text {
    font-size: 12px;
    line-height: 1.45;
    color: var(--text-muted);
}

.gap-status-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 10.5px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 999px;
}

.gap-status-chip.untapped {
    background: rgba(16, 185, 129, 0.12);
    color: #059669;
    border: 1px solid rgba(16, 185, 129, 0.25);
}

.gap-status-chip.covered {
    background: rgba(100, 116, 139, 0.12);
    color: var(--text-muted);
    border: 1px solid var(--border-color);
}

.gap-status-chip .status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

.gap-status-chip.untapped .status-dot {
    background: #10b981;
    box-shadow: 0 0 6px rgba(16, 185, 129, 0.6);
}

.gap-status-chip.covered .status-dot {
    background: var(--text-muted);
}

.kw-text {
    font-weight: 800;
    color: var(--text-main);
    font-size: 14px;
}

.intent-tag {
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 6px;
    background: var(--bg-body);
    color: var(--text-muted);
    border: 1px solid var(--border-color);
}

.intent-tutorial { background: rgba(59, 130, 246, 0.1); color: #2563eb; border-color: rgba(59, 130, 246, 0.2); }
.intent-comparison { background: rgba(139, 92, 246, 0.1); color: #7c3aed; border-color: rgba(139, 92, 246, 0.2); }
.intent-beginner { background: rgba(16, 185, 129, 0.1); color: #059669; border-color: rgba(16, 185, 129, 0.2); }
.intent-shorts { background: rgba(239, 68, 68, 0.1); color: #dc2626; border-color: rgba(239, 68, 68, 0.2); }

.badge-status-pill {
    font-size: 10.5px;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 999px;
}

.badge-golden { background: rgba(245, 158, 11, 0.15); color: #d97706; border: 1px solid rgba(245, 158, 11, 0.3); }
.badge-emerging { background: rgba(16, 185, 129, 0.15); color: #059669; border: 1px solid rgba(16, 185, 129, 0.3); }
.badge-competitive { background: rgba(239, 68, 68, 0.15); color: #dc2626; border: 1px solid rgba(239, 68, 68, 0.3); }
.badge-high { background: rgba(59, 130, 246, 0.15); color: #2563eb; border: 1px solid rgba(59, 130, 246, 0.3); }

.format-cell {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.fmt-icon-wrap {
    width: 26px;
    height: 26px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.fmt-icon-wrap i,
.fmt-icon-wrap svg {
    width: 14px !important;
    height: 14px !important;
}

.fmt-shorts { background: rgba(239, 68, 68, 0.12); color: #ef4444; }
.fmt-step_by_step { background: rgba(59, 130, 246, 0.12); color: #3b82f6; }
.fmt-comparison { background: rgba(139, 92, 246, 0.12); color: #8b5cf6; }
.fmt-longform { background: rgba(16, 185, 129, 0.12); color: #10b981; }

.fmt-label {
    font-weight: 700;
    color: var(--text-main);
    font-size: 13px;
}

.demand-cell, .comp-cell {
    min-width: 110px;
}

.demand-val-row {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 4px;
    flex-wrap: wrap;
}

.demand-val {
    font-weight: 800;
    font-size: 13.5px;
    color: var(--text-main);
}

.demand-val small {
    font-size: 11px;
    color: var(--text-muted);
}

.demand-level-pill {
    font-size: 10px;
    font-weight: 800;
    padding: 1px 7px;
    border-radius: 999px;
    letter-spacing: 0.2px;
}

.dl-super {
    background: rgba(245, 158, 11, 0.15);
    color: #d97706;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.dl-high {
    background: rgba(16, 185, 129, 0.15);
    color: #059669;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.dl-emerging {
    background: rgba(59, 130, 246, 0.15);
    color: #2563eb;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.search-vol-label {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 5px;
    white-space: nowrap;
}

.mini-suggest-icon {
    width: 12px !important;
    height: 12px !important;
    color: var(--primary-color);
    flex-shrink: 0;
}

.metric-meter {
    width: 100%;
    height: 5px;
    background: var(--border-color);
    border-radius: 999px;
    overflow: hidden;
}

.meter-bar {
    height: 100%;
    border-radius: 999px;
    transition: width 0.3s;
}

.fill-demand { background: #3b82f6; }
.fill-comp-low { background: #10b981; }
.fill-comp-moderate { background: #f59e0b; }
.fill-comp-high { background: #ef4444; }

.comp-badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 800;
    margin-bottom: 4px;
}

.comp-low { color: #10b981; }
.comp-moderate { color: #f59e0b; }
.comp-high { color: #ef4444; }

.score-circle-pill {
    display: inline-flex;
    align-items: baseline;
    gap: 2px;
    padding: 6px 12px;
    border-radius: 10px;
    font-weight: 900;
}

.score-num {
    font-size: 16px;
}

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

.score-super { background: rgba(245, 158, 11, 0.15); color: #d97706; border: 1px solid rgba(245, 158, 11, 0.3); }
.score-high { background: rgba(16, 185, 129, 0.15); color: #059669; border: 1px solid rgba(16, 185, 129, 0.3); }
.score-med { background: rgba(59, 130, 246, 0.15); color: #2563eb; border: 1px solid rgba(59, 130, 246, 0.3); }
.score-low { background: rgba(100, 116, 139, 0.15); color: #475569; border: 1px solid rgba(100, 116, 139, 0.3); }

.row-actions-group {
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-table-action.btn-blueprint {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 8px;
    background: var(--primary-light, rgba(249, 115, 22, 0.12));
    border: 1px solid color-mix(in srgb, var(--primary-color) 30%, transparent);
    color: var(--primary-color);
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
    transition: 0.15s;
    font-family: inherit;
    white-space: nowrap;
}

.btn-table-action.btn-blueprint:hover {
    background: var(--primary-color);
    color: #ffffff;
}

.btn-table-action.btn-blueprint i,
.btn-table-action.btn-blueprint svg {
    width: 14px !important;
    height: 14px !important;
}

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

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

.btn-table-icon i,
.btn-table-icon svg {
    width: 14px !important;
    height: 14px !important;
}

.td-empty {
    text-align: center;
    padding: 40px !important;
}

.empty-state-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    color: var(--text-muted);
}

.empty-icon {
    width: 32px !important;
    height: 32px !important;
    opacity: 0.5;
}

/* Table Pagination Footer (Standard) */
.table-pagination-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 24px;
    background: var(--card-bg);
    border-top: 1px solid var(--border-color);
    flex-wrap: wrap;
}

.tpf-info-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: var(--bg-body) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 999px;
    font-size: 12.5px;
    color: var(--text-muted) !important;
}

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

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

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

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

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

.page-btn i,
.page-btn svg {
    width: 16px !important;
    height: 16px !important;
}

.page-current-pill {
    padding: 6px 14px;
    border-radius: 8px;
    background: var(--bg-body) !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-main) !important;
    font-size: 13px;
    font-weight: 700;
}

.custom-rows-dropdown {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: var(--bg-body);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    font-size: 12.5px;
    color: var(--text-main);
    user-select: none;
}

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

.crd-current {
    font-weight: 700;
    color: var(--primary-color);
}

.crd-chevron {
    width: 14px !important;
    height: 14px !important;
    color: var(--text-muted);
    transition: transform 0.2s ease;
}

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

.crd-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text-main) !important;
    cursor: pointer;
    transition: all 0.15s ease;
}

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

.crd-check {
    width: 14px !important;
    height: 14px !important;
    color: var(--primary-color) !important;
}

/* Quantum Chart Tooltip Neutralization & Quantum Styles (_agent/YOUTUBE.md Section 8) */
#opportunity-matrix-chart .apexcharts-tooltip,
#format-demand-chart .apexcharts-tooltip {
    background: transparent !important;
    background-color: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    overflow: visible !important;
}

.quantum-chart-tooltip {
    background: var(--card-bg) !important;
    border: 1.5px solid var(--border-color) !important;
    border-radius: 12px !important;
    padding: 10px 14px !important;
    box-shadow: var(--shadow-lg), 0 0 0 1px var(--primary-border-light) !important;
    backdrop-filter: blur(14px) !important;
    -webkit-backdrop-filter: blur(14px) !important;
    min-width: 180px;
    color: var(--text-main) !important;
}

.qct-title {
    font-size: 13px;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 6px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--border-color);
}

.qct-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 3px;
}

.qct-row strong {
    color: var(--text-main);
    font-weight: 700;
}

.table-disclaimer-footer {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 20px;
    background: var(--bg-body);
    border-top: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 11.5px;
    line-height: 1.5;
}

.disc-icon {
    width: 16px !important;
    height: 16px !important;
    flex-shrink: 0;
    color: var(--primary-color);
}

/* --- 6. ROOT-LEVEL MODALS (ZERO-SCROLL TRAP ARCHITECTURE) --- */
.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;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    animation: cofFadeIn 0.2s ease;
}

html.modal-open, body.modal-open {
    overflow: hidden !important;
    height: 100vh !important;
}

.custom-modal-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    width: 100%;
    max-width: 580px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35);
    display: flex;
    flex-direction: column;
    overflow: hidden !important;
    animation: cofScaleUp 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.blueprint-modal-card {
    max-width: 680px;
}

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

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

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

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

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

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

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

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

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

.bp-keyword-banner {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: var(--bg-body);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    flex-wrap: wrap;
}

.bp-kw-lbl {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 700;
}

.bp-kw-val {
    font-size: 15px;
    color: var(--text-main);
}

.bp-section-card {
    background: var(--bg-body);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 16px;
}

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

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

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

.hook-quote-box {
    background: color-mix(in srgb, var(--primary-color) 8%, transparent);
    border-inline-start: 3px solid var(--primary-color);
    padding: 12px 16px;
    border-radius: 8px;
}

.hook-text {
    font-size: 14.5px;
    font-weight: 700;
    color: var(--text-main);
    line-height: 1.5;
    margin: 0;
    font-style: italic;
}

.bp-grid-two {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

@media (max-width: 576px) {
    .bp-grid-two {
        grid-template-columns: 1fr;
    }
}

.runtime-badge {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 8px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    font-size: 13px;
    font-weight: 800;
    color: var(--text-main);
}

.runtime-badge.format-badge {
    color: var(--primary-color);
}

.bps-text {
    font-size: 13px;
    line-height: 1.55;
    color: var(--text-main);
    margin: 0;
}

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

.btn-modal-copy {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 18px;
    border-radius: 10px;
    background: var(--primary-color);
    color: #ffffff;
    font-size: 13px;
    font-weight: 800;
    border: none;
    cursor: pointer;
    font-family: inherit;
    transition: 0.15s;
}

.btn-modal-copy:hover {
    background: var(--primary-hover, color-mix(in srgb, var(--primary-color) 85%, black));
}

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

.btn-modal-close {
    padding: 9px 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: 0.15s;
}

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

/* Modal text */
.modal-text {
    font-size: 13.5px;
    line-height: 1.6;
    color: var(--text-muted);
    margin: 0;
}

/* --- 7. TOAST NOTIFICATION --- */
.cpg-toast {
    position: fixed;
    bottom: 28px;
    inset-inline-end: 28px;
    background: var(--card-bg);
    border: 1px solid var(--primary-color);
    border-radius: 12px;
    padding: 12px 20px;
    color: var(--text-main);
    font-size: 13.5px;
    font-weight: 700;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 1000000;
}

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

.toast-fade-enter-active, .toast-fade-leave-active {
    transition: all 0.25s ease;
}

.toast-fade-enter-from, .toast-fade-leave-to {
    opacity: 0;
    transform: translateY(12px);
}

/* Custom Scrollbar */
.custom-scrollbar::-webkit-scrollbar {
    width: 6px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: transparent;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 999px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* ApexCharts Quantum Glass Tooltip */
.apexcharts-canvas .apexcharts-tooltip {
    background: color-mix(in srgb, var(--card-bg, #ffffff) 92%, transparent) !important;
    border: 1px solid var(--border-color, #e2e8f0) !important;
    border-radius: 12px !important;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.2) !important;
    backdrop-filter: blur(14px) !important;
    color: var(--text-main, #1e293b) !important;
    padding: 10px 14px !important;
}

/* Keyframes */
@keyframes cofSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

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

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

@keyframes cofScaleUp {
    from { opacity: 0; transform: scale(0.96); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes cofPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.08); }
}

@keyframes cofBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-4px); }
}

@keyframes cofTilt {
    0%, 100% { transform: rotate(0deg); }
    50% { transform: rotate(8deg); }
}

@keyframes cofFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

@keyframes cofGlow {
    0%, 100% { opacity: 0.05; }
    50% { opacity: 0.12; }
}

