/* -- Login/Register page: fully transparent, ghost-style inputs -------- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body.login-page {
    font-family: 'Inter', sans-serif;
    min-height: 100vh;
    background: linear-gradient(135deg, #0a2820 0%, #0f3d33 45%, #14532d 100%);
    background-attachment: fixed;
}

/* Wrapper */
.login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    position: relative;
    overflow: hidden;
}


.login-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 460px;
}

/* Tagline / hero text on top, centered */
.hero-content {
    text-align: center;
    color: white;
    margin-bottom: 20px;
}

.hero-logo {
    display: none;
}

.hero-content h1 {
    font-family: var(--font-display);
    font-size: 2.3rem;
    font-weight: 700;
    margin-bottom: 8px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, .9), 0 4px 20px rgba(0, 0, 0, .7);
    color: white;
}

.hero-content p {
    font-size: 0.95rem;
    color: #ffffff;
    max-width: 420px;
    margin: 0 auto;
    text-shadow: 0 1px 3px rgba(0, 0, 0, .9), 0 2px 10px rgba(0, 0, 0, .6);
}

.hero-stats {
    display: flex;
    gap: 16px;
    margin-top: 24px;
    justify-content: center;
    flex-wrap: wrap;
}

.stat-box {
    background: rgba(0, 0, 0, .25);
    padding: 12px 20px;
    border-radius: 20px;
    min-width: 100px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, .3);
}

.stat-box h3 {
    font-family: var(--font-display);
    font-size: 22px;
    font-weight: 700;
    color: white;
    text-shadow: 0 1px 4px rgba(0, 0, 0, .8);
}

.stat-box span {
    font-size: 13px;
    color: #ffffff;
    text-shadow: 0 1px 3px rgba(0, 0, 0, .7);
}

/* Login/Register card -- no background at all, fully invisible container */
.glass-card {
    width: 100%;
    max-width: 460px;
    background: transparent;
    padding: 20px 10px;
}

.glass-card h2 {
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, .9), 0 4px 16px rgba(0, 0, 0, .7);
}

.glass-card p.text-muted {
    color: #ffffff !important;
    text-shadow: 0 1px 3px rgba(0, 0, 0, .9), 0 2px 10px rgba(0, 0, 0, .6);
}

/* Ghost-style inputs with icon */
.input-icon-wrapper {
    position: relative;
}

.input-icon-wrapper .field-icon {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: white;
    opacity: .95;
    pointer-events: none;
    z-index: 2;
    filter: drop-shadow(0 1px 3px rgba(0, 0, 0, .7));
}

.glass-card .form-control {
    border-radius: 14px;
    min-height: 58px;
    background: rgba(0, 0, 0, .22);
    border: 1.5px solid rgba(255, 255, 255, .65);
    padding-left: 48px;
    color: white;
}

.glass-card .form-control:focus {
    background: rgba(0, 0, 0, .32);
    border-color: rgba(255, 255, 255, .95);
    box-shadow: 0 0 0 .2rem rgba(255, 255, 255, .15);
    color: white;
}

.glass-card .form-floating > label {
    font-size: 1.02rem !important;
    font-weight: 700 !important;
    color: white !important;
    text-shadow: 0 1px 3px rgba(0, 0, 0, .8);
    padding-left: 48px;
}

.glass-card .form-floating > .form-control {
    font-size: 0.88rem !important;
    font-weight: 400 !important;
    color: #ffffff !important;
}

.glass-card .form-floating > .form-control::placeholder {
    font-size: 0.88rem !important;
    font-weight: 400 !important;
    color: rgba(255, 255, 255, .75) !important;
}

/* Autofill override -- browsers force a white box by default */
.glass-card .form-control:-webkit-autofill,
.glass-card .form-control:-webkit-autofill:focus {
    -webkit-text-fill-color: white;
    -webkit-box-shadow: 0 0 0px 1000px rgba(10, 40, 32, .45) inset;
    transition: background-color 9999s ease-in-out 0s;
}

/* Password toggle */
.password-wrapper {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: white;
    opacity: .95;
    filter: drop-shadow(0 1px 3px rgba(0, 0, 0, .7));
}

.password-toggle:hover {
    opacity: 1;
}

/* Remember me / Forgot password text */
.glass-card .form-check-label {
    color: #ffffff;
    text-shadow: 0 1px 3px rgba(0, 0, 0, .8);
    font-weight: 500;
}

.glass-card .form-check-input {
    background-color: rgba(0, 0, 0, .2);
    border: 1.5px solid rgba(255, 255, 255, .8);
}

.glass-card .form-check-input:checked {
    background-color: var(--forest-700);
    border-color: var(--forest-700);
}

.glass-card a {
    color: #a8f0cb;
    text-shadow: 0 1px 3px rgba(0, 0, 0, .8);
    font-weight: 600;
}

.glass-card a:hover {
    color: white;
}

/* Button */
.btn-login {
    border: none;
    min-height: 58px;
    border-radius: 14px;
    font-weight: 600;
    background: linear-gradient(135deg, var(--forest-700), var(--forest-950));
    box-shadow: 0 10px 30px rgba(0, 0, 0, .5);
    border: 1px solid rgba(255, 255, 255, .2);
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, .6);
}

.glass-card p.text-center {
    color: #ffffff;
    text-shadow: 0 1px 3px rgba(0, 0, 0, .8);
    font-weight: 500;
    margin-top: 18px;
}
.glass-card p.text-center a {
    color: #a8f0cb;
    text-shadow: 0 1px 3px rgba(0, 0, 0, .8);
}

/* Modal -- keep this one solid/readable since it's dense legal text */
.consent-modal-content {
    border: none;
    border-radius: 20px;
    background: white;
}

#agreeBtn.disabled {
    opacity: .5;
    pointer-events: none;
    cursor: not-allowed;
}

.consent-modal-content .modal-body {
    padding: 30px 35px;
    line-height: 1.7;
}

.consent-modal-content h6 {
    font-size: 1.1rem;
    margin-top: 28px;
    margin-bottom: 12px;
}

.consent-modal-content h6:first-of-type {
    margin-top: 0;
}

.consent-modal-content .modal-body p {
    text-indent: 2em;
    margin-bottom: 14px;
}

.consent-modal-content .modal-body ul {
    margin: 0 0 14px 0;
    padding-left: 2.2em;
}

.consent-modal-content .modal-body li {
    margin-bottom: 8px;
    line-height: 1.6;
}

.consent-modal-content .form-check {
    margin-top: 24px;
    padding: 16px;
    background: rgba(27, 99, 73, .05);
    border-radius: 12px;
}

.password-hint {
    font-size: 12.5px;
    color: #ffffff;
    margin-top: 6px;
    margin-bottom: 14px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, .8);
    font-weight: 500;
}

.hint-success {
    color: #8ff5bd;
    font-weight: 700;
}

.hint-error {
    color: #ffb3a3;
    font-weight: 700;
}

/* Password requirements checklist */
.password-checklist {
    list-style: none;
    padding: 0;
    margin: 6px 0 14px;
    font-size: 12.5px;
}

.password-checklist li {
    color: #ffffff;
    margin-bottom: 4px;
    padding-left: 20px;
    position: relative;
    transition: color .2s ease;
    text-shadow: 0 1px 3px rgba(0, 0, 0, .8);
    font-weight: 500;
}

.password-checklist li::before {
    content: '○';
    position: absolute;
    left: 0;
    font-size: 11px;
}

.password-checklist li.rule-valid {
    color: #8ff5bd;
    font-weight: 700;
}

.password-checklist li.rule-valid::before {
    content: '✓';
}

.password-checklist li.rule-invalid {
    color: #ffffff;
}

/* Mobile */
@media (max-width: 576px) {
    .login-wrapper {
        padding: 30px 15px;
    }
    .hero-content h1 {
        font-size: 1.8rem;
    }
    .glass-card {
        padding: 10px 6px;
    }
    .consent-modal-content .modal-body {
        padding: 20px 18px;
        line-height: 1.6;
    }
    .consent-modal-content h6 {
        font-size: 1rem;
        margin-top: 20px;
    }
    .consent-modal-content .modal-body p {
        text-indent: 1.2em;
    }
    .consent-modal-content .modal-body ul {
        padding-left: 1.5em;
    }
    .consent-modal-content .form-check {
        padding: 12px;
    }
    .modal-footer {
        flex-direction: column-reverse;
        gap: 8px;
    }
    .modal-footer .btn {
        width: 100%;
        margin: 0 !important;
    }
}

/* Fix textarea floating-label spacing + remove resize handle */
.glass-card .form-floating > textarea.form-control {
    padding-top: 1.9rem !important;
    resize: none;
}

/* ===== Mobile fixes ===== */
body.login-page { min-height: 100dvh; }
.login-wrapper  { min-height: 100dvh; }

/* huwag sumagi ang text sa eye icon */
.password-wrapper .form-control { padding-right: 56px; }

/* mas malaking pindutan para sa daliri */
.password-toggle {
    right: 6px;
    padding: 12px;
}

/* mahabang email sa "We sent a code to..." */
.glass-card strong { overflow-wrap: anywhere; }

@media (max-width: 576px) {
    /* pigilan ang auto-zoom ng iPhone */
    .glass-card .form-floating > .form-control { font-size: 16px !important; }

    /* hindi gumagana ang fixed background sa iOS */
    body.login-page { background-attachment: scroll; }
}

@media (max-width: 380px) {
    .hero-content h1 { font-size: 1.5rem; }
}

/* Logo na pumalit sa hero text */
.hero-content .hero-logo-img {
    display: block;
    width: 160px;
    max-width: 50vw;
    height: auto;
    margin: 0 auto;
    filter: drop-shadow(0 4px 14px rgba(0, 0, 0, .45));
}

@media (max-width: 576px) {
    .hero-content .hero-logo-img {
        width: 120px;
    }
}

/* ===== Hover colors ng mga button ===== */
.btn-login {
    transition: background 0.25s ease, transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.btn-login:hover,
.btn-login:focus-visible {
    background: linear-gradient(135deg, #d9a441, #b8860b) !important;
    border-color: rgba(255, 255, 255, .6) !important;
    color: #0a2820 !important;
}

.btn-login:active {
    transform: translateY(0);
    box-shadow: 0 6px 16px rgba(0, 0, 0, .5);
}

.glass-card p.text-center a {
    transition: color 0.2s ease;
}

.glass-card p.text-center a:hover,
.glass-card p.text-center a:focus-visible {
    color: #ffffff;
}

/* ===== Keyboard fix (mobile) ===== */
html {
    scroll-padding-bottom: 140px;
}

@media (max-width: 576px) {
    .login-wrapper {
        padding-bottom: 140px;
    }
}

/* Checkbox sa consent modal: itapat sa unang linya ng text */
.consent-modal-content .form-check {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}
.consent-modal-content .form-check .form-check-input {
    float: none;
    flex-shrink: 0;
    margin: 0.25em 0 0 0;
}
.consent-modal-content .form-check .form-check-label {
    flex: 1;
    min-width: 0;
}