body {
    font-family: sans-serif;
    margin: 0;
}

.sidenav {
    height: 100%;
    width: 250px;
    position: fixed;
    z-index: 1;
    top: 0;
    left: 0;
    background-color: #FFC222; /* The golden yellow from the image */
    overflow-x: hidden;
    padding-top: 20px;
    color: #333; /* Darker text for contrast */
    box-shadow: 2px 0 5px rgba(0,0,0,0.1);
}

.sidenav .profile {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 0;
    margin-bottom: 20px;
}

.sidenav .profile-pic {
    width: 80px;
    height: 80px;
    background-color: #fff;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 10px;
    font-size: 40px;
    color: #f5b921; /* Icon color matching background */
}

.sidenav .profile-name {
    font-size: 18px;
    font-weight: bold;
    color: #fff; /* White text for the name */
}

.sidenav a {
    padding: 12px 8px 12px 16px;
    text-decoration: none;
    font-size: 17px;
    color: #fff; /* White text for menu items */
    display: block;
    transition: 0.3s;
    display: flex;
    align-items: center;
}

.sidenav a i {
    margin-right: 10px;
    width: 20px; /* Give icons a fixed width for alignment */
    text-align: center;
}

.sidenav a:hover, .sidenav .dropdown-btn:hover {
    background-color: #f5b921;; /* Slightly darker yellow on hover */
    color: #fff;
}

.sidenav .active {
    background-color: #fff; /* White background for active item */
    color: #f5b921; /* Golden yellow text for active item */
    border-radius: 5px;
    margin: 0 10px;
    padding-left: 10px; /* Adjust padding for rounded corners */
}

/* Dropdown styling */
.dropdown-content {
    display: none;
    background-color: rgba(255, 255, 255, 0.2); /* Slightly transparent white for dropdown */
    padding-left: 30px;
}

.dropdown-content a {
    color: #fff;
    padding: 8px 0px 8px 16px;
    text-decoration: none;
    display: block;
    font-size: 15px;
}

.dropdown-content a:hover {
    background-color: rgba(255, 255, 255, 0.3);
}

.dropdown-btn {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.dropdown-btn .fa-caret-down {
    margin-right: 10px;
    transition: transform 0.3s;
}

.dropdown-btn.active .fa-caret-down {
    transform: rotate(180deg);
}

/*----------Trial Only----------*/
.container {
    margin-left: 250px;
    padding: 20px;
}
.title {
    color: #dc2626;
    text-align: center;
    margin-bottom: 30px;
    font-size: 24px;
}
.form-group{
    margin-bottom: 20px;
}
.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #333;
}
.form-group label.required::before{
    content: '*';
    color: #dc2626;
    margin-right: 4px;
}
.form-group input[type="text"], .form-group input[type="tel"] {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
    font-size: 16px;
}
.profile-photo-section {
    text-align: center;
    margin-bottom: 30px;
}
.profile-photo-circle {
    width: 120px;
    height: 120px;
    border: 2px solid #ccc;
    border-radius: 50%;
    margin: 0 auto 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    cursor: pointer;
    background-color: #eee;
}
.profile-photo-circle img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.profile-photo-circle .hidden {
    display: none;
}
.upload-text {
    color: #666;
    font-size: 14px;
}
.save-button {
    background-color: #dc2626;
    color: white;
    padding: 12px 25px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 18px;
    float: right;
    margin-top: 20px;
}
.save-button:hover {
    background-color: #cc0000;
}
/* --- Responsive Styles --- */

/* Tablet and smaller desktop screens (max-width: 992px) */
@media (max-width: 992px) {
    .sidenav {
        width: 80px; /* Collapse sidebar for tablets */
    }

    .sidenav .profile-name,
    .sidenav a span { /* Hide text in sidenav items */
        display: none;
    }

    .sidenav a {
        justify-content: center; /* Center icons when text is hidden */
        padding: 12px 0; /* Adjust padding */
    }

    .sidenav a i {
        margin-right: 0;
    }

    .sidenav .profile {
        padding: 10px 0;
    }

    .sidenav .profile-pic {
        width: 60px;
        height: 60px;
        font-size: 30px;
    }

    .main-content {
        margin-left: 80px; /* Adjust main content margin to match collapsed sidebar */
    }

    .sidenav .active {
        margin: 0; /* Remove horizontal margin for active item */
        border-radius: 0; /* Remove border-radius for collapsed state */
        padding-left: 0;
    }

    /* Hide dropdown content in collapsed sidebar */
    .dropdown-content {
        display: none !important;
    }

    .dropdown-btn .fa-caret-down {
        display: none;
    }
    

}

/* Mobile devices (max-width: 768px) */
@media (max-width: 768px) {
    .sidenav {
        width: 100%; /* Full width sidebar on mobile */
        height: auto;
        position: relative; /* Make it part of the flow */
        padding-top: 0;
        box-shadow: none;
        display: flex; /* Use flexbox for horizontal layout */
        justify-content: space-around; /* Distribute items evenly */
        align-items: center;
        flex-wrap: wrap; /* Allow items to wrap if needed */
        z-index: 1000; /* Ensure it's on top if it overlays content */
    }

    .sidenav .profile,
    .sidenav .profile-name,
    .sidenav .profile-pic {
        display: none; /* Hide profile section on mobile */
    }

    .sidenav a {
        padding: 10px 5px;
        font-size: 14px;
        flex-direction: column; /* Stack icon and text for better tap targets */
        gap: 5px;
        color: #fff;
    }

    .sidenav a i {
        margin-right: 0;
        font-size: 20px;
    }

    .sidenav .active {
        background-color: #f5b921; /* Keep active state visible */
        color: #fff;
        border-radius: 0;
        margin: 0;
        padding: 10px 5px;
    }
    .container {
        margin-left: 0; /* Remove left margin on smaller screens */
        padding: 15px; /* Slightly reduce padding for smaller screens */
    }

    .main-content {
        margin-left: 0; /* No margin on mobile */
        padding-top: 0; /* Adjust padding if header is now fixed */
    }

}

/* Even smaller mobile screens (max-width: 480px) */
@media (max-width: 480px) {
    .sidenav a {
        font-size: 12px;
        padding: 8px 3px;
        gap: 3px;
    }

    .sidenav a i {
        font-size: 18px;
    }

    .container {
        padding: 10px; /* Further reduce padding for very small screens */
    }

    .title {
        font-size: 18px;
    }

    .form-group label {
        font-size: 14px;
    }

    .upload-text {
        font-size: 12px;
    }
}

/* Existing CSS for .container */
.container {
    margin-left: 250px;
    padding: 20px;
}

/* Adjustments for tablet devices (e.g., screens up to 768px wide) */
@media (max-width: 768px) {
    .container {
        margin-left: 0; /* Remove left margin on smaller screens */
        padding: 15px; /* Slightly reduce padding for smaller screens */
    }

    .sidenav {
        width: 100%; /* Make sidebar full width for mobile */
        height: auto; /* Adjust height based on content */
        position: relative; /* Change position to relative so it flows with the document */
        padding-top: 0; /* Remove top padding */
        box-shadow: none; /* Remove shadow */
    }

    .sidenav .profile {
        flex-direction: row; /* Align profile items horizontally */
        justify-content: center;
        padding: 10px 0;
        margin-bottom: 0;
    }

    .sidenav .profile-pic {
        width: 60px;
        height: 60px;
        font-size: 30px;
        margin-bottom: 0;
        margin-right: 10px; /* Add some space between pic and name */
    }

    .sidenav .profile-name {
        font-size: 16px;
    }

    .sidenav a {
        padding: 10px 8px; /* Adjust padding for links */
        justify-content: center; /* Center align links for mobile */
    }

    .sidenav a i {
        margin-right: 5px; /* Reduce icon margin */
    }

    .sidenav .active {
        margin: 0; /* Remove side margins for full width */
        border-radius: 0; /* Remove border radius */
    }

    /* Form adjustments for smaller screens */
    .title {
        font-size: 20px;
        margin-bottom: 20px;
    }

    .form-group input[type="text"],
    .form-group input[type="tel"] {
        padding: 8px; /* Slightly reduce input padding */
        font-size: 14px;
    }

    .profile-photo-circle {
        width: 100px;
        height: 100px;
    }

    .save-button {
        width: 100%; /* Make button full width */
        float: none; /* Remove float */
        margin-top: 30px; /* Adjust top margin */
        padding: 10px 0; /* Adjust padding */
    }
}

/* Logout Modal Styles */
.modal {
    display: none; /* Hidden by default */
    position: fixed; /* Stay in place */
    z-index: 1000; /* Sit on top */
    left: 0;
    top: 0;
    width: 100%; /* Full width */
    height: 100%; /* Full height */
    overflow: auto; /* Enable scroll if needed */
    background-color: rgba(0,0,0,0.4); /* Black w/ opacity */
    justify-content: center; /* Center horizontally */
    align-items: center; /* Center vertically */
}

.modal-content {
    background-color: #fefefe;
    margin: auto; /* For older browsers, flexbox handles centering */
    padding: 30px;
    border: 1px solid #888;
    width: 90%; /* Responsive width */
    max-width: 400px; /* Maximum width */
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    text-align: center;
    position: relative;
}

.close-button {
    color: #aaa;
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close-button:hover,
.close-button:focus {
    color: #333;
    text-decoration: none;
}

.modal-content h2 {
    color: #333;
    margin-bottom: 20px;
    font-size: 24px;
}

.modal-content p {
    margin-bottom: 30px;
    font-size: 16px;
    color: #555;
}

.modal-actions button {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    margin: 0 10px;
    transition: background-color 0.3s ease;
}

.modal-actions .cancel {
    background-color: #ccc;
    color: #333;
}

.modal-actions .cancel:hover {
    background-color: #bbb;
}

.modal-actions .logout {
    background-color: #dc2626; /* Match your save button color */
    color: white;
}

.modal-actions .logout:hover {
    background-color: #cc0000; /* Darker red on hover */
}

/* Ensure modal is hidden by default and shown with JavaScript */
.modal.show {
    display: flex; /* Use flex to center content */
}

/* Responsive adjustments for modal */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        padding: 20px;
    }
    .modal-content h2 {
        font-size: 20px;
    }
    .modal-content p {
        font-size: 14px;
    }
    .modal-actions button {
        padding: 8px 15px;
        font-size: 14px;
        margin: 0 5px;
    }
}

@media (max-width: 480px) {
    .modal-content {
        padding: 15px;
    }
    .close-button {
        font-size: 24px;
        top: 5px;
        right: 10px;
    }
}
