* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #74b9ff 0%, #0984e3 50%, #6c5ce7 100%);
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
    /* Hide scrollbars but allow scrolling */
    scrollbar-width: none !important; /* Firefox */
    -ms-overflow-style: none !important; /* IE and Edge */
}

/* Hide scrollbars on body using webkit */
body::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
}

html {
    /* Hide scrollbars but allow scrolling */
    scrollbar-width: none !important; /* Firefox */
    -ms-overflow-style: none !important; /* IE and Edge */
}

html::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
}

body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="white" opacity="0.1"/><circle cx="75" cy="75" r="1" fill="white" opacity="0.1"/><circle cx="50" cy="10" r="0.5" fill="white" opacity="0.1"/><circle cx="10" cy="60" r="0.5" fill="white" opacity="0.1"/><circle cx="90" cy="40" r="0.5" fill="white" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    pointer-events: none;
}

.container {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(15px);
    border-radius: 20px;
    margin-top: 30px;
    padding: 20px 15px;
    width: calc(100% - 20px);
    max-width: 350px;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    position: relative;
    z-index: 1;
    /* Completely hide scrollbars */
    max-height: none;
    overflow-y: hidden !important; /* Hide scrollbar completely */
    overflow-x: hidden !important; /* Hide horizontal scrollbar */
    margin: 0 auto;
    animation: float 3s ease-in-out infinite;
    /* Hide scrollbars using Firefox and IE */
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
}

/* Force hide scrollbars when sign-in form is present */
.container:has(#loginSection),
.container:has(.login-section) {
    overflow-y: hidden !important;
    overflow-x: hidden !important;
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
}

/* Allow scrolling in sign-up form but hide scrollbar */
.container:has(#registerSection),
.container:has(.register-section) {
    overflow-y: auto !important; /* Allow scrolling */
    overflow-x: hidden !important;
    scrollbar-width: none !important; /* Hide scrollbar in Firefox */
    -ms-overflow-style: none !important; /* Hide scrollbar in IE/Edge */
}

/* Hide scrollbars on container using webkit (Chrome, Safari, Edge) */
.container::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
    background: transparent !important;
    -webkit-appearance: none !important;
}

.container::-webkit-scrollbar-track {
    display: none !important;
    background: transparent !important;
}

.container::-webkit-scrollbar-thumb {
    display: none !important;
    background: transparent !important;
}

/* Move sign-in, forgot password, and reset password forms upward */
/* When login section is active, reduce container margin-top */
.container:has(.login-section.active) {
    margin-top: -30px;
}

/* When forgot password section is active, reduce container margin-top */
.container:has(.forgot-password-section.active) {
    margin-top: -30px;
}

/* Keep sign-up form at original position when active */
.container:has(.register-section.active) {
    margin-top: 30px;
}


.container::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #74b9ff, #0984e3, #6c5ce7, #74b9ff);
    border-radius: 27px;
    z-index: -1;
    opacity: 0.3;
    animation: borderGlow 3s ease-in-out infinite alternate;
}

@keyframes borderGlow {
    0% { opacity: 0.3; }
    100% { opacity: 0.6; }
}

@keyframes float {
    0%, 100% { 
        transform: translateY(0px); 
    }
    50% { 
        transform: translateY(-10px); 
    }
}

.logo {
    text-align: center;
    margin-bottom: 20px;
}

.logo-image {
    max-width: 80px;
    height: auto;
    margin-bottom: 8px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.logo-image:hover {
    transform: scale(1.05);
}

.logo p {
    color: #666;
    font-size: 12px;
    font-weight: 400;
}

.form-group {
    margin-bottom: 12px;
}

.form-group label {
    display: block;
    margin-bottom: 4px;
    color: #333;
    font-weight: 600;
    font-size: 12px;
}

/* Enlarge Email Address and Password labels in sign-in form */
#loginSection .form-group label[for="email"],
#loginSection .form-group label[for="password"] {
    font-size: 14px;
}

/* Enlarge all sign-up form labels to match sign-in form (14px), except address-related fields */
#registerSection .form-group label:not([for="province"]):not([for="municipality"]):not([for="barangay"]):not([for="specific_address"]) {
    font-size: 14px;
}

.form-group input {
    width: 100%;
    padding: 6px 10px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 13px;
    /* Removed transition to prevent animations on click/tap */
    background: #f8f9fa;
}

/* Enlarge email and password input fields in sign-in form to match sign-up form */
#loginSection .form-group input[type="email"],
#loginSection .form-group input[type="password"] {
    padding: 10px 12px;
    font-size: 13px;
}

.form-group input:focus {
    outline: none;
    border-color: #0984e3;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(9, 132, 227, 0.15);
    /* Removed transform animation */
}

.form-group input::placeholder {
    color: #999;
}

.password-container {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    min-width: 0; /* Prevent container from shrinking */
    /* Ensure container maintains position during layout changes */
    box-sizing: border-box;
    /* Prevent container from shifting when content above changes */
    isolation: isolate;
}

.password-container input {
    width: 100%;
    padding-right: 45px; /* Make room for the icon */
    box-sizing: border-box;
    /* Ensure input maintains position */
    position: relative;
    flex: 1 0 0; /* Prevent the input from shrinking when content is entered */
    min-width: 0; /* Allow proper flexbox behavior */
}

.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    font-size: 18px;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    pointer-events: auto;
    /* Ensure icon follows the field - no transitions that could cause lag */
    transition: none;
    /* Ensure icon stays within container bounds */
    margin: 0;
    flex-shrink: 0;
    /* Ensure icon position is relative to container, not viewport */
    will-change: auto;
}

.remember-forgot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    font-size: 12px;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 8px;
}

.remember-me input[type="checkbox"] {
    width: auto;
    margin: 0;
}

.forgot-password {
    color: #000000;
    text-decoration: none;
    font-weight: 700;
    transition: all 0.3s ease;
}

/* Change font color of Forgot Password, Sign up here, Sign in here */
.toggle-btn {
    background: none;
    border: none;
    color: #000000;
    text-decoration: none;
    font-weight: 700;
    cursor: pointer;
    padding: 0;
    font-size: inherit;
    transition: all 0.3s ease;
}

.forgot-password:hover {
    text-decoration: underline;
}

.login-btn {
    width: auto;
    min-width: 200px;
    margin-left: auto;
    margin-right: auto;
    display: block;
    padding: 8px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 12px;
    text-align: center;
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}

.login-btn:active {
    transform: translateY(0);
}

.divider {
    text-align: center;
    margin: 15px 0;
    position: relative;
    color: #666;
    font-size: 12px;
}

.divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #e1e5e9;
}

.divider span {
    background: rgba(255, 255, 255, 0.95);
    padding: 0 15px;
}

.social-login {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.social-btn {
    flex: 1;
    padding: 8px;
    border: 2px solid #e1e5e9;
    border-radius: 10px;
    background: white;
    color: #333;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.social-btn:hover {
    border-color: #667eea;
    background: #f8f9fa;
}

.signup-link {
    text-align: center;
    font-size: 12px;
    color: #666;
}

.signup-link a {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
}

.signup-link a:hover {
    text-decoration: underline;
}


.login-section.active {
    display: block;
    overflow-y: visible !important; /* Don't show scrollbar on section itself */
    overflow-x: hidden !important;
    scrollbar-width: none !important; /* Firefox */
    -ms-overflow-style: none !important; /* IE and Edge */
}

/* Force hide login section when email verification is active */
.email-verification-section.active ~ .login-section.active,
.container:has(.email-verification-section.active) .login-section.active,
.login-section.active:has(~ .email-verification-section.active) {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
    z-index: -1 !important;
}

.login-section {
    display: none;
    overflow-y: visible !important; /* Don't show scrollbar on section itself */
    overflow-x: hidden !important;
    scrollbar-width: none !important; /* Firefox */
    -ms-overflow-style: none !important; /* IE and Edge */
}

/* Hide scrollbars on login section using webkit */
.login-section::-webkit-scrollbar,
.login-section.active::-webkit-scrollbar,
#loginSection::-webkit-scrollbar,
#loginSection *::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
    background: transparent !important;
}

/* Hide scrollbars on all forms within login section */
.login-section form,
.login-section form *,
#loginSection form,
#loginSection form * {
    overflow-y: hidden !important; /* Completely hide scrollbar */
    overflow-x: hidden !important;
    scrollbar-width: none !important; /* Firefox */
    -ms-overflow-style: none !important; /* IE and Edge */
}

/* Hide scrollbars using webkit (Chrome, Safari, Edge) */
.login-section form::-webkit-scrollbar,
.login-section form *::-webkit-scrollbar,
#loginSection form::-webkit-scrollbar,
#loginSection form *::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
    background: transparent !important;
}

/* Hide scrollbars using Firefox */
.login-section,
.login-section form,
#loginSection,
#loginSection form {
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
}

.forgot-password-section {
    display: none !important;
    overflow-y: auto !important; /* Allow scrolling but hide scrollbar */
    overflow-x: hidden !important;
    scrollbar-width: none !important; /* Firefox */
    -ms-overflow-style: none !important; /* IE and Edge */
}

.forgot-password-section.active {
    display: block !important;
    overflow-y: auto !important; /* Allow scrolling but hide scrollbar */
    overflow-x: hidden !important;
    scrollbar-width: none !important; /* Firefox */
    -ms-overflow-style: none !important; /* IE and Edge */
    visibility: visible !important;
    opacity: 1 !important;
    position: relative !important;
    width: auto !important;
    height: auto !important;
    left: auto !important;
    top: auto !important;
    margin: 0 !important;
    padding: inherit !important;
}

.email-verification-section {
    display: none !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
}

.email-verification-section.active {
    display: block !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: relative !important;
    width: auto !important;
    height: auto !important;
    left: auto !important;
    top: auto !important;
    margin: 0 !important;
    padding: inherit !important;
    z-index: 100 !important;
}

/* Hide scrollbars on all forms within forgot password section (including reset password form) */
.forgot-password-section form,
.forgot-password-section form *,
#resetPasswordForm,
#resetPasswordForm *,
#forgotPasswordForm,
#forgotPasswordForm * {
    overflow-y: auto !important; /* Allow scrolling but hide scrollbar */
    overflow-x: hidden !important;
    scrollbar-width: none !important; /* Firefox */
    -ms-overflow-style: none !important; /* IE and Edge */
}

/* Hide scrollbars using webkit (Chrome, Safari, Edge) */
.forgot-password-section form::-webkit-scrollbar,
.forgot-password-section form *::-webkit-scrollbar,
#resetPasswordForm::-webkit-scrollbar,
#resetPasswordForm *::-webkit-scrollbar,
#forgotPasswordForm::-webkit-scrollbar,
#forgotPasswordForm *::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
}

/* Hide scrollbars using Firefox */
.forgot-password-section form,
#resetPasswordForm,
#forgotPasswordForm {
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
}

.register-section {
    display: none;
    overflow-y: auto !important; /* Allow scrolling but hide scrollbar */
    overflow-x: hidden !important;
    scrollbar-width: none !important; /* Firefox - hide scrollbar */
    -ms-overflow-style: none !important; /* IE and Edge - hide scrollbar */
    max-height: 100vh; /* Limit height to enable scrolling */
    /* Inherit background from container to match sign-up form */
    background: transparent;
    /* Ensure background covers entire scrollable content including bottom */
    padding-bottom: 10px;
}

.register-section.active {
    display: block;
    overflow-y: auto !important; /* Allow scrolling but hide scrollbar */
    overflow-x: hidden !important;
    scrollbar-width: none !important; /* Firefox - hide scrollbar */
    -ms-overflow-style: none !important; /* IE and Edge - hide scrollbar */
    max-height: 100vh; /* Limit height to enable scrolling */
    /* Inherit background from container to match sign-up form */
    background: transparent;
    /* Ensure background covers entire scrollable content including bottom */
    padding-bottom: 10px;
}

/* Ensure register section form has transparent background to show container background */
.register-section form,
#registerSection form {
    background: transparent !important;
    /* Ensure form extends to bottom with padding */
    padding-bottom: 5px;
}

/* Ensure form groups have transparent background */
.register-section .form-group,
#registerSection .form-group {
    background: transparent !important;
}

/* Hide scrollbars on register section using webkit - allow scrolling but hide scrollbar */
.register-section::-webkit-scrollbar,
.register-section.active::-webkit-scrollbar,
#registerSection::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
    background: transparent !important;
}

.register-section::-webkit-scrollbar-track,
.register-section.active::-webkit-scrollbar-track,
#registerSection::-webkit-scrollbar-track {
    display: none !important;
    background: transparent !important;
}

.register-section::-webkit-scrollbar-thumb,
.register-section.active::-webkit-scrollbar-thumb,
#registerSection::-webkit-scrollbar-thumb {
    display: none !important;
    background: transparent !important;
}

/* Allow scrolling in sign-up form but hide scrollbar on form elements */
.register-section form,
#registerSection form {
    overflow-y: visible !important; /* Form itself doesn't scroll - section handles it */
    overflow-x: hidden !important;
}

/* Hide scrollbars on form child elements (but allow natural flow) */
.register-section form *,
#registerSection form * {
    overflow-y: visible !important;
    overflow-x: hidden !important;
    scrollbar-width: none !important; /* Firefox */
    -ms-overflow-style: none !important; /* IE and Edge */
}

/* Hide scrollbars using webkit on form child elements */
.register-section form *::-webkit-scrollbar,
#registerSection form *::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
    background: transparent !important;
}

/* Hide scrollbars using Firefox */
.register-section,
.register-section form,
#registerSection,
#registerSection form {
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
}

/* Ensure login section is hidden when forgot password is active */
.login-section:not(.active) {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Ensure register section is hidden when forgot password is active */
.register-section:not(.active) {
    display: none !important;
}

/* Hide login section when email verification section is active */
.email-verification-section.active ~ .login-section,
.container:has(.email-verification-section.active) .login-section,
.login-section:has(~ .email-verification-section.active),
#loginSection:has(~ #emailVerificationSection.active) {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
    z-index: -1 !important;
}

/* Hide register section when email verification section is active */
.email-verification-section.active ~ .register-section,
.container:has(.email-verification-section.active) .register-section {
    display: none !important;
}

/* Hide forgot password section when email verification section is active */
.email-verification-section.active ~ .forgot-password-section,
.container:has(.email-verification-section.active) .forgot-password-section {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
}

/* Ensure forgot password section is hidden when login or register is active */
.forgot-password-section:not(.active) {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
    margin: 0 !important;
    padding: 0 !important;
    position: absolute !important;
    width: 0 !important;
    left: -9999px !important;
}

/* Desktop view: Ensure only one section is visible at a time - completely remove verify email from sign-in/sign-up */
@media (min-width: 1024px) {
    /* Desktop: When login section is active, completely remove forgot password section */
    .container:has(.login-section.active) .forgot-password-section,
    .login-section.active ~ .forgot-password-section,
    .container .login-section.active + .forgot-password-section {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        height: 0 !important;
        max-height: 0 !important;
        min-height: 0 !important;
        overflow: hidden !important;
        margin: 0 !important;
        padding: 0 !important;
        border: none !important;
        position: absolute !important;
        width: 0 !important;
        min-width: 0 !important;
        max-width: 0 !important;
        left: -9999px !important;
        top: -9999px !important;
        pointer-events: none !important;
        z-index: -999 !important;
        line-height: 0 !important;
        font-size: 0 !important;
    }
    
    /* Desktop: When register section is active, completely remove forgot password section */
    .container:has(.register-section.active) .forgot-password-section,
    .register-section.active ~ .forgot-password-section,
    .container .register-section.active + .forgot-password-section {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        height: 0 !important;
        max-height: 0 !important;
        min-height: 0 !important;
        overflow: hidden !important;
        margin: 0 !important;
        padding: 0 !important;
        border: none !important;
        position: absolute !important;
        width: 0 !important;
        min-width: 0 !important;
        max-width: 0 !important;
        left: -9999px !important;
        top: -9999px !important;
        pointer-events: none !important;
        z-index: -999 !important;
        line-height: 0 !important;
        font-size: 0 !important;
    }
    
    /* Desktop: When forgot password section is active, completely hide login section */
    .container:has(.forgot-password-section.active) .login-section,
    .forgot-password-section.active ~ .login-section {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        height: 0 !important;
        max-height: 0 !important;
        overflow: hidden !important;
        margin: 0 !important;
        padding: 0 !important;
        position: absolute !important;
        width: 0 !important;
        left: -9999px !important;
        top: -9999px !important;
        pointer-events: none !important;
        z-index: -1 !important;
    }
    
    /* Desktop: When forgot password section is active, completely hide register section */
    .container:has(.forgot-password-section.active) .register-section,
    .forgot-password-section.active ~ .register-section {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        height: 0 !important;
        max-height: 0 !important;
        overflow: hidden !important;
        margin: 0 !important;
        padding: 0 !important;
        position: absolute !important;
        width: 0 !important;
        left: -9999px !important;
        top: -9999px !important;
        pointer-events: none !important;
        z-index: -1 !important;
    }
    
    /* Desktop: Catch any forgot password section that is not active when login or register is active */
    .container:has(.login-section.active) .forgot-password-section:not(.active),
    .container:has(.register-section.active) .forgot-password-section:not(.active) {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        height: 0 !important;
        max-height: 0 !important;
        min-height: 0 !important;
        overflow: hidden !important;
        margin: 0 !important;
        padding: 0 !important;
        border: none !important;
        position: absolute !important;
        width: 0 !important;
        min-width: 0 !important;
        max-width: 0 !important;
        left: -9999px !important;
        top: -9999px !important;
        pointer-events: none !important;
        z-index: -999 !important;
        line-height: 0 !important;
        font-size: 0 !important;
    }
}

.toggle-btn {
    background: none;
    border: none;
    color: #000000;
    text-decoration: none;
    font-weight: 700;
    cursor: pointer;
    font-size: 14px;
}

.toggle-btn:hover {
    text-decoration: underline;
}

/* Style for "to Sign In" button - black and bold */
.back-to-signin-btn {
    color: #000000 !important;
    font-weight: 700 !important;
}

.role-select {
    width: 100%;
    padding: 6px 10px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 13px;
    /* Removed transition to prevent animations on click/tap */
    background: #f8f9fa;
    color: #333;
}

.role-select:focus {
    outline: none;
    border-color: #0984e3;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(9, 132, 227, 0.15);
    /* Removed transform animation */
}

.register-btn {
    width: auto;
    min-width: 200px;
    margin-left: auto;
    margin-right: auto;
    display: block;
    padding: 8px 20px;
    background: linear-gradient(135deg, #0984e3 0%, #6c5ce7 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 12px;
    text-align: center;
}

.register-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(9, 132, 227, 0.3);
}

.register-btn:active {
    transform: translateY(0);
}

.welcome-message {
    background: linear-gradient(135deg, #0984e3, #6c5ce7);
    color: white;
    padding: 15px;
    border-radius: 12px;
    text-align: center;
    margin-bottom: 15px;
}

.welcome-message h3 {
    margin: 0 0 8px 0;
    font-size: 16px;
}

.welcome-message p {
    margin: 0 0 10px 0;
    opacity: 0.9;
    font-size: 12px;
}

.logout-btn {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    font-size: 11px;
}

.logout-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.error-message {
    background: #fee;
    color: #c33;
    padding: 8px;
    border-radius: 6px;
    margin-bottom: 12px;
    font-size: 12px;
    border: 1px solid #fcc;
}

.success-message {
    background: #efe;
    color: #363;
    padding: 8px;
    border-radius: 6px;
    margin-bottom: 12px;
    font-size: 12px;
    border: 1px solid #cfc;
}

.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(5px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    border-radius: 20px;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #e1e5e9;
    border-top: 4px solid #0984e3;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-text {
    color: #0984e3;
    font-size: 14px;
    font-weight: 600;
    margin: 0;
}

/* Home Page Styles */
.home-page {
    display: none;
}

.home-page.active {
    display: block;
}

.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(15px);
    padding: 12px 15px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 100%;
    margin: 0 auto;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-section img {
    width: 35px;
    height: 35px;
    border-radius: 8px;
}

.logo-section h1 {
    color: #0984e3;
    font-size: 18px;
    font-weight: 700;
}

.auth-buttons {
    display: flex;
    gap: 8px;
    align-items: center;
}

.btn-signin, .btn-signup {
    padding: 6px 10px;
    border: none;
    border-radius: 15px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
   
}

.btn-signin {
    background: transparent;
    color: #0984e3;
    border: 2px solid #0984e3;
}

.btn-signin:hover {
    background: #0984e3;
    color: white;
    transform: translateY(-2px);
}

.btn-signup {
    background: linear-gradient(135deg, #0984e3, #6c5ce7);
    color: white;
}

.btn-signup:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(9, 132, 227, 0.3);
}

.hero-section {
    text-align: center;
    padding: 40px 20px;
    max-width: 100%;
    margin: 0 auto;
}

.hero-title {
    font-size: 32px;
    font-weight: 700;
    color: white;
    margin-bottom: 15px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 30px;
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.4;
}

.hero-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
    justify-content: center;
    align-items: center;
    max-width: 250px;
    margin: 0 auto;
}

.btn-hero {
    padding: 8px 16px;
    border: none;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    width: 100%;
    max-width: 200px;
}

.btn-hero-primary {
    background: white;
    color: #0984e3;
}

.btn-hero-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.btn-hero-secondary {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid white;
}

.btn-hero-secondary:hover {
    background: white;
    color: #0984e3;
    transform: translateY(-3px);
}

.features-section {
    padding: 40px 15px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.features-container {
    max-width: 100%;
    margin: 0 auto;
}

.section-title {
    text-align: center;
    font-size: 24px;
    font-weight: 700;
    color: white;
    margin-bottom: 30px;
}

/* Features Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
    box-sizing: border-box;
}

.feature-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(15px);
    border-radius: 15px;
    padding: 25px 20px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

/* Slideshow Arrows */
.slideshow-arrow {
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    z-index: 10;
    flex-shrink: 0;
    position: relative;
}

.slideshow-arrow:hover {
    background: rgba(255, 255, 255, 1);
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.slideshow-arrow:active {
    transform: scale(0.95);
}

.slideshow-arrow svg {
    color: #0984e3;
    width: 28px;
    height: 28px;
}

.slideshow-arrow-left {
    left: 0;
}

.slideshow-arrow-right {
    right: 0;
}

/* Slideshow Indicators */
.slideshow-indicators {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
}

.slideshow-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
}

.slideshow-indicator.active {
    background: rgba(255, 255, 255, 1);
    transform: scale(1.2);
}

.feature-icon {
    font-size: 48px;
    margin-bottom: 15px;
    line-height: 1;
}

.feature-title {
    font-size: 20px;
    font-weight: 700;
    color: #333;
    margin-bottom: 12px;
}

.feature-desc {
    color: #666;
    line-height: 1.5;
    font-size: 14px;
    max-width: 500px;
    margin: 0 auto;
}

.login-signup-page {
    display: none;
    min-height: 100vh;
    align-items: center;
    justify-content: center;
    padding: 30px 0 20px 0;
    /* Hide scrollbars but allow scrolling */
    overflow-y: auto !important;
    overflow-x: hidden !important;
    scrollbar-width: none !important; /* Firefox */
    -ms-overflow-style: none !important; /* IE and Edge */
}

.login-signup-page::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
}

.login-signup-page.active {
    display: flex;
}

/* Desktop and Tablet Responsive Design */
@media (min-width: 1024px) {
    .login-signup-page {
        padding: 20px 0;
    }
    
    .container {
        max-width: 420px;
        width: 420px;
        padding: 30px 25px;
        margin: 0 auto;
        /* Completely hide scrollbars on desktop - no overflow scrolling on container */
        overflow-y: hidden !important; /* Hide scrollbar completely */
        overflow-x: hidden !important;
        scrollbar-width: none !important; /* Firefox */
        -ms-overflow-style: none !important; /* IE and Edge */
    }
    
    /* Ensure container never shows scrollbar for sign-in form */
    .container:has(#loginSection.active),
    .container:has(.login-section.active) {
        overflow-y: hidden !important; /* Completely hide - no scrollbar */
        overflow-x: hidden !important;
        scrollbar-width: none !important;
        -ms-overflow-style: none !important;
    }
    
    /* Remove scrolling from sign-up form container in desktop view */
    .container:has(#registerSection.active),
    .container:has(.register-section.active) {
        overflow-y: hidden !important; /* No scrolling on container */
        overflow-x: hidden !important;
        scrollbar-width: none !important; /* Hide scrollbar in Firefox */
        -ms-overflow-style: none !important; /* Hide scrollbar in IE/Edge */
    }
    
    /* Hide scrollbars on desktop container using webkit - more aggressive */
    .container::-webkit-scrollbar {
        display: none !important;
        width: 0 !important;
        height: 0 !important;
        background: transparent !important;
        -webkit-appearance: none !important;
    }
    
    .container::-webkit-scrollbar-track {
        display: none !important;
        background: transparent !important;
    }
    
    .container::-webkit-scrollbar-thumb {
        display: none !important;
        background: transparent !important;
    }
    
    /* Specifically hide scrollbar when sign-up form is active (but allow scrolling) */
    .container:has(#registerSection.active)::-webkit-scrollbar,
    .container:has(.register-section.active)::-webkit-scrollbar {
        display: none !important;
        width: 0 !important;
        height: 0 !important;
        background: transparent !important;
        -webkit-appearance: none !important;
    }
    
    .container:has(#registerSection.active)::-webkit-scrollbar-track,
    .container:has(.register-section.active)::-webkit-scrollbar-track {
        display: none !important;
        background: transparent !important;
    }
    
    .container:has(#registerSection.active)::-webkit-scrollbar-thumb,
    .container:has(.register-section.active)::-webkit-scrollbar-thumb {
        display: none !important;
        background: transparent !important;
    }
    
    /* Hide scrollbars on login section in desktop view - no scrolling */
    .container .login-section,
    .container #loginSection {
        overflow-y: visible !important; /* Sections don't scroll */
        overflow-x: hidden !important;
        scrollbar-width: none !important; /* Firefox */
        -ms-overflow-style: none !important; /* IE and Edge */
    }
    
    /* Register section should not scroll - only the form scrolls */
    .container .register-section,
    .container #registerSection {
        overflow-y: visible !important; /* No scrolling on section */
        overflow-x: hidden !important;
        scrollbar-width: none !important; /* Firefox - hide scrollbar */
        -ms-overflow-style: none !important; /* IE and Edge - hide scrollbar */
        /* Inherit background from container to match sign-up form */
        background: transparent !important;
    }
    
    /* Make the form itself scrollable in desktop view and ensure background */
    .container .register-section form,
    .container #registerSection form {
        overflow-y: auto !important; /* Allow scrolling but hide scrollbar */
        overflow-x: hidden !important;
        scrollbar-width: none !important; /* Firefox - hide scrollbar */
        -ms-overflow-style: none !important; /* IE and Edge - hide scrollbar */
        max-height: 90vh !important; /* Limit height to enable scrolling */
        background: transparent !important;
        /* Ensure form extends to bottom with padding */
        padding-bottom: 5px !important;
    }
    
    /* Ensure form groups have transparent background */
    .container .register-section .form-group,
    .container #registerSection .form-group {
        background: transparent !important;
    }
    
    /* Ensure address dropdowns are visible in desktop view - stacked vertically */
    .container .address-dropdowns {
        display: flex !important;
        flex-direction: column !important;
        gap: 12px !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    .container .address-dropdown-item {
        width: 100% !important;
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    .container .address-dropdown-item select,
    .container .address-dropdown-item input {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    /* Forms inside login section should not scroll */
    .container .login-section form,
    .container #loginSection form,
    .container #loginSection form * {
        overflow-y: hidden !important; /* Forms don't scroll - completely hide scrollbar */
        overflow-x: hidden !important;
        scrollbar-width: none !important; /* Firefox */
        -ms-overflow-style: none !important; /* IE and Edge */
    }
    
    /* Forms inside register section - form is scrollable in desktop view */
    .container .register-section form,
    .container #registerSection form {
        overflow-y: auto !important; /* Form is scrollable in desktop view */
        overflow-x: hidden !important;
        scrollbar-width: none !important; /* Firefox - hide scrollbar */
        -ms-overflow-style: none !important; /* IE and Edge - hide scrollbar */
        max-height: 90vh !important; /* Limit height to enable scrolling */
    }
    
    /* Child elements of register section form should not scroll */
    .container .register-section form *,
    .container #registerSection form * {
        overflow-y: visible !important;
        overflow-x: hidden !important;
        scrollbar-width: none !important; /* Firefox */
        -ms-overflow-style: none !important; /* IE and Edge */
    }
    
    
    /* Forgot password section forms */
    .container .forgot-password-section form,
    .container form {
        overflow-y: hidden !important;
        overflow-x: hidden !important;
        scrollbar-width: none !important;
        -ms-overflow-style: none !important;
    }
    
    /* Hide scrollbars on desktop forms using webkit - more aggressive */
    .container .login-section::-webkit-scrollbar,
    .container .register-section::-webkit-scrollbar,
    .container .forgot-password-section::-webkit-scrollbar,
    .container .login-section form::-webkit-scrollbar,
    .container .register-section form::-webkit-scrollbar,
    .container .forgot-password-section form::-webkit-scrollbar,
    .container form::-webkit-scrollbar,
    .container form *::-webkit-scrollbar,
    .container #loginSection::-webkit-scrollbar,
    .container #loginSection *::-webkit-scrollbar,
    .container #registerSection::-webkit-scrollbar,
    .container #registerSection *::-webkit-scrollbar {
        display: none !important;
        width: 0 !important;
        height: 0 !important;
        background: transparent !important;
        -webkit-appearance: none !important;
    }
    
    .container .login-section::-webkit-scrollbar-track,
    .container .register-section::-webkit-scrollbar-track,
    .container #loginSection::-webkit-scrollbar-track,
    .container #registerSection::-webkit-scrollbar-track {
        display: none !important;
        background: transparent !important;
    }
    
    .container .login-section::-webkit-scrollbar-thumb,
    .container .register-section::-webkit-scrollbar-thumb,
    .container #loginSection::-webkit-scrollbar-thumb,
    .container #registerSection::-webkit-scrollbar-thumb {
        display: none !important;
        background: transparent !important;
    }
    
    /* Completely remove scrollbars - no fallback needed */
    
    /* Final guarantee - absolutely no scrollbars on sign-in form */
    .container:has(#loginSection.active) *,
    .container:has(.login-section.active) * {
        scrollbar-width: none !important;
        -ms-overflow-style: none !important;
    }
    
    .container:has(#loginSection.active) *::-webkit-scrollbar,
    .container:has(.login-section.active) *::-webkit-scrollbar {
        display: none !important;
        width: 0 !important;
        height: 0 !important;
        background: transparent !important;
    }
    
    /* Hide scrollbars on sign-up form register section and form */
    .container:has(#registerSection.active) .register-section::-webkit-scrollbar,
    .container:has(.register-section.active) .register-section::-webkit-scrollbar,
    .container:has(#registerSection.active) #registerSection::-webkit-scrollbar,
    .container:has(.register-section.active) #registerSection::-webkit-scrollbar,
    .container:has(#registerSection.active) .register-section form::-webkit-scrollbar,
    .container:has(.register-section.active) .register-section form::-webkit-scrollbar,
    .container:has(#registerSection.active) #registerSection form::-webkit-scrollbar,
    .container:has(.register-section.active) #registerSection form::-webkit-scrollbar {
        display: none !important;
        width: 0 !important;
        height: 0 !important;
        background: transparent !important;
    }
    
    /* Hide scrollbar track and thumb for register section and form */
    .container:has(#registerSection.active) .register-section::-webkit-scrollbar-track,
    .container:has(.register-section.active) .register-section::-webkit-scrollbar-track,
    .container:has(#registerSection.active) #registerSection::-webkit-scrollbar-track,
    .container:has(.register-section.active) #registerSection::-webkit-scrollbar-track,
    .container:has(#registerSection.active) .register-section form::-webkit-scrollbar-track,
    .container:has(.register-section.active) .register-section form::-webkit-scrollbar-track,
    .container:has(#registerSection.active) #registerSection form::-webkit-scrollbar-track,
    .container:has(.register-section.active) #registerSection form::-webkit-scrollbar-track {
        display: none !important;
        background: transparent !important;
    }
    
    .container:has(#registerSection.active) .register-section::-webkit-scrollbar-thumb,
    .container:has(.register-section.active) .register-section::-webkit-scrollbar-thumb,
    .container:has(#registerSection.active) #registerSection::-webkit-scrollbar-thumb,
    .container:has(.register-section.active) #registerSection::-webkit-scrollbar-thumb,
    .container:has(#registerSection.active) .register-section form::-webkit-scrollbar-thumb,
    .container:has(.register-section.active) .register-section form::-webkit-scrollbar-thumb,
    .container:has(#registerSection.active) #registerSection form::-webkit-scrollbar-thumb,
    .container:has(.register-section.active) #registerSection form::-webkit-scrollbar-thumb {
        display: none !important;
        background: transparent !important;
    }
    
    .logo-image {
        max-width: 70px;
    }
    
    .logo p {
        font-size: 12px;
    }
    
    .form-group {
        margin-bottom: 14px;
    }
    
    .form-group label {
        font-size: 12px;
        margin-bottom: 4px;
    }
    
    /* Keep sign-up form labels at 14px on desktop */
    #registerSection .form-group label:not([for="province"]):not([for="municipality"]):not([for="barangay"]):not([for="specific_address"]) {
        font-size: 14px;
    }
    
    .form-group input, .role-select {
        padding: 10px 12px;
        font-size: 13px;
        border-radius: 8px;
    }
    
    /* Ensure sign-in form inputs match sign-up form size on desktop */
    #loginSection .form-group input[type="email"],
    #loginSection .form-group input[type="password"] {
        padding: 10px 12px;
        font-size: 13px;
    }
    
    /* Ensure password toggle icon stays attached */
    .password-container input[type="password"] {
        padding-right: 45px !important; /* Make room for the icon */
    }
    
    .login-btn, .register-btn {
        padding: 8px;
        font-size: 13px;
        border-radius: 8px;
    }
    
    .remember-forgot {
        font-size: 12px;
        margin-bottom: 14px;
    }
    
    .signup-link {
        font-size: 12px;
    }
    
    .toggle-btn {
        font-size: 14px;
    }
    
    .error-message, .success-message {
        padding: 8px;
        font-size: 12px;
        border-radius: 6px;
    }
    
    /* Home page desktop styles */
    .header {
        padding: 20px 40px;
    }
    
    .header-content {
        max-width: 1200px;
    }
    
    .logo-section h1 {
        font-size: 24px;
    }
    
    .btn-signin, .btn-signup {
        padding: 10px 20px;
        font-size: 14px;
        border-radius: 20px;
    }
    
    .hero-section {
        padding: 80px 40px;
        max-width: 1200px;
        margin: 0 auto;
    }
    
    .hero-title {
        font-size: 48px;
        margin-bottom: 20px;
    }
    
    .hero-subtitle {
        font-size: 20px;
        margin-bottom: 40px;
        max-width: 600px;
    }
    
    .hero-buttons {
        flex-direction: row;
        gap: 20px;
        max-width: 400px;
    }
    
    .btn-hero {
        padding: 12px 24px;
        font-size: 16px;
        max-width: 180px;
    }
    
    .features-section {
        padding: 80px 40px;
    }
    
    .features-container {
        max-width: 1200px;
        margin: 0 auto;
    }
    
    .section-title {
        font-size: 36px;
        margin-bottom: 50px;
    }
    
    .features-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 30px;
        padding: 0 20px;
    }
    
    .feature-card {
        padding: 35px 30px;
    }
    
    .feature-icon {
        font-size: 60px;
        margin-bottom: 18px;
    }
    
    .feature-title {
        font-size: 26px;
        margin-bottom: 15px;
    }
    
    .feature-desc {
        font-size: 16px;
        max-width: 600px;
        line-height: 1.6;
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    .login-signup-page {
        padding: 50px 0;
    }
    
    .container {
        max-width: 380px;
        width: 380px;
        padding: 25px 20px;
        margin: 0 auto;
    }
    
    .logo-image {
        max-width: 90px;
    }
    
    .form-group {
        margin-bottom: 16px;
    }
    
    .form-group label {
        font-size: 13px;
    }
    
    /* Keep sign-up form labels at 14px on tablets */
    #registerSection .form-group label:not([for="province"]):not([for="municipality"]):not([for="barangay"]):not([for="specific_address"]) {
        font-size: 14px;
    }
    
    .form-group input, .role-select {
        padding: 10px 12px;
        font-size: 14px;
    }
    
    /* Ensure sign-in form inputs match sign-up form size on tablet */
    #loginSection .form-group input[type="email"],
    #loginSection .form-group input[type="password"] {
        padding: 10px 12px;
        font-size: 14px;
    }
    
    /* Ensure password toggle icon stays attached */
    .password-container input[type="password"] {
        padding-right: 45px !important; /* Make room for the icon */
    }
    
    .login-btn, .register-btn {
        padding: 8px;
        font-size: 13px;
    }
    
    .remember-forgot {
        font-size: 13px;
    }
    
    .signup-link {
        font-size: 13px;
    }
    
    /* Home page tablet styles */
    .header {
        padding: 15px 30px;
    }
    
    .header-content {
        max-width: 100%;
    }
    
    .logo-section h1 {
        font-size: 20px;
    }
    
    .btn-signin, .btn-signup {
        padding: 8px 16px;
        font-size: 13px;
    }
    
    .hero-section {
        padding: 60px 30px;
    }
    
    .hero-title {
        font-size: 40px;
    }
    
    .hero-subtitle {
        font-size: 18px;
        max-width: 500px;
    }
    
    .hero-buttons {
        flex-direction: row;
        gap: 15px;
        max-width: 350px;
    }
    
    .btn-hero {
        padding: 10px 20px;
        font-size: 14px;
        max-width: 160px;
    }
    
    .features-section {
        padding: 60px 30px;
    }
    
    .features-container {
        max-width: 100%;
    }
    
    .section-title {
        font-size: 28px;
        margin-bottom: 40px;
    }
    
    .features-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 24px;
        padding: 0 15px;
    }
    
    .feature-card {
        padding: 30px 25px;
    }
    
    .feature-icon {
        font-size: 52px;
        margin-bottom: 15px;
    }
    
    .feature-title {
        font-size: 22px;
        margin-bottom: 12px;
    }
    
    .feature-desc {
        font-size: 15px;
        max-width: 550px;
        line-height: 1.5;
    }
}

/* Mobile-first responsive design */
@media (max-width: 768px) {
    .login-signup-page {
        padding: 20px 0;
    }
    .header {
        padding: 10px 12px;
    }
    
    .logo-section h1 {
        font-size: 16px;
    }
    
    .hero-title {
        font-size: 28px;
    }
    
    .hero-subtitle {
        font-size: 14px;
    }
    
    .hero-buttons {
        max-width: 220px;
    }
    
    .btn-hero {
        padding: 6px 12px;
        font-size: 11px;
    }
    
    .section-title {
        font-size: 20px;
    }
    
    .feature-card {
        padding: 15px;
    }
    
    .feature-icon {
        font-size: 32px;
    }
    
    .feature-title {
        font-size: 15px;
    }
    
    .feature-desc {
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .header {
        padding: 8px 10px;
    }
    
    .logo-section {
        gap: 8px;
    }
    
    .logo-section img {
        width: 30px;
        height: 30px;
    }
    
    .logo-section h1 {
        font-size: 14px;
    }
    
    .auth-buttons {
        gap: 6px;
    }
    
    .btn-signin, .btn-signup {
        padding: 4px 8px;
        font-size: 10px;
    }
    
    .hero-section {
        padding: 30px 15px;
    }
    
    .hero-title {
        font-size: 24px;
    }
    
    .hero-subtitle {
        font-size: 13px;
    }
    
    .hero-buttons {
        max-width: 200px;
    }
    
    .btn-hero {
        padding: 6px 12px;
        font-size: 11px;
    }
    
    .features-section {
        padding: 30px 10px;
    }
    
    .section-title {
        font-size: 18px;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
        gap: 16px;
        padding: 0 8px;
    }
    
    .feature-card {
        padding: 25px 18px;
    }
    
    .feature-icon {
        font-size: 40px;
        margin-bottom: 12px;
    }
    
    .feature-title {
        font-size: 18px;
        margin-bottom: 10px;
    }
    
    .feature-desc {
        font-size: 13px;
        max-width: 100%;
        line-height: 1.5;
    }
}

/* Additional mobile optimizations */
@media (max-width: 767px) {
    .container {
        padding: 15px 12px;
        margin: 0 10px;
        max-width: 350px;
        width: calc(100% - 20px);
        overflow: visible !important; /* No scrollbars */
        overflow-y: visible !important; /* No vertical scrollbar */
        overflow-x: hidden !important; /* Hide horizontal scrollbar */
        box-sizing: border-box;
    }
    
    /* Ensure address dropdowns don't overflow container on mobile */
    .container .address-dropdowns {
        max-width: 100% !important;
        width: 100% !important;
    }
    
    .container .address-dropdown-item {
        max-width: 100% !important;
        width: 100% !important;
    }
    
    .container .address-dropdown-item select {
        max-width: 100% !important;
        width: 100% !important;
    }
    
    .logo-image {
        max-width: 60px;
    }
    
    .social-login {
        flex-direction: column;
    }
}

/* Mobile-specific form optimizations */
@media (max-width: 480px) {
    .login-signup-page {
        padding: 20px 0;
    }
    
    .container {
        padding: 12px 10px;
        margin: 0 10px;
        max-width: 350px;
        width: calc(100% - 20px);
        /* Removed internal scroll on mobile - no scrollbars */
        max-height: none;
        overflow: visible !important; /* No scrollbars */
        overflow-y: visible !important; /* No vertical scrollbar */
        overflow-x: hidden !important; /* Hide horizontal scrollbar */
        box-sizing: border-box;
    }
    
    /* Ensure address dropdowns are constrained on very small screens */
    .container .address-dropdown-item select {
        max-width: calc(100vw - 60px) !important; /* Constrain to viewport minus padding */
        width: 100% !important;
    }
    
    .logo {
        margin-bottom: 15px;
    }
    
    .logo-image {
        max-width: 50px;
    }
    
    .form-group {
        margin-bottom: 10px;
    }
    
    .form-group label {
        font-size: 11px;
        margin-bottom: 3px;
    }
    
    .form-group input {
        padding: 5px 8px;
        font-size: 12px;
    }
    
    /* Ensure password toggle icon stays attached on small screens */
    .password-container input {
        padding-right: 40px !important; /* Make room for the icon */
    }
    
    .password-toggle {
        right: 8px;
        font-size: 16px;
        width: 20px;
        height: 20px;
    }
    
    .role-select {
        padding: 5px 8px;
        font-size: 12px;
    }
    
    .remember-forgot {
        margin-bottom: 12px;
        font-size: 11px;
    }
    
    .login-btn, .register-btn {
        padding: 8px;
        font-size: 13px;
        margin-bottom: 12px;
    }
    
    .divider {
        margin: 12px 0;
        font-size: 11px;
    }
    
    .social-login {
        gap: 8px;
        margin-bottom: 12px;
    }
    
    .social-btn {
        padding: 6px;
        font-size: 11px;
    }
    
    .signup-link {
        font-size: 11px;
    }
    
    .welcome-message {
        padding: 12px;
        margin-bottom: 12px;
    }
    
    .welcome-message h3 {
        font-size: 14px;
    }
    
    .welcome-message p {
        font-size: 11px;
    }
    
    .logout-btn {
        padding: 4px 8px;
        font-size: 10px;
    }
    
    .error-message, .success-message {
        padding: 6px;
        font-size: 11px;
        margin-bottom: 10px;
    }
    
    /* Role selection mobile optimizations */
    .role-select {
        padding: 4px 6px;
        font-size: 11px;
        border-radius: 6px;
    }
    
    .role-select:focus {
        transform: none;
    }
}

/* Validation Styles */
.password-strength {
    margin-top: 5px;
    height: 4px;
    background: #e5e7eb;
    border-radius: 2px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.password-strength-bar {
    height: 100%;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.password-strength.weak .password-strength-bar {
    background: #ef4444;
    width: 25%;
}

.password-strength.fair .password-strength-bar {
    background: #f59e0b;
    width: 50%;
}

.password-strength.good .password-strength-bar {
    background: #3b82f6;
    width: 75%;
}

.password-strength.strong .password-strength-bar {
    background: #10b981;
    width: 100%;
}

.password-requirements {
    margin-top: 8px;
    font-size: 12px;
    color: #6b7280;
    transition: all 0.3s ease;
    overflow: hidden;
    opacity: 1;
    max-height: 100px;
    /* Prevent layout shift from affecting password container above */
    contain: layout;
}

.requirement {
    margin: 2px 0;
    transition: color 0.3s ease;
}

.requirement.valid {
    color: #10b981;
}

.requirement.invalid {
    color: #ef4444;
}

.password-match {
    margin-top: 5px;
    font-size: 12px;
    font-weight: 500;
    min-height: 16px;
    /* Prevent layout shift when content changes */
    transition: opacity 0.2s ease;
}

.password-match.match {
    color: #10b981;
}

.password-match.no-match {
    color: #ef4444;
}

/* Hide field-error for confirm password field - we use passwordMatch instead */
#confirm_password + .password-toggle + .field-error,
.password-container:has(#confirm_password) + .field-error {
    display: none !important;
}

.form-group.error input,
.form-group.error select {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.form-group.success input,
.form-group.success select {
    border-color: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.field-error {
    color: #ef4444;
    font-size: 12px;
    margin-top: 4px;
    display: none;
}

.field-error.show {
    display: block;
}

.register-btn:disabled {
    background: #9ca3af;
    cursor: not-allowed;
    opacity: 0.6;
}

/* Address Dropdowns Vertical Layout - Legacy support */
.address-dropdowns {
    display: flex !important;
    flex-direction: column !important;
    gap: 12px;
    align-items: stretch;
    width: 100%;
    box-sizing: border-box;
    max-width: 100%;
}

.address-form-group {
    margin-top: 0;
    margin-bottom: 12px;
    width: 100%;
    box-sizing: border-box;
    overflow: visible;
    position: relative;
}

/* New address-row layout - override legacy styles */
.address-form-group .address-row {
    padding-left: 0 !important; /* Remove legacy indentation */
}

.address-form-group .form-group {
    transform: none !important;
}

.address-form-group * {
    transform: none !important;
}

.address-form-group > label {
    display: block;
    margin-bottom: 4px;
}

.address-dropdown-item {
    display: flex !important;
    flex-direction: column !important;
    flex: 1 1 auto !important; /* Stretch to fill available width */
    box-sizing: border-box;
    width: 100%;
    transform: none !important;
    transition: none !important;
}

.address-dropdown-item label {
    transform: none !important;
    transition: none !important;
}

/* Make sure dropdowns match field size - same width as other form inputs */
.address-dropdown-item select,
.address-dropdown-item input.address-input {
    width: 100% !important; /* Match other form field width - full width */
    padding: 6px 30px 6px 8px; /* Add right padding for dropdown arrow */
    box-sizing: border-box;
    font-size: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
}

/* Add dropdown arrow to municipality and barangay selects */
.address-dropdown-item select {
    background: #f8f9fa url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M6 9L1 4h10z'/%3E%3C/svg%3E") no-repeat right 8px center;
    background-size: 12px;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.address-dropdown-item select:focus {
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%230984e3' d='M6 9L1 4h10z'/%3E%3C/svg%3E") no-repeat right 8px center;
    background-size: 12px;
}

.address-dropdown-item input.address-input {
    font-weight: 600;
    color: #333;
}

/* ✅ Responsive stacking for smaller screens - merged with existing media query below */
.address-dropdown-item label {
    display: block;
    margin-bottom: 2px;
    color: #333;
    font-weight: 600;
    font-size: 11px;
    line-height: 1.1;
    transform: none !important;
    transition: none !important;
    position: static !important;
}

.address-select {
    width: 100%; /* Match other form field width */
    min-width: 120px; /* Minimum width for readability */
    padding: 3px 30px 3px 8px; /* Add right padding for dropdown arrow */
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 12px;
    /* Removed transition to prevent animations on click/tap */
    background: #f8f9fa url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M6 9L1 4h10z'/%3E%3C/svg%3E") no-repeat right 8px center;
    background-size: 12px;
    color: #333;
    box-sizing: border-box;
    max-width: 100%;
    line-height: 1.2;
    height: auto;
    min-height: 28px;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.address-select:focus {
    outline: none;
    border-color: #0984e3;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%230984e3' d='M6 9L1 4h10z'/%3E%3C/svg%3E") no-repeat right 8px center;
    background-size: 12px;
    box-shadow: 0 0 0 3px rgba(9, 132, 227, 0.15);
    /* Removed transform animation */
}

.address-dropdown-item:focus-within {
    transform: none !important;
}

.optional-label {
    color: #999;
    font-weight: normal;
    font-size: 11px;
}

.vendor-warning {
    background: #fff3cd;
    border: 1px solid #ffc107;
    color: #856404;
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 15px;
    font-size: 12px;
}

.vendor-warning p {
    margin: 0;
}

/* Responsive Address Dropdowns - Only stack on mobile */
@media (max-width: 768px) {
    .address-dropdowns {
        flex-direction: column !important;
        gap: 8px;
        flex-wrap: wrap;
        /* Reduce indentation on mobile for better space usage */
        padding-left: 20px;
        max-width: calc(100% - 40px); /* Constrain to container width */
        box-sizing: border-box;
    }
    
    .address-dropdown-item {
        min-width: 100% !important;
        flex: 1 1 100% !important;
        width: 100% !important;
        max-width: 100% !important; /* Full width on mobile */
        box-sizing: border-box;
        position: relative; /* Ensure proper positioning */
    }
    
    .address-dropdown-item:first-child,
    .address-dropdown-item:nth-child(2),
    .address-dropdown-item:last-child {
        flex: 1 1 100% !important;
        min-width: 100% !important;
        max-width: 100% !important;
        width: 100% !important;
    }
    
    /* On mobile, make selects/inputs constrained to container */
    .address-dropdown-item select,
    .address-dropdown-item input.address-input {
        width: 100% !important;
        min-width: 100% !important;
        max-width: 100% !important; /* Prevent overflow */
        box-sizing: border-box !important;
        position: relative !important;
        z-index: 1 !important; /* Keep dropdown list within bounds */
    }
    
    /* Constrain select dropdown to container width */
    .address-dropdown-item select {
        -webkit-appearance: none;
        -moz-appearance: none;
        appearance: none;
        overflow: hidden;
        text-overflow: ellipsis;
        /* Prevent native mobile dropdown from expanding beyond container */
        max-width: calc(100vw - 80px) !important; /* Account for form padding and margins */
        /* Ensure dropdown arrow is visible */
        padding-right: 30px !important;
        background: #f8f9fa url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M6 9L1 4h10z'/%3E%3C/svg%3E") no-repeat right 8px center !important;
        background-size: 12px !important;
    }
    
    /* Ensure the address form group container doesn't overflow */
    .address-form-group {
        max-width: 100% !important;
        overflow: hidden !important;
        box-sizing: border-box !important;
    }
    
    /* Ensure dropdown options list doesn't expand beyond container */
    .address-dropdown-item select option {
        max-width: 100%;
        white-space: normal;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    
    /* Specific address field - no indentation needed with new layout */
    .address-form-group + .form-group:has(#specific_address) {
        padding-left: 0;
    }
}

@media (max-width: 480px) {
    .address-dropdown-item label {
        font-size: 11px;
    }
    
    .address-select,
    .address-dropdown-item input.address-input {
        padding: 5px 30px 5px 8px !important; /* Add right padding for arrow */
        font-size: 12px;
        max-width: 100% !important; /* Ensure no overflow */
        box-sizing: border-box !important;
    }
    
    /* Ensure dropdown arrow is visible on mobile */
    .address-select {
        background: #f8f9fa url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M6 9L1 4h10z'/%3E%3C/svg%3E") no-repeat right 8px center !important;
        background-size: 12px !important;
    }
    
    .address-select:focus {
        background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%230984e3' d='M6 9L1 4h10z'/%3E%3C/svg%3E") no-repeat right 8px center !important;
        background-size: 12px !important;
    }
    
    /* Further reduce indentation on very small screens */
    .address-dropdowns {
        padding-left: 15px;
        max-width: calc(100% - 30px); /* Constrain to container */
    }
    
    .address-dropdown-item {
        max-width: 100% !important;
        overflow: hidden; /* Prevent dropdown from expanding */
    }
    
    .address-dropdown-item select {
        max-width: 100% !important;
        overflow-x: hidden !important;
        text-overflow: ellipsis !important;
    }
    
    .address-form-group + .form-group:has(#specific_address) {
        padding-left: 0;
    }
    
    .vendor-warning {
        padding: 8px;
        font-size: 11px;
    }
}

/* Sign Up Form Mobile-First Layout */
.signup-form-title {
    text-align: center;
    font-size: 20px;
    font-weight: 700;
    color: #333;
    margin-bottom: 15px;
    margin-top: 0;
}

/* Form Row - Full Name and Phone Number side by side */
.form-row {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
    width: 100%;
    box-sizing: border-box;
}

.form-group-half {
    flex: 1;
    min-width: 0; /* Prevent flex items from overflowing */
    margin-bottom: 0;
}

.form-group-half label {
    font-size: 12px;
    margin-bottom: 4px;
}

.form-group-half input {
    width: 100%;
    padding: 6px 8px;
    font-size: 12px;
}

/* Address Row - Municipality, Barangay, Province in one row */
.address-row {
    display: flex;
    gap: 6px;
    width: 100%;
    box-sizing: border-box;
    margin-top: 4px;
    position: relative;
    overflow: visible;
}

.address-item {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
    position: relative;
    overflow: visible;
}

.address-item label {
    font-size: 12px;
    margin-bottom: 4px;
    color: #333;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
}

/* Specific Address label - increase font size */
.address-form-group + .form-group label[for="specific_address"] {
    font-size: 12px;
    margin-bottom: 4px;
}

.address-select-small,
.address-input-small {
    width: 100%;
    padding: 4px 22px 4px 6px;
    font-size: 11px;
    font-weight: normal;
    border: 2px solid #e1e5e9;
    border-radius: 6px;
    background: #f8f9fa;
    box-sizing: border-box;
    min-height: 28px;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.address-select-small {
    background: #f8f9fa url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M6 9L1 4h10z'/%3E%3C/svg%3E") no-repeat right 6px center;
    background-size: 10px;
}

.address-select-small:focus {
    outline: none;
    border-color: #0984e3;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 12 12'%3E%3Cpath fill='%230984e3' d='M6 9L1 4h10z'/%3E%3C/svg%3E") no-repeat right 6px center;
    background-size: 10px;
    box-shadow: 0 0 0 2px rgba(9, 132, 227, 0.15);
}

.address-input-small {
    font-weight: 600;
    color: #333;
    font-size: 11px;
}

/* Compact spacing for sign-up form */
.signup-form .form-group {
    margin-bottom: 10px;
}

.signup-form .form-group label {
    font-size: 12px;
    margin-bottom: 4px;
}

.signup-form .form-group input,
.signup-form .form-group select {
    padding: 6px 8px;
    font-size: 12px;
}

/* Hide scrollbar but allow scrolling for signup form */
.signup-form {
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.signup-form::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
}

/* Custom Dropdown for Mobile - Prevents full-screen native select */
.custom-select-wrapper {
    position: relative;
    width: 100%;
    z-index: 1000;
    overflow: visible !important;
}

.custom-select {
    width: 100%;
    padding: 6px 28px 6px 8px;
    font-size: 11px;
    border: 2px solid #e1e5e9;
    border-radius: 6px;
    background: #f8f9fa;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 32px;
    box-sizing: border-box;
    user-select: none;
    position: relative;
}

.custom-select-text {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #333;
    padding-right: 20px;
    line-height: 1.4;
}

.custom-select:focus {
    outline: none;
    border-color: #0984e3;
    background: #fff;
    box-shadow: 0 0 0 2px rgba(9, 132, 227, 0.15);
}

.custom-select-arrow {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    transform-origin: center center;
    width: 12px;
    height: 12px;
    pointer-events: none;
    transition: transform 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    z-index: 1;
}

.custom-select-arrow svg {
    width: 100%;
    height: 100%;
    display: block;
    fill: currentColor;
}

.custom-select.open .custom-select-arrow {
    transform: translateY(-50%) rotate(180deg);
    transform-origin: center center;
}

.custom-select-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff !important;
    display: none;
    border: 2px solid #0984e3 !important;
    border-radius: 6px;
    margin-top: 2px;
    max-height: 200px;
    min-height: 40px;
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 99999 !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
    display: none !important;
    box-sizing: border-box;
    width: 100%;
    scrollbar-width: thin;
    scrollbar-color: #0984e3 #f0f0f0;
    -webkit-overflow-scrolling: touch;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.2s, visibility 0.2s;
    transform: translateZ(0); /* Force hardware acceleration */
    will-change: opacity, visibility;
    /* Ensure menu is always visible when open */
    contain: layout style paint;
}

/* Hide scrollbar for custom select menu */
.custom-select-menu::-webkit-scrollbar {
    width: 4px;
}

.custom-select-menu::-webkit-scrollbar-track {
    background: #f0f0f0;
    border-radius: 2px;
}

.custom-select-menu::-webkit-scrollbar-thumb {
    background: #0984e3;
    border-radius: 2px;
}

.custom-select-menu::-webkit-scrollbar-thumb:hover {
    background: #0873c7;
}

.custom-select-menu.open {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    min-height: 40px !important;
    background: #fff !important;
    border: 2px solid #0984e3 !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
}

/* Ensure menu can overflow parent containers */
.custom-select-menu {
    position: absolute !important;
}

/* Override any parent overflow that might clip the menu */
.register-section .custom-select-menu,
#registerSection .custom-select-menu,
.register-section form .custom-select-menu,
#registerSection form .custom-select-menu,
.container .custom-select-menu,
.address-item .custom-select-menu,
.address-row .custom-select-menu {
    position: absolute !important;
    z-index: 99999 !important;
}

/* Ensure menu is visible on mobile */
@media (max-width: 768px) {
    .custom-select-menu.open {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        pointer-events: auto !important;
        position: fixed !important;
        min-height: 40px !important;
        min-width: 100px !important;
        background: #fff !important;
        border: 2px solid #0984e3 !important;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
    }
    
    /* Allow menu to overflow parent containers on mobile - but only for the menu */
    .custom-select-wrapper,
    .address-item,
    .address-row,
    .address-form-group {
        overflow: visible !important;
    }
    
    /* Keep form scrolling but allow menu overflow */
    .register-section.active,
    #registerSection.active {
        overflow-y: auto !important;
        overflow-x: visible !important;
    }
    
    .register-section form,
    #registerSection form {
        overflow-y: auto !important;
        overflow-x: visible !important;
    }
}

.custom-select-option {
    padding: 8px 10px;
    font-size: 14px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.2s;
    box-sizing: border-box;
    line-height: 1.4;
    white-space: normal;
    overflow: visible;
    word-wrap: break-word;
    min-height: 24px;
    display: flex;
    align-items: center;
    color: #333 !important;
    background: #fff !important;
}

.custom-select-option:last-child {
    border-bottom: none;
}

.custom-select-option:hover,
.custom-select-option.selected {
    background: #f0f7ff;
    color: #0984e3;
}

.custom-select-option:active {
    background: #e0f0ff;
}

/* Hide native select on mobile, show custom dropdown */
@media (max-width: 768px) {
    /* Hide native select on mobile */
    #municipality,
    #barangay {
        position: absolute;
        opacity: 0;
        pointer-events: none;
        width: 0;
        height: 0;
        overflow: hidden;
    }

    /* Show custom dropdown wrapper */
    .custom-select-wrapper {
        display: block;
    }
}

/* Desktop - hide custom dropdown, show native select */
@media (min-width: 769px) {
    .custom-select-wrapper {
        display: none;
    }

    #municipality,
    #barangay {
        position: static;
        opacity: 1;
        pointer-events: auto;
        width: 100%;
        height: auto;
        overflow: visible;
    }
}

/* Mobile adjustments */
@media (max-width: 768px) {
    /* Increase address field label sizes on mobile */
    .address-item label {
        font-size: 11px !important;
        margin-bottom: 4px;
    }

    .address-form-group + .form-group label[for="specific_address"] {
        font-size: 11px !important;
        margin-bottom: 4px;
    }

    /* Custom select field - normal font size */
    .custom-select {
        font-size: 11px !important;
        padding: 6px 26px 6px 8px !important;
        min-height: 30px;
    }

    /* Only minimize font in dropdown menu options */
    .custom-select-option {
        font-size: 9px !important;
        padding: 7px 10px;
    }

    .custom-select-arrow {
        right: 8px;
        top: 50%;
        transform: translateY(-50%);
        transform-origin: center center;
        width: 11px;
        height: 11px;
    }
}

@media (max-width: 480px) {
    .signup-form-title {
        font-size: 18px;
        margin-bottom: 12px;
    }

    .form-row {
        gap: 6px;
        margin-bottom: 8px;
    }

    .form-group-half label {
        font-size: 11px;
    }

    .form-group-half input {
        padding: 5px 6px;
        font-size: 11px;
    }

    .address-row {
        gap: 4px;
    }

    .address-item label {
        font-size: 9px;
    }

    .address-select-small,
    .address-input-small {
        padding: 3px 20px 3px 5px;
        font-size: 10px;
        min-height: 26px;
    }

    /* Small mobile adjustments (480px and below) */
    .address-item label {
        font-size: 10px !important;
    }

    .address-form-group + .form-group label[for="specific_address"] {
        font-size: 10px !important;
    }

    .custom-select {
        font-size: 10px !important;
        padding: 5px 24px 5px 7px !important;
        min-height: 28px;
    }

    .custom-select-text {
        font-size: 10px !important;
    }

    .custom-select-arrow {
        right: 7px;
        top: 50%;
        transform: translateY(-50%);
        transform-origin: center center;
        width: 10px;
        height: 10px;
    }

    .custom-select-menu {
        max-height: 150px;
    }

    /* Font size for dropdown menu options on mobile */
    .custom-select-option {
        padding: 8px 10px;
        font-size: 14px !important;
    }

    /* Minimize font for dropdown options */
    #municipality option,
    #barangay option {
        font-size: 8px !important;
        padding: 4px !important;
    }

    .address-select-small {
        background-size: 8px;
        background-position: right 4px center;
    }

    .address-select-small:focus {
        background-size: 8px;
        background-position: right 4px center;
    }

    #municipality:focus,
    #barangay:focus {
        background-size: 8px !important;
        background-position: right 4px center !important;
    }

    .signup-form .form-group {
        margin-bottom: 8px;
    }

    .signup-form .form-group label {
        font-size: 11px;
        margin-bottom: 3px;
    }

    .signup-form .form-group input,
    .signup-form .form-group select {
        padding: 5px 6px;
        font-size: 11px;
    }
}

/* Very small screens - stack address fields if needed */
@media (max-width: 360px) {
    .address-row {
        flex-wrap: wrap;
    }

    .address-item {
        flex: 1 1 calc(50% - 2px);
        min-width: calc(50% - 2px);
    }

    .address-item-province {
        flex: 1 1 100%;
        min-width: 100%;
    }

    /* Very small screens (360px and below) */
    .address-item label {
        font-size: 9px !important;
    }

    .address-form-group + .form-group label[for="specific_address"] {
        font-size: 9px !important;
    }

    .custom-select {
        font-size: 9px !important;
        padding: 4px 22px 4px 6px !important;
        min-height: 26px;
    }

    .custom-select-text {
        font-size: 9px !important;
    }

    .custom-select-arrow {
        right: 6px;
        top: 50%;
        transform: translateY(-50%);
        transform-origin: center center;
        width: 9px;
        height: 9px;
    }

    .custom-select-menu {
        max-height: 120px;
    }

    /* Font size for dropdown menu options on very small screens */
    .custom-select-option {
        padding: 6px 8px;
        font-size: 13px !important;
    }
}


/* Desktop/Tablet - keep horizontal layout but adjust sizes */
@media (min-width: 768px) {
    .signup-form-title {
        font-size: 22px;
        margin-bottom: 18px;
    }

    .form-row {
        gap: 10px;
        margin-bottom: 12px;
    }

    .address-row {
        gap: 8px;
    }

    .address-item label {
        font-size: 11px;
    }

    .address-select-small,
    .address-input-small {
        padding: 6px 24px 6px 8px;
        font-size: 12px;
        min-height: 32px;
    }

    .address-select-small {
        background-size: 12px;
        background-position: right 8px center;
    }

    .address-select-small:focus {
        background-size: 12px;
        background-position: right 8px center;
    }
}


