/* Reset some default styles */
body, h1, h2, h3, ul, li, table, th, td {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Base styles */
body {
    font-family: Arial, sans-serif;
    height: 100vh;
}

/* Header styling */
header {
    background-color: #000;
    color: antiquewhite;
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: 'Poppins', sans-serif;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
}

.nav-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 95%;
}

.logo {
    font-size: 24px;
    font-weight: bold;
    font-family: 'Times New Roman', Times, serif;
}

.nav-links {
    display: flex;
    align-items: center;
    margin-left: auto;
}

.nav-links a {
    color: antiquewhite;
    text-decoration: none;
    margin: 0 15px;
    font-size: 16px;
}

.search-container {
    display: flex;
    align-items: center;
    margin-left: 15px;
}

.search-container input {
    padding: 5px;
    font-size: 16px;
    border: none;
    border-radius: 3px;
}

.search-container button {
    background-color: #ecf0f1;
    border: none;
    padding: 5px;
    border-radius: 3px;
    cursor: pointer;
}

/* Dashboard layout */
.dashboard {
    display: flex;
    margin-top: 48px; /* Adjust this if header height changes */
    height: calc(100vh - 68px);
}

/* Sidebar styling */
.sidebar {
    width: 220px;
    max-width: fit-content;
    background-color: #2c3e50;
    color: #ecf0f1;
    height: calc(100vh - 68px);
    /* height: 100%; */
    padding: 10px;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    position: fixed;
    top: 48px; /* Adjust this if header height changes */
    bottom: 0;
}

.sidebar h2 {
    margin: 5px;
    margin-top: 0px;
    color: antiquewhite;
}

.sidebar ul {
    list-style-type: none;
    flex: 1;
    overflow-y: auto;
}

.sidebar ul li {
    margin-bottom: 10px;
}

.sidebar ul li a {
    color: #ecf0f1;
    text-decoration: none;
    display: flex;
    justify-content: space-between;
    padding: 10px;
    border-radius: 5px;
    transition: background-color 0.3s;
}

.sidebar ul li a:hover {
    background-color: #34495e;
}

/* CSS for the selected site */
.sidebar ul li.selected a {
    background-color: #d3a269;
    color: #2c3e50;
    font-weight: bold;
    border-left: 5px solid #b38150;
}

/* Active link styling */
.sidebar ul li a.active {
    background-color: black;
    font-weight: bold;
}

.sidebar button {
    padding: 10px;
    border: none;
    border-radius: 5px;
    background-color: #d3a269;
    color: white;
    cursor: pointer;
    transition: background-color 0.3s;
    margin-top: 10px;
}

.sidebar button:hover {
    background-color: #b38150;
}

/* Main content styling */
.main-content {
    flex: 1;
    background-color: #ecf0f1;
    padding: 20px;
    overflow-y: auto;
    margin-left: 220px; /* Match the sidebar width */
    height: calc(100vh - 69px);
}

.content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.content-header h1 {
    font-size: 24px;
}

/* Table styling */
table {
    width: 100%;
    border-collapse: collapse;
    background-color: white;
}

th, td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

th {
    background-color: #2c3e50;
    color: #d3a269;
}

td button {
    padding: 5px 10px;
    border: none;
    border-radius: 3px;
    cursor: pointer;
}

td button:hover {
    background-color: #b38150;
    color: white;
}

/* Add Material Button styling */
#addMaterialButton {
    padding: 10px;
    border: none;
    border-radius: 5px;
    background-color: #d3a269;
    color: white;
    cursor: pointer;
    transition: background-color 0.3s;
}

#addMaterialButton:hover {
    background-color: #b38150;
}

/* Modal styling */
.modal {
    display: none;
    position: fixed;
    z-index: 1;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgb(0,0,0);
    background-color: rgba(0,0,0,0.4);
}

.modal-content {
    background-color: #fefefe;
    margin: 15% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
}

.modal-content button {
    margin: 5px;
}

/* Form Styling */
.site-form-container {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
}

.del-site-form-container,
.update-form-container,
.material-form-container {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    text-align: center;
    
}

.delete-form,
.update-form,
.material-form,
.site-form{
    background: white;
    padding: 20px;
    border-radius: 5px;
    position: absolute;
    top: 25%;
    left: 45%;    
}

.site-form h2,
.update-form h2,
.material-form h2{
    margin-bottom: 20px;
}

.del-site-form-container  h3{
    margin-bottom: 10px;  
}

.site-form label,
.update-form label,
.material-form label {
    display: block;
    margin-bottom: 5px;
}

.site-form input,
.update-form input,
.material-form input{
    width: 100%;
    padding: 8px;
    margin-bottom: 15px;
    border-radius: 3px;
    border: 1px solid #ccc;
}

.site-form button,
.update-form button,
.material-form button {
    padding: 10px;
    border: none;
    border-radius: 5px;
    background-color: #3498db;
    color: white;
    cursor: pointer;
    transition: background-color 0.3s;
}

.site-form button[type="button"],
.update-form button[type="button"],
.material-form button[type="button"] {
    background-color: #e74c3c;
    margin-left: 10px;
}

.site-form button[type="submit"],
.update-form button[type="submit"],
.material-form button[type="submit"] {
    background-color: #3498db;
    color: white;
}

/* Button hover styling */
.site-form button[type="submit"]:hover,
.update-form button[type="submit"]:hover,
.material-form button[type="submit"]:hover {
    background-color: #2980b9;
}

.site-form button[type="button"]:hover,
.update-form button[type="button"]:hover,
.material-form button[type="button"]:hover {
    background-color: #c0392b;
}

/* Delete button styling */
#delCancelButton, #del-yes-btn {
    padding: 10px;
    border: none;
    border-radius: 5px;
    background-color: #3498db;
    color: white;
    cursor: pointer;
    transition: background-color 0.3s;
}
#del-yes-btn {
    background-color: #c0392b;
}