﻿/* Global Styles */
body {
    background-color: #1c1c1c;
    color: #e0e0e0;
    font-family: 'Arial', sans-serif;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

*, *::before, *::after {
    box-sizing: inherit;
}

h1, h2, h3, h4, h5, h6 {
    color: #ff6f61;
}

a, a:hover {
    color: #ff6f61;
    text-decoration: none;
}

/* Container */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding-top: 110px; /* ensures space for fixed navbar */
    padding-bottom: 60px;
}

.container.content {
    background-color: #2b2b2b;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

/* Navbar Styling */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    height: 60px;
    background-color: #2b2b2b;
    z-index: 1000;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #3d3d3d;
    box-shadow: 0 2px 4px rgba(0,0,0,0.4);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 0;
}

.nav-logo {
    font-size: 24px;
    color: #ff6f61;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-links {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: center;
    font-size: 15px;
}

.nav-links a {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    color: #ff6f61;
    transition: background-color 0.2s ease, color 0.2s ease;
    border-radius: 4px;
}

.nav-links a:hover {
    background-color: #3d3d3d;
    color: #ffa500;
}

.nav-group {
    display: flex;
    flex-direction: column;
    margin-right: 15px;
}

.nav-section-title {
    color: #ff6f61;
    font-size: 14px;
    font-weight: bold;
    margin: 5px 0 5px;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Menu icon */
.menu-icon {
    display: block !important;  /* Always show the icon */
    font-size: 24px;
    cursor: pointer;
    color: #ff6f61;
}

/* Slide-out Menu */
.side-menu {
    height: 100%;
    width: 0;
    position: fixed;
    top: 0;
    right: 0;
    background-color: #2b2b2b;
    overflow-x: hidden;
    transition: 0.5s;
    padding-top: 60px;
    z-index: 1100;
}

.side-menu a {
    padding: 10px 20px;
    font-size: 16px;
    display: flex;
    align-items: center;
    color: #e0e0e0;
}

.side-menu a i {
    margin-right: 10px;
}

.side-menu a:hover {
    color: #ffa500;
    background-color: #3d3d3d;
}

.side-menu .nav-group {
    padding: 10px 15px;
    border-top: 1px solid #444;
}

.side-menu .nav-section-title {
    font-size: 13px;
    color: #ff6f61;
    font-weight: bold;
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.close-btn {
    position: absolute;
    top: 20px;
    right: 25px;
    font-size: 36px;
}

/* Responsive */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    .navbar {
        flex-direction: row;
        justify-content: space-between;
        height: auto;
        padding: 10px 15px;
    }
    .navbar .container {
        flex-direction: row;
    }
    .container {
        padding-top: 120px;
    }
}

/* Buttons */
.btn-option, .btn-logout {
    margin: 10px;
    padding: 15px 20px;
    background-color: #ffa500;
    color: #fff;
    border-radius: 8px;
    display: inline-block;
    box-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.btn-option:hover {
    background-color: #ff7f00;
}

.btn-logout {
    background-color: #dc3545;
}

.btn-logout:hover {
    background-color: #c82333;
}

.btn-small {
    background-color: #007bff;
    color: #fff;
    padding: 5px 10px;
    border-radius: 3px;
    display: inline-block;
}

.btn-small:hover {
    background-color: #0056b3;
}

/* Table Styles */
table {
    width: 100%;
    border-collapse: collapse;
    background-color: #2b2b2b;
}

th, td {
    border: 1px solid #3d3d3d;
    padding: 12px;
    color: #fff;
}

th {
    background-color: #3d3d3d;
}

tr:nth-child(even) td {
    background-color: #333;
}

tr:hover td {
    background-color: #444;
}

/* Dashboard */
.dashboard-header, .dashboard-stats {
    margin-bottom: 30px;
    text-align: center;
}

.stat-group {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
}

.stat-item {
    flex: 1 1 45%;
    margin: 10px;
    padding: 15px;
    background-color: #333;
    border-radius: 8px;
    position: relative;
}

/* Badges */
.badge {
    padding: 4px 8px;
    border-radius: 4px;
    color: #fff;
    font-size: 0.85em;
}
.badge.Low { background-color: #007bff; }
.badge.Medium { background-color: #ffc107; color: #000; }
.badge.High { background-color: #fd7e14; }
.badge.Critical { background-color: #dc3545; }
.badge.Active { background-color: #17a2b8; }
.badge.Resolved { background-color: #28a745; }
.badge.Mitigated { background-color: #6c757d; }

/* Form Elements */
form, .form-group {
    background-color: #2b2b2b;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0px 0px 10px rgba(0,0,0,0.5);
    margin-bottom: 30px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.form-group label, form label {
    display: block;
    color: #e0e0e0;
    margin-bottom: 8px;
}

input[type="text"],
input[type="number"],
input[type="password"],
input[type="email"],
textarea,
select {
    width: 100%;
    padding: 12px 15px;
    margin: 10px 0;
    border: 1px solid #444;
    border-radius: 4px;
    background-color: #333;
    color: #fff;
    font-size: 16px;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.12);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    box-sizing: border-box;
}

input[type="text"]:focus,
input[type="number"]:focus,
input[type="password"]:focus,
input[type="email"]:focus,
textarea:focus,
select:focus {
    border-color: #ff6f61;
    outline: none;
}

input[type="checkbox"],
input[type="radio"] {
    margin-right: 10px;
    transform: scale(1.2);
    vertical-align: middle;
}

input[type="submit"],
input[type="reset"],
button {
    background-color: #ff6f61;
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    margin-top: 10px;
    width: auto;
    box-sizing: border-box;
}

input[type="submit"]:hover,
input[type="reset"]:hover,
button:hover {
    background-color: #e85c50;
}

form p, .form-group p {
    margin-bottom: 10px;
}

form input, form select, form textarea {
    margin-bottom: 15px;
}

select {
    appearance: none;
    background-image: url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/svgs/solid/chevron-down.svg');
    background-repeat: no-repeat;
    background-position: right 10px top 50%;
    background-size: 12px;
    padding-right: 30px;
}

.toggle-btn {
    margin-bottom: 10px;
    background-color: #444;
    color: #fff;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    border: none;
    z-index: 10;
}
.login-wrapper {
    max-width: 400px;
    margin: 0 auto;
    background-color: #2b2b2b;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0px 0px 15px rgba(0,0,0,0.4);
}

.login-wrapper h2, .login-wrapper p {
    text-align: center;
}

.login-wrapper form .form-group {
    margin-bottom: 20px;
}
