/* 🌍 Universal Styling - Modern Font */
body {
    font-family: Arial, Helvetica, sans-serif;
    background-color: #f0f4f8; /* Soft blue-gray background */
    color: #333;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center; /* Center horizontally */
    align-items: center; /* Center vertically */
    height: 100vh; /* Full viewport height */
}

/* 📌 Fully Centered Navigation */
nav {
    background: #83CCEC; /* Blue-gray */
    width: 280px; /* Fixed width */
    height: 80vh; /* Adjusted height */
    padding: 20px; /* Added padding to prevent corner clipping */
    border-radius: 12px; /* Soft rounded edges */
    box-shadow: 2px 4px 8px rgba(0, 0, 0, 0.2);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between; /* Push footer to bottom */
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    overflow: hidden; /* Prevents accidental scrollbars */
}

/* 🏠 Dashboard Title Inside the Menu */
nav h1 {
    font-size: 22px;
    font-weight: bold;
    color: white;
    margin-bottom: 15px;
    padding: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    background: #3b4b5b; /* Slightly darker shade */
    border-radius: 8px;
    width: 80%;
}

/* 📋 Vertical Navigation List */
nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    width: 100%;
    flex-grow: 1; /* Allows items to expand while keeping footer at bottom */
}

/* 📌 Ensure items are stacked and centered */
nav ul li {
    width: 100%;
    text-align: center;
    margin: 8px 0;
}

/* 🔗 Flexible Button Sizing */
nav ul li a {
    display: block;
    text-decoration: none;
    color: white;
    font-weight: bold;
    font-size: 1.2vw; /* Adjusts based on screen width */
    padding: 1.5vh; /* Adjusts based on screen height */
    border-radius: 8px;
    transition: all 0.3s ease-in-out;
    background: #3b4b5b;
    width: 80%;
    margin: 0 auto;
}

/* 🔄 Hover Effect */
nav ul li a:hover {
    background: #2a3948;
}

/* 🚪 Logout Button - Stand Out */
nav ul li .logout {
    background: #d9534f;
}

nav ul li .logout:hover {
    background: #c9302c;
}

.admin-button {
    display: block;
    text-decoration: none;
    color: white;
    font-weight: bold;
    font-size: 1.2vw;
    padding: 1.5vh;
    border-radius: 8px;
    transition: all 0.3s ease-in-out;
    background: #d9534f; /* Red like the logout button */
    width: 80%;
    margin: 10px auto;
    text-align: center;
}

.admin-button:hover {
    background: #c9302c;
}

/* 📌 Footer Inside Menu */
nav footer {
    text-align: center;
    font-size: 12px;
    color: white;
    padding: 10px 0;
    width: 100%;
    background: transparent; /* No background, blends into menu */
}

/* 📱 Landscape Mode Adjustments (Fix for Small Screens) */
@media (max-height: 500px) {
    nav {
        width: 55%; /* Make it slightly wider in landscape */
        max-height: 85vh; /* Prevents it from taking the entire screen */
        padding: 15px; /* Ensure corners stay rounded */
        overflow-y: auto; /* Enable scrolling if buttons overflow */
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
    }

    nav ul {
        padding-bottom: 10px; /* Prevents last button from getting cut off */
        max-height: 70vh; /* Ensure space for all buttons */
        overflow-y: auto; /* Allow scrolling inside menu */
    }

    nav ul li {
        margin: 4px 0; /* Reduce space between buttons */
    }

    nav ul li a {
        font-size: 1.2vw; /* Keep text readable */
        padding: 1vh 0.8vw; /* Reduce padding by 50% */
    }

    footer {
        font-size: 10px; /* Reduce footer text size */
    }
}

/* 📱 Smaller Screens (Phones) */
@media (max-width: 768px) {
    nav {
        width: 90%; /* Adjust width for smaller screens */
        max-width: 320px; /* Prevents it from being too wide */
        max-height: 85vh; /* Reduce height by 15% */
        padding: 15px;
        overflow-y: auto; /* Ensures scrolling if needed */
    }

    nav h1 {
        font-size: 18px;
        width: 90%;
    }

    nav ul {
        max-height: 75vh; /* Limit height of button container */
        overflow-y: auto; /* Enable scrolling if buttons overflow */
    }

    nav ul li a {
        font-size: 14px;
        width: 90%;
        padding: 8px; /* Reduce button padding */
    }

    footer {
        font-size: 10px;
    }
}

/* 🌍 Dashboard Background */
.dashboard-body {
    background: url('/manuals/Pictures/PanelMockup.JPG') no-repeat center center;
    background-size: cover; /* Ensures full-screen coverage */
    background-attachment: scroll; /* Fix for iOS Safari */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100vh;
    margin: 0;
    position: relative;
    overflow: hidden; /* Prevents weird page scrolling */
}

/* Optional: Overlay for better text visibility */
.dashboard-body::before {
    content: "";
    position: fixed; /* Ensure it stays behind everything */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    z-index: -1; /* Send it behind the content */
    pointer-events: none; /* Allow clicks to pass through */
}

/* 📱 Fix for iPhones & Small Screens */
@media (max-width: 768px) {
    .dashboard-body {
        background-attachment: scroll; /* Prevents disappearing background */
        min-height: 100vh; /* Ensures full background coverage */
    }
}


/* Dashboard Container */
.dashboard-container {
    position: relative;
    z-index: 2; /* Ensures content is above the overlay */
    background: rgba(255, 255, 255, 0.9); /* Semi-transparent white */
    padding: 20px;
    border-radius: 12px;
    box-shadow: 2px 4px 8px rgba(0, 0, 0, 0.2);
    text-align: center;
    width: 80%;
    max-width: 800px;
}

/* Dashboard Sections */
section {
    margin-top: 20px;
    background: white;
    padding: 15px;
    border-radius: 10px;
    box-shadow: 2px 4px 8px rgba(0, 0, 0, 0.2);
    position: relative;
    z-index: 2;
}

/* Responsive Design */
@media (max-width: 768px) {
    .dashboard-container {
        width: 90%;
    }
}
.container form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.container label {
    font-weight: bold;
    margin-top: 10px;
}

.container input[type="text"],
.container input[type="email"],
.container input[type="password"],
.container button {
    width: 100%;
    padding: 10px;
    border-radius: 5px;
    border: 1px solid #ddd;
}

.container button {
    background: #4a5d72;
    color: white;
    font-weight: bold;
    cursor: pointer;
}

.container button:hover {
    background: #3b4b5b;
}
.button-container {
    display: flex;
    justify-content: space-between;
    align-items: center; /* Ensure both buttons are level */
    margin-top: 10px;
    gap: 10px;
}

.back-button, .add-user-button {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px 10px;
    border-radius: 5px;
    font-weight: bold;
    text-decoration: none;
    text-align: center;
    width: 48%;
    font-size: 16px;
    height: 40px; /* Force exact same height for both */
    line-height: 1;
    border: none;
    box-sizing: border-box; /* Prevents unexpected padding issues */
}

/* Back to Dashboard Button */
.back-button {
    background: #4a5d72;
    color: white;
}

.back-button:hover {
    background: #3b4b5b;
}

/* Add User Button */
.add-user-button {
    background: #4a5d72; /* Match Back to Dashboard color */
    color: white;
}

.add-user-button:hover {
    background: #3b4b5b;
}
