/* Professional AI SAST Platform Styles */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --primary-gradient: linear-gradient(135deg, #000000 0%, #333333 100%);
    --primary-color: #000000;
    --secondary-color: #333333;
    --accent-color: #666666;
    --success-color: #059669;
    --danger-color: #dc2626;
    --warning-color: #d97706;
    --info-color: #0891b2;
    --dark-color: #000000;
    --light-color: #ffffff;
    --glass-bg: rgba(255, 255, 255, 0.98);
    --shadow-sm: 0 1px 3px 0 rgb(0 0 0 / 0.1);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: #ffffff;
    height: 100vh;
    font-weight: 400;
    line-height: 1.6;
    color: #000000;
    overflow: hidden;
}

.navbar {
    background: #000000 !important;
    border-bottom: 1px solid #333333;
    box-shadow: var(--shadow-md);
}

.navbar .navbar-brand,
.navbar .nav-link {
    color: #ffffff !important;
}

.navbar .nav-link:hover {
    color: #e0e7ff !important;
}

.navbar-dark {
    background: #000000 !important;
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
    color: #ffffff !important;
}

.card {
    border: none;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: var(--shadow-md);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid #e2e8f0;
}

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

.card-header {
    background: #000000;
    color: white;
    border-radius: 8px 8px 0 0 !important;
    border: none;
    padding: 1rem 1.5rem;
    font-weight: 600;
}

.btn-primary {
    background: #000000 !important;
    border: 1px solid #000000 !important;
    border-radius: 8px;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    background: #333333 !important;
    border-color: #333333 !important;
    transform: translateY(-1px);
}

.btn-outline-primary {
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    border-radius: 6px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-outline-success,
.btn-outline-danger {
    border-radius: 6px;
    border-width: 1px;
}

.btn-outline-primary:hover {
    background: var(--primary-gradient);
    border-color: transparent;
    transform: translateY(-1px);
}

.table {
    border-radius: 16px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    table-layout: fixed;
    width: 100%;
}

/* Custom Rules Table Specific Styling */
#rulesTable {
    table-layout: fixed;
    width: 100%;
    white-space: nowrap;
}

#rulesTable th,
#rulesTable td {
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 0.75rem 0.5rem;
    vertical-align: middle;
}

#rulesTable th:nth-child(1),
#rulesTable td:nth-child(1) { width: 5%; }
#rulesTable th:nth-child(2),
#rulesTable td:nth-child(2) { width: 35%; }
#rulesTable th:nth-child(3),
#rulesTable td:nth-child(3) { width: 12%; }
#rulesTable th:nth-child(4),
#rulesTable td:nth-child(4) { width: 18%; }
#rulesTable th:nth-child(5),
#rulesTable td:nth-child(5) { width: 12%; }
#rulesTable th:nth-child(6),
#rulesTable td:nth-child(6) { width: 12%; }
#rulesTable th:nth-child(7),
#rulesTable td:nth-child(7) { width: 18%; }

.table-responsive {
    overflow-x: visible !important;
}

.modal-xl .table-responsive {
    overflow-x: visible !important;
    border-radius: 12px;
}

/* Button group styling for rules table */
#rulesTable .btn-group {
    display: flex;
    gap: 2px;
}

#rulesTable .btn-group .btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    border-radius: 4px;
}

#rulesTable .btn-group .btn:first-child {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

#rulesTable .btn-group .btn:not(:first-child):not(:last-child) {
    border-radius: 0;
}

/* Professional action buttons for rules table */
#rulesTable .btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
    border-radius: 6px;
    font-weight: 500;
    min-width: 36px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

#rulesTable .btn-sm:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

/* Users table styling */
#usersTable {
    table-layout: fixed;
    width: 100%;
}

#usersTable th,
#usersTable td {
    padding: 0.75rem;
    vertical-align: middle;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#usersTable .btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
    border-radius: 6px;
    font-weight: 500;
    min-width: 36px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

#usersTable .btn-sm:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

/* Professional tech cards */
.tech-card {
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    transition: all 0.3s ease;
    height: 140px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.tech-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
    border-color: #000000;
    background: linear-gradient(135deg, #ffffff 0%, #f1f5f9 100%);
}

.tech-card i {
    transition: transform 0.3s ease;
}

.tech-card:hover i {
    transform: scale(1.1);
}

.table thead th {
    background: #000000;
    color: white;
    border: none;
    font-weight: 600;
    padding: 1rem;
}

.table tbody tr {
    transition: all 0.2s ease;
}

.table tbody tr:hover {
    background: rgba(0, 0, 0, 0.05);
    transform: scale(1.01);
}

.badge {
    border-radius: 20px;
    padding: 0.5em 1em;
    font-size: 0.75em;
    font-weight: 600;
    box-shadow: var(--shadow-sm);
}

.progress {
    height: 10px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.2);
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
}

.progress-bar {
    border-radius: 20px;
    background: #000000 !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Modern vulnerability severity colors */
.severity-critical {
    background: #8A1D0B !important;
    color: white !important;
    box-shadow: 0 4px 12px rgba(138, 29, 11, 0.3);
}

.severity-high {
    background: #DB2C09 !important;
    color: white !important;
    box-shadow: 0 4px 12px rgba(219, 44, 9, 0.3);
}

.severity-medium {
    background: #FAC419 !important;
    color: black !important;
    box-shadow: 0 4px 12px rgba(250, 196, 25, 0.3);
}

.severity-low {
    background: #FAEF23 !important;
    color: black !important;
    box-shadow: 0 4px 12px rgba(250, 239, 35, 0.3);
}

/* Ensure rules table severity badges match */
#rulesTable .severity-critical,
.badge.severity-critical {
    background-color: #8A1D0B !important;
    color: white !important;
}

#rulesTable .severity-high,
.badge.severity-high {
    background-color: #DB2C09 !important;
    color: white !important;
}

#rulesTable .severity-medium,
.badge.severity-medium {
    background-color: #FAC419 !important;
    color: black !important;
}

#rulesTable .severity-low,
.badge.severity-low {
    background-color: #FAEF23 !important;
    color: black !important;
}

/* Scan status indicators */
.status-completed {
    color: var(--success-color);
}

.status-running {
    color: var(--warning-color);
}

.status-pending {
    color: var(--info-color);
}

.status-failed {
    color: var(--danger-color);
}

/* Modern activity feed */
.activity-item {
    background: rgba(255, 255, 255, 0.8);
    border-radius: 12px;
    padding: 1rem 1.5rem;
    margin-bottom: 1rem;
    border-left: 4px solid #000000;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    position: relative;
}

.activity-item:hover {
    transform: translateX(4px);
    box-shadow: var(--shadow-md);
}

.activity-item::before {
    content: '';
    position: absolute;
    left: -8px;
    top: 50%;
    transform: translateY(-50%);
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #000000;
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.8);
}

.activity-time {
    font-size: 0.85em;
    color: #6c757d;
}

/* Code snippet styling */
.code-snippet {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 5px;
    padding: 10px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
    overflow-x: auto;
}

/* Vulnerability details */
.vulnerability-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-left: 4px solid;
    margin-bottom: 15px;
}

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

.vulnerability-card.critical {
    border-left-color: var(--danger-color);
}

.vulnerability-card.high {
    border-left-color: #fd7e14;
}

.vulnerability-card.medium {
    border-left-color: var(--warning-color);
}

.vulnerability-card.low {
    border-left-color: var(--success-color);
}

.vulnerability-card.info {
    border-left-color: var(--info-color);
}

/* Collapsible vulnerability details */
.vulnerability-card .card-title a {
    color: #1e293b !important;
    text-decoration: none !important;
    display: flex;
    align-items: center;
    transition: color 0.2s ease;
}

.vulnerability-card .card-title a:hover {
    color: #000000 !important;
}

.vulnerability-card .card-title a i {
    transition: transform 0.3s ease;
    color: #000000;
    font-size: 0.8em;
}

.vulnerability-details {
    transition: all 0.3s ease;
    overflow: hidden;
    border-top: 1px solid #e2e8f0;
    padding-top: 1rem;
    margin-top: 1rem;
}

.vulnerability-details .btn-sm {
    font-size: 0.75rem;
    padding: 0.375rem 0.75rem;
    border-radius: 6px;
}

/* Enhanced modal styling */
.modal-xl {
    max-width: 95%;
    width: 95%;
}

.modal-content {
    border: none;
    border-radius: 20px;
    box-shadow: var(--shadow-xl);
    backdrop-filter: blur(20px);
}

.modal-header {
    background: #000000;
    color: white;
    border-radius: 20px 20px 0 0;
    padding: 1.5rem 2rem;
}

.modal-header .btn-close {
    filter: invert(1);
    opacity: 0.8;
}

.modal-body {
    padding: 2rem;
}

/* Modern loading spinner */
.spinner-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.spinner-border-custom {
    width: 4rem;
    height: 4rem;
    border-width: 0.4em;
    border-color: #000000 transparent #333333 transparent;
    animation: spin 1s linear infinite;
}

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

/* Enhanced notification styles */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1050;
    min-width: 350px;
    border-radius: 16px;
    box-shadow: var(--shadow-xl);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    animation: slideInRight 0.3s ease-out;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Enhanced animations */
.fade-in {
    animation: fadeIn 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.slide-in {
    animation: slideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideIn {
    from { transform: translateX(-100%) scale(0.95); }
    to { transform: translateX(0) scale(1); }
}

.bounce-in {
    animation: bounceIn 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes bounceIn {
    0% {
        transform: scale(0.3);
        opacity: 0;
    }
    50% {
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Enhanced utility classes */
.text-gradient {
    color: #000000 !important;
    font-weight: 600;
}

.border-gradient {
    border: 2px solid transparent;
    background: linear-gradient(white, white) padding-box, linear-gradient(135deg, #000000 0%, #333333 100%) border-box;
    border-radius: 12px;
}

.glass-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 16px;
}

.floating {
    animation: floating 3s ease-in-out infinite;
}

@keyframes floating {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.glow {
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
}

.text-shadow {
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Additional professional enhancements */
.stats-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.stats-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.chart-container {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.scan-progress {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.status-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 8px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.feature-highlight {
    color: #000000 !important;
    font-weight: 700;
}

.section-divider {
    height: 2px;
    background: #000000;
    border-radius: 2px;
    margin: 2rem 0;
    opacity: 0.3;
}

/* Enhanced responsive design */
@media (max-width: 768px) {
    .card {
        border-radius: 12px;
        margin-bottom: 1rem;
    }
    
    .card-body {
        padding: 1.5rem;
    }
    
    .table-responsive {
        font-size: 0.9em;
        border-radius: 12px;
    }
    
    .btn {
        font-size: 0.9em;
        padding: 0.6rem 1.2rem;
    }
    
    .notification {
        min-width: 300px;
        margin: 10px;
    }
    
    .modal-body {
        padding: 1.5rem;
    }
}

.card:hover {
    transform: translateY(-2px);
    transition: all 0.2s ease;
}



/* Black and White Theme */
body {
    background: #ffffff !important;
    color: #000000 !important;
}

.card {
    background: #ffffff !important;
    color: #000000 !important;
    border: 1px solid #e0e0e0 !important;
}

.table {
    background: #ffffff !important;
    color: #000000 !important;
}

.activity-item {
    background: #ffffff !important;
    color: #000000 !important;
}

.text-muted {
    color: #666666 !important;
}

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

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

.btn-outline-secondary {
    border-color: #666666 !important;
    color: #666666 !important;
}

.btn-outline-secondary:hover {
    background-color: #666666 !important;
    border-color: #666666 !important;
    color: #ffffff !important;
}

.btn-outline-success {
    border-color: #4a4a4a !important;
    color: #4a4a4a !important;
}

.btn-outline-success:hover {
    background-color: #4a4a4a !important;
    border-color: #4a4a4a !important;
    color: #ffffff !important;
}

.btn-outline-danger {
    border-color: #1a1a1a !important;
    color: #1a1a1a !important;
}

.btn-outline-danger:hover {
    background-color: #1a1a1a !important;
    border-color: #1a1a1a !important;
    color: #ffffff !important;
}

.badge {
    background-color: #000000 !important;
    color: #ffffff !important;
}

.bg-success {
    background-color: #059669 !important;
}

.bg-warning {
    background-color: #d97706 !important;
    color: #ffffff !important;
}

.bg-info {
    background-color: #0891b2 !important;
}

.bg-danger {
    background-color: #dc2626 !important;
}

.bg-secondary {
    background-color: #333333 !important;
}

.text-primary {
    color: #000000 !important;
}

.dropdown-menu {
    background-color: #ffffff !important;
    border: 1px solid #e0e0e0 !important;
}

.dropdown-item {
    color: #000000 !important;
}

.dropdown-item:hover {
    background-color: #f5f5f5 !important;
    color: #000000 !important;
}

.form-control {
    border: 1px solid #cccccc !important;
    color: #000000 !important;
}

.form-control:focus {
    border-color: #000000 !important;
    box-shadow: 0 0 0 0.2rem rgba(0, 0, 0, 0.25) !important;
}

.form-select {
    border: 1px solid #cccccc !important;
    color: #000000 !important;
}

.form-select:focus {
    border-color: #000000 !important;
    box-shadow: 0 0 0 0.2rem rgba(0, 0, 0, 0.25) !important;
}

.nav-tabs .nav-link {
    color: #000000 !important;
    border-color: #cccccc !important;
}

.nav-tabs .nav-link.active {
    background-color: #ffffff !important;
    border-color: #000000 !important;
    color: #000000 !important;
}

.nav-tabs .nav-link:hover {
    border-color: #000000 !important;
    color: #000000 !important;
}