html {
  font-size: 14px;
  overflow-x: hidden;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

body {
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  width: 100%;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

.caip-main-content {
  margin-left: 240px;
  width: calc(100% - 240px);
  overflow-x: hidden;
}

/* Hide scrollbars but keep functionality */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

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

::-webkit-scrollbar-thumb {
  background: rgba(0,0,0,0.2);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(0,0,0,0.3);
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
  text-align: start;
}

/* =========================================
   CAIP - Combined Assurance Intelligence Platform
   Enterprise UI Stylesheet
   ========================================= */

:root {
    /* Brand Colors */
    --caip-primary: #1a365d;
    --caip-primary-light: #2b6cb0;
    --caip-primary-dark: #0f2442;
    --caip-secondary: #4a5568;
    --caip-accent: #3182ce;
    
    /* Status Colors */
    --caip-success: #38a169;
    --caip-warning: #d69e2e;
    --caip-danger: #e53e3e;
    --caip-info: #3182ce;
    
    /* Risk Rating Colors */
    --caip-critical: #c53030;
    --caip-high: #dd6b20;
    --caip-medium: #d69e2e;
    --caip-low: #38a169;
    
    /* Neutral Colors */
    --caip-gray-50: #f7fafc;
    --caip-gray-100: #edf2f7;
    --caip-gray-200: #e2e8f0;
    --caip-gray-300: #cbd5e0;
    --caip-gray-400: #a0aec0;
    --caip-gray-500: #718096;
    --caip-gray-600: #4a5568;
    --caip-gray-700: #2d3748;
    --caip-gray-800: #1a202c;
    --caip-gray-900: #171923;
    
    /* Layout */
    --sidebar-width: 260px;
    --sidebar-collapsed-width: 70px;
    --header-height: 64px;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    
    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 200ms ease;
    --transition-slow: 300ms ease;
}

/* =========================================
   Base Styles
   ========================================= */

html {
    font-size: 14px;
}

@media (min-width: 768px) {
    html {
        font-size: 15px;
    }
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--caip-gray-100);
    color: var(--caip-gray-800);
    margin: 0;
    padding: 0;
    min-height: 100vh;
}

.caip-body {
    overflow-x: hidden;
}

/* =========================================
   Layout Structure
   ========================================= */

.caip-wrapper {
    display: flex;
    min-height: 100vh;
}

.caip-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    margin-left: var(--sidebar-width);
    transition: margin-left var(--transition-base);
}

@media (max-width: 991.98px) {
    .caip-main {
        margin-left: 0;
    }
}

/* =========================================
   Sidebar - Premium Design
   ========================================= */

.caip-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: linear-gradient(180deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
    color: #fff;
    z-index: 1040;
    display: flex;
    flex-direction: column;
    transition: transform var(--transition-base);
    box-shadow: 
        4px 0 24px rgba(0, 0, 0, 0.15),
        1px 0 0 rgba(255, 255, 255, 0.05);
}

.caip-sidebar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(ellipse 80% 50% at 0% 0%, rgba(59, 130, 246, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse 60% 40% at 100% 100%, rgba(139, 92, 246, 0.06) 0%, transparent 50%);
    pointer-events: none;
}

@media (max-width: 991.98px) {
    .caip-sidebar {
        transform: translateX(-100%);
    }
    
    .caip-sidebar.show {
        transform: translateX(0);
    }
}

.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    position: relative;
    z-index: 10;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #fff;
    gap: 0.875rem;
}

.brand-icon {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    box-shadow: 
        0 4px 12px rgba(59, 130, 246, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.sidebar-brand:hover .brand-icon {
    transform: scale(1.05);
    box-shadow: 
        0 6px 16px rgba(59, 130, 246, 0.5),
        0 0 0 1px rgba(255, 255, 255, 0.15);
}

.brand-text {
    font-size: 1.375rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, #ffffff 0%, #94a3b8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.sidebar-toggle {
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 1.25rem 0;
    position: relative;
    z-index: 10;
}

.sidebar-nav::-webkit-scrollbar {
    width: 4px;
}

.sidebar-nav::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar-nav::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 4px;
}

.sidebar-nav::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.25);
}

.sidebar-nav .nav-section {
    padding: 1.5rem 1.5rem 0.625rem;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(255, 255, 255, 0.35);
    list-style: none;
}

.sidebar-nav .nav-item {
    padding: 0 0.75rem;
    margin: 2px 0;
}

.sidebar-nav .nav-link {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    color: rgba(255, 255, 255, 0.65);
    text-decoration: none;
    transition: all 0.2s ease;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 500;
    position: relative;
    overflow: hidden;
}

.sidebar-nav .nav-link::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, #3b82f6, #8b5cf6);
    border-radius: 0 3px 3px 0;
    opacity: 0;
    transform: scaleY(0);
    transition: all 0.2s ease;
}

.sidebar-nav .nav-link:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
}

.sidebar-nav .nav-link.active {
    background: linear-gradient(90deg, rgba(59, 130, 246, 0.15), rgba(139, 92, 246, 0.08));
    color: #fff;
}

.sidebar-nav .nav-link.active::before {
    opacity: 1;
    transform: scaleY(1);
}

.sidebar-nav .nav-link i {
    font-size: 1.125rem;
    width: 24px;
    margin-right: 0.875rem;
    opacity: 0.8;
    transition: all 0.2s ease;
}

.sidebar-nav .nav-link:hover i,
.sidebar-nav .nav-link.active i {
    opacity: 1;
}

.sidebar-nav .nav-link span {
    flex: 1;
}

.sidebar-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    position: relative;
    z-index: 10;
}

.sidebar-footer .version-info {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.sidebar-footer .version-info small {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.4);
    font-weight: 500;
}

.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 1030;
    transition: opacity 0.3s ease;
}

@media (max-width: 991.98px) {
    .sidebar-overlay.show {
        display: block;
    }
}

/* =========================================
   Header - Premium Design
   ========================================= */

.caip-header {
    position: sticky;
    top: 0;
    height: var(--header-height);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.75rem;
    z-index: 1020;
    box-shadow: 
        0 1px 3px rgba(0, 0, 0, 0.04),
        0 4px 12px rgba(0, 0, 0, 0.02);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sidebar-toggle-btn {
    width: 40px;
    height: 40px;
    padding: 0;
    color: #475569;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.sidebar-toggle-btn:hover {
    background: #e2e8f0;
    color: #1e293b;
}

.breadcrumb {
    font-size: 0.875rem;
    margin: 0;
    padding: 0.5rem 1rem;
    background: #f8fafc;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
}

.breadcrumb-item {
    color: #64748b;
    font-weight: 500;
}

.breadcrumb-item.active {
    color: #1e293b;
    font-weight: 600;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: "›";
    color: #94a3b8;
    font-weight: 600;
}

.breadcrumb-item a {
    color: #64748b;
    text-decoration: none;
    transition: color 0.2s ease;
}

.breadcrumb-item a:hover {
    color: #3b82f6;
}

/* Header Search - Premium */
.header-search {
    position: relative;
}

.header-search .input-group {
    width: 320px;
    background: #f8fafc;
    border-radius: 14px;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    overflow: hidden;
}

.header-search .input-group:focus-within {
    background: #fff;
    border-color: #3b82f6;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

.header-search .form-control {
    border: none;
    background: transparent;
    padding: 0.75rem 1rem 0.75rem 0;
    font-size: 0.9rem;
    color: #1e293b;
}

.header-search .form-control::placeholder {
    color: #94a3b8;
}

.header-search .form-control:focus {
    box-shadow: none;
}

.header-search .input-group-text {
    background: transparent;
    border: none;
    color: #94a3b8;
    padding: 0.75rem 0.5rem 0.75rem 1rem;
    font-size: 1rem;
}

/* Tenant Selector - Premium */
.header-tenant-selector .btn {
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, #f8fafc, #f1f5f9);
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    color: #475569;
    font-weight: 600;
    font-size: 0.85rem;
    transition: all 0.2s ease;
}

.header-tenant-selector .btn:hover {
    background: linear-gradient(135deg, #f1f5f9, #e2e8f0);
    border-color: #cbd5e1;
    color: #1e293b;
}

.header-tenant-selector .dropdown-menu {
    border: none;
    border-radius: 16px;
    box-shadow: 
        0 10px 40px rgba(0, 0, 0, 0.12),
        0 0 0 1px rgba(0, 0, 0, 0.05);
    padding: 0.5rem;
    min-width: 240px;
}

.header-tenant-selector .dropdown-header {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #94a3b8;
    padding: 0.75rem 1rem 0.5rem;
}

.header-tenant-selector .dropdown-item {
    padding: 0.625rem 1rem;
    border-radius: 10px;
    font-weight: 500;
    color: #475569;
    transition: all 0.2s ease;
}

.header-tenant-selector .dropdown-item:hover {
    background: #f1f5f9;
    color: #1e293b;
}

.header-tenant-selector .dropdown-item.text-danger:hover {
    background: rgba(239, 68, 68, 0.1);
}

/* Header Notifications - Premium */
.header-notifications .btn-link {
    width: 44px;
    height: 44px;
    padding: 0;
    color: #64748b;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.header-notifications .btn-link:hover {
    background: #f1f5f9;
    color: #1e293b;
    border-color: #cbd5e1;
}

.notification-badge {
    font-size: 0.6rem;
    padding: 0.25em 0.5em;
    min-width: 18px;
    font-weight: 700;
    border: 2px solid #fff;
    box-shadow: 0 2px 6px rgba(239, 68, 68, 0.4);
}

.notification-dropdown {
    width: 380px;
    padding: 0;
    border: none;
    border-radius: 20px;
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.15),
        0 0 0 1px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.notification-dropdown .dropdown-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #f1f5f9;
    background: linear-gradient(135deg, #f8fafc, #fff);
}

.notification-dropdown .dropdown-header .fw-semibold {
    font-size: 1rem;
    font-weight: 700;
    color: #1e293b;
}

.notification-list {
    max-height: 360px;
    overflow-y: auto;
}

.notification-item {
    display: flex;
    align-items: flex-start;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #f8fafc;
    transition: background 0.2s ease;
    cursor: pointer;
}

.notification-item:last-child {
    border-bottom: none;
}

.notification-item:hover {
    background: #f8fafc;
}

.notification-item.unread {
    background: linear-gradient(90deg, rgba(59, 130, 246, 0.05), transparent);
}

.notification-item.unread:hover {
    background: linear-gradient(90deg, rgba(59, 130, 246, 0.08), rgba(248, 250, 252, 0.5));
}

.notification-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-right: 1rem;
    font-size: 1rem;
}

.notification-content p {
    font-size: 0.9rem;
    color: #334155;
    font-weight: 500;
    line-height: 1.4;
}

.notification-content small {
    font-size: 0.75rem;
    color: #94a3b8;
}

/* Header User - Premium */
.header-user .btn-link {
    color: #334155;
    text-decoration: none;
    padding: 0.375rem 0.75rem 0.375rem 0.5rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    transition: all 0.2s ease;
}

.header-user .btn-link:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

.user-avatar {
    width: 38px;
    height: 38px;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    color: #fff;
    border-radius: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.user-info {
    margin-left: 0.75rem;
    text-align: left;
}

.user-name {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.2;
    color: #1e293b;
}

.user-role {
    display: block;
    font-size: 0.75rem;
    color: #64748b;
    font-weight: 500;
}

.header-user .dropdown-menu {
    border: none;
    border-radius: 16px;
    box-shadow: 
        0 10px 40px rgba(0, 0, 0, 0.12),
        0 0 0 1px rgba(0, 0, 0, 0.05);
    padding: 0.5rem;
    min-width: 200px;
}

.header-user .dropdown-item {
    padding: 0.625rem 1rem;
    border-radius: 10px;
    font-weight: 500;
    color: #475569;
    transition: all 0.2s ease;
}

.header-user .dropdown-item:hover {
    background: #f1f5f9;
    color: #1e293b;
}

.header-user .dropdown-item.text-danger:hover {
    background: rgba(239, 68, 68, 0.1);
}

.header-user .dropdown-divider {
    margin: 0.375rem 0;
    border-color: #f1f5f9;
}

/* =========================================
   Content Area
   ========================================= */

.caip-content {
    flex: 1;
    padding: 1.5rem;
}

/* =========================================
   Dashboard Cards
   ========================================= */

.stat-card {
    background: #fff;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--caip-gray-200);
    transition: all var(--transition-fast);
}

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

.stat-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.stat-card-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.stat-card-icon.primary {
    background: rgba(26, 54, 93, 0.1);
    color: var(--caip-primary);
}

.stat-card-icon.success {
    background: rgba(56, 161, 105, 0.1);
    color: var(--caip-success);
}

.stat-card-icon.warning {
    background: rgba(214, 158, 46, 0.1);
    color: var(--caip-warning);
}

.stat-card-icon.danger {
    background: rgba(229, 62, 62, 0.1);
    color: var(--caip-danger);
}

.stat-card-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--caip-gray-800);
    line-height: 1;
}

.stat-card-label {
    font-size: 0.875rem;
    color: var(--caip-gray-500);
    margin-top: 0.25rem;
}

.stat-card-trend {
    display: flex;
    align-items: center;
    font-size: 0.8rem;
    margin-top: 0.75rem;
}

.stat-card-trend.up {
    color: var(--caip-success);
}

.stat-card-trend.down {
    color: var(--caip-danger);
}

/* =========================================
   Health Score Gauge
   ========================================= */

.health-score-card {
    background: linear-gradient(135deg, var(--caip-primary) 0%, var(--caip-primary-light) 100%);
    color: #fff;
    border-radius: 12px;
    padding: 1.5rem;
    position: relative;
    overflow: hidden;
}

.health-score-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
}

.health-score-value {
    font-size: 4rem;
    font-weight: 700;
    line-height: 1;
}

.health-score-label {
    font-size: 1rem;
    opacity: 0.9;
    margin-top: 0.5rem;
}

.health-score-breakdown {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.health-score-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    font-size: 0.875rem;
}

/* =========================================
   Data Tables
   ========================================= */

.data-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--caip-gray-200);
    overflow: hidden;
}

.data-card-header {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--caip-gray-200);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.data-card-title {
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
    color: var(--caip-gray-800);
}

.data-card-body {
    padding: 0;
}

.data-table {
    margin: 0;
    width: 100%;
}

.data-table th {
    background: var(--caip-gray-50);
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--caip-gray-600);
    padding: 0.875rem 1rem;
    border-bottom: 1px solid var(--caip-gray-200);
}

.data-table td {
    padding: 1rem;
    vertical-align: middle;
    border-bottom: 1px solid var(--caip-gray-100);
}

.data-table tbody tr:hover {
    background: var(--caip-gray-50);
}

.data-table tbody tr:last-child td {
    border-bottom: none;
}

/* =========================================
   Badges & Status
   ========================================= */

.badge-risk {
    padding: 0.35em 0.75em;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.badge-risk.critical {
    background: rgba(197, 48, 48, 0.1);
    color: var(--caip-critical);
}

.badge-risk.high {
    background: rgba(221, 107, 32, 0.1);
    color: var(--caip-high);
}

.badge-risk.medium {
    background: rgba(214, 158, 46, 0.1);
    color: var(--caip-medium);
}

.badge-risk.low {
    background: rgba(56, 161, 105, 0.1);
    color: var(--caip-low);
}

.badge-status {
    padding: 0.35em 0.75em;
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: 20px;
}

.badge-status.open {
    background: rgba(49, 130, 206, 0.1);
    color: var(--caip-info);
}

.badge-status.in-progress {
    background: rgba(214, 158, 46, 0.1);
    color: var(--caip-warning);
}

.badge-status.closed {
    background: rgba(56, 161, 105, 0.1);
    color: var(--caip-success);
}

/* =========================================
   Coverage Matrix
   ========================================= */

.coverage-matrix {
    display: grid;
    gap: 2px;
    background: var(--caip-gray-200);
    border-radius: 8px;
    overflow: hidden;
}

.coverage-cell {
    padding: 1rem;
    text-align: center;
    font-size: 0.875rem;
    font-weight: 500;
}

.coverage-cell.header {
    background: var(--caip-gray-100);
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--caip-gray-600);
}

.coverage-cell.none {
    background: rgba(229, 62, 62, 0.1);
    color: var(--caip-danger);
}

.coverage-cell.low {
    background: rgba(214, 158, 46, 0.15);
    color: var(--caip-warning);
}

.coverage-cell.medium {
    background: rgba(49, 130, 206, 0.1);
    color: var(--caip-info);
}

.coverage-cell.high {
    background: rgba(56, 161, 105, 0.15);
    color: var(--caip-success);
}

.coverage-cell.over-covered {
    background: rgba(128, 90, 213, 0.15);
    color: #805ad5;
}

/* =========================================
   Charts Container
   ========================================= */

.chart-container {
    position: relative;
    height: 300px;
    width: 100%;
}

/* =========================================
   Forms
   ========================================= */

.form-label {
    font-weight: 500;
    font-size: 0.875rem;
    color: var(--caip-gray-700);
    margin-bottom: 0.5rem;
}

.form-control, .form-select {
    border-radius: 8px;
    border-color: var(--caip-gray-300);
    padding: 0.625rem 0.875rem;
}

.form-control:focus, .form-select:focus {
    border-color: var(--caip-primary-light);
    box-shadow: 0 0 0 3px rgba(43, 108, 176, 0.15);
}

/* =========================================
   Buttons
   ========================================= */

.btn {
    font-weight: 500;
    border-radius: 8px;
    padding: 0.5rem 1rem;
    transition: all var(--transition-fast);
}

.btn-primary {
    background: var(--caip-primary);
    border-color: var(--caip-primary);
}

.btn-primary:hover {
    background: var(--caip-primary-light);
    border-color: var(--caip-primary-light);
}

.btn-outline-primary {
    color: var(--caip-primary);
    border-color: var(--caip-primary);
}

.btn-outline-primary:hover {
    background: var(--caip-primary);
    border-color: var(--caip-primary);
}

/* =========================================
   Page Headers
   ========================================= */

.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.page-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--caip-gray-800);
    margin: 0;
}

.page-subtitle {
    font-size: 0.875rem;
    color: var(--caip-gray-500);
    margin-top: 0.25rem;
}

/* =========================================
   Public Pages
   ========================================= */

.caip-public {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.public-header {
    background: #fff;
    border-bottom: 1px solid var(--caip-gray-200);
    padding: 0.5rem 0;
}

.public-content {
    flex: 1;
}

.public-footer {
    background: #fff;
    border-top: 1px solid var(--caip-gray-200);
}

/* =========================================
   Landing Page
   ========================================= */

.hero-section {
    background: linear-gradient(135deg, var(--caip-primary) 0%, var(--caip-primary-light) 100%);
    color: #fff;
    padding: 5rem 0;
    text-align: center;
}

.hero-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.hero-subtitle {
    font-size: 1.25rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto 2rem;
}

.feature-card {
    background: #fff;
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    box-shadow: var(--shadow-md);
    height: 100%;
}

.feature-icon {
    width: 64px;
    height: 64px;
    background: rgba(26, 54, 93, 0.1);
    color: var(--caip-primary);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    margin: 0 auto 1.5rem;
}

.feature-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

/* =========================================
   Upload Component
   ========================================= */

.upload-zone {
    border: 2px dashed var(--caip-gray-300);
    border-radius: 12px;
    padding: 3rem;
    text-align: center;
    transition: all var(--transition-fast);
    cursor: pointer;
    background: var(--caip-gray-50);
}

.upload-zone:hover, .upload-zone.dragover {
    border-color: var(--caip-primary-light);
    background: rgba(43, 108, 176, 0.05);
}

.upload-zone-icon {
    font-size: 3rem;
    color: var(--caip-gray-400);
    margin-bottom: 1rem;
}

.upload-zone-text {
    color: var(--caip-gray-600);
    margin-bottom: 0.5rem;
}

/* =========================================
   Scorecard Display
   ========================================= */

.scorecard-gauge {
    position: relative;
    width: 120px;
    height: 60px;
    margin: 0 auto;
}

.score-bar {
    height: 8px;
    background: var(--caip-gray-200);
    border-radius: 4px;
    overflow: hidden;
}

.score-bar-fill {
    height: 100%;
    border-radius: 4px;
    transition: width var(--transition-slow);
}

.score-bar-fill.excellent {
    background: var(--caip-success);
}

.score-bar-fill.good {
    background: var(--caip-info);
}

.score-bar-fill.fair {
    background: var(--caip-warning);
}

.score-bar-fill.poor {
    background: var(--caip-danger);
}

/* =========================================
   Responsive Utilities
   ========================================= */

@media (max-width: 767.98px) {
    .page-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .stat-card {
        padding: 1rem;
    }
    
    .stat-card-value {
        font-size: 1.5rem;
    }
    
    .caip-content {
        padding: 1rem;
    }
}

/* =========================================
   Print Styles
   ========================================= */

@media print {
    .caip-sidebar,
    .caip-header,
    .sidebar-overlay {
        display: none !important;
    }
    
    .caip-main {
        margin-left: 0 !important;
    }
    
    .data-card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}

/* =========================================
   AI Operations - Premium Design System
   ========================================= */

/* AI Page Container */
.ai-page {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 50%, #e2e8f0 100%);
    min-height: calc(100vh - var(--header-height));
    position: relative;
}

.ai-page::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 400px;
    background: 
        radial-gradient(ellipse 80% 50% at 50% -20%, rgba(99, 102, 241, 0.12) 0%, transparent 50%),
        radial-gradient(ellipse 60% 40% at 80% 10%, rgba(139, 92, 246, 0.08) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

.ai-page > * {
    position: relative;
    z-index: 1;
}

/* AI Page Header */
.ai-page-header {
    padding: 2rem 0 1.5rem;
    margin-bottom: 1.5rem;
}

.ai-page-header h1 {
    font-size: 2rem;
    font-weight: 800;
    background: linear-gradient(135deg, #1e293b 0%, #475569 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
    letter-spacing: -0.025em;
}

.ai-page-header .lead {
    color: #64748b;
    font-size: 1rem;
    font-weight: 500;
}

.ai-page-header .btn-group-nav {
    display: flex;
    gap: 0.5rem;
}

.ai-page-header .btn-nav {
    padding: 0.625rem 1.25rem;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.875rem;
    border: 2px solid transparent;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.ai-page-header .btn-nav-outline {
    background: rgba(255, 255, 255, 0.8);
    border-color: #e2e8f0;
    color: #475569;
    backdrop-filter: blur(10px);
}

.ai-page-header .btn-nav-outline:hover {
    background: #fff;
    border-color: #6366f1;
    color: #4f46e5;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.2);
}

.ai-page-header .btn-nav-primary {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: #fff;
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.4);
}

.ai-page-header .btn-nav-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.5);
}

/* AI Hero Metrics */
.ai-metrics-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

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

@media (max-width: 575.98px) {
    .ai-metrics-grid {
        grid-template-columns: 1fr;
    }
}

.ai-metric-card {
    position: relative;
    border-radius: 20px;
    padding: 1.75rem;
    color: #fff;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.ai-metric-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 100% 0%, rgba(255, 255, 255, 0.2) 0%, transparent 50%),
        radial-gradient(circle at 0% 100%, rgba(0, 0, 0, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.ai-metric-card::after {
    content: '';
    position: absolute;
    inset: 1px;
    border-radius: 19px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    pointer-events: none;
}

.ai-metric-card:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.ai-metric-card.purple {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a855f7 100%);
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.4);
}

.ai-metric-card.emerald {
    background: linear-gradient(135deg, #10b981 0%, #059669 50%, #047857 100%);
    box-shadow: 0 10px 30px rgba(16, 185, 129, 0.4);
}

.ai-metric-card.rose {
    background: linear-gradient(135deg, #f43f5e 0%, #e11d48 50%, #be123c 100%);
    box-shadow: 0 10px 30px rgba(244, 63, 94, 0.4);
}

.ai-metric-card.cyan {
    background: linear-gradient(135deg, #06b6d4 0%, #0891b2 50%, #0e7490 100%);
    box-shadow: 0 10px 30px rgba(6, 182, 212, 0.4);
}

.ai-metric-card.amber {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 50%, #b45309 100%);
    box-shadow: 0 10px 30px rgba(245, 158, 11, 0.4);
}

.ai-metric-card.slate {
    background: linear-gradient(135deg, #475569 0%, #334155 50%, #1e293b 100%);
    box-shadow: 0 10px 30px rgba(71, 85, 105, 0.4);
}

.ai-metric-content {
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.ai-metric-value {
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.025em;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.ai-metric-value small {
    font-size: 1rem;
    font-weight: 600;
    opacity: 0.9;
}

.ai-metric-label {
    font-size: 0.9rem;
    font-weight: 600;
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.ai-metric-icon {
    width: 56px;
    height: 56px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* AI Status Pipeline */
.ai-pipeline {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

@media (max-width: 991.98px) {
    .ai-pipeline {
        grid-template-columns: repeat(3, 1fr);
    }
}

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

.ai-pipeline-card {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 16px;
    padding: 1.25rem;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 
        0 4px 6px -1px rgba(0, 0, 0, 0.05),
        0 2px 4px -1px rgba(0, 0, 0, 0.03),
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.ai-pipeline-card:hover {
    transform: translateY(-4px);
    box-shadow: 
        0 20px 25px -5px rgba(0, 0, 0, 0.08),
        0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.ai-pipeline-card.active {
    border-color: #6366f1;
    box-shadow: 
        0 0 0 3px rgba(99, 102, 241, 0.1),
        0 10px 20px rgba(99, 102, 241, 0.15);
}

.ai-pipeline-card.warning {
    border-color: #f59e0b;
    box-shadow: 
        0 0 0 3px rgba(245, 158, 11, 0.1),
        0 10px 20px rgba(245, 158, 11, 0.15);
}

.ai-pipeline-card.danger {
    border-color: #ef4444;
    box-shadow: 
        0 0 0 3px rgba(239, 68, 68, 0.1),
        0 10px 20px rgba(239, 68, 68, 0.15);
}

.ai-pipeline-icon {
    font-size: 2rem;
    margin-bottom: 0.75rem;
    display: block;
}

.ai-pipeline-icon.pending { color: #94a3b8; }
.ai-pipeline-icon.processing { color: #6366f1; }
.ai-pipeline-icon.completed { color: #10b981; }
.ai-pipeline-icon.failed { color: #ef4444; }
.ai-pipeline-icon.review { color: #8b5cf6; }
.ai-pipeline-icon.stuck { color: #f59e0b; }

.ai-pipeline-value {
    font-size: 1.75rem;
    font-weight: 800;
    color: #1e293b;
    line-height: 1;
    margin-bottom: 0.25rem;
}

.ai-pipeline-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Processing spinner */
.ai-processing-spin {
    animation: ai-spin 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

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

/* AI Cards - Glassmorphism */
.ai-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 
        0 4px 6px -1px rgba(0, 0, 0, 0.05),
        0 2px 4px -1px rgba(0, 0, 0, 0.03),
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.ai-card:hover {
    box-shadow: 
        0 20px 25px -5px rgba(0, 0, 0, 0.08),
        0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.ai-card-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(180deg, rgba(248, 250, 252, 0.8), rgba(255, 255, 255, 0));
}

.ai-card-title {
    font-size: 1rem;
    font-weight: 700;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.ai-card-title .badge {
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.35em 0.75em;
    border-radius: 50px;
}

.ai-card-body {
    padding: 0;
}

.ai-card-body.padded {
    padding: 1.5rem;
}

/* AI Model Health Items */
.ai-health-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
    transition: background 0.2s ease;
}

.ai-health-item:last-child {
    border-bottom: none;
}

.ai-health-item:hover {
    background: rgba(99, 102, 241, 0.03);
}

.ai-health-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.ai-health-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.ai-health-icon.healthy {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(16, 185, 129, 0.05));
    color: #10b981;
}

.ai-health-icon.warning {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.1), rgba(245, 158, 11, 0.05));
    color: #f59e0b;
}

.ai-health-icon.critical {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1), rgba(239, 68, 68, 0.05));
    color: #ef4444;
}

.ai-health-details h6 {
    font-size: 0.95rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 0.25rem;
}

.ai-health-details .meta {
    font-size: 0.8rem;
    color: #64748b;
}

.ai-health-stats {
    text-align: right;
}

.ai-health-rate {
    font-size: 1.25rem;
    font-weight: 800;
}

.ai-health-rate.success { color: #10b981; }
.ai-health-rate.warning { color: #f59e0b; }
.ai-health-rate.danger { color: #ef4444; }

.ai-health-status {
    font-size: 0.75rem;
    color: #64748b;
    font-weight: 600;
}

/* AI Tables */
.ai-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.ai-table thead th {
    background: linear-gradient(180deg, #f8fafc, #f1f5f9);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #64748b;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #e2e8f0;
    white-space: nowrap;
}

.ai-table tbody td {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
    color: #334155;
}

.ai-table tbody tr {
    transition: background 0.2s ease;
}

.ai-table tbody tr:hover {
    background: rgba(99, 102, 241, 0.02);
}

.ai-table tbody tr:last-child td {
    border-bottom: none;
}

/* AI Status Badges */
.ai-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.875rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.ai-badge-pending {
    background: linear-gradient(135deg, rgba(148, 163, 184, 0.15), rgba(148, 163, 184, 0.08));
    color: #64748b;
}

.ai-badge-processing {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.15), rgba(99, 102, 241, 0.08));
    color: #4f46e5;
}

.ai-badge-completed {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15), rgba(16, 185, 129, 0.08));
    color: #059669;
}

.ai-badge-failed {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.15), rgba(239, 68, 68, 0.08));
    color: #dc2626;
}

.ai-badge-review {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.15), rgba(139, 92, 246, 0.08));
    color: #7c3aed;
}

.ai-badge-active {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15), rgba(16, 185, 129, 0.08));
    color: #059669;
}

.ai-badge-deprecated {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.15), rgba(245, 158, 11, 0.08));
    color: #d97706;
}

.ai-badge-retired {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.15), rgba(239, 68, 68, 0.08));
    color: #dc2626;
}

.ai-badge-default {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

/* AI Provider Icons */
.ai-provider-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.ai-provider-icon.openai {
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.08), rgba(0, 0, 0, 0.04));
    color: #1e293b;
}

.ai-provider-icon.azure {
    background: linear-gradient(135deg, rgba(0, 120, 212, 0.12), rgba(0, 120, 212, 0.06));
    color: #0078d4;
}

.ai-provider-icon.anthropic {
    background: linear-gradient(135deg, rgba(199, 128, 76, 0.12), rgba(199, 128, 76, 0.06));
    color: #c7804c;
}

.ai-provider-icon.google {
    background: linear-gradient(135deg, rgba(66, 133, 244, 0.12), rgba(66, 133, 244, 0.06));
    color: #4285f4;
}

/* Circuit Breaker Indicators */
.ai-circuit {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
}

.ai-circuit.closed {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

.ai-circuit.half-open {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
    animation: ai-pulse 2s ease-in-out infinite;
}

.ai-circuit.open {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    animation: ai-pulse 1s ease-in-out infinite;
}

@keyframes ai-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(1.05); }
}

/* AI Empty States */
.ai-empty-state {
    text-align: center;
    padding: 4rem 2rem;
}

.ai-empty-icon {
    width: 100px;
    height: 100px;
    margin: 0 auto 1.5rem;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(139, 92, 246, 0.05));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: #6366f1;
}

.ai-empty-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 0.5rem;
}

.ai-empty-text {
    color: #64748b;
    margin-bottom: 1.5rem;
}

/* AI Buttons */
.ai-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.875rem;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.ai-btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.8rem;
    border-radius: 8px;
}

.ai-btn-primary {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.ai-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(99, 102, 241, 0.4);
    color: #fff;
}

.ai-btn-outline {
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid #e2e8f0;
    color: #475569;
}

.ai-btn-outline:hover {
    border-color: #6366f1;
    color: #4f46e5;
    background: #fff;
}

.ai-btn-success {
    background: linear-gradient(135deg, #10b981, #059669);
    color: #fff;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.ai-btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(16, 185, 129, 0.4);
    color: #fff;
}

.ai-btn-warning {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #fff;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.ai-btn-warning:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(245, 158, 11, 0.4);
    color: #fff;
}

.ai-btn-danger {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: #fff;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.ai-btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(239, 68, 68, 0.4);
    color: #fff;
}

/* AI Filters */
.ai-filters {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 16px;
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 
        0 4px 6px -1px rgba(0, 0, 0, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.ai-filters .form-label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #64748b;
    margin-bottom: 0.5rem;
}

.ai-filters .form-control,
.ai-filters .form-select {
    border-radius: 10px;
    border: 2px solid #e2e8f0;
    padding: 0.625rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.ai-filters .form-control:focus,
.ai-filters .form-select:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

/* AI Confidence Score */
.ai-confidence {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.25rem 0.625rem;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 700;
}

.ai-confidence.high {
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
}

.ai-confidence.medium {
    background: rgba(245, 158, 11, 0.1);
    color: #d97706;
}

.ai-confidence.low {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
}

/* AI Modal */
.ai-modal .modal-content {
    border: none;
    border-radius: 20px;
    box-shadow: 
        0 25px 50px -12px rgba(0, 0, 0, 0.25),
        0 0 0 1px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.ai-modal .modal-header {
    background: linear-gradient(180deg, #f8fafc, #fff);
    border-bottom: 1px solid #f1f5f9;
    padding: 1.5rem;
}

.ai-modal .modal-title {
    font-weight: 700;
    color: #1e293b;
}

.ai-modal .modal-body {
    padding: 1.5rem;
}

.ai-modal .modal-footer {
    background: #f8fafc;
    border-top: 1px solid #f1f5f9;
    padding: 1rem 1.5rem;
}

/* AI Alert Banner */
.ai-alert {
    border: none;
    border-radius: 16px;
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.ai-alert-danger {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1), rgba(239, 68, 68, 0.05));
    border-left: 4px solid #ef4444;
}

.ai-alert-warning {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.1), rgba(245, 158, 11, 0.05));
    border-left: 4px solid #f59e0b;
}

.ai-alert-success {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(16, 185, 129, 0.05));
    border-left: 4px solid #10b981;
}

.ai-alert-icon {
    font-size: 1.5rem;
}

.ai-alert-danger .ai-alert-icon { color: #ef4444; }
.ai-alert-warning .ai-alert-icon { color: #f59e0b; }
.ai-alert-success .ai-alert-icon { color: #10b981; }

.ai-alert-content {
    flex: 1;
}

.ai-alert-title {
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 0.125rem;
}

.ai-alert-text {
    color: #64748b;
    font-size: 0.875rem;
}

/* AI Search Box */
.ai-search {
    position: relative;
    max-width: 320px;
}

.ai-search-input {
    width: 100%;
    padding: 0.625rem 1rem 0.625rem 2.75rem;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 0.875rem;
    font-weight: 500;
    background: rgba(255, 255, 255, 0.9);
    transition: all 0.2s ease;
}

.ai-search-input:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.ai-search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 1rem;
}

/* AI Error Item */
.ai-error-item {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #f1f5f9;
    transition: background 0.2s ease;
}

.ai-error-item:last-child {
    border-bottom: none;
}

.ai-error-item:hover {
    background: rgba(239, 68, 68, 0.02);
}

.ai-error-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.75rem;
}

.ai-error-type {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.25rem 0.75rem;
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
}

.ai-error-time {
    font-size: 0.75rem;
    color: #94a3b8;
}

.ai-error-message {
    font-size: 0.9rem;
    color: #334155;
    margin-bottom: 0.75rem;
    line-height: 1.5;
}

.ai-error-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ai-error-entity {
    font-size: 0.8rem;
    color: #64748b;
}

/* AI Pagination */
.ai-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    padding: 1rem;
}

.ai-pagination .page-item .page-link {
    border: none;
    border-radius: 10px;
    padding: 0.5rem 0.875rem;
    font-weight: 600;
    font-size: 0.875rem;
    color: #475569;
    background: transparent;
    transition: all 0.2s ease;
}

.ai-pagination .page-item .page-link:hover {
    background: #f1f5f9;
    color: #1e293b;
}

.ai-pagination .page-item.active .page-link {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.ai-pagination .page-item.disabled .page-link {
    color: #cbd5e1;
    background: transparent;
}

/* Print overrides for AI pages */
@media print {
    .ai-page::before {
        display: none;
    }
    
    .ai-metric-card,
    .ai-card {
        box-shadow: none;
        border: 1px solid #e2e8f0;
    }
}