/* AI Ops Platform - Airtel Brand Theme (White/Red/Black) */

/* ============================================
   CSS Variables & Base - Airtel Colors
   ============================================ */
:root {
    /* Airtel Brand Colors */
    --airtel-red: #ED1C24;
    --airtel-red-dark: #C41920;
    --airtel-red-light: #FF4D54;
    --airtel-black: #000000;
    --airtel-white: #FFFFFF;

    /* Backgrounds */
    --bg-primary: #FFFFFF;
    --bg-secondary: #F8F9FA;
    --bg-card: #FFFFFF;
    --bg-sidebar: #1A1A1A;

    /* Text Colors */
    --text-primary: #1A1A1A;
    --text-secondary: #4A4A4A;
    --text-muted: #6B7280;
    --text-light: #9CA3AF;

    /* Accent Colors */
    --accent-primary: var(--airtel-red);
    --accent-secondary: #374151;

    /* Status Colors */
    --success: #10B981;
    --warning: #F59E0B;
    --danger: var(--airtel-red);

    /* Borders */
    --border-color: #E5E7EB;
    --border-dark: #D1D5DB;

    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.15);

    /* Radius */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-xl: 18px;

    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: var(--bg-secondary);
    min-height: 100vh;
    color: var(--text-secondary);
    display: flex;
}

/* ============================================
   Sidebar - Black Theme
   ============================================ */
.sidebar {
    width: 260px;
    background: linear-gradient(180deg, #1A1A1A 0%, #2D2D2D 100%);
    border-right: none;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    z-index: 100;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.15);
}

.logo {
    padding: 20px;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.logo-icon {
    font-size: 48px;
    display: block;
    margin-bottom: 8px;
}

.logo-text {
    font-size: 22px;
    font-weight: 800;
    color: var(--airtel-red);
}

.logo-subtitle {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.6);
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-top: 4px;
}

.nav-menu {
    flex: 1;
    padding: 20px 12px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    border-radius: var(--radius-md);
    margin-bottom: 6px;
    transition: var(--transition);
    font-weight: 500;
}

.nav-item:hover {
    background: rgba(237, 28, 36, 0.15);
    color: var(--airtel-red);
}

.nav-item.active {
    background: linear-gradient(135deg, var(--airtel-red) 0%, var(--airtel-red-dark) 100%);
    color: white;
    box-shadow: 0 4px 20px rgba(237, 28, 36, 0.4);
}

.nav-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.nav-label {
    white-space: nowrap;
}

.sidebar-footer {
    padding: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.ai-status {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--success);
    font-size: 13px;
    font-weight: 600;
}

.sidebar-version {
    color: rgba(255, 255, 255, 0.3);
    font-size: 11px;
    text-align: center;
}

/* Pulse Animation */
.pulse {
    width: 10px;
    height: 10px;
    background: var(--success);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

.pulse.purple {
    background: var(--airtel-red);
    animation: pulse-red 2s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
    70% { box-shadow: 0 0 0 12px rgba(16, 185, 129, 0); }
    100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

@keyframes pulse-red {
    0% { box-shadow: 0 0 0 0 rgba(237, 28, 36, 0.7); }
    70% { box-shadow: 0 0 0 12px rgba(237, 28, 36, 0); }
    100% { box-shadow: 0 0 0 0 rgba(237, 28, 36, 0); }
}

/* ============================================
   Main Content - White Theme
   ============================================ */
.main-content {
    flex: 1;
    margin-left: 260px;
    padding: 0 20px 20px;
    min-height: 100vh;
    background: var(--bg-secondary);
}

/* Top Bar */
.top-bar {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    min-height: 42px;
    max-height: 42px;
    margin: 0 -20px 14px;
    padding: 0 20px;
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 50;
}

.top-bar-left {
    display: flex;
    align-items: center;
}

.breadcrumb {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.top-bar-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.top-bar-status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--success);
    font-weight: 500;
}

.pulse.small {
    width: 7px;
    height: 7px;
}

.top-bar-divider {
    width: 1px;
    height: 20px;
    background: var(--border-color);
}

.top-bar-tenant {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 500;
}

.top-bar-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--airtel-red);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
}

.tab-content {
    display: none;
    overflow: hidden;
    animation: fadeIn 0.3s ease;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ============================================
   AI Activity Bar
   ============================================ */
.ai-activity-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 24px;
    background: var(--bg-card);
    border: 2px solid var(--success);
    border-radius: var(--radius-md);
    margin-bottom: 30px;
    box-shadow: var(--shadow-sm);
}

.ai-activity-bar.purple {
    border-color: var(--airtel-red);
}

.ai-activity-text {
    color: var(--success);
    font-weight: 600;
    font-size: 14px;
}

.ai-activity-bar.purple .ai-activity-text {
    color: var(--airtel-red);
}

.ai-activity-detail {
    color: var(--text-muted);
    font-size: 13px;
}

/* ============================================
   Section Titles
   ============================================ */
.section-title {
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 10px;
}

.section-subtitle {
    color: var(--text-muted);
    font-size: 12px;
    margin-top: -6px;
    margin-bottom: 10px;
}

/* ============================================
   KPI Cards - White with Red Accents
   ============================================ */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-bottom: 16px;
}

.kpi-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 12px 16px;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.kpi-card:hover {
    box-shadow: var(--shadow-md);
}

.kpi-label {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 6px;
}

.kpi-value {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
    font-variant-numeric: tabular-nums;
}

.kpi-value.danger {
    color: var(--airtel-red);
}

.kpi-value.warning {
    color: var(--warning);
}

.kpi-value.success {
    color: var(--success);
}

.kpi-delta {
    font-size: 12px;
    margin-top: 8px;
}

.kpi-delta.positive {
    color: var(--success);
}

.kpi-delta.negative {
    color: var(--airtel-red);
}

/* ============================================
   Charts
   ============================================ */
.charts-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 20px;
}

.chart-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 12px;
    box-shadow: var(--shadow-sm);
}

.chart-title {
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 12px;
}

.chart-wrapper {
    position: relative;
    height: 250px;
    width: 100%;
}

/* Heatmap */
.heatmap-container {
    display: grid;
    gap: 4px;
}

.heatmap-row {
    display: flex;
    gap: 4px;
    align-items: center;
}

.heatmap-label {
    width: 80px;
    font-size: 11px;
    color: var(--text-muted);
    text-align: right;
    padding-right: 8px;
}

.heatmap-cell {
    width: 60px;
    height: 30px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    color: white;
    font-weight: 600;
}

.heatmap-header {
    display: flex;
    gap: 4px;
    margin-left: 88px;
    margin-bottom: 4px;
}

.heatmap-header span {
    width: 60px;
    font-size: 10px;
    color: var(--text-muted);
    text-align: center;
}

/* ============================================
   ROI Calculator
   ============================================ */
.roi-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.roi-inputs {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 20px;
    box-shadow: var(--shadow-sm);
}

.roi-inputs h3 {
    color: var(--text-primary);
    font-size: 14px;
    margin-bottom: 16px;
}

.input-group {
    margin-bottom: 14px;
}

.input-group label {
    display: block;
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.input-group input,
.input-group select {
    width: 100%;
    padding: 8px 12px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 13px;
    transition: var(--transition);
}

.input-group input:focus,
.input-group select:focus {
    outline: none;
    border-color: var(--airtel-red);
    box-shadow: 0 0 0 3px rgba(237, 28, 36, 0.15);
}

.btn-calculate,
.btn-classify {
    width: 100%;
    padding: 10px 20px;
    background: var(--airtel-red);
    border: none;
    border-radius: var(--radius-sm);
    color: white;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-calculate:hover,
.btn-classify:hover {
    background: var(--airtel-red-dark);
}

.btn-secondary {
    width: 100%;
    padding: 10px 20px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.btn-secondary:hover {
    background: var(--border-color);
}

.roi-result {
    display: flex;
    align-items: flex-start;
}

.savings-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.savings-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 20px;
    text-align: center;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.savings-card:hover {
    border-color: var(--airtel-red);
    box-shadow: var(--shadow-md);
}

.savings-icon {
    font-size: 36px;
    margin-bottom: 12px;
}

.savings-number {
    width: 40px;
    height: 40px;
    background: var(--airtel-red);
    color: white;
    font-size: 18px;
    font-weight: 700;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
}

.savings-label {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.savings-hours {
    font-size: 32px;
    font-weight: 700;
    color: var(--airtel-red);
}

.savings-amount {
    font-size: 14px;
    color: var(--success);
    margin-top: 8px;
}

/* ============================================
   Classification
   ============================================ */
.classification-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.accuracy-section,
.test-section {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 16px;
    box-shadow: var(--shadow-sm);
}

.accuracy-section h3,
.test-section h3 {
    color: var(--text-primary);
    font-size: 14px;
    margin-bottom: 14px;
}

.accuracy-gauge {
    text-align: center;
    margin-bottom: 16px;
}

.gauge-value {
    font-size: 32px;
    font-weight: 700;
    color: var(--success);
}

.gauge-label {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.gauge-bar {
    height: 8px;
    background: var(--bg-secondary);
    border-radius: 4px;
    overflow: hidden;
}

.gauge-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--success), #34D399);
    border-radius: 4px;
    transition: width 1s ease;
}

.accuracy-breakdown {
    margin-top: 20px;
}

.accuracy-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-color);
    font-size: 13px;
}

.accuracy-type {
    color: var(--text-secondary);
}

.accuracy-pct {
    color: var(--success);
    font-weight: 600;
}

.classification-result {
    margin-top: 24px;
    padding: 24px;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
}

.hidden {
    display: none !important;
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.result-label {
    color: var(--text-muted);
    font-size: 12px;
    text-transform: uppercase;
}

.result-type {
    font-size: 20px;
    font-weight: 700;
    color: var(--airtel-red);
}

.result-confidence {
    margin-bottom: 20px;
}

.result-confidence span:first-child {
    color: var(--text-muted);
}

.confidence-value {
    color: var(--success);
    font-weight: 700;
    margin-left: 8px;
}

.probability-bars {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.prob-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.prob-header {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
}

.prob-label {
    color: var(--text-secondary);
}

.prob-value {
    color: var(--text-muted);
}

.prob-bar {
    height: 6px;
    background: var(--border-color);
    border-radius: 3px;
    overflow: hidden;
}

.prob-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.5s ease;
}

/* ============================================
   Repeat Tickets
   ============================================ */
.repeat-summary {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin-bottom: 20px;
}

.summary-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 12px 16px;
    box-shadow: var(--shadow-sm);
}

.summary-label {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.summary-value {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    font-variant-numeric: tabular-nums;
}

/* ============================================
   Data Table
   ============================================ */
.table-container {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th {
    background: var(--bg-secondary);
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 10px 14px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.data-table td {
    padding: 8px 14px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 13px;
}

.data-table tr:hover {
    background: rgba(237, 28, 36, 0.03);
}

.data-table td.loading {
    text-align: center;
    color: var(--text-muted);
    padding: 40px;
}

.data-table td.danger {
    color: var(--airtel-red);
    font-weight: 600;
}

/* ============================================
   Priority Queue
   ============================================ */
.priority-queue {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.queue-item {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-left: 3px solid var(--text-muted);
    border-radius: var(--radius-sm);
    padding: 12px;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.queue-item:hover {
    box-shadow: var(--shadow-md);
}

.queue-item.urgent {
    border-left-color: var(--airtel-red);
}

.queue-item.warning {
    border-left-color: var(--warning);
}

.queue-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.queue-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.priority-badge {
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    color: white;
}

.priority-badge.p1 {
    background: linear-gradient(135deg, var(--airtel-red), var(--airtel-red-dark));
}

.priority-badge.p2 {
    background: linear-gradient(135deg, var(--warning), #D97706);
}

.ticket-id {
    font-weight: 700;
    color: var(--text-primary);
}

.score-badge {
    background: var(--bg-secondary);
    color: var(--text-primary);
    padding: 4px 10px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 12px;
    border: 1px solid var(--border-color);
}

.queue-meta {
    display: flex;
    gap: 16px;
    margin-bottom: 8px;
    font-size: 12px;
    flex-wrap: wrap;
}

.queue-meta strong {
    color: var(--text-primary);
}

.queue-meta .risk-high {
    color: var(--airtel-red);
    font-weight: 600;
}

.queue-meta .risk-medium {
    color: var(--warning);
}

.queue-meta .risk-low {
    color: var(--success);
}

.queue-meta .danger {
    color: var(--airtel-red);
    font-weight: 600;
}

.queue-recommendations {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    padding-top: 8px;
    border-top: 1px solid var(--border-color);
}

.rec-section h4 {
    color: var(--text-muted);
    font-size: 11px;
    text-transform: uppercase;
    margin-bottom: 6px;
}

.rec-section ul {
    list-style: none;
    padding: 0;
}

.rec-section li {
    padding: 3px 0;
    color: var(--text-secondary);
    font-size: 12px;
    display: flex;
    align-items: flex-start;
    gap: 6px;
}

.rec-section li::before {
    content: "→";
    color: var(--airtel-red);
}

.rec-section.immediate li::before {
    content: "•";
    color: var(--airtel-red);
    font-weight: bold;
}

.rec-section.preventive li::before {
    content: "•";
    color: var(--success);
}

.loading-spinner {
    text-align: center;
    padding: 40px;
    color: var(--text-muted);
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 1400px) {
    .kpi-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Skeleton loading animation */
@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 4px;
    color: transparent !important;
}

@media (max-width: 1200px) {
    .sidebar {
        width: 80px;
    }

    .logo-text,
    .logo-subtitle,
    .nav-label,
    .sidebar-version {
        display: none;
    }

    .nav-item {
        justify-content: center;
        padding: 14px;
    }

    .main-content {
        margin-left: 80px;
    }

    .classification-container,
    .roi-container {
        grid-template-columns: 1fr;
    }

    .kpi-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .repeat-summary {
        grid-template-columns: repeat(2, 1fr);
    }

    .savings-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 900px) {
    .charts-grid {
        grid-template-columns: 1fr;
    }

    .kpi-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .savings-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    body {
        flex-direction: column;
    }

    /* Mobile Sidebar - Horizontal at top */
    .sidebar {
        width: 100%;
        height: auto;
        position: sticky;
        top: 0;
        z-index: 1000;
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        flex-direction: row;
        overflow-x: auto;
    }

    .logo {
        padding: 12px 16px;
        min-width: 120px;
        border-bottom: none;
        border-right: 1px solid rgba(255, 255, 255, 0.1);
    }

    .logo-text {
        display: block !important;
        font-size: 18px;
    }

    .logo-subtitle {
        display: block !important;
        font-size: 8px;
    }

    .nav-menu {
        flex-direction: row;
        overflow-x: auto;
        overflow-y: hidden;
        padding: 0;
        scrollbar-width: none;
        -ms-overflow-style: none;
        flex: 1;
    }

    .nav-menu::-webkit-scrollbar {
        display: none;
    }

    .nav-item {
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 4px;
        padding: 10px 16px;
        min-width: 70px;
        flex-shrink: 0;
        border-radius: 0;
    }

    .nav-icon {
        width: 20px;
        height: 20px;
    }

    .nav-label {
        display: block !important;
        font-size: 10px;
        white-space: nowrap;
    }

    .sidebar-footer,
    .sidebar-version {
        display: none;
    }

    /* Main Content */
    .main-content {
        margin-left: 0;
        width: 100%;
        padding: 12px;
    }

    .top-bar {
        margin: 0 -12px 12px;
        padding: 0 12px;
    }

    .hero-section {
        flex-direction: column;
        text-align: center;
    }

    .hero-metrics {
        justify-content: center;
    }

    .kpi-grid,
    .repeat-summary,
    .savings-grid {
        grid-template-columns: 1fr;
    }

    .queue-recommendations {
        grid-template-columns: 1fr;
    }

    .chart-wrapper {
        height: 200px;
    }

    .table-container {
        overflow-x: auto;
    }

    .data-table {
        min-width: 600px;
    }
}

/* ============================================
   AI Value Pipeline
   ============================================ */
.pipeline-container {
    max-width: 900px;
    margin: 0 auto;
}

.pipeline-step {
    display: flex;
    gap: 20px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 20px;
    margin-bottom: 0;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.pipeline-step:hover {
    border-color: var(--airtel-red);
    box-shadow: var(--shadow-md);
}

.step-number {
    width: 50px;
    height: 50px;
    min-width: 50px;
    background: var(--airtel-red);
    color: white;
    font-size: 24px;
    font-weight: 700;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.step-content {
    flex: 1;
}

.step-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.step-traditional,
.step-ai {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    margin-bottom: 12px;
    padding: 12px;
    border-radius: var(--radius-sm);
}

.step-traditional {
    background: #FEF2F2;
}

.step-ai {
    background: #F0FDF4;
}

.step-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 4px 10px;
    border-radius: 4px;
    white-space: nowrap;
}

.step-traditional .step-label {
    background: var(--airtel-red);
    color: white;
}

.step-ai .step-label {
    background: var(--success);
    color: white;
}

.step-traditional p,
.step-ai p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.5;
    margin: 0;
}

.step-impact {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px dashed var(--border-color);
}

.impact-metric {
    font-size: 28px;
    font-weight: 800;
    color: var(--airtel-red);
}

.impact-label {
    font-size: 14px;
    color: var(--text-muted);
}

.pipeline-connector {
    width: 4px;
    height: 30px;
    background: linear-gradient(180deg, var(--airtel-red), var(--airtel-red-light));
    margin: 0 auto;
    border-radius: 2px;
}

.pipeline-summary {
    margin-top: 40px;
}

.impact-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.impact-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 20px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.impact-card:hover {
    border-color: var(--airtel-red);
    transform: translateY(-1px);
}

.impact-card.highlight {
    background: linear-gradient(135deg, var(--airtel-red) 0%, var(--airtel-red-dark) 100%);
    border: none;
}

.impact-card.highlight .impact-value,
.impact-card.highlight .impact-desc {
    color: white;
}

.impact-card .impact-value {
    font-size: 28px;
    font-weight: 800;
    color: var(--airtel-red);
    margin-bottom: 6px;
}

.impact-card .impact-desc {
    font-size: 14px;
    color: var(--text-muted);
}

@media (max-width: 1200px) {
    .impact-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .pipeline-step {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .step-traditional,
    .step-ai {
        flex-direction: column;
        align-items: center;
    }

    .step-impact {
        justify-content: center;
    }

    .impact-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   Date Filter & Auto-Refresh Controls
   ============================================ */
.top-bar-filters {
    display: flex;
    align-items: center;
    gap: 6px;
}

.top-bar-filters input[type="date"] {
    padding: 4px 8px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 12px;
    color: var(--text-primary);
    background: var(--bg-primary);
    height: 30px;
}

.btn-filter {
    padding: 4px 10px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 11px;
    cursor: pointer;
    height: 30px;
    transition: var(--transition);
}

.btn-filter:hover {
    background: var(--border-color);
}

.btn-filter-clear {
    color: var(--text-muted);
}

.auto-refresh-label {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    color: var(--text-muted);
    cursor: pointer;
    white-space: nowrap;
}

.auto-refresh-label input[type="checkbox"] {
    width: 14px;
    height: 14px;
    accent-color: var(--airtel-red);
}

/* ============================================
   Governance Tab Styles
   ============================================ */

/* Approval Table */
.approval-table th:last-child,
.approval-table td:last-child {
    text-align: center;
}

.btn-approve-sm {
    padding: 4px 12px;
    background: var(--airtel-red);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 12px;
    cursor: pointer;
    transition: var(--transition);
}

.btn-approve-sm:hover {
    background: var(--airtel-red-dark);
}

/* Decision Form */
.decision-form {
    background: var(--bg-card);
    border: 2px solid var(--airtel-red);
    border-radius: var(--radius-md);
    padding: 20px;
    margin: 16px 0;
    box-shadow: var(--shadow-md);
}

.decision-form h4 {
    margin: 0 0 12px;
    color: var(--text-primary);
}

.decision-form textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 13px;
    resize: vertical;
    box-sizing: border-box;
}

.decision-buttons {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.btn-approve {
    padding: 8px 20px;
    background: var(--success);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-approve:hover {
    background: #0e9f6e;
}

.btn-reject {
    padding: 8px 20px;
    background: var(--danger);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-reject:hover {
    background: var(--airtel-red-dark);
}

.btn-cancel {
    padding: 8px 20px;
    background: var(--bg-secondary);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 13px;
    cursor: pointer;
    transition: var(--transition);
}

.btn-cancel:hover {
    background: var(--border-color);
}

/* Decision badges */
.decision-badge {
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.decision-badge.approve {
    background: rgba(16, 185, 129, 0.15);
    color: var(--success);
}

.decision-badge.reject {
    background: rgba(237, 28, 36, 0.15);
    color: var(--danger);
}

/* Shadow Mode Accuracy */
.shadow-accuracy-grid {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 20px;
    margin-bottom: 24px;
}

.accuracy-gauge-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 20px;
    text-align: center;
    box-shadow: var(--shadow-sm);
}

.shadow-stats {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-top: 12px;
    font-size: 12px;
    color: var(--text-muted);
}

.shadow-by-type {
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 20px;
    box-shadow: var(--shadow-sm);
}

.shadow-type-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.shadow-type-header {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: var(--text-primary);
}

.shadow-type-stats {
    font-size: 11px;
    color: var(--text-muted);
}

/* Shadow Actions */
.shadow-actions {
    margin-bottom: 16px;
}

.input-group.inline {
    display: flex;
    align-items: center;
    gap: 10px;
}

.input-group.inline label {
    white-space: nowrap;
    font-size: 13px;
    font-weight: 600;
    margin: 0;
}

.input-group.inline select,
.input-group.inline input[type="text"] {
    flex: 1;
    max-width: 400px;
}

.shadow-result {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-sm);
}

/* Baseline Comparison */
.baseline-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 20px;
}

.baseline-comparison {
    margin-top: 16px;
}

.baseline-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}

.baseline-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px;
    box-shadow: var(--shadow-sm);
}

.baseline-label {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
}

.baseline-values {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.baseline-before,
.baseline-after {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.baseline-tag {
    font-size: 10px;
    color: var(--text-muted);
    text-transform: uppercase;
}

.baseline-num {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    font-variant-numeric: tabular-nums;
}

.baseline-arrow {
    font-size: 14px;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: var(--radius-sm);
}

.baseline-arrow.positive {
    color: var(--success);
    background: rgba(16, 185, 129, 0.1);
}

.baseline-arrow.negative {
    color: var(--danger);
    background: rgba(237, 28, 36, 0.1);
}

@media (max-width: 1200px) {
    .shadow-accuracy-grid {
        grid-template-columns: 1fr;
    }

    .baseline-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .top-bar-filters {
        display: none;
    }
}

@media (max-width: 768px) {
    .baseline-grid {
        grid-template-columns: 1fr;
    }

    .baseline-actions {
        flex-direction: column;
    }
}

/* ============================================
   Pipeline Status Badge
   ============================================ */
.status-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
}

.status-badge.active {
    background: rgba(16, 185, 129, 0.12);
    color: var(--success);
}

.status-badge.pending {
    background: rgba(245, 158, 11, 0.12);
    color: var(--warning);
}

/* Top Bar Refresh Timestamp */
.top-bar-refresh {
    font-size: 11px;
    color: var(--text-muted);
    white-space: nowrap;
}
