/* General Styles */
body {
    font-family: Arial, sans-serif;
    background-color: #f4f4f4;
    margin: 0;
    padding: 0;
    text-align: center;
}

/* Centered Container */
.container {
    max-width: 800px;
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0px 0px 10px rgba(0,0,0,0.1);
    margin: 50px auto;
}

/* Headings */
h1 {
    color: #333;
    margin-bottom: 10px;
}

h2 {
    color: #007bff;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 10px 20px;
    margin: 10px;
    text-decoration: none;
    color: white;
    background: #007bff;
    border-radius: 5px;
    transition: 0.3s;
}

.btn:hover {
    background: #0056b3;
}

.logout {
    background: #dc3545;
}

.logout:hover {
    background: #b52b2b;
}

.back-btn {
    margin-top: 20px;
    display: inline-block;
    background-color: #6c757d;
    color: white;
    padding: 10px 20px;
    border-radius: 5px;
    text-decoration: none;
    transition: background-color 0.3s;
}

.back-btn:hover {
    background-color: #5a6268;
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

table, th, td {
    border: 1px solid #ddd;
}

th, td {
    padding: 10px;
    text-align: center;
}

th {
    background: #007bff;
    color: white;
}

/* Forms */
form {
    display: flex;
    flex-direction: column;
    align-items: center;
}

input[type="text"], 
input[type="email"], 
input[type="password"], 
input[type="file"], 
select {
    width: 80%;
    padding: 10px;
    margin: 5px 0;
    border: 1px solid #ccc;
    border-radius: 5px;
}

input[type="submit"] {
    width: 85%;
    padding: 10px;
    margin: 10px 0;
    border: none;
    background: #007bff;
    color: white;
    border-radius: 5px;
    cursor: pointer;
}

input[type="submit"]:hover {
    background: #0056b3;
}

/* Navigation Bar */
.navbar {
    background: #007bff;
    padding: 15px;
    text-align: center;
}

.navbar a {
    color: white;
    text-decoration: none;
    padding: 10px;
    margin: 0 10px;
    border-radius: 5px;
}

.navbar a:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Loader and Overlay */
#loading-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.6);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    color: white;
    font-family: Arial, sans-serif;
}

.loader {
    border: 6px solid #f3f3f3;
    border-top: 6px solid #4CAF50;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}

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

/* Admin Navigation Dropdown */
.admin-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: center;
    gap: 20px;
    background-color: #007bff;
}

.admin-nav ul li {
    position: relative;
}

.admin-nav .btn {
    color: white;
    padding: 10px 20px;
    text-decoration: none;
    display: inline-block;
    border-radius: 5px;
    transition: 0.3s;
    background-color: #007bff;
}

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

.dropdown-content {
    visibility: hidden;
    opacity: 0;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #fff;
    min-width: 180px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    z-index: 1000;
    border-radius: 5px;
    padding: 0;
    transition: visibility 0s linear 0.2s, opacity 0.2s ease-in-out;
}

.dropdown-content li {
    border-bottom: 1px solid #eee;
}

.dropdown-content li:last-child {
    border-bottom: none;
}

.dropdown-content a {
    display: block;
    color: #333;
    padding: 10px 15px;
    text-decoration: none;
}

.dropdown-content a:hover {
    background-color: #f4f4f4;
}

.dropdown:hover .dropdown-content {
    visibility: visible;
    opacity: 1;
    transition-delay: 0s;
}
