/* Custom CSS for Insurance GPTs AI Performance Platform */

:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --accent-color: #e74c3c;
    --success-color: #27ae60;
    --warning-color: #f39c12;
    --light-blue: #ecf0f1;
    --medium-gray: #95a5a6;
    --dark-gray: #34495e;
    --subtle-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --card-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    --card-shadow-hover: 0 4px 15px rgba(0, 0, 0, 0.12);
    --border-color: #dee2e6;
}

body {
    background: #ffffff;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    min-height: 100vh;
    color: #2c3e50;
}

/* Global text visibility improvements */
h1, h2, h3, h4, h5, h6 {
    color: #ffffff !important;
}

/* Page titles and main content headers */
.main-content h1, .main-content h2, .main-content h3,
.main-content h4, .main-content h5, .main-content h6 {
    color: #ffffff !important;
}

/* Ensure all page content titles are visible */
.container-fluid h1, .container-fluid h2, .container-fluid h3,
.container-fluid h4, .container-fluid h5, .container-fluid h6 {
    color: #ffffff !important;
}

p, span, div, label, small {
    color: #2c3e50 !important;
}

/* Table styling with solid white background */
.table {
    background-color: #ffffff !important;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.table th, .table td {
    color: #2c3e50 !important;
    background-color: #ffffff !important;
    border-color: #e9ecef !important;
}

/* Table headers specifically */
.table thead th {
    color: #ffffff !important;
    background-color: #6c757d !important;
    border-bottom: 2px solid #dee2e6 !important;
    font-weight: 600;
}

/* Table body cells */
.table tbody td {
    color: #2c3e50 !important;
    background-color: #ffffff !important;
}

/* Table rows always white background */
.table tbody tr {
    background-color: #ffffff !important;
}

/* Override hover effect to keep white background */
.table tbody tr:hover {
    background-color: #ffffff !important;
}

.table tbody tr:hover td {
    background-color: #ffffff !important;
}

/* Ensure table container has white background */
.table-responsive {
    background-color: #ffffff !important;
    border-radius: 8px;
    padding: 0;
}

/* Override any light text classes */
.text-light, .text-muted {
    color: #ffffff !important;
}

/* Ensure buttons have visible text */
.btn:not(.btn-primary):not(.btn-success):not(.btn-danger):not(.btn-warning) {
    color: #ffffff !important;
    border-color: #ffffff !important;
}

/* Button hover states */
.btn-outline-success {
    color: #ffffff !important;
    border-color: #ffffff !important;
}

.btn-outline-primary {
    color: #ffffff !important;
    border-color: #ffffff !important;
}

/* Card titles should be white for better visibility on dark backgrounds */
.card-header h1, .card-header h2, .card-header h3, 
.card-header h4, .card-header h5, .card-header h6 {
    color: #ffffff !important;
}

/* Dashboard card titles on gradient backgrounds */
.metric-card h1, .metric-card h2, .metric-card h3,
.metric-card h4, .metric-card h5, .metric-card h6,
.metric-card p, .metric-card span {
    color: #ffffff !important;
}

/* Modal dialog styling with clean white background */
.modal-content {
    color: #2c3e50 !important;
    background-color: #ffffff !important;
    background: #ffffff !important;
}

/* Proper modal text colors for readability */
.modal-header h1, .modal-header h2, .modal-header h3,
.modal-header h4, .modal-header h5, .modal-header h6 {
    color: #2c3e50 !important;
}

.modal-body h1, .modal-body h2, .modal-body h3,
.modal-body h4, .modal-body h5, .modal-body h6,
.modal-body p, .modal-body span, .modal-body label,
.modal-body div, .modal-body small {
    color: #2c3e50 !important;
}

.modal-footer .btn {
    color: #ffffff !important;
}

/* Form elements in modals */
.modal .form-label, .modal .form-control, .modal .form-select {
    color: #2c3e50 !important;
}

.modal .form-control, .modal .form-select {
    border: 2px solid #dee2e6 !important;
    border-radius: 8px !important;
    background-color: #ffffff !important;
    padding: 0.75rem !important;
}

.modal .form-control:focus, .modal .form-select:focus {
    border-color: #667eea !important;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25) !important;
    outline: none !important;
}

.modal textarea.form-control {
    min-height: 120px !important;
    resize: vertical !important;
}

/* Fix dropdown text color */
.form-control, .form-select {
    color: #212529 !important;
    background-color: #ffffff !important;
}

.form-control option, .form-select option {
    color: #212529 !important;
    background-color: #ffffff !important;
}

select.form-select {
    color: #212529 !important;
}

select.form-select option {
    color: #212529 !important;
    background-color: #ffffff !important;
}

/* More specific targeting for all select elements */
select, select option {
    color: #212529 !important;
    background-color: #ffffff !important;
}

input, textarea, select {
    color: #212529 !important;
}

/* Override any Bootstrap default styling */
.form-control, .form-select, input, select, textarea {
    color: #212529 !important;
    background-color: #ffffff !important;
}

.form-control option, .form-select option, select option {
    color: #212529 !important;
    background-color: #ffffff !important;
}

/* Maximum specificity CSS override */
html body div .card .card-body select.form-select {
    color: #000000 !important;
    background-color: #ffffff !important;
}

html body div .card .card-body select.form-select option {
    color: #000000 !important;
    background-color: #ffffff !important;
}

html body div .card .card-body input.form-control {
    color: #000000 !important;
    background-color: #ffffff !important;
}

html body div .card .card-body textarea.form-control {
    color: #000000 !important;
    background-color: #ffffff !important;
}

/* Universal form element override */
div select, div input, div textarea {
    color: #000000 !important;
    background-color: #ffffff !important;
}

div select option {
    color: #000000 !important;
    background-color: #ffffff !important;
}

/* Fix placeholder text and input text */
input::placeholder, textarea::placeholder, select::placeholder {
    color: #666666 !important;
    opacity: 1 !important;
}

input, textarea, select {
    color: #000000 !important;
    background-color: #ffffff !important;
}

/* Ensure all text inputs are black */
.form-control::placeholder {
    color: #666666 !important;
    opacity: 1 !important;
}

/* Force all form elements to have black text */
input[type="text"], input[type="email"], input[type="password"], 
textarea, select, .form-control, .form-select {
    color: #000000 !important;
    background-color: #ffffff !important;
}

/* Additional input text fixes */
input {
    color: #000000 !important;
    -webkit-text-fill-color: #000000 !important;
}

input:focus {
    color: #000000 !important;
    -webkit-text-fill-color: #000000 !important;
}

/* Override any autofill styling */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus {
    -webkit-text-fill-color: #000000 !important;
    -webkit-box-shadow: 0 0 0px 1000px #ffffff inset !important;
    transition: background-color 5000s ease-in-out 0s !important;
}

/* Nuclear option for input text */
* input, * input[type="text"], * textarea {
    color: #000000 !important;
    -webkit-text-fill-color: #000000 !important;
    -moz-text-fill-color: #000000 !important;
    -ms-text-fill-color: #000000 !important;
}

/* Target specific form controls with highest specificity */
html body * .form-control {
    color: #000000 !important;
    -webkit-text-fill-color: #000000 !important;
}

html body * input.form-control:not(:placeholder-shown) {
    color: #000000 !important;
    -webkit-text-fill-color: #000000 !important;
}

/* Force visibility with opacity and text-shadow */
input, textarea, select {
    opacity: 1 !important;
    filter: none !important;
    text-shadow: none !important;
    font-weight: 500 !important;
}

/* Direct attribute override */
input[style*="color"] {
    color: #000000 !important;
}

/* Override any inherited styles */
.form-control {
    opacity: 1 !important;
    filter: contrast(1) !important;
}

/* Bootstrap form-select override */
.form-select {
    color: #000000 !important;
    -webkit-text-fill-color: #000000 !important;
    opacity: 1 !important;
}

/* Login Button Gradient Styling - Nuclear Override */
.btn-gradient, 
a.btn-gradient, 
button.btn-gradient,
.btn.btn-gradient,
a.btn.btn-gradient {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    background-color: #667eea !important;
    background-image: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    border: none !important;
    border-color: transparent !important;
    color: white !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    padding: 12px 24px !important;
    border-radius: 25px !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3) !important;
    position: relative !important;
    overflow: hidden !important;
    text-decoration: none !important;
    display: inline-block !important;
    width: auto !important;
    min-width: 120px !important;
}

/* Remove any Bootstrap button overrides */
.btn-gradient::before,
.btn-gradient::after {
    display: none !important;
}

/* Force remove any white overlays */
.btn-gradient * {
    background: transparent !important;
    border: none !important;
}

.btn-gradient:hover, a.btn-gradient:hover, button.btn-gradient:hover {
    background: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%) !important;
    background-color: transparent !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4) !important;
    color: white !important;
    text-decoration: none !important;
}

.btn-gradient:active, a.btn-gradient:active, button.btn-gradient:active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    background-color: transparent !important;
    transform: translateY(0) !important;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3) !important;
    color: white !important;
    text-decoration: none !important;
}

.btn-gradient:focus, a.btn-gradient:focus, button.btn-gradient:focus {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    background-color: transparent !important;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.5) !important;
    color: white !important;
    text-decoration: none !important;
    outline: none !important;
}

/* Override Bootstrap's btn class completely for gradient buttons */
html body .btn-gradient {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    background-color: transparent !important;
    border: none !important;
}

/* Remove any possible white background from Bootstrap */
.btn-gradient,
.btn-gradient:not(:disabled):not(.disabled):active,
.btn-gradient:not(:disabled):not(.disabled).active,
.btn-gradient:visited,
.btn-gradient:link {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    background-color: #667eea !important;
    background-image: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    border-color: transparent !important;
    color: white !important;
}

/* Completely override Bootstrap btn class for gradient buttons */
.card-body .btn-gradient {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    background-color: #667eea !important;
    background-image: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    border: none !important;
    color: white !important;
}

/* Target the specific login page button */
.d-grid .btn-gradient {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    background-color: #667eea !important;
    background-image: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    border: none !important;
    color: white !important;
}

/* Glass effect for login card */
.glass-effect {
    background: rgba(255, 255, 255, 0.1) !important;
    backdrop-filter: blur(20px) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    border-radius: 20px !important;
}

/* Feature icon styling */
.feature-icon {
    width: 80px;
    height: 80px;
    background: rgba(0, 212, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid rgba(0, 212, 255, 0.3);
}

/* Remove any overlays or pseudo-elements that might block clicks */
.card-body::before,
.card-body::after,
.glass-effect::before,
.glass-effect::after,
.d-grid::before,
.d-grid::after {
    display: none !important;
    content: none !important;
}

/* Ensure buttons are always clickable */
button {
    pointer-events: auto !important;
    position: relative !important;
    z-index: 999999 !important;
}

/* Remove any Bootstrap backdrop or overlay */
.modal-backdrop,
.backdrop,
.overlay {
    display: none !important;
}

.form-select option {
    color: #000000 !important;
    background-color: #ffffff !important;
}

/* Force all Bootstrap form elements */
.form-control, .form-select {
    color: #000000 !important;
    -webkit-text-fill-color: #000000 !important;
    background-color: #ffffff !important;
    border: 1px solid #ced4da !important;
}

/* Fix checkbox appearance - make checkmark visible */
.form-check-input {
    width: 1.25rem !important;
    height: 1.25rem !important;
    background-color: #ffffff !important;
    border: 2px solid #007bff !important;
    border-radius: 0.25rem !important;
    position: relative !important;
    cursor: pointer !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
}

.form-check-input:checked {
    background-color: #007bff !important;
    border-color: #007bff !important;
}

.form-check-input:checked::after {
    content: '✓' !important;
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    color: #ffffff !important;
    font-weight: bold !important;
    font-size: 0.9rem !important;
    line-height: 1 !important;
}

.form-check-input:focus {
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25) !important;
    border-color: #007bff !important;
}

/* Target by ID if needed */
#system_type, #domain {
    color: #000000 !important;
    -webkit-text-fill-color: #000000 !important;
    font-weight: 600 !important;
}

/* Fix checkbox and form labels */
.form-check-label, label.form-label, .form-label {
    color: #000000 !important;
    opacity: 1 !important;
    font-weight: 500 !important;
}

/* Specifically target the hallucination analysis label */
label[for="include-hallucination-analysis"] {
    color: #000000 !important;
    opacity: 1 !important;
    font-weight: 500 !important;
}

/* Fix badge text visibility */
.badge, .btn .badge, .badge.bg-success, .badge.bg-secondary, .badge.bg-info {
    color: #000000 !important;
    opacity: 1 !important;
    font-weight: 600 !important;
}

/* System status text */
.badge:contains("System Active"), .badge:contains("Active") {
    color: #000000 !important;
    background-color: #28a745 !important;
}

/* Badge styling for better contrast - more specific targeting */
table .badge {
    background-color: #495057 !important;
    color: #ffffff !important;
    font-weight: 600 !important;
    padding: 0.5em 0.75em !important;
    border-radius: 0.375rem !important;
    font-size: 0.875em !important;
}

table .badge.bg-secondary {
    background-color: #6c757d !important;
    color: #ffffff !important;
}

table .badge.bg-info {
    background-color: #0d6efd !important;
    color: #ffffff !important;
}

table .badge.bg-success {
    background-color: #198754 !important;
    color: #ffffff !important;
}

/* Override any other badge styles */
.table td .badge {
    background-color: #495057 !important;
    color: #ffffff !important;
    font-weight: 600 !important;
}

/* Professional Brand Elements */
.brand-text {
    color: #ffffff;
    font-weight: 600;
    font-size: 1.2em;
}

/* How It Works Section Styles */
.step-content {
    position: relative;
    padding-left: 80px;
}

.step-number {
    position: absolute;
    left: 0;
    top: 0;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-size: 1.5rem;
    font-weight: bold;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.integration-box {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    min-height: 100px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.integration-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.metric-preview {
    transition: transform 0.2s ease;
    border: 1px solid #e9ecef;
}

.metric-preview:hover {
    transform: translateY(-2px);
}

.monitoring-dashboard {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    border: none;
}

.workflow-step {
    transition: transform 0.3s ease;
    border: none;
}

.workflow-step:hover {
    transform: translateX(10px);
}

.workflow-arrow {
    opacity: 0.6;
}

.refresher-preview {
    border-left: 4px solid var(--bs-primary);
    background: #f8f9fa !important;
}

@media (max-width: 768px) {
    .step-content {
        padding-left: 0;
        text-align: center;
        margin-top: 2rem;
    }
    
    .step-number {
        position: relative;
        margin: 0 auto 1rem;
    }
    
    .integration-visual .row {
        justify-content: center;
    }
    
    .integration-box {
        margin-bottom: 1rem;
    }
}

/* Why Choose Our Platform Section */
.benefit-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #e9ecef;
}

.benefit-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1) !important;
}

.benefit-icon {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.roi-calculator {
    border: 2px solid #e9ecef;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%) !important;
}

.roi-metric {
    padding: 1rem 0;
}

.roi-metric .h3 {
    margin-bottom: 0.5rem;
}

@media (max-width: 768px) {
    .benefit-card {
        margin-bottom: 2rem;
    }
    
    .roi-calculator .row {
        text-align: center;
    }
    
    .roi-metric {
        margin-bottom: 1rem;
    }
}

.text-primary-custom {
    color: var(--primary-color) !important;
}

.bg-subtle-gradient {
    background: var(--subtle-gradient) !important;
}

.navbar-brand {
    display: flex;
    align-items: center;
    font-weight: 600;
}

.navbar-brand i {
    font-size: 1.5em;
    margin-right: 10px;
    text-shadow: 0 0 10px rgba(255, 0, 127, 0.5);
}

/* Layout */
.main-content {
    margin-top: 56px;
    min-height: calc(100vh - 56px);
}

.sidebar {
    background-color: var(--primary-color);
    min-height: calc(100vh - 56px);
    box-shadow: 2px 0 5px rgba(0,0,0,0.1);
}

.sidebar .nav-link {
    color: #ffffff !important;
    transition: all 0.3s ease;
    border-radius: 5px;
    margin: 2px 8px;
    padding: 12px 16px;
    font-weight: 500;
}

.sidebar .nav-link:hover {
    background: rgba(255,255,255,0.15);
    transform: translateX(5px);
    color: #ffffff !important;
}

.sidebar .nav-link.active {
    background: var(--secondary-color);
    box-shadow: 0 2px 5px rgba(52, 152, 219, 0.3);
    color: #ffffff !important;
}

.sidebar .nav-link i {
    width: 20px;
    margin-right: 10px;
    color: #ffffff !important;
}

.sidebar-divider {
    border-color: rgba(255,255,255,0.3);
    margin: 1rem 0;
}

.sidebar-heading {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #ffffff !important;
    font-weight: 600;
    padding: 0.5rem 1rem;
}

/* Cards */
.dashboard-card {
    transition: all 0.3s ease;
    border: none;
    box-shadow: var(--card-shadow);
    border-radius: 10px;
    overflow: hidden;
    background-color: #ffffff !important;
}

.dashboard-card .card-body {
    color: #2c3e50;
    background-color: #ffffff !important;
}

.dashboard-card .card-header {
    color: #ffffff;
    background-color: #6c757d !important;
}

.dashboard-card .card-header h1, .dashboard-card .card-header h2, .dashboard-card .card-header h3, 
.dashboard-card .card-header h4, .dashboard-card .card-header h5, .dashboard-card .card-header h6 {
    color: #ffffff !important;
}

/* For cards with light backgrounds, use dark text */
.dashboard-card:not(.metric-card) .card-body h1,
.dashboard-card:not(.metric-card) .card-body h2,
.dashboard-card:not(.metric-card) .card-body h3,
.dashboard-card:not(.metric-card) .card-body h4,
.dashboard-card:not(.metric-card) .card-body h5,
.dashboard-card:not(.metric-card) .card-body h6 {
    color: #2c3e50 !important;
}

.dashboard-card:not(.metric-card) .card-body p, 
.dashboard-card:not(.metric-card) .card-body span, 
.dashboard-card:not(.metric-card) .card-body div {
    color: #2c3e50;
}

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

.metric-card {
    background: var(--subtle-gradient);
    color: white;
    position: relative;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.metric-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100px;
    height: 100px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    transform: translate(30px, -30px);
}

.metric-card .card-body {
    position: relative;
    z-index: 1;
}

.metric-card h4 {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0;
}

/* Performance indicators */
.performance-excellent { color: #28a745; }
.performance-good { color: #17a2b8; }
.performance-fair { color: #ffc107; }
.performance-poor { color: #dc3545; }

/* Status indicators */
.status-indicator {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 8px;
}

.status-active { background-color: #28a745; }
.status-warning { background-color: #ffc107; }
.status-error { background-color: #dc3545; }
.status-inactive { background-color: #6c757d; }

/* Navigation */
.navbar-brand {
    font-weight: 600;
    font-size: 1.3rem;
    color: #ffffff !important;
}

.navbar-brand i {
    margin-right: 10px;
    color: var(--secondary-color);
}

.navbar-brand small {
    color: #bdc3c7 !important;
    font-weight: 400;
}

/* Buttons */
.btn {
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 1px solid;
}

/* Ensure buttons have proper contrast */
.btn:focus,
.btn.focus {
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(52, 152, 219, 0.25);
}

.btn-primary {
    background-color: var(--primary-color);
    border: 1px solid var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: var(--dark-gray);
    border-color: var(--dark-gray);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(52, 73, 94, 0.3);
}

.btn-success {
    background-color: var(--success-color);
    border: 1px solid var(--success-color);
    color: white;
}

.btn-success:hover {
    background-color: #219653;
    border-color: #219653;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(39, 174, 96, 0.3);
}

.btn-outline-primary {
    background-color: transparent;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
}

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

.btn-outline-success {
    background-color: transparent;
    border: 1px solid var(--success-color);
    color: var(--success-color);
}

.btn-outline-success:hover {
    background-color: var(--success-color);
    border-color: var(--success-color);
    color: white;
}

.btn-warning {
    background-color: var(--warning-color);
    border: 1px solid var(--warning-color);
    color: white;
}

.btn-warning:hover {
    background-color: #e67e22;
    border-color: #e67e22;
    color: white;
}

.btn-danger {
    background-color: var(--accent-color);
    border: 1px solid var(--accent-color);
    color: white;
}

.btn-danger:hover {
    background-color: #c0392b;
    border-color: #c0392b;
    color: white;
}

.btn-secondary {
    background-color: var(--medium-gray);
    border: 1px solid var(--medium-gray);
    color: white;
}

.btn-secondary:hover {
    background-color: var(--dark-gray);
    border-color: var(--dark-gray);
    color: white;
}

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
}

/* Forms */
.form-control, .form-select {
    border-radius: 8px;
    border: 1px solid #e3e6f0;
    transition: all 0.3s ease;
}

.form-control:focus, .form-select:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

/* Tables */
.table {
    border-radius: 10px;
    overflow: hidden;
}

.table th {
    background-color: #f8f9fc;
    border-bottom: 2px solid #e3e6f0;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.05em;
}

.table-hover tbody tr:hover {
    background-color: rgba(102, 126, 234, 0.05);
}

/* Charts */
#performance-chart {
    max-height: 300px;
}

/* Activity Feed */
.activity-item {
    padding: 12px 0;
    border-bottom: 1px solid #e3e6f0;
}

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

.activity-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    margin-right: 12px;
}

.activity-analysis { background: rgba(102, 126, 234, 0.1); color: #667eea; }
.activity-refresher { background: rgba(40, 167, 69, 0.1); color: #28a745; }
.activity-alert { background: rgba(220, 53, 69, 0.1); color: #dc3545; }

/* Analysis Results */
.metric-bar {
    height: 8px;
    border-radius: 4px;
    background: #e3e6f0;
    overflow: hidden;
    margin: 8px 0;
}

.metric-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.5s ease;
}

.metric-fill.excellent { background: #28a745; }
.metric-fill.good { background: #17a2b8; }
.metric-fill.fair { background: #ffc107; }
.metric-fill.poor { background: #dc3545; }

/* Knowledge Base Display */
.kb-section {
    background: #f8f9fc;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    border-left: 4px solid #667eea;
}

.kb-section h6 {
    color: #667eea;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.05em;
    margin-bottom: 15px;
}

.kb-content {
    background: white;
    border-radius: 6px;
    padding: 15px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.9rem;
    line-height: 1.5;
    max-height: 300px;
    overflow-y: auto;
}

/* Mobile Navigation */
.navbar-toggler {
    border: none;
    padding: 4px 8px;
}

.navbar-toggler:focus {
    box-shadow: none;
}

/* Offcanvas Navigation */
.offcanvas .nav-link {
    padding: 12px 20px;
    color: #ffffff !important;
    border-radius: 0;
    margin: 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    transition: all 0.3s ease;
}

.offcanvas .nav-link:hover {
    background: rgba(255,255,255,0.1);
    color: #ffffff !important;
}

.offcanvas .nav-link i {
    width: 20px;
    margin-right: 12px;
}

/* Metric Boxes for Mobile */
.metric-box {
    background: rgba(255,255,255,0.1);
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 8px;
}

.metric-value {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.metric-label {
    font-size: 0.75rem;
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .main-content {
        margin-left: 0;
        padding: 0;
    }
    
    .main-content main {
        padding: 15px !important;
    }
    
    .metric-card h4 {
        font-size: 2rem;
    }
    
    .dashboard-card {
        margin-bottom: 20px;
    }
    
    .navbar-brand span {
        font-size: 1rem;
    }
    
    .navbar-brand small {
        display: none;
    }
    
    /* Forms on mobile */
    .form-control, .form-select, textarea {
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    /* Button adjustments */
    .btn {
        padding: 12px 20px;
        font-size: 14px;
    }
    
    .btn-sm {
        padding: 8px 12px;
        font-size: 12px;
    }
    
    /* Card spacing */
    .card {
        margin-bottom: 15px;
    }
    
    .card-body {
        padding: 15px;
    }
    
    /* Table responsiveness */
    .table-responsive {
        font-size: 14px;
    }
    
    /* Modal adjustments */
    .modal-dialog {
        margin: 10px;
    }
    
    .modal-content {
        border-radius: 10px;
    }
    
    /* Chart containers */
    #performance-chart {
        height: 250px !important;
    }
    
    /* Analysis results */
    .metric-bar {
        height: 6px;
    }
    
    /* Activity feed */
    .activity-item {
        padding: 8px 0;
    }
    
    .activity-icon {
        width: 28px;
        height: 28px;
        font-size: 0.8rem;
    }
}

@media (max-width: 576px) {
    .container-fluid {
        padding-left: 10px;
        padding-right: 10px;
    }
    
    .row {
        margin-left: -5px;
        margin-right: -5px;
    }
    
    .col-12, .col-sm-6, .col-md-4, .col-md-6, .col-md-8, .col-lg-4, .col-lg-6, .col-lg-8 {
        padding-left: 5px;
        padding-right: 5px;
    }
    
    .metric-card h4 {
        font-size: 1.8rem;
    }
    
    .metric-card .card-body {
        padding: 12px;
    }
    
    .btn {
        width: 100%;
        margin-bottom: 8px;
    }
    
    .btn-toolbar .btn {
        width: auto;
        margin-bottom: 4px;
    }
    
    /* Smaller text inputs */
    textarea {
        min-height: 120px;
    }
    
    /* Compact navigation */
    .navbar-brand {
        font-size: 1rem;
    }
    
    .d-flex.justify-content-between {
        flex-direction: column;
        align-items: flex-start !important;
    }
    
    .btn-toolbar {
        margin-top: 10px;
        width: 100%;
    }
    
    .btn-toolbar .btn {
        flex: 1;
        margin: 0 2px;
    }
}

/* Loading States */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(102, 126, 234, 0.3);
    border-radius: 50%;
    border-top-color: #667eea;
    animation: spin 1s ease-in-out infinite;
}

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

/* Alerts */
.alert {
    border-radius: 10px;
    border: none;
    box-shadow: var(--card-shadow);
}

.alert-success {
    background: linear-gradient(45deg, rgba(40, 167, 69, 0.1), rgba(40, 167, 69, 0.05));
    color: #155724;
    border-left: 4px solid #28a745;
}

.alert-warning {
    background: linear-gradient(45deg, rgba(255, 193, 7, 0.1), rgba(255, 193, 7, 0.05));
    color: #856404;
    border-left: 4px solid #ffc107;
}

.alert-danger {
    background: linear-gradient(45deg, rgba(220, 53, 69, 0.1), rgba(220, 53, 69, 0.05));
    color: #721c24;
    border-left: 4px solid #dc3545;
}

.alert-info {
    background: linear-gradient(45deg, rgba(23, 162, 184, 0.1), rgba(23, 162, 184, 0.05));
    color: #0c5460;
    border-left: 4px solid #17a2b8;
}

/* Client Status */
.client-status .fas {
    font-size: 0.7rem;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.5s ease-out;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.pulse {
    animation: pulse 2s infinite;
}

/* Code blocks */
pre {
    background: #f8f9fc;
    border-radius: 8px;
    padding: 15px;
    border-left: 4px solid #667eea;
    overflow-x: auto;
}

code {
    background: rgba(102, 126, 234, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
}

/* Tooltips */
.tooltip {
    font-size: 0.8rem;
}

.tooltip-inner {
    background: #2c3e50;
    border-radius: 6px;
    padding: 8px 12px;
}

/* Modal customizations */
.modal-content {
    border-radius: 15px;
    border: none;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
    background: #ffffff !important;
    color: #2c3e50 !important;
}

.modal-header {
    border-bottom: 1px solid #dee2e6;
    background: #f8f9fa !important;
    color: #2c3e50 !important;
}

.modal-body {
    background: #ffffff !important;
    color: #2c3e50 !important;
}

.modal-footer {
    background: #ffffff !important;
    border-top: 1px solid #dee2e6;
}

/* Specific styling for implementation modal */
#implementationModal .modal-content {
    background: #ffffff !important;
    border: 1px solid #dee2e6;
}

#implementationModal .modal-header {
    background: #f8f9fa !important;
    border-bottom: 1px solid #dee2e6;
    color: #2c3e50 !important;
}

#implementationModal .modal-body {
    background: #ffffff !important;
    color: #2c3e50 !important;
}

#implementationModal .modal-footer {
    background: #ffffff !important;
}

/* Clean styling for modal content sections */
#implementationModal .alert-info {
    background: #d1ecf1 !important;
    color: #0c5460 !important;
    border: 1px solid #bee5eb !important;
}

#implementationModal .deployment-info {
    background: #f8f9fa !important;
    color: #2c3e50 !important;
    border: 1px solid #dee2e6 !important;
}

#implementationModal .bg-light {
    background: #f8f9fa !important;
    color: #2c3e50 !important;
}

/* User Management Tab Styling */
.modal .nav-tabs .nav-link {
    color: #2c3e50 !important;
    background: #f8f9fa !important;
    border: 1px solid #dee2e6 !important;
}

.modal .nav-tabs .nav-link.active {
    color: #2c3e50 !important;
    background: #ffffff !important;
    border-color: #dee2e6 #dee2e6 #ffffff !important;
}

.modal .nav-tabs .nav-link:hover {
    color: #2c3e50 !important;
    background: #e9ecef !important;
}

/* Tab content styling in modals */
.modal .tab-content {
    background: #ffffff !important;
    color: #2c3e50 !important;
}

.modal .tab-pane {
    color: #2c3e50 !important;
}

.modal .tab-pane * {
    color: #2c3e50 !important;
}

/* Table styling in modal tabs */
.modal .table {
    color: #2c3e50 !important;
    background: #ffffff !important;
}

.modal .table th,
.modal .table td {
    color: #2c3e50 !important;
    background: #ffffff !important;
    border-color: #dee2e6 !important;
}

.modal .table thead th {
    background: #f8f9fa !important;
    color: #2c3e50 !important;
}

.modal-title {
    color: #2c3e50 !important;
    font-weight: 600;
}

/* JSON formatting */
.json-display {
    background: #2d3748;
    color: #e2e8f0;
    border-radius: 8px;
    padding: 20px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.9rem;
    line-height: 1.6;
    max-height: 400px;
    overflow-y: auto;
}

.json-key { color: #63b3ed; }
.json-string { color: #68d391; }
.json-number { color: #f6ad55; }
.json-boolean { color: #fc8181; }
.json-null { color: #a0aec0; }

/* Framework Section Styling */
.framework-section {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.framework-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
}

.framework-section h6 {
    color: #ffffff !important;
    font-weight: 600;
    margin-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 8px;
}

.framework-section .text-muted {
    color: rgba(255, 255, 255, 0.8) !important;
    font-size: 0.9rem;
    line-height: 1.5;
}

.framework-section .alert {
    margin-bottom: 15px;
    border-radius: 8px;
}

.framework-section .btn-group {
    gap: 8px;
}

/* Analysis Results Styling */
.analysis-results {
    margin-top: 15px;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
}

.analysis-results[style*="block"] {
    opacity: 1;
    transform: translateY(0);
}

.result-card {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    padding: 20px;
    backdrop-filter: blur(5px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.result-card h6 {
    color: #ffffff !important;
    font-weight: 600;
    margin-bottom: 10px;
}

.result-card .btn-group {
    gap: 5px;
}

/* Drift Metrics Styling */
.drift-metrics {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    padding: 15px;
    margin-top: 10px;
}

.metric-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

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

.metric-label {
    color: rgba(255, 255, 255, 0.9) !important;
    font-weight: 500;
    font-size: 0.9rem;
}

.metric-value {
    color: #4ade80 !important;
    font-weight: 700;
    font-size: 1rem;
    background: rgba(74, 222, 128, 0.1);
    padding: 4px 8px;
    border-radius: 4px;
    border: 1px solid rgba(74, 222, 128, 0.3);
}

/* Fix overlapping text issues */
.col-md-6 {
    padding-left: 15px;
    padding-right: 15px;
    position: relative;
    z-index: 1;
}

.framework-section small {
    display: block;
    margin-bottom: 10px;
    word-wrap: break-word;
}

/* Ensure proper spacing between sections */
.governance-card .card-body .row .col-md-6:first-child {
    margin-bottom: 30px;
}

@media (min-width: 768px) {
    .governance-card .card-body .row .col-md-6:first-child {
        margin-bottom: 0;
        border-right: 1px solid rgba(255, 255, 255, 0.1);
        padding-right: 25px;
    }
    
    .governance-card .card-body .row .col-md-6:last-child {
        padding-left: 25px;
    }
}

/* Button styling improvements */
.framework-section .btn {
    margin-right: 8px;
    margin-bottom: 8px;
    white-space: nowrap;
}

.framework-section .d-flex.gap-2 {
    flex-wrap: wrap;
    gap: 8px !important;
}
