/* ==========================================================================
   APIs Analytics Report Module Styles
   Enhanced with Coderstation Widgets: smallbox, infobox, and cards
   ========================================================================== */

.analytics-container {
    width: 100%;
    min-height: 100%;
    padding: 1.5rem 1.75rem;
    box-sizing: border-box;
    display: flex !important;
    flex-direction: column !important;
}

/* AI Automated Intelligence 3 Separate Cards */
.ai-insight-card {
    border: 1px solid #e2e8f0 !important;
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.04);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.ai-insight-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08) !important;
    border-color: #cbd5e1 !important;
}

.ai-insight-card .card-custom-header {
    padding: 10px 16px;
}

.ai-insight-card .card-body {
    padding: 16px;
    min-height: 140px;
    background: #ffffff;
}

.ai-insight-card .ai-insight-text {
    font-size: 0.825rem;
    color: #475569;
    line-height: 1.5;
}

.ai-insight-card .ai-insight-text strong {
    color: #0f172a;
}

.ai-insight-card .ai-insight-metrics {
    background: #f8fafc;
    border: 1px solid #edf2f7;
    border-radius: 8px;
    padding: 7px 12px;
    font-size: 0.78rem;
    margin-top: 10px;
}

.ai-insight-card .card-custom-footer {
    padding: 9px 16px;
    background: #f8fafc;
    border-top: 1px solid #f1f5f9;
    font-size: 0.78rem;
    color: var(--primary-color) !important;
    border-radius: 0 0 11px 11px;
}

.ai-insight-card .card-custom-footer span,
.ai-insight-card .card-custom-footer .small,
.ai-insight-card .card-custom-footer .text-muted {
    color: var(--primary-color) !important;
}

/* Card Widgets Customizations */
.coderstation-card {
    margin-bottom: 0 !important;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.04);
}

.coderstation-card .card-custom-header {
    border-radius: 11px 11px 0 0;
    padding: 10px 16px;
}

.coderstation-card .card-custom-header .header-title {
    font-size: 0.96rem;
    font-weight: 700;
}

.coderstation-card .card-body {
    position: relative;
}

.coderstation-card .card-custom-footer {
    background: #f8fafc;
    border-top: 1px solid #f1f5f9;
    border-radius: 0 0 11px 11px;
    padding: 8px 16px;
    font-size: 0.76rem;
}

/* Chart Empty State */
.chart-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    padding: 2.5rem 1rem;
    text-align: center;
    min-height: 260px;
}

.chart-empty-state i {
    font-size: 2.2rem;
    margin-bottom: 0.5rem;
    color: #cbd5e1;
}

/* Combined Providers & Request Status Table Styles */
#providersCombinedTable thead th {
    font-size: 0.76rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: #64748b;
    background-color: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    padding: 10px 12px;
}

#providersCombinedTable tbody td {
    padding: 9px 12px;
    font-size: 0.835rem;
    border-bottom: 1px solid #f1f5f9;
}

#providersCombinedTable tbody tr:hover td {
    background-color: #f8fafc;
}

.provider-avatar-circle {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.provider-avatar-circle img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 4px;
}

#providersCombinedTable tbody tr:hover .provider-avatar-circle {
    transform: scale(1.08);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12) !important;
}

/* Models Breakdown Table Styles */
#modelsBreakdownTable thead th {
    font-size: 0.74rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    color: #64748b;
    background-color: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    padding: 8px 10px;
    white-space: nowrap;
}

#modelsBreakdownTable tbody td {
    padding: 7px 10px;
    font-size: 0.81rem;
    border-bottom: 1px solid #f1f5f9;
}

#modelsBreakdownTable tbody tr:hover td {
    background-color: #f8fafc;
}

/* Use Case & Model Analytics Custom Header */
.card-custom-header.header-usecase {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    color: #fff;
    border-bottom: none;
}
.card-custom-header.header-usecase .header-icon {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

/* Use Case Table Styles */
#usecaseModelsTable thead th {
    font-size: 0.74rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    color: #64748b;
    background-color: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    padding: 8px 10px;
    white-space: nowrap;
}

#usecaseModelsTable tbody td {
    padding: 7px 10px;
    font-size: 0.81rem;
    border-bottom: 1px solid #f1f5f9;
}

#usecaseModelsTable tbody tr:hover td {
    background-color: #f8fafc;
}

/* Use Case Filter Buttons */
.usecase-filter-btn {
    font-size: 0.72rem !important;
    padding: 2px 8px !important;
    border-radius: 6px !important;
    font-weight: 600;
    transition: all 0.15s ease;
}

.usecase-filter-btn.active {
    background-color: #4f46e5 !important;
    border-color: #4f46e5 !important;
    color: #ffffff !important;
    box-shadow: 0 2px 6px rgba(79, 70, 229, 0.25);
}

.usecase-pill-badge {
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    cursor: pointer;
}

.usecase-pill-badge:hover {
    transform: translateY(-2px);
    box-shadow: 0 3px 8px rgba(0,0,0,0.08);
}

/* Standard Equal Height for Analytics Card Panels across all 3 reports */
.analytics-panel-equal {
    height: 410px !important;
    min-height: 410px !important;
    max-height: 410px !important;
    box-sizing: border-box !important;
}

.analytics-table-scroll {
    overflow-y: auto !important;
    overflow-x: hidden !important;
}

/* Balanced Use Case Data Items */
.usecase-item-card {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
}

.usecase-item-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.06);
    border-color: #cbd5e1 !important;
}

.usecase-item-card.active {
    border-color: var(--primary-color, #4f46e5) !important;
    background-color: #f8fafc !important;
    box-shadow: 0 0 0 1px var(--primary-color, #4f46e5) !important;
}

/* Provider Traffic Share Container Enhancements */
.pa-traffic-share-panel {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden !important;
    box-sizing: border-box !important;
}

.pa-pills-scroll-container {
    overflow-y: auto !important;
    overflow-x: hidden !important;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
}

.pa-pills-scroll-container::-webkit-scrollbar {
    width: 4px;
}

.pa-pills-scroll-container::-webkit-scrollbar-thumb {
    background-color: #cbd5e1;
    border-radius: 4px;
}

.pa-provider-pill-item {
    transition: all 0.15s ease-in-out;
    background: #f8fafc;
    border: 1px solid #edf2f7;
    cursor: default;
}

.pa-provider-pill-item:hover {
    background: #f1f5f9;
    border-color: #e2e8f0;
    transform: translateX(2px);
}

.pa-mini-telemetry-box {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 6px 10px;
}

/* Executive KPI Metrics Cards Enhancement (Compact Unified Green Theme) */
.exec-kpi-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 0.65rem 0.8rem;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.exec-kpi-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.08);
    border-color: #a7f3d0;
}

.exec-kpi-icon-circle {
    width: 26px;
    height: 26px;
    border-radius: 6px;
    background: rgba(16, 185, 129, 0.12);
    color: #10b981;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 0.74rem;
}

.exec-kpi-label {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    color: #64748b;
    margin: 0;
}

.exec-kpi-value {
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.15;
    margin-bottom: 0;
    color: #0f172a;
}

/* Executive Intelligence Line Percentage Enhancement (Unified Green Theme) */
.ai-insight-progress-track {
    height: 7px !important;
    background-color: #e2e8f0 !important;
    border-radius: 999px !important;
    overflow: hidden !important;
    box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.08);
    position: relative;
}

.ai-insight-progress-bar {
    background: linear-gradient(90deg, #34d399 0%, #10b981 55%, #059669 100%) !important;
    border-radius: 999px !important;
    box-shadow: 0 1px 5px rgba(16, 185, 129, 0.4);
    transition: width 0.7s cubic-bezier(0.4, 0, 0.2, 1) !important;
    position: relative;
}

.ai-insight-progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.28) 0%, rgba(255, 255, 255, 0) 100%);
    border-radius: 999px;
    pointer-events: none;
}

/* Light Semi-Transparent Blue Badge */
.badge-soft-blue {
    background-color: rgba(59, 130, 246, 0.12) !important;
    color: var(--primary-color) !important;
    border: 1px solid rgba(59, 130, 246, 0.22) !important;
}

/* ==========================================================================
   Remove Glowing Effects on Hover on Container Components across All Report Pages:
   "APIS Analytic Report", "Provider Analytics", "Model Analytics", "User Analytics"
   ========================================================================== */
.analytics-container .coderstation-card,
.analytics-container .coderstation-card:hover,
.analytics-container .coderstation-card.card-top-secondary,
.analytics-container .coderstation-card.card-top-secondary:hover,
.analytics-container .coderstation-card.no-hover,
.analytics-container .coderstation-card.no-hover:hover,
.analytics-container .card-top-secondary,
.analytics-container .card-top-secondary:hover,
.analytics-container .card-border-top-secondary,
.analytics-container .card-border-top-secondary:hover,
#apiAnalyticsReportModule .coderstation-card,
#apiAnalyticsReportModule .coderstation-card:hover,
#providerAnalyticsModule .coderstation-card,
#providerAnalyticsModule .coderstation-card:hover,
#modelAnalyticsModule .coderstation-card,
#modelAnalyticsModule .coderstation-card:hover,
#userAnalyticsModule .coderstation-card,
#userAnalyticsModule .coderstation-card:hover,
#execOverviewCard,
#execOverviewCard:hover,
#execUsecaseCard,
#execUsecaseCard:hover,
#execCombinedLeaderboardsCard,
#execCombinedLeaderboardsCard:hover,
#paAIInsightsCard,
#paAIInsightsCard:hover,
#paProvidersCombinedCard,
#paProvidersCombinedCard:hover,
#maOverviewCard,
#maOverviewCard:hover,
#maModelsUsageCard,
#maModelsUsageCard:hover,
#maUsecasesCard,
#maUsecasesCard:hover,
#uaOverviewCard,
#uaOverviewCard:hover,
#uaTrafficCard,
#uaTrafficCard:hover,
#uaUsersCard,
#uaUsersCard:hover {
    transform: none !important;
    border-top: 3.5px solid var(--secondary-color, #FF5C0A) !important;
    border-top-width: 3.5px !important;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.04) !important;
    outline: none !important;
}

/* ==========================================================================
   User Analytics Equal-Width Badges:
   - "Traffic by Action Breakdown" percentage badges
   - "Registered Users & Consumer Telemetry Directory" Role & LLM Calls badges
   ========================================================================== */
.ua-action-badge {
    width: 54px !important;
    min-width: 54px !important;
    max-width: 54px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    white-space: nowrap !important;
    box-sizing: border-box !important;
}

/* ==========================================================================
   Analytics Reports: Table Column Data Badges
   - Equal 4px left and right padding across all table column badges
   - Automatic per-column equal widths managed by coderstation.badge-equalizer.js
   ========================================================================== */
.analytics-container table tbody td .badge,
.analytics-container table tbody td .coderstation-badge,
.analytics-container table tbody td [class*=badge-] {
    padding-left: 4px !important;
    padding-right: 4px !important;
    box-sizing: border-box !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    white-space: nowrap !important;
}

/* ==========================================================================
   Card Custom Footer & Left-aligned Captions
   ========================================================================== */
.card-custom-footer {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    text-align: left !important;
}

.card-custom-footer:not(.justify-content-end) > span:first-child:not(:last-child),
.card-custom-footer .footer-caption {
    margin-right: auto !important;
    text-align: left !important;
    display: inline-flex !important;
    align-items: center !important;
}

.card-custom-footer > span:last-child:not(:first-child),
.card-custom-footer.justify-content-end,
.card-custom-footer.justify-content-end > span,
#paProviderCombinedFooterSummary {
    margin-left: auto !important;
    margin-right: 0 !important;
    text-align: right !important;
}

.card-custom-footer.justify-content-end {
    justify-content: flex-end !important;
}

/* ==========================================================================
   Platform Domain Leaderboards: Equal Width Badges with 4px Padding
   - Ranked Active Providers (#execTopProvidersList)
   - Ranked Monitored Models (#execTopModelsList)
   - Top Active Consumers (#execTopUsersList)
   ========================================================================== */
#execCombinedLeaderboardsCard .badge,
#execTopProvidersList .badge,
#execTopModelsList .badge,
#execTopUsersList .badge {
    padding-left: 4px !important;
    padding-right: 4px !important;
    box-sizing: border-box !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    white-space: nowrap !important;
}
