/* ==========================================================================
   YouTube Policy Risk Guard (Tool 30) - GuinRank V7 Canonical Suite
   Standard: Canonical YouTube Suite Standard (_agent/YOUTUBE.md)
   Architecture: Zero-Regression Engineering Protocol
   ========================================================================== */

.policy-risk-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);
}

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

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

#policy-risk-app svg.lucide,
.policy-risk-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: 860px;
    margin: 0 auto 32px;
    position: relative;
    z-index: 2;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: var(--primary-light, rgba(249, 115, 22, 0.1));
    border: 1px solid rgba(249, 115, 22, 0.2);
    border-radius: 999px;
    color: var(--primary-color, #f97316);
    font-size: 12px;
    font-weight: 800;
    margin-bottom: 16px;
}

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

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

.hero-title .gradient-text {
    font-style: normal;
    background: linear-gradient(135deg, var(--primary-color, #f97316) 0%, #ea580c 50%, #e11d48 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-description {
    font-size: 15px;
    line-height: 1.6;
    color: var(--text-muted, #64748b);
    max-width: 720px;
    margin: 0 auto 24px;
}

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

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

.hfb-icon {
    width: 15px;
    height: 15px;
}

.text-green { color: #10b981 !important; }
.text-amber { color: #f59e0b !important; }
.text-blue  { color: #3b82f6 !important; }
.text-purple{ color: #8b5cf6 !important; }
.text-red   { color: #ef4444 !important; }

/* --- 3. UNIFIED SEARCH & COMMAND BAR --- */
.unified-search-container {
    max-width: 1040px;
    margin: 0 auto 36px;
    position: relative;
    z-index: 100;
}

.unified-search-bar {
    display: flex;
    align-items: center;
    background: var(--card-bg, #ffffff);
    border: 2px solid var(--border-color, #e2e8f0);
    border-radius: 20px;
    padding: 6px 8px 6px 14px;
    box-shadow: var(--shadow-md, 0 10px 25px -5px rgba(0, 0, 0, 0.05));
    transition: all 0.25s ease;
    gap: 6px;
}

.unified-search-container.is-focused .unified-search-bar,
.unified-search-bar:focus-within {
    border-color: var(--primary-color, #f97316);
    box-shadow: 0 0 0 4px var(--primary-light, rgba(249, 115, 22, 0.15));
}

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

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

.dropdown-segment {
    cursor: pointer;
    user-select: none;
}

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

.dropdown-segment:hover .segment-content {
    background: var(--bg-body, #f8fafc);
}

.channel-avatar-sm {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--border-color, #cbd5e1);
    flex-shrink: 0;
}

.channel-meta-inline {
    display: flex;
    flex-direction: column;
    min-width: 140px;
    max-width: 220px;
    text-align: start;
}

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

.channel-handle-sub {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted, #64748b);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chevron-icon {
    width: 16px;
    height: 16px;
    color: var(--text-muted, #94a3b8);
    transition: transform 0.2s ease;
}

.mode-icon {
    width: 16px;
    height: 16px;
    color: var(--primary-color, #f97316);
}

/* Glass Menus */
.glass-menu {
    position: absolute;
    top: calc(100% + 10px);
    background: var(--card-bg, #ffffff);
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: 16px;
    box-shadow: 0 20px 35px -10px rgba(0, 0, 0, 0.15);
    z-index: 999;
    min-width: 260px;
    padding: 8px;
    backdrop-filter: blur(14px);
    animation: menuFadeIn 0.2s ease;
}

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

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

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

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

.dropdown-item:hover {
    background: var(--bg-body, #f8fafc);
    color: var(--primary-color, #f97316);
}

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

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

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

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

.search-icon {
    width: 18px;
    height: 18px;
    color: var(--primary-color, #f97316);
    flex-shrink: 0;
}

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

.search-input::placeholder {
    color: var(--text-muted, #94a3b8);
    font-weight: 500;
}

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

.clear-btn:hover {
    color: var(--text-main, #0f172a);
}

/* Action Button */
.btn-execute-audit {
    border: none;
    background: linear-gradient(135deg, var(--primary-color, #f97316) 0%, #ea580c 100%);
    color: #ffffff;
    font-weight: 800;
    font-size: 14px;
    padding: 12px 22px;
    border-radius: 14px;
    cursor: pointer;
    box-shadow: 0 8px 18px -4px rgba(249, 115, 22, 0.4);
    transition: all 0.2s ease;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.btn-execute-audit:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px -4px rgba(249, 115, 22, 0.5);
}

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

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

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

.credit-pill-badge {
    background: rgba(255, 255, 255, 0.25);
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    margin-inline-start: 4px;
}

.loader-spin {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    100% { transform: rotate(360deg); }
}

/* Secondary Toolbar */
.cmo-action-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 14px;
    padding: 0 8px;
}

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

.toolbar-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    background: var(--card-bg, #ffffff);
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: 10px;
    font-size: 12px;
    font-weight: 700;
    color: var(--text-main, #334155);
    cursor: pointer;
    transition: all 0.15s ease;
}

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

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

.btn-export {
    background: var(--primary-light, rgba(249, 115, 22, 0.1));
    border-color: rgba(249, 115, 22, 0.3);
    color: var(--primary-color, #f97316);
}

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

/* Fetching Progress Box */
.cmo-fetching-box {
    margin-top: 16px;
    background: var(--card-bg, #ffffff);
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: 14px;
    padding: 16px 20px;
    box-shadow: var(--shadow-sm);
}

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

.cmo-fetching-title {
    display: flex;
    align-items: center;
    gap: 8px;
}

.cmo-fetching-title svg,
.cmo-fetching-title i {
    width: 16px;
    height: 16px;
    color: var(--primary-color, #f97316);
}

.cmo-fetching-pct {
    font-weight: 900;
    color: var(--primary-color, #f97316);
}

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

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

/* Error Banner */
.cmo-error-banner {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 14px;
    padding: 12px 16px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 12px;
    color: #dc2626;
    font-size: 13px;
    font-weight: 700;
}

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

/* --- 4. CANONICAL 6-CARD BENTO CLUSTERS --- */
.console-features {
    max-width: 1100px;
    margin: 0 auto 60px;
}

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

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

.bento-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg, 0 16px 30px -8px rgba(0, 0, 0, 0.08));
    border-color: var(--primary-color, #f97316);
}

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

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

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

.bento-decor-icon {
    position: absolute;
    top: 14px;
    right: 14px;
    opacity: 0.12;
    pointer-events: none;
}

.bento-decor-icon svg,
.bento-decor-icon i {
    width: 64px;
    height: 64px;
    color: var(--primary-color, #f97316);
}

.bento-card-content {
    position: relative;
    z-index: 1;
}

.dashed-ring-wrapper {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: var(--primary-light, rgba(249, 115, 22, 0.1));
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}

.bc-icon-wrapper svg,
.bc-icon-wrapper i {
    width: 22px;
    height: 22px;
    color: var(--primary-color, #f97316);
}

.bc-title {
    font-size: 16px;
    font-weight: 800;
    color: var(--text-main, #0f172a);
    margin-bottom: 8px;
}

.bc-desc {
    font-size: 13px;
    line-height: 1.6;
    color: var(--text-muted, #64748b);
}

/* Micro-animations */
.anim-pulse { animation: pulseAnim 3s infinite ease-in-out; }
.anim-bounce { animation: bounceAnim 3s infinite ease-in-out; }
.anim-tilt { animation: tiltAnim 4s infinite ease-in-out; }
.anim-float { animation: floatAnim 3s infinite ease-in-out; }
.anim-glow { animation: glowAnim 2.5s infinite alternate ease-in-out; }

@keyframes pulseAnim { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.08); } }
@keyframes bounceAnim { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@keyframes tiltAnim { 0%, 100% { transform: rotate(0deg); } 50% { transform: rotate(10deg); } }
@keyframes floatAnim { 0%, 100% { transform: translateY(0) scale(1); } 50% { transform: translateY(-8px) scale(1.04); } }
@keyframes glowAnim { from { opacity: 0.1; } to { opacity: 0.25; } }

/* --- 5. RESULTS WORKSPACE --- */
.prp-workspace-container {
    animation: fadeIn 0.3s ease;
}

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

/* Status Banner */
.prp-status-banner {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 20px 24px;
    border-radius: 20px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-sm);
}

.banner-safe {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #166534;
}

.banner-safe .psb-icon-wrap {
    background: #dcfce7;
    color: #15803d;
}

.banner-moderate {
    background: #fffbeb;
    border: 1px solid #fde68a;
    color: #92400e;
}

.banner-moderate .psb-icon-wrap {
    background: #fef3c7;
    color: #b45309;
}

.banner-critical {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

.banner-critical .psb-icon-wrap {
    background: #fee2e2;
    color: #b91c1c;
}

.psb-icon-wrap {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

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

.psb-content {
    flex: 1;
}

.psb-title {
    font-size: 17px;
    font-weight: 800;
    margin-bottom: 4px;
}

.psb-desc {
    font-size: 13px;
    line-height: 1.5;
    opacity: 0.9;
}

.psb-score-pill {
    display: inline-flex;
    align-items: baseline;
    gap: 3px;
    padding: 8px 18px;
    border-radius: 999px;
    background: #ffffff;
    box-shadow: var(--shadow-sm);
    font-size: 22px;
    font-weight: 900;
}

.psb-score-pill small {
    font-size: 12px;
    font-weight: 700;
    opacity: 0.6;
}

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

.kpi-card {
    background: var(--card-bg, #ffffff);
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: 18px;
    padding: 18px 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;
}

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

.icon-green { background: #dcfce7; color: #16a34a; }
.icon-gold  { background: #fef3c7; color: #d97706; }
.icon-blue  { background: #dbeafe; color: #2563eb; }
.icon-red   { background: #fee2e2; color: #dc2626; }
.icon-purple{ background: #f3e8ff; color: #9333ea; }

.kpi-meta {
    flex: 1;
    overflow: hidden;
}

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

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

.kpi-unit {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted, #94a3b8);
}

.highlight-gold {
    color: #d97706;
}

.kpi-topic-text {
    font-size: 15px;
    font-weight: 800;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Analytics Row */
.analytics-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 24px;
}

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

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

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

.card-title-icon {
    width: 18px;
    height: 18px;
    color: var(--primary-color, #f97316);
}

.analytics-subtitle {
    font-size: 12px;
    color: var(--text-muted, #64748b);
}

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

.gauge-chart-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* --- Multi-Ring Quantum Gauge Legend --- */
.quantum-rings-legend {
    display: flex;
    align-items: center;
    justify-content: space-around;
    gap: 12px;
    margin-top: auto;
    padding-top: 14px;
    border-top: 1px dashed var(--border-color, #e2e8f0);
}

.ring-legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    justify-content: center;
}

.ring-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    flex-shrink: 0;
}

.dot-emerald {
    background-color: #10b981;
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.45);
}

.dot-amber {
    background-color: #f59e0b;
    box-shadow: 0 0 8px rgba(245, 158, 11, 0.45);
}

.dot-blue {
    background-color: #3b82f6;
    box-shadow: 0 0 8px rgba(59, 130, 246, 0.45);
}

.ring-meta {
    display: flex;
    flex-direction: column;
}

.ring-name {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted, #64748b);
    line-height: 1.2;
}

.ring-val {
    font-size: 14px;
    font-weight: 800;
    line-height: 1.3;
}

.ring-val small {
    font-size: 10px;
    opacity: 0.7;
    font-weight: 600;
}

/* --- Chart View Mode Switcher --- */
.chart-view-modes {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: var(--bg-surface, rgba(0, 0, 0, 0.04));
    padding: 4px;
    border-radius: 12px;
    border: 1px solid var(--border-color, #e2e8f0);
}

.mode-pill-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 11px;
    border-radius: 8px;
    border: none;
    background: transparent;
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted, #64748b);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.mode-pill-btn svg,
.mode-pill-btn i {
    width: 13px !important;
    height: 13px !important;
    flex-shrink: 0;
}

.mode-pill-btn:hover {
    color: var(--text-main, #0f172a);
    background: rgba(0, 0, 0, 0.03);
}

.mode-pill-btn.active {
    background: var(--card-bg, #ffffff);
    color: var(--primary-color, #f97316);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    font-weight: 800;
}

/* --- Regulatory Pillars Micro Status Cards --- */
.pillars-micro-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-top: auto;
    padding-top: 14px;
    border-top: 1px dashed var(--border-color, #e2e8f0);
}

.pmg-card {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 10px;
    background: var(--bg-surface, rgba(0, 0, 0, 0.02));
    border: 1px solid var(--border-color, #e2e8f0);
    transition: all 0.2s ease;
}

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

.pmg-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.pmg-status-safe .pmg-indicator {
    background: #10b981;
    box-shadow: 0 0 6px rgba(16, 185, 129, 0.5);
}

.pmg-status-warning .pmg-indicator {
    background: #f59e0b;
    box-shadow: 0 0 6px rgba(245, 158, 11, 0.5);
}

.pmg-status-critical .pmg-indicator {
    background: #ef4444;
    box-shadow: 0 0 6px rgba(239, 68, 68, 0.5);
}

.pmg-info {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.pmg-title {
    font-size: 10.5px;
    font-weight: 700;
    color: var(--text-muted, #64748b);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pmg-val {
    font-size: 13px;
    font-weight: 800;
    color: var(--text-main, #0f172a);
}

/* --- Frosted Glass Quantum Tooltip --- */
.quantum-tooltip {
    background: rgba(15, 23, 42, 0.90) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    border-radius: 10px !important;
    padding: 8px 12px !important;
    color: #ffffff !important;
    font-size: 12px !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3) !important;
    pointer-events: none !important;
    line-height: 1.4 !important;
    z-index: 9999 !important;
}

/* AI Strategic Advisory Card */
.prp-advisory-card {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.05) 0%, rgba(234, 88, 12, 0.08) 100%);
    border: 1px solid rgba(249, 115, 22, 0.2);
    border-radius: 18px;
    padding: 20px 24px;
    margin-bottom: 24px;
}

.pac-icon-wrap {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: var(--primary-color, #f97316);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.pac-icon-wrap svg,
.pac-icon-wrap i {
    width: 22px;
    height: 22px;
}

.pac-content {
    flex: 1;
}

.pac-title {
    font-size: 15px;
    font-weight: 800;
    color: var(--primary-color, #f97316);
    margin-bottom: 6px;
}

.pac-text {
    font-size: 13.5px;
    line-height: 1.6;
    color: var(--text-main, #1e293b);
}

/* Table Card */
.prp-table-card {
    background: var(--card-bg, #ffffff);
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: 20px;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    margin-bottom: 24px;
}

.prp-table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px 16px;
    border-bottom: 1px solid var(--border-color, #f1f5f9);
    flex-wrap: wrap;
    gap: 14px;
}

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

.title-icon {
    width: 20px;
    height: 20px;
    color: var(--primary-color, #f97316);
}

.table-card-subtitle {
    font-size: 12px;
    color: var(--text-muted, #64748b);
}

/* Hub Sort Wrapper */
.hub-sort-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
}

.sort-label {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-muted, #64748b);
}

.sort-trigger-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background: var(--bg-body, #f8fafc);
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: 12px;
    font-size: 12.5px;
    font-weight: 800;
    color: var(--text-main, #0f172a);
    cursor: pointer;
    transition: all 0.15s ease;
}

.sort-trigger-btn:hover {
    border-color: var(--primary-color, #f97316);
}

.chevron-sm {
    width: 14px;
    height: 14px;
    color: var(--text-muted, #94a3b8);
}

.sort-menu {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    min-width: 210px;
}

.sort-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 12.5px;
    font-weight: 700;
    color: var(--text-main, #334155);
    cursor: pointer;
}

.sort-option:hover {
    background: var(--bg-body, #f1f5f9);
    color: var(--primary-color, #f97316);
}

.sort-option.selected {
    background: var(--primary-light, rgba(249, 115, 22, 0.1));
    color: var(--primary-color, #f97316);
}

.check-sm {
    width: 14px;
    height: 14px;
    color: var(--primary-color, #f97316);
}

/* Filter Toolbar */
.prp-filter-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 24px;
    background: var(--bg-body, #f8fafc);
    border-bottom: 1px solid var(--border-color, #f1f5f9);
    flex-wrap: wrap;
    gap: 12px;
}

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

.filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: var(--card-bg, #ffffff);
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: 10px;
    font-size: 12px;
    font-weight: 700;
    color: var(--text-main, #334155);
    cursor: pointer;
    transition: all 0.15s ease;
}

.filter-chip:hover {
    border-color: var(--primary-color, #f97316);
}

.filter-chip.active {
    background: var(--primary-color, #f97316);
    border-color: var(--primary-color, #f97316);
    color: #ffffff;
}

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

.red-dot    { background: #ef4444; }
.yellow-dot { background: #f59e0b; }
.green-dot  { background: #10b981; }

.table-search-box {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--card-bg, #ffffff);
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: 10px;
    padding: 4px 10px;
    min-width: 240px;
}

.search-mini-icon {
    width: 14px;
    height: 14px;
    color: var(--text-muted, #94a3b8);
}

.table-search-box input {
    border: none;
    background: transparent;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-main, #0f172a);
    outline: none;
    width: 100%;
}

.clear-mini-btn {
    border: none;
    background: transparent;
    color: var(--text-muted, #94a3b8);
    cursor: pointer;
    padding: 2px;
}

/* Table Responsive */
.prp-table-responsive {
    width: 100%;
    overflow-x: auto;
}

.prp-table {
    width: 100%;
    border-collapse: collapse;
    text-align: start;
}

.prp-table th {
    padding: 12px 18px;
    font-size: 11.5px;
    font-weight: 800;
    color: var(--text-muted, #64748b);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: var(--bg-body, #f8fafc);
    border-bottom: 1px solid var(--border-color, #e2e8f0);
    white-space: nowrap;
}

.prp-table td {
    padding: 14px 18px;
    border-bottom: 1px solid var(--border-color, #f1f5f9);
    vertical-align: middle;
}

.prp-table tr:hover td {
    background: rgba(249, 115, 22, 0.02);
}

/* Video Cell */
.vid-meta-cell {
    display: flex;
    align-items: center;
    gap: 14px;
    max-width: 440px;
}

.vid-thumb-wrapper {
    position: relative;
    width: 110px;
    height: 62px;
    border-radius: 10px;
    overflow: hidden;
    flex-shrink: 0;
    background: #000;
}

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

.vid-views-badge {
    position: absolute;
    bottom: 3px;
    right: 4px;
    background: rgba(0, 0, 0, 0.75);
    color: #ffffff;
    font-size: 9.5px;
    font-weight: 700;
    padding: 1px 5px;
    border-radius: 4px;
}

.vid-info-wrap {
    overflow: hidden;
}

.vid-title-link {
    font-size: 13.5px;
    font-weight: 800;
    color: var(--text-main, #0f172a);
    text-decoration: none;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 4px;
    transition: color 0.15s ease;
}

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

.vid-date-row {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: var(--text-muted, #64748b);
}

.meta-icon {
    width: 12px;
    height: 12px;
}

.vid-id-tag {
    background: var(--bg-body, #f1f5f9);
    padding: 1px 6px;
    border-radius: 4px;
    font-family: monospace;
    font-size: 10px;
}

/* Monetization Pill */
.monetization-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 10px;
    font-size: 11.5px;
    font-weight: 800;
    white-space: nowrap;
}

.mon-icon-wrap svg,
.mon-icon-wrap i {
    width: 13px;
    height: 13px;
}

.mon-green {
    background: #dcfce7;
    color: #15803d;
    border: 1px solid #bbf7d0;
}

.mon-yellow {
    background: #fef3c7;
    color: #b45309;
    border: 1px solid #fde68a;
}

.mon-grey {
    background: #fee2e2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

/* Triggers & Violations */
.violation-info-wrap {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-width: 320px;
}

.primary-viol-badge {
    font-size: 11.5px;
    font-weight: 800;
    color: var(--text-main, #1e293b);
}

.flagged-tags-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.flag-tag-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 10.5px;
    font-weight: 700;
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

.flag-tag-pill em {
    color: #15803d;
    font-style: normal;
}

.flag-more-pill {
    font-size: 10px;
    font-weight: 700;
    color: var(--text-muted, #64748b);
    padding: 2px 4px;
}

.clean-flag-note {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11.5px;
    color: #16a34a;
    font-weight: 700;
}

.clean-icon {
    width: 14px;
    height: 14px;
}

/* Score Cell */
.score-cell-wrap {
    width: 90px;
}

.score-number {
    font-size: 14px;
    font-weight: 900;
    margin-bottom: 4px;
}

.score-number small {
    font-size: 10px;
    color: var(--text-muted, #94a3b8);
}

.score-txt-safe { color: #16a34a; }
.score-txt-medium { color: #d97706; }
.score-txt-high { color: #dc2626; }

.score-progress-bar {
    width: 100%;
    height: 6px;
    background: var(--bg-body, #e2e8f0);
    border-radius: 999px;
    overflow: hidden;
}

.score-fill {
    height: 100%;
    border-radius: 999px;
}

.fill-safe { background: #16a34a; }
.fill-medium { background: #d97706; }
.fill-high { background: #dc2626; }

/* Table Actions */
.actions-group {
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-table-action {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 10px;
    font-size: 11.5px;
    font-weight: 800;
    cursor: pointer;
    border: none;
    transition: all 0.15s ease;
}

.btn-table-action svg,
.btn-table-action i {
    width: 13px;
    height: 13px;
}

.btn-inspect {
    background: var(--primary-light, rgba(249, 115, 22, 0.1));
    color: var(--primary-color, #f97316);
    border: 1px solid rgba(249, 115, 22, 0.3);
}

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

.btn-copy-title {
    background: var(--bg-body, #f1f5f9);
    color: var(--text-muted, #64748b);
    border: 1px solid var(--border-color, #e2e8f0);
    padding: 6px 8px;
}

.btn-copy-title:hover {
    color: var(--primary-color, #f97316);
    border-color: var(--primary-color, #f97316);
}

/* Empty Table State */
.empty-table-cell {
    padding: 40px 20px !important;
    text-align: center;
}

.empty-state-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    color: var(--text-muted, #64748b);
    font-size: 13px;
    font-weight: 600;
}

.empty-icon {
    width: 32px;
    height: 32px;
    opacity: 0.4;
}

/* Pagination Footer */
.table-pagination-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    background: var(--bg-body, #f8fafc);
    border-top: 1px solid var(--border-color, #e2e8f0);
    font-size: 12px;
    font-weight: 700;
    color: var(--text-muted, #64748b);
    flex-wrap: wrap;
    gap: 12px;
}

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

.rows-per-page-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    gap: 6px;
}

.rpp-trigger-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    background: var(--card-bg, #ffffff);
    border: 1px solid var(--border-color, #cbd5e1);
    border-radius: 8px;
    font-size: 11.5px;
    font-weight: 800;
    color: var(--text-main, #0f172a);
    cursor: pointer;
}

.rpp-dropdown.crd-menu {
    position: absolute;
    bottom: calc(100% + 6px);
    right: 0;
    background: var(--card-bg, #ffffff);
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: 12px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.15);
    padding: 4px;
    min-width: 80px;
    z-index: 100;
}

.rpp-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 11.5px;
    font-weight: 700;
    color: var(--text-main, #334155);
    cursor: pointer;
}

.rpp-option:hover {
    background: var(--bg-body, #f1f5f9);
    color: var(--primary-color, #f97316);
}

.rpp-option.selected {
    background: var(--primary-light, rgba(249, 115, 22, 0.1));
    color: var(--primary-color, #f97316);
}

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

.pg-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    background: var(--card-bg, #ffffff);
    border: 1px solid var(--border-color, #cbd5e1);
    border-radius: 8px;
    font-size: 11.5px;
    font-weight: 800;
    color: var(--text-main, #0f172a);
    cursor: pointer;
}

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

.pg-current {
    font-weight: 800;
    color: var(--text-main, #0f172a);
}

/* Compliance Footer Note */
.compliance-footer-note {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 16px 20px;
    background: var(--card-bg, #ffffff);
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: 16px;
    font-size: 12px;
    line-height: 1.6;
    color: var(--text-muted, #64748b);
}

.note-icon {
    width: 16px;
    height: 16px;
    color: var(--primary-color, #f97316);
    flex-shrink: 0;
    margin-top: 2px;
}

/* --- 6. ZERO-SCROLL TRAP ROOT MODALS --- */
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;
    align-items: center;
    justify-content: center;
    animation: modalBgIn 0.25s ease;
}

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

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

.inspect-modal-card {
    max-width: 820px;
}

.legal-modal-card {
    max-width: 580px;
}

@keyframes modalSlideUp {
    from { opacity: 0; transform: translateY(16px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

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

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

.modal-icon-primary {
    width: 24px;
    height: 24px;
    color: var(--primary-color, #f97316);
    flex-shrink: 0;
}

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

.modal-subtitle {
    font-size: 12px;
    color: var(--text-muted, #64748b);
    max-width: 600px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.modal-close-btn {
    border: none;
    background: var(--bg-body, #f1f5f9);
    color: var(--text-muted, #64748b);
    width: 32px;
    height: 32px;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
}

.modal-close-btn:hover {
    color: #ef4444;
    background: #fee2e2;
}

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

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

.btn-modal-close {
    padding: 8px 18px;
    background: var(--card-bg, #ffffff);
    border: 1px solid var(--border-color, #cbd5e1);
    border-radius: 10px;
    font-size: 13px;
    font-weight: 700;
    color: var(--text-main, #334155);
    cursor: pointer;
}

/* Modal Risk Banner */
.modal-risk-banner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 18px;
    border-radius: 14px;
    background: var(--bg-body, #f8fafc);
    border: 1px solid var(--border-color, #e2e8f0);
}

.mrb-status {
    display: flex;
    align-items: center;
    gap: 12px;
}

.mrb-label {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-muted, #64748b);
}

.mrb-score {
    display: flex;
    align-items: baseline;
    gap: 6px;
}

.score-lbl {
    font-size: 12px;
    color: var(--text-muted, #64748b);
    font-weight: 700;
}

.score-val {
    font-size: 20px;
    font-weight: 900;
    color: var(--text-main, #0f172a);
}

/* Inspect Section Card */
.inspect-section-card {
    background: var(--bg-body, #f8fafc);
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: 16px;
    padding: 18px 20px;
}

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

.isc-icon {
    width: 18px;
    height: 18px;
    color: var(--primary-color, #f97316);
}

.isc-title {
    font-size: 14.5px;
    font-weight: 800;
    color: var(--text-main, #0f172a);
    margin: 0;
}

/* Title Comparison */
.title-compare-wrap {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.title-box {
    background: var(--card-bg, #ffffff);
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: 12px;
    padding: 12px 14px;
}

.tb-tag {
    font-size: 11px;
    font-weight: 800;
    color: var(--text-muted, #64748b);
    margin-bottom: 4px;
    display: block;
}

.tb-top-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.tag-safe {
    color: #16a34a;
}

.tb-text {
    font-size: 13.5px;
    font-weight: 700;
    color: var(--text-main, #1e293b);
    margin: 0;
    line-height: 1.5;
}

.text-safe {
    color: #15803d;
}

.title-compare-arrow {
    display: flex;
    justify-content: center;
}

.arrow-down-icon {
    width: 18px;
    height: 18px;
    color: var(--primary-color, #f97316);
}

.btn-copy-mini {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    background: var(--primary-light, rgba(249, 115, 22, 0.1));
    border: 1px solid rgba(249, 115, 22, 0.3);
    border-radius: 8px;
    font-size: 11px;
    font-weight: 800;
    color: var(--primary-color, #f97316);
    cursor: pointer;
}

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

.btn-copy-mini svg,
.btn-copy-mini i {
    width: 12px;
    height: 12px;
}

/* Triggers Table in Modal */
.triggers-table-wrap {
    width: 100%;
    overflow-x: auto;
}

.triggers-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.triggers-table th {
    padding: 8px 10px;
    font-weight: 800;
    color: var(--text-muted, #64748b);
    border-bottom: 1px solid var(--border-color, #e2e8f0);
    text-align: start;
}

.triggers-table td {
    padding: 10px;
    border-bottom: 1px solid var(--border-color, #f1f5f9);
    vertical-align: middle;
}

.flag-badge {
    padding: 2px 8px;
    border-radius: 6px;
    font-weight: 800;
    font-size: 11.5px;
    background: #fee2e2;
    color: #dc2626;
}

.loc-badge {
    background: var(--bg-body, #f1f5f9);
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 700;
    font-size: 10.5px;
}

.safe-alt-text {
    color: #15803d;
    font-size: 12.5px;
}

.btn-mini-copy {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border: 1px solid var(--border-color, #cbd5e1);
    background: #ffffff;
    border-radius: 6px;
    font-size: 10.5px;
    font-weight: 700;
    color: var(--text-main, #334155);
    cursor: pointer;
}

.btn-mini-copy:hover {
    color: var(--primary-color, #f97316);
    border-color: var(--primary-color, #f97316);
}

.empty-triggers-box {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 12px;
    color: #15803d;
    font-size: 13px;
    font-weight: 700;
}

.clean-check-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

/* Mitigation Checklist */
.mitigation-checklist {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.mitigation-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 13px;
    line-height: 1.5;
    color: var(--text-main, #1e293b);
}

.step-check-icon {
    width: 16px;
    height: 16px;
    color: #16a34a;
    flex-shrink: 0;
    margin-top: 3px;
}

/* Legal Links */
.legal-links-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 14px;
}

.legal-link-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: var(--bg-body, #f8fafc);
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: 10px;
    font-size: 12.5px;
    font-weight: 700;
    color: var(--primary-color, #f97316);
    text-decoration: none;
    transition: all 0.15s ease;
}

.legal-link-item:hover {
    background: var(--card-bg, #ffffff);
    box-shadow: var(--shadow-sm);
}

.legal-link-item svg,
.legal-link-item i {
    width: 14px;
    height: 14px;
}

/* Toast */
.cpg-toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: var(--text-main, #0f172a);
    color: #ffffff;
    padding: 12px 20px;
    border-radius: 14px;
    font-size: 13px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
    z-index: 9999999;
}

.toast-icon {
    width: 18px;
    height: 18px;
    color: #10b981;
}

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

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

/* RTL Specific Overrides */
.rtl .segment-dropdown.glass-menu {
    right: 0;
    left: auto;
}

.rtl .sort-menu {
    left: 0;
    right: auto;
}

.rtl .rpp-dropdown.crd-menu {
    left: 0;
    right: auto;
}

.rtl .cpg-toast {
    right: auto;
    left: 24px;
}

/* Quantum Glass Tooltip */
.quantum-tooltip {
    background: var(--card-bg, #ffffff) !important;
    border: 1px solid var(--border-color, rgba(226, 232, 240, 0.8)) !important;
    border-radius: 12px !important;
    padding: 10px 14px !important;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.2), 0 8px 10px -6px rgba(0, 0, 0, 0.1) !important;
    backdrop-filter: blur(14px) !important;
    font-family: inherit !important;
    color: var(--text-main, #0f172a) !important;
}

/* Responsive Breakpoints */
@media (max-width: 992px) {
    .bento-features-cluster {
        grid-template-columns: repeat(2, 1fr);
    }
    .bc-wide-top,
    .bc-wide-mid,
    .bc-tall {
        grid-column: span 2;
        grid-row: span 1;
    }
    .kpi-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .analytics-row {
        grid-template-columns: 1fr;
    }
    .pillars-micro-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .quantum-rings-legend {
        flex-wrap: wrap;
        gap: 12px;
    }
}

@media (max-width: 680px) {
    .unified-search-bar {
        flex-direction: column;
        align-items: stretch;
        padding: 10px;
    }
    .search-divider {
        display: none;
    }
    .bento-features-cluster {
        grid-template-columns: 1fr;
    }
    .bc-wide-top,
    .bc-wide-mid,
    .bc-tall {
        grid-column: span 1;
    }
    .kpi-grid {
        grid-template-columns: 1fr;
    }
    .prp-status-banner {
        flex-direction: column;
        align-items: flex-start;
    }
    .pillars-micro-grid {
        grid-template-columns: 1fr;
    }
    .analytics-header {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }
    .chart-view-modes {
        width: 100%;
        justify-content: space-between;
    }
    .mode-pill-btn {
        flex: 1;
        justify-content: center;
    }
}

/* ==========================================================================
   AI Deep Policy Audit Extensions (Single & Bulk)
   ========================================================================== */

/* Tools Toolbar Row */
.toolbar-tools-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Bulk AI Deep Audit Button */
.btn-bulk-ai {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 18px;
    border-radius: 12px;
    border: 1px solid rgba(249, 115, 22, 0.3);
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.12) 0%, rgba(234, 88, 12, 0.2) 100%);
    color: var(--primary-color, #f97316);
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
}

.btn-bulk-ai:hover:not(:disabled) {
    background: var(--primary-color, #f97316);
    color: #ffffff;
    box-shadow: 0 4px 16px rgba(249, 115, 22, 0.35);
    transform: translateY(-2px);
}

.btn-bulk-ai:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.anim-sparkle {
    display: inline-flex;
    animation: sparkle-glow 2s ease-in-out infinite;
}

@keyframes sparkle-glow {
    0%, 100% { transform: scale(1); opacity: 0.9; }
    50% { transform: scale(1.18); opacity: 1; filter: drop-shadow(0 0 6px currentColor); }
}

/* Live Bulk AI Progress Bar */
.bulk-ai-progress-bar-wrap {
    margin: 14px 20px 6px;
    padding: 14px 18px;
    background: var(--bg-surface, rgba(0, 0, 0, 0.03));
    border: 1px solid rgba(249, 115, 22, 0.25);
    border-radius: 14px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}

.bap-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    font-size: 13px;
    font-weight: 750;
    color: var(--text-main, #0f172a);
}

.bap-title {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--primary-color, #f97316);
}

.bap-pct {
    font-weight: 900;
    color: var(--primary-color, #f97316);
}

.bap-track {
    width: 100%;
    height: 8px;
    background: rgba(0, 0, 0, 0.08);
    border-radius: 999px;
    overflow: hidden;
}

.bap-fill {
    height: 100%;
    background: linear-gradient(90deg, #f97316, #10b981);
    border-radius: 999px;
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Single AI Video Audit Button in Table */
.btn-ai-single {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 12px;
    border-radius: 9px;
    border: 1px solid rgba(249, 115, 22, 0.3);
    background: rgba(249, 115, 22, 0.08);
    color: var(--primary-color, #f97316);
    font-size: 11.5px;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn-ai-single:hover:not(:disabled) {
    background: var(--primary-color, #f97316);
    color: #ffffff;
    box-shadow: 0 2px 10px rgba(249, 115, 22, 0.3);
}

.btn-ai-single.is-verified {
    background: rgba(16, 185, 129, 0.1);
    border-color: rgba(16, 185, 129, 0.3);
    color: #10b981;
}

.badge-ai-pill, .badge-ai-verified {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 7px;
    border-radius: 6px;
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #10b981;
    font-size: 10.5px;
    font-weight: 800;
}

.badge-ai-pill svg, .badge-ai-verified svg {
    width: 11px !important;
    height: 11px !important;
}

/* Mini Spinner */
.mini-spinner {
    width: 12px;
    height: 12px;
    border: 2px solid rgba(249, 115, 22, 0.3);
    border-top-color: var(--primary-color, #f97316);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    display: inline-block;
}

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

/* Bulk AI Confirmation Modal Card */
.bulk-ai-modal-card {
    max-width: 540px !important;
}

.ai-sparkle-icon-wrap {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.15) 0%, rgba(234, 88, 12, 0.25) 100%);
    color: var(--primary-color, #f97316);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.ai-sparkle-icon-wrap svg {
    width: 20px !important;
    height: 20px !important;
}

.bulk-credit-summary-box {
    display: flex;
    align-items: center;
    justify-content: space-around;
    padding: 18px 16px;
    border-radius: 14px;
    background: var(--bg-surface, rgba(0, 0, 0, 0.03));
    border: 1px dashed var(--border-color, #e2e8f0);
    margin: 16px 0;
}

.bcs-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.bcs-label {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-muted, #64748b);
}

.bcs-val {
    font-size: 20px;
    font-weight: 900;
    color: var(--text-main, #0f172a);
}

.bcs-divider {
    width: 1px;
    height: 40px;
    background: var(--border-color, #e2e8f0);
}

.bulk-modal-tip {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 12px;
    line-height: 1.5;
    color: var(--text-muted, #64748b);
    margin: 0;
}

.bulk-modal-tip svg {
    width: 16px !important;
    height: 16px !important;
    color: var(--primary-color, #f97316);
    flex-shrink: 0;
    margin-top: 2px;
}

.bulk-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 16px 20px;
}

.btn-bulk-cancel {
    padding: 10px 18px;
    border-radius: 10px;
    border: 1px solid var(--border-color, #e2e8f0);
    background: var(--card-bg, #ffffff);
    color: var(--text-muted, #64748b);
    font-size: 13px;
    font-weight: 750;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-bulk-cancel:hover {
    background: var(--bg-surface, #f8fafc);
    color: var(--text-main, #0f172a);
}

.btn-bulk-confirm {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 22px;
    border-radius: 10px;
    border: none;
    background: linear-gradient(135deg, var(--primary-color, #f97316) 0%, #ea580c 100%);
    color: #ffffff;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(249, 115, 22, 0.35);
    transition: all 0.2s ease;
}

.btn-bulk-confirm:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(249, 115, 22, 0.45);
}

/* AI Deep Audit Section inside Modal 1 */
.ai-deep-audit-section {
    border-color: rgba(249, 115, 22, 0.35) !important;
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.03) 0%, rgba(234, 88, 12, 0.06) 100%) !important;
}

.ai-sparkle-badge-icon {
    color: var(--primary-color, #f97316);
    display: inline-flex;
}

.ai-rationale-box {
    padding: 14px 16px;
    border-radius: 12px;
    background: var(--card-bg, #ffffff);
    border: 1px solid var(--border-color, #e2e8f0);
    margin-bottom: 14px;
    font-size: 13px;
    line-height: 1.6;
    color: var(--text-main, #0f172a);
}

.ai-actionable-tip {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dashed var(--border-color, #e2e8f0);
    font-size: 12px;
    color: #10b981;
}

.ai-titles-list-wrap {
    margin-top: 10px;
}

.ai-titles-header {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 800;
    color: var(--text-muted, #64748b);
    margin-bottom: 8px;
}

.ai-title-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: 10px;
    background: var(--card-bg, #ffffff);
    border: 1px solid var(--border-color, #e2e8f0);
    margin-bottom: 8px;
    transition: all 0.2s ease;
}

.ai-title-row:hover {
    border-color: var(--primary-color, #f97316);
    box-shadow: var(--shadow-sm);
}

.ai-title-num {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: rgba(249, 115, 22, 0.12);
    color: var(--primary-color, #f97316);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 900;
    flex-shrink: 0;
}

.ai-title-content {
    flex: 1;
    font-size: 13px;
    font-weight: 750;
    color: var(--text-main, #0f172a);
    line-height: 1.4;
}

.btn-copy-ai-title {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    border-radius: 7px;
    border: 1px solid var(--border-color, #e2e8f0);
    background: var(--bg-surface, #f8fafc);
    color: var(--text-main, #0f172a);
    font-size: 11.5px;
    font-weight: 750;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.btn-copy-ai-title:hover {
    border-color: var(--primary-color, #f97316);
    color: var(--primary-color, #f97316);
}

/* AI Trigger Promo inside Modal when unverified */
.ai-trigger-promo {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 16px 20px !important;
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.05) 0%, rgba(234, 88, 12, 0.08) 100%) !important;
    border: 1px dashed rgba(249, 115, 22, 0.35) !important;
}

.atp-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

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

.atp-content h5 {
    font-size: 13.5px;
    font-weight: 800;
    color: var(--text-main, #0f172a);
    margin: 0 0 3px;
}

.atp-content p {
    font-size: 11.5px;
    color: var(--text-muted, #64748b);
    margin: 0;
    line-height: 1.4;
}

.btn-modal-ai-audit {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 16px;
    border-radius: 9px;
    border: none;
    background: linear-gradient(135deg, var(--primary-color, #f97316) 0%, #ea580c 100%);
    color: #ffffff;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 3px 10px rgba(249, 115, 22, 0.3);
    white-space: nowrap;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.btn-modal-ai-audit:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 5px 14px rgba(249, 115, 22, 0.4);
}

.btn-modal-ai-audit:disabled {
    opacity: 0.75;
    cursor: not-allowed;
}

.btn-modal-ai-audit .mini-spinner {
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-top-color: #ffffff;
    width: 14px;
    height: 14px;
}

/* Modal Live AI Loading State */
.modal-ai-loading-state {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px 22px;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.08) 0%, rgba(234, 88, 12, 0.12) 100%);
    border: 1px solid rgba(249, 115, 22, 0.35);
    box-shadow: 0 4px 20px rgba(249, 115, 22, 0.12);
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
}

.ai-loading-orb {
    position: relative;
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--primary-color, #f97316) 0%, #ea580c 100%);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 4px 14px rgba(249, 115, 22, 0.35);
}

.orb-icon-spin svg {
    width: 22px !important;
    height: 22px !important;
    animation: spin 3s linear infinite;
}

.pulsing-halo {
    position: absolute;
    inset: -4px;
    border-radius: 18px;
    border: 2px solid var(--primary-color, #f97316);
    opacity: 0.6;
    animation: haloPulse 1.8s ease-out infinite;
}

@keyframes haloPulse {
    0% { transform: scale(0.95); opacity: 0.8; }
    50% { transform: scale(1.15); opacity: 0.2; }
    100% { transform: scale(0.95); opacity: 0.8; }
}

.ai-loading-texts {
    flex: 1;
}

.ai-loading-texts h4 {
    font-size: 14px;
    font-weight: 850;
    color: var(--text-main, #0f172a);
    margin: 0 0 4px;
}

.ai-loading-texts p {
    font-size: 12px;
    color: var(--text-muted, #64748b);
    margin: 0;
    line-height: 1.45;
}

.ai-loading-dots {
    display: flex;
    gap: 4px;
    align-items: center;
}

.ai-loading-dots span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--primary-color, #f97316);
    animation: dotsBounce 1.4s infinite ease-in-out both;
}

.ai-loading-dots span:nth-child(1) { animation-delay: -0.32s; }
.ai-loading-dots span:nth-child(2) { animation-delay: -0.16s; }

@keyframes dotsBounce {
    0%, 80%, 100% { transform: scale(0); opacity: 0.3; }
    40% { transform: scale(1); opacity: 1; }
}

/* AI Verified Badges in Table Video Cell */
.badge-ai-verified-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 7px;
    border-radius: 6px;
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #10b981;
    font-size: 10px;
    font-weight: 800;
    margin-inline-start: 6px;
    vertical-align: middle;
}

.badge-ai-verified-tag svg {
    width: 10px !important;
    height: 10px !important;
}

.badge-ai-cleared {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 10.5px;
    font-weight: 700;
    color: #10b981;
    margin-top: 4px;
}

.badge-ai-cleared svg {
    width: 12px !important;
    height: 12px !important;
}

.btn-ai-single.is-verified:hover {
    background: #10b981 !important;
    border-color: #10b981 !important;
    color: #ffffff !important;
    box-shadow: 0 3px 12px rgba(16, 185, 129, 0.35) !important;
}

