/* ISA Scanner - Custom Styles */

:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #0dcaf0;
    --light-color: #f8f9fa;
    --dark-color: #212529;
}

/* Global Styles */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: #f8f9fa;
}

/* Navigation */
.navbar-brand img {
    filter: brightness(0) invert(1);
}

/* Cards */
.card {
    border: none;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    transition: box-shadow 0.15s ease-in-out;
}

.card:hover {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

/* Buttons */
.btn {
    border-radius: 0.375rem;
    font-weight: 500;
    transition: all 0.15s ease-in-out;
}

/* Forms */
.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

/* Login page specific */
.login-container {
    max-width: 400px;
}

.login-card {
    border: none;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

/* Setup page specific */
.setup-container {
    max-width: 600px;
}

.setup-card {
    border: none;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.setup-step {
    min-height: 400px;
}

.setup-step h4 {
    color: var(--dark-color);
    font-weight: 600;
}

.setup-step .form-label {
    font-weight: 500;
    color: var(--dark-color);
}

.setup-step .form-text {
    font-size: 0.875rem;
}

/* Progress bar styling */
.progress {
    height: 8px;
    background-color: #e9ecef;
}

.progress .progress-bar {
    background: linear-gradient(90deg, var(--primary-color), #0056b3);
    transition: width 0.3s ease;
}

/* TOTP setup specific */
.totp-secret {
    font-family: 'Courier New', monospace;
    font-size: 0.875rem;
    letter-spacing: 1px;
}

/* Success step styling */
.setup-step .bi-check-circle-fill {
    color: var(--success-color);
    animation: checkAnimation 0.6s ease-in-out;
}

@keyframes checkAnimation {
    0% {
        transform: scale(0);
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
    }
}

/* Dashboard specific */
.dashboard-stat-card {
    background: linear-gradient(135deg, var(--primary-color), #0056b3);
    color: white;
}

.dashboard-stat-card .card-body {
    padding: 1.5rem;
}

.dashboard-stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1;
}

.dashboard-stat-label {
    font-size: 0.875rem;
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

/* Status badges */
.status-badge {
    font-size: 0.75rem;
    padding: 0.375rem 0.75rem;
    border-radius: 0.5rem;
}

.status-pending {
    background-color: #ffc107;
    color: #000;
}

.status-running {
    background-color: #0dcaf0;
    color: #000;
}

.status-completed {
    background-color: #198754;
    color: #fff;
}

.status-failed {
    background-color: #dc3545;
    color: #fff;
}

/* Vulnerability severity colors */
.severity-critical {
    background-color: #dc3545;
    color: #fff;
}

.severity-high {
    background-color: #fd7e14;
    color: #fff;
}

.severity-medium {
    background-color: #ffc107;
    color: #000;
}

.severity-low {
    background-color: #20c997;
    color: #fff;
}

.severity-info {
    background-color: #0dcaf0;
    color: #000;
}

/* Tables */
.table th {
    border-top: none;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.025em;
    padding: 1rem 0.75rem;
}

.table td {
    padding: 0.75rem;
    vertical-align: middle;
}

/* Progress bars */
.progress {
    height: 0.5rem;
    border-radius: 0.25rem;
}

/* Alerts */
.alert {
    border: none;
    border-radius: 0.5rem;
}

/* Loading states */
.loading {
    position: relative;
    color: transparent !important;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 1rem;
    height: 1rem;
    border: 2px solid #f3f3f3;
    border-top: 2px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Responsive utilities */
@media (max-width: 768px) {
    .dashboard-stat-number {
        font-size: 2rem;
    }
    
    .table-responsive {
        border: none;
    }
}

/* Print styles */
@media print {
    .navbar,
    .btn,
    .alert,
    footer {
        display: none !important;
    }
    
    .card {
        box-shadow: none !important;
        border: 1px solid #dee2e6 !important;
    }
}

/* Accessibility improvements */
.visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* Focus states for accessibility */
.btn:focus,
.form-control:focus,
.form-select:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Dark mode support (future enhancement) */
@media (prefers-color-scheme: dark) {
    /* Dark mode styles can be added here */
}