/* Basic reset and typography */
* {
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: #333;
    background-color: #fff;
    margin: 0;
    padding: 20px;
}

/* Container and layout */
.row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -15px;
}

.col-md-6 {
    flex: 0 0 50%;
    max-width: 50%;
    padding: 0 15px;
}

@media (max-width: 768px) {
    .col-md-6 {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

/* Form styling */
.form-group {
    margin-bottom: 1rem;
}

.control-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #333;
}

.form-control {
    display: block;
    width: 100%;
    padding: 0.5rem 0.75rem;
    font-size: 14px;
    line-height: 1.5;
    color: #495057;
    background-color: #fff;
    background-clip: padding-box;
    border: 1px solid #ced4da;
    border-radius: 0.25rem;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-control:focus {
    color: #495057;
    background-color: #fff;
    border-color: #80bdff;
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* Automatic required field indicator using :has */
/* Shows a red asterisk after any label whose following input/select/textarea has the HTML required attribute or unobtrusive data-val-required marker */
label.control-label:has(+ input[required]),
label.control-label:has(+ select[required]),
label.control-label:has(+ textarea[required]),
label.control-label:has(+ input[data-val-required]),
label.control-label:has(+ select[data-val-required]),
label.control-label:has(+ textarea[data-val-required]) {
    position: relative;
}
label.control-label:has(+ input[required])::after,
label.control-label:has(+ select[required])::after,
label.control-label:has(+ textarea[required])::after,
label.control-label:has(+ input[data-val-required])::after,
label.control-label:has(+ select[data-val-required])::after,
label.control-label:has(+ textarea[data-val-required])::after {
    content: " *";
    color: #dc3545;
}

/* Date/time input specific styling */
input[type="datetime-local"].form-control {
    padding: 0.5rem 0.75rem;
    min-height: 38px;
}

textarea.form-control {
    min-height: 100px;
    resize: vertical;
}

/* Button styling */
.btn {
    display: inline-block;
    font-weight: 400;
    text-align: center;
    vertical-align: middle;
    cursor: pointer;
    border: 1px solid transparent;
    padding: 0.5rem 1rem;
    font-size: 14px;
    line-height: 1.5;
    border-radius: 0.25rem;
    text-decoration: none;
    transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.btn-primary {
    color: #fff;
    background-color: #007bff;
    border-color: #007bff;
}

.btn-primary:hover {
    color: #fff;
    background-color: #0069d9;
    border-color: #0062cc;
}

.btn-primary:focus {
    box-shadow: 0 0 0 0.2rem rgba(38, 143, 255, 0.5);
}

/* Validation and help text */
.text-danger {
    color: #dc3545;
    font-size: 12px;
    margin-top: 0.25rem;
}

.help-block {
    display: block;
    margin-top: 0.25rem;
    color: #6c757d;
    font-size: 12px;
}

/* Headings */
h2 {
    color: #333;
    margin-bottom: 1.5rem;
    font-size: 1.75rem;
    font-weight: 500;
}

/* Validation summary */
.validation-summary-errors {
    color: #dc3545;
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 0.25rem;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
}

.validation-summary-errors ul {
    margin: 0;
    padding-left: 1.25rem;
}

/* Vulnerability table */
.vulnerabilities { max-width: 1200px; margin: 0 auto;}
.vulnerabilities table { width: 100% }
.vulnerabilities table tr.severity-low { background-color: #f5fdf5; }
.vulnerabilities table tr.severity-medium { background-color: #fffbe6; }
.vulnerabilities table tr.severity-critical { background-color: #fdecea; }

.badge { display:block; padding:2px 6px; border-radius:4px; font-size:12px; font-weight:600; text-align: center;}
.badge-low { background:#d4edda; color:#155724; }
.badge-medium { background:#ffeeba; color:#856404; }
.badge-critical { background:#f8d7da; color:#721c24; }

.btn-outline-primary { color:#0069d9; background:transparent; border:1px solid #0069d9; }
.btn-outline-primary:hover { background:#0069d9; color:#fff; }
.btn-outline-danger { color:#dc3545; background:transparent; border:1px solid #dc3545; }
.btn-outline-danger:hover { background:#dc3545; color:#fff; }
.btn-create { font-weight:600; }
.actions .btn { margin-right:4px; }

.actions.no-wrap { white-space:nowrap; }
.actions.no-wrap .inline-form { display:inline-block; }
.vulnerability-table td, .vulnerability-table th { padding:6px 8px; }
.vulnerability-table .btn.btn-sm { padding:2px 8px; line-height:1.2; }

.vulnerability { max-width: 1200px; margin: 0 auto; }
.vulnerability form { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 2rem; }
.vulnerability .description { grid-column: span 2; }
.vulnerability .controls { grid-column: span 3; display: flex; justify-content: space-between; }

.resolutions table.resolution { width: 100%; }
.resolutions table.resolution td { padding: 0.25rem 1rem; }