/* Custom Styles for AI Threat Modeling Tool */

:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --success-color: #27ae60;
    --warning-color: #f39c12;
    --danger-color: #e74c3c;
    --dark-color: #34495e;
    --light-color: #ecf0f1;
}

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

.navbar-brand {
    font-weight: bold;
    font-size: 1.5rem;
}

.content-section {
    min-height: calc(100vh - 76px);
    padding-bottom: 2rem;
}

.card {
    border: none;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s, box-shadow 0.2s;
}

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

.card-header {
    border-radius: 10px 10px 0 0 !important;
    font-weight: 600;
}

.btn {
    border-radius: 8px;
    padding: 0.6rem 1.2rem;
    font-weight: 500;
    transition: all 0.2s;
}

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

.framework-stats .badge {
    font-size: 0.9rem;
    padding: 0.5rem 0.8rem;
}

.technique-item {
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 0.5rem;
    background: white;
    transition: all 0.2s;
    cursor: pointer;
}

.technique-item:hover {
    border-color: #007bff;
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.1);
}

.technique-id {
    font-weight: bold;
    color: #007bff;
    font-size: 0.9rem;
}

.technique-name {
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.technique-description {
    color: #6c757d;
    font-size: 0.9rem;
}

.risk-item {
    border-left: 4px solid #dc3545;
    background: #fff5f5;
    padding: 1rem;
    margin-bottom: 0.5rem;
    border-radius: 0 8px 8px 0;
}

.risk-high { border-left-color: #dc3545; background: #fff5f5; }
.risk-medium { border-left-color: #ffc107; background: #fffbf0; }
.risk-low { border-left-color: #28a745; background: #f8fff8; }

.checklist-item {
    display: flex;
    align-items: flex-start;
    padding: 0.75rem;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    margin-bottom: 0.5rem;
    background: white;
    transition: all 0.2s ease;
}

.checklist-item:hover {
    border-color: #007bff;
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.1);
}

.checklist-item input[type="checkbox"] {
    margin-right: 1rem;
    margin-top: 0.25rem;
    transform: scale(1.2);
}

.checklist-item.completed {
    background: #f8f9fa;
    opacity: 0.8;
    border-color: #28a745;
}

.checklist-item.completed .checklist-text {
    text-decoration: line-through;
    color: #6c757d;
}

.security-category {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #007bff;
}

.security-category h6 {
    margin-bottom: 1rem;
    font-weight: 600;
    color: #495057;
}

.progress {
    height: 1.5rem;
    border-radius: 8px;
    background-color: #e9ecef;
}

.progress-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    color: white;
    transition: width 0.6s ease;
}

.risk-score {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    font-weight: bold;
    font-size: 0.9rem;
    color: white;
    margin-left: auto;
}

.risk-score.high { background: #dc3545; }
.risk-score.medium { background: #ffc107; color: #000; }
.risk-score.low { background: #28a745; }

.search-box {
    position: relative;
    margin-bottom: 1rem;
}

.search-box i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
}

.search-box input {
    padding-left: 3rem;
    border-radius: 25px;
    border: 1px solid #dee2e6;
}

.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    color: #6c757d;
}

.loading i {
    animation: spin 1s linear infinite;
    margin-right: 0.5rem;
}

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

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

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

.assessment-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2rem;
    border-radius: 10px;
    margin-bottom: 2rem;
}

.system-config-field {
    margin-bottom: 1rem;
}

.progress-indicator {
    display: flex;
    justify-content: space-between;
    margin-bottom: 2rem;
}

.progress-step {
    flex: 1;
    text-align: center;
    padding: 1rem;
    border-radius: 8px;
    border: 2px solid #e9ecef;
    margin: 0 0.5rem;
    transition: all 0.3s;
}

.progress-step.active {
    border-color: #007bff;
    background: #e7f3ff;
    color: #007bff;
}

.progress-step.completed {
    border-color: #28a745;
    background: #d4edda;
    color: #155724;
}

.threat-matrix {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem;
    margin-top: 2rem;
}

.threat-category {
    border: 1px solid #dee2e6;
    border-radius: 8px;
    background: white;
    overflow: hidden;
}

.threat-category-header {
    background: #f8f9fa;
    padding: 1rem;
    border-bottom: 1px solid #dee2e6;
    font-weight: 600;
}

.threat-list {
    max-height: 400px;
    overflow-y: auto;
    padding: 0;
}

.export-options {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.metric-card {
    text-align: center;
    padding: 1.5rem;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.metric-card h3 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    font-weight: bold;
}

.metric-card small {
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
}

@media (max-width: 768px) {
    .threat-matrix {
        grid-template-columns: 1fr;
    }
    
    .export-options {
        flex-direction: column;
    }
    
    .btn-lg {
        padding: 0.8rem 1.5rem;
        font-size: 1rem;
    }
    
    .metric-card h3 {
        font-size: 2rem;
    }
}