/* IACSec Custom Styles */

:root {
    --primary-color: #1a237e;
    --secondary-color: #424242;
    --success-color: #2e7d32;
    --danger-color: #c62828;
    --warning-color: #f57c00;
    --info-color: #0277bd;
    --sidebar-width: 280px;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f5f5;
}

/* Sidebar Styles */
.wrapper {
    display: flex;
    width: 100%;
    align-items: stretch;
}

#sidebar {
    min-width: var(--sidebar-width);
    max-width: var(--sidebar-width);
    background: #2c3e50;
    color: #fff;
    transition: all 0.3s;
    min-height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    z-index: 1000;
    overflow-y: auto;
}

#sidebar.active {
    margin-left: calc(-1 * var(--sidebar-width));
}

#sidebar .sidebar-header {
    background: #1a252f;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

#sidebar ul.components {
    padding: 0;
}

#sidebar ul li {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

#sidebar ul li a {
    padding: 12px 20px;
    font-size: 0.95rem;
    display: block;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: all 0.3s;
}

#sidebar ul li a:hover,
#sidebar ul li a.active {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
    border-left: 3px solid #007bff;
}

#sidebar .sidebar-section {
    background: rgba(0, 0, 0, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.assessment-item .sub-items {
    background: rgba(0, 0, 0, 0.2);
    padding: 5px 0;
}

.assessment-item .sub-items a {
    padding: 8px 20px;
    font-size: 0.85rem;
}

.assessment-item .sub-items a:hover {
    background: rgba(255, 255, 255, 0.05);
    border-left: 2px solid #17a2b8;
}

#content {
    width: 100%;
    margin-left: var(--sidebar-width);
    transition: all 0.3s;
    min-height: 100vh;
}

#content.active {
    margin-left: 0;
}

/* Auth Pages */
.auth-wrapper {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

.auth-wrapper .card {
    border: none;
    border-radius: 10px;
}

/* Dashboard Cards */
.card {
    border: none;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 1.5rem;
}

.card-header {
    background-color: #fff;
    border-bottom: 2px solid #f0f0f0;
    font-weight: 600;
}

/* Statistics Cards */
.card.bg-primary,
.card.bg-success,
.card.bg-warning,
.card.bg-danger,
.card.bg-info {
    border: none;
    transition: transform 0.2s;
}

.card.bg-primary:hover,
.card.bg-success:hover,
.card.bg-warning:hover,
.card.bg-danger:hover,
.card.bg-info:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Tables */
.table {
    background-color: #fff;
}

.table thead th {
    border-bottom: 2px solid #dee2e6;
    font-weight: 600;
    color: #495057;
    font-size: 0.9rem;
    text-transform: uppercase;
}

.table-hover tbody tr:hover {
    background-color: #f8f9fa;
}

/* Buttons */
.btn {
    border-radius: 6px;
    font-weight: 500;
    padding: 0.5rem 1.2rem;
    transition: all 0.2s;
}

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

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

.btn-primary:hover {
    background-color: #0d47a1;
    border-color: #0d47a1;
}

/* Badges */
.badge {
    padding: 0.4em 0.8em;
    font-weight: 500;
    border-radius: 4px;
}

/* Forms */
.form-control,
.form-select {
    border-radius: 6px;
    border: 1px solid #ced4da;
    padding: 0.6rem 0.9rem;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(26, 35, 126, 0.25);
}

/* Question Items */
.question-item {
    transition: background-color 0.2s;
}

.question-item:hover {
    background-color: #f8f9fa;
}

.answer-select,
.priority-select {
    font-size: 0.9rem;
}

.notes-section {
    background-color: #f8f9fa;
    padding: 1rem;
    border-radius: 6px;
    border: 1px solid #dee2e6;
}

/* Alerts */
.alert {
    border-radius: 6px;
    border: none;
}

/* Progress Bars */
.progress {
    border-radius: 10px;
    overflow: hidden;
}

.progress-bar {
    font-size: 0.85rem;
    font-weight: 500;
}

/* Breadcrumb */
.breadcrumb {
    background-color: transparent;
    padding: 0;
    margin-bottom: 1rem;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: "›";
    font-size: 1.2rem;
}

/* Modals */
.modal-content {
    border: none;
    border-radius: 10px;
}

.modal-header {
    border-bottom: 2px solid #f0f0f0;
    border-radius: 10px 10px 0 0;
}

.modal-footer {
    border-top: 2px solid #f0f0f0;
}

/* Navbar */
.navbar {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Responsive */
@media (max-width: 768px) {
    #sidebar {
        margin-left: calc(-1 * var(--sidebar-width));
    }

    #sidebar.active {
        margin-left: 0;
    }

    #content {
        margin-left: 0;
        width: 100%;
    }

    #content.active {
        margin-left: var(--sidebar-width);
    }
}

/* Print Styles */
@media print {
    #sidebar,
    .navbar,
    .breadcrumb,
    .btn,
    .no-print {
        display: none !important;
    }

    #content {
        margin-left: 0 !important;
        padding: 0 !important;
    }

    .card {
        page-break-inside: avoid;
        box-shadow: none !important;
        border: 1px solid #ddd !important;
    }

    body {
        background: white !important;
    }
}

/* Scrollbar Customization */
#sidebar::-webkit-scrollbar {
    width: 6px;
}

#sidebar::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
}

#sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
}

#sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

/* Loading Spinner */
.spinner-border-sm {
    width: 1rem;
    height: 1rem;
    border-width: 0.15em;
}

/* Custom utility classes */
.text-primary {
    color: var(--primary-color) !important;
}

.bg-primary {
    background-color: var(--primary-color) !important;
}

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

/* Severity Colors for Vulnerabilities */
.severity-critical {
    color: #d32f2f;
}

.severity-high {
    color: #f57c00;
}

.severity-medium {
    color: #fbc02d;
}

.severity-low {
    color: #388e3c;
}

.severity-info {
    color: #1976d2;
}

.bg-severity-critical {
    background-color: #d32f2f !important;
}

.bg-severity-high {
    background-color: #f57c00 !important;
}

.bg-severity-medium {
    background-color: #fbc02d !important;
}

.bg-severity-low {
    background-color: #388e3c !important;
}

.bg-severity-info {
    background-color: #1976d2 !important;
}

/* Assessment Name Truncation */
.assessment-name {
    display: inline-block;
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    vertical-align: middle;
}

/* Save Indicator Animation */
.save-indicator {
    animation: fadeInOut 2s ease-in-out;
}

@keyframes fadeInOut {
    0% { opacity: 0; }
    20% { opacity: 1; }
    80% { opacity: 1; }
    100% { opacity: 0; }
}
