* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, Helvetica, sans-serif;
}

body {
     min-height: 100vh;
    background: 
        linear-gradient(rgba(0,0,0,0.45), rgba(0,0,0,0.45)),
        url("gallery/barangay-logo.png");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Main Wrapper */
.login-wrapper {
    width: 1000px;
    height: 480px;
    display: flex;
    border-radius: 15px;
    overflow: hidden;

    /* Glass effect */
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}

/* LEFT PANEL */
.info-panel {
    flex: 2.2;
    padding: 60px;
    color: #fff;
    background: rgba(0, 0, 0, 0.15);
}

.info-panel h1 {
    font-size: 32px;
    margin-bottom: 15px;
}

.info-panel p {
    font-size: 16px;
    line-height: 1.6;
    opacity: 0.9;
}

/* RIGHT PANEL (LOGIN) */
.login-panel {
    width: 350px;
    padding: 40px;
    background: rgba(255, 255, 255, 0.25);
    
    /* glass inside */
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.login-panel h2 {
    margin-bottom: 25px;
    color: #2c3e50;
    text-align: center;
}

/* Inputs */
.input-group {
    margin-bottom: 15px;
}

.input-group label {
    font-size: 14px;
    color: #333;
}

.input-group input {
    width: 100%;
    padding: 10px;
    margin-top: 5px;
    border-radius: 5px;
    border: none;
    outline: none;
    background: rgba(255,255,255,0.7);
}

/* Button */
.login-btn {
    display: block;
    margin-top: 20px;
    padding: 12px;
    text-align: center;
    background: #1abc9c;
    color: #fff;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
}

.login-btn:hover {
    background: #16a085;
}



/* Extra links below login button */
.extra-btns {
    display: flex;
    justify-content: space-between;
    margin-top: 15px;
}

.link-btn {
    font-size: 13px;
    color: #2c3e50;
    text-decoration: underline;
    cursor: pointer;
    transition: color 0.3s;
}

.link-btn:hover {
    color: #1abc9c;
}
/* Dropdown role selection */
/* Dropdown styling (Gender, House Role, Role) */
.login-panel select {
    width: 100%;
    padding: 10px;
    border-radius: 5px;
    border: none;
    outline: none;
    background: rgba(255,255,255,0.7);
    margin-top: 5px;
}

/* Input number for age */
.login-panel input[type="number"] {
    -moz-appearance: textfield;
}

.login-panel input[type="number"]::-webkit-inner-spin-button,
.login-panel input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* For longer forms, scrollable wrapper */
.login-panel {
    max-height: 90vh;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(0,0,0,0.2) transparent;
}

.login-panel::-webkit-scrollbar {
    width: 6px;
}

.login-panel::-webkit-scrollbar-thumb {
    background-color: rgba(0,0,0,0.2);
    border-radius: 3px;
}

.login-logo {
    display: flex;
    justify-content: center;
    margin-bottom: 15px;
}

.login-logo img {
    width: 90px;
    height: 90px;
    object-fit: cover; /* Ensures the image fills the circle without squishing */
    border-radius: 50%; /* Makes it a perfect circle */
    border: 2px solid rgba(255, 255, 255, 0.4); /* Optional: subtle border to match the glass theme */
    box-shadow: 0 4px 8px rgba(0,0,0,0.2); /* Optional: adds depth */
}

@media (max-width: 600px) {
    body {
        min-height: 100vh;
        height: auto;
        padding: 18px;
        overflow-y: auto;
        align-items: flex-start;
        background-position: center;
    }

    .login-wrapper {
        flex-direction: column;
        width: 100%;
        max-width: 390px;
        height: auto;
        min-height: auto;
        margin: 30px auto;
        border-radius: 22px;
        overflow: hidden;

        background: rgba(255, 255, 255, 0.13);
        border: 1px solid rgba(255, 255, 255, 0.22);
        backdrop-filter: blur(18px);
        -webkit-backdrop-filter: blur(18px);
        box-shadow: 0 18px 35px rgba(0,0,0,0.35);
    }

    .info-panel {
        flex: none;
        width: 100%;
        height: auto;
        max-height: none;
        padding: 26px 22px 18px;
        text-align: center;
        background: rgba(0, 0, 0, 0.18);
        border-bottom: 1px solid rgba(255, 255, 255, 0.18);
        overflow: visible;
    }

    .info-panel .login-logo {
        margin-bottom: 12px;
    }

    .info-panel .login-logo img {
        width: 72px;
        height: 72px;
    }

    .info-panel h1 {
        font-size: 1.25rem;
        line-height: 1.35;
        margin-bottom: 10px;
        color: #fff;
    }

    .info-panel h3 {
        font-size: 1rem;
        line-height: 1.4;
        color: #fff;
        margin: 0;
    }

    .info-panel p {
        font-size: 0;
        line-height: 0;
        margin: 0;
    }

    .info-panel p br,
    .info-panel p::after {
        display: none;
    }

    .login-panel {
        width: 100%;
        flex: none;
        min-height: auto;
        max-height: none;
        overflow-y: visible;
        padding: 30px 24px 28px;
        background: rgba(255, 255, 255, 0.16);
        border-top: none;
    }

    .login-panel h2 {
        color: #fff;
        text-align: center;
        margin-bottom: 24px;
        font-size: 2rem;
        letter-spacing: 0.5px;
    }

    .input-group {
        margin-bottom: 20px;
    }

    .input-group label {
        display: block;
        color: #fff;
        font-size: 0.95rem;
        font-weight: 600;
        margin-bottom: 7px;
    }

    .login-panel input,
    .login-panel select {
        width: 100%;
        min-height: 52px;
        background: rgba(255, 255, 255, 0.20);
        border: 1px solid rgba(255, 255, 255, 0.45);
        color: #fff;
        padding: 13px 14px;
        border-radius: 13px;
        font-size: 16px;
        outline: none;
    }

    .login-panel input:focus,
    .login-panel select:focus {
        border-color: #1abc9c;
        box-shadow: 0 0 0 3px rgba(26, 188, 156, 0.18);
    }

    .login-panel input::placeholder {
        color: rgba(255, 255, 255, 0.65);
    }

    .password-wrapper input {
        padding-right: 48px !important;
    }

    .toggle-password {
        right: 16px;
        color: rgba(255, 255, 255, 0.75);
        font-size: 17px;
    }

    .toggle-password:hover {
        color: #1abc9c;
    }

    .login-btn {
        display: inline-block;
        width: auto;
        min-width: 115px;
        margin-top: 8px;
        padding: 14px 24px;
        background: #1abc9c;
        border: none;
        border-radius: 12px;
        color: #fff;
        font-size: 1rem;
        font-weight: 700;
        cursor: pointer;
        box-shadow: 0 5px 0 #0e6f5e;
    }

    .login-btn:hover {
        background: #16a085;
    }

    .login-btn:active {
        transform: translateY(3px);
        box-shadow: 0 2px 0 #0e6f5e;
    }

    .extra-btns {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 14px;
        margin-top: 28px;
        text-align: center;
    }

    .extra-btns .link-btn {
        flex: none;
        width: auto;
        color: rgba(255, 255, 255, 0.95);
        font-size: 0.95rem;
        font-weight: 600;
        text-decoration: underline;
    }

    .extra-btns .link-btn:hover {
        color: #1abc9c;
    }

    #login-error {
        text-align: center;
        background: rgba(255, 255, 255, 0.85);
        padding: 10px 12px;
        border-radius: 10px;
    }
}
/* =========================================
PASSWORD TOGGLE & BUTTON ALIGNMENT
========================================= */
.password-wrapper {
    position: relative;
    width: 100%;
}

.password-wrapper input {
    padding-right: 42px !important; /* Makes room for the eye icon */
}

.toggle-password {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    cursor: pointer;
    color: #555;
    font-size: 15px;
    padding: 0;
    margin-top: 2px;
    transition: color 0.2s ease;
}

.toggle-password:hover {
    color: #1abc9c;
}

/* Update extra buttons layout for 3 items */
.extra-btns {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
    flex-wrap: wrap;
    gap: 10px;
}

/* Mobile tweak for the 3 links */
@media (max-width: 600px) {
    .extra-btns {
        justify-content: center;
        text-align: center;
    }
    .extra-btns .link-btn {
        flex: 1 1 100%;
        text-align: center;
    }
}

  /* Essential styling for the strength meter */
        .strength-container {
            width: 100%;
            background-color: #e0e0e0;
            height: 5px;
            margin-top: 5px;
            border-radius: 5px;
            overflow: hidden;
        }
        #strength-bar {
            height: 100%;
            width: 0%;
            transition: width 0.3s ease-in-out;
        }
        #strength-text {
            font-size: 0.85rem;
            font-weight: bold;
            display: block;
            margin-top: 5px;
        }
        .input-group { margin-bottom: 15px; }


        /* =========================================
LOGIN LOADING OVERLAY & ANIMATION
========================================= */
.loader-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(4px);
    z-index: 10000;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 600;
    font-size: 1.1rem;
    letter-spacing: 0.5px;
}

.spinner {
    width: 45px;
    height: 45px;
    border: 4px solid rgba(255, 255, 255, 0.25);
    border-top: 4px solid #1abc9c;
    border-radius: 50%;
    animation: spin 0.9s linear infinite;
    margin-bottom: 15px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Prevent double-clicks during submission */
button:disabled, input:disabled {
    opacity: 0.7;
    cursor: wait;
}