/* Global Styles */
* {
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
    margin: 0;
    padding: 0;
}

body {
    background-color: #5A5959;
    color: white;
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

/* Header Styling */
header {
    width: 100%;
    background-color: #D9D9D9;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 40px;
    flex-wrap: nowrap;
    position: relative;
}

.logo-left {
    height: 50px; /* Consistent logo size */
    margin-right: 1600px;
}

.logo-right {
    height: 50px;
    position: absolute;
    top: 0;
    right: 0;
}

.toyota-logo {
    height: 50px; /* Consistent logo size */
}

/* User greeting below the header and aligned to the top right */
.user-greeting {
    font-size: 16px;
    font-weight: bold;
    padding: 10px 20px;
    color: white;
    text-align: right;
    margin-top: 10px;
    position: relative;
}

/* Main container for buttons */
main {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;  /* Centers the buttons vertically */
    height: 70%;  /* Set height to ensure the buttons are in the middle */
    gap: 20px;   /* Adds space between buttons */
}

/* Profile Container */
.profile-container {
    width: 100%;
    max-width: 500px;
    margin: 40px auto;
    background-color: #C6C6C6;
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    text-align: center;
}

/* Heading Styling */
h2 {
    font-size: 24px;
    color: #ffffff;
    margin-bottom: 20px;
}

/* Label Styling */
label {
    font-size: 16px;
    color: #ffffff;
    margin-bottom: 5px;
    text-align: left;
    display: block;
}

/* Input Styling */
input[type="text"],
input[type="email"],
input[type="password"] {
    width: 100%;
    padding: 15px;
    margin-bottom: 15px;
    border-radius: 12px;
    border: 1px solid #ccc;
    font-size: 16px;
}

/* Button Styling */
button,
.logout-button,
.back-link button {
    padding: 15px;
    background-color: #EB2128;
    color: white;
    font-weight: bold;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    font-size: 18px;
    margin-bottom: 10px;  /* Added margin-bottom for spacing between buttons */
    max-width: 300px; /* Set a max-width to prevent buttons from taking full width */
    width: 100%; /* Ensure uniform width */
    margin-left: auto;  /* Center the button horizontally */
    margin-right: auto; /* Center the button horizontally */
}

button:hover,
.logout-button:hover,
.back-link button:hover {
    background-color: #c8181e;
}

/* Success/Error Message Styling */
.error-message,
.success-message {
    font-size: 14px;
    text-align: center;
}

.error-message {
    color: red;
}

.success-message {
    color: green;
}

/* Mobile responsiveness */
@media (max-width: 480px) {
    .top-bar {
        display: flex;
        flex-direction: row;
        justify-content: flex-start;
        align-items: center;
        padding: 1px 1px;
        margin-left: 0;
        flex-wrap: nowrap;
    }

    header {
        width: 100%;
        background-color: #D9D9D9;
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 20px 40px;
        flex-wrap: nowrap;
        position: relative;
    }

    .logo-left {
        height: 30px;
        margin-right: 80px;
    }

    .logo-right {
        height: 50px;
        position: absolute;
        top: 20px;
        right: 40px;
    }

    .form-container.logo-right {
        height: 50px;
        position: absolute;
        top: 0;
        right: 0;
    }

    .toyota-logo {
        height: 35px;
        top: 40px;
    }

    .user-greeting {
        font-size: 16px;
        padding: 10px 20px;
        text-align: right;
        margin-top: 10px;
    }

    .profile-container {
        max-width: 90%;
        padding: 20px;
    }

    h2 {
        font-size: 22px;
    }

    h1 {
        font-size: 28px;
    }

    label {
        font-size: 14px;
    }

    input[type="text"],
    input[type="email"],
    input[type="password"] {
        font-size: 14px;
        padding: 12px;
    }

    button {
        font-size: 16px;
        padding: 12px;
    }

    .logout-button {
        font-size: 16px;
        padding: 12px;
    }

    .back-link button {
        font-size: 16px;
        padding: 12px;
    }

    /* Specific adjustments for the followup_year_selection.php page */
    .form-container {
        width: 300px;
        padding: 20px;
        background-color: #C6C6C6;
        border-radius: 20px;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    }

    select, input[type="text"], input[type="email"], input[type="password"] {
        font-size: 16px;  /* Consistent font size */
        padding: 15px;
        margin-bottom: 15px;
        border-radius: 12px;
        width: 100%;  /* Ensure full-width for all inputs */
    }

    h3 {
        font-size: 25px;  /* Increase size for section heading */
        font-weight: bold;
    }

    .form-container button {
        font-size: 18px;
        padding: 15px;
        margin-left: auto;
        margin-right: auto;
        display: block;
        width: 100%;
    }
}

/* Desktop responsiveness */
@media (min-width: 481px) {
    .top-bar {
        display: flex;
        background-color: #D9D9D9;
        justify-content: space-between;
        align-items: center;
        padding: 20px 40px;
        flex-wrap: wrap;
    }

    .logo-left {
        height: 80px;
    }

    .logo-right {
        display: flex;
        align-items: center;
        gap: 20px;
        top: 60px;
        right: 40px;
    }

    .toyota-logo {
        height: 80px;
    }

    .user-greeting {
        font-size: 30px;
        justify-content: flex-end;
        padding: 20px 40px 0;
    }

    .profile-container {
        max-width: 600px;
        padding: 40px;
    }

    h2 {
        font-size: 30px;
    }

    h1 {
        font-size: 40px;
        font-weight: bold;
    }

    h3 {
        font-size: 40px;
        font-weight: bold;
    }

    label {
        font-size: 18px;
    }

    input[type="text"],
    input[type="email"],
    input[type="password"] {
        font-size: 18px;
        padding: 18px;
    }

    button {
        font-size: 20px;
        padding: 18px;
        width: 300px; /* Fixed button width */
    }

    .logout-button {
        font-size: 18px;
        padding: 18px;
        width: 300px; /* Fixed button width */
    }

    .back-link button {
        font-size: 18px;
        padding: 18px;
        width: 300px; /* Fixed button width */
    }

    /* Specific adjustments for the followup_year_selection page */
    .form-container {
        width: 500px;
        padding: 30px;
        background-color: #C6C6C6;
        border-radius: 20px;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    }

    .form-container h3 {
        font-size: 36px;
    }

    .form-container input, .form-container select {
        padding: 15px;  /* Consistent padding */
        width: 100%;
        margin-bottom: 15px;
        font-size: 16px;
    }

    .form-container button {
        font-size: 18px;
        padding: 15px;
        margin-left:auto;
        margin-right: auto;
        display: block;
        width: 100%;
    }
}
