/* ============================================================
   BuhayAhente – Auth Pages (Login & Register)
   ============================================================ */

/* ---------- Page Background ---------- */
.auth-body {
    min-height: 100vh;
    margin: 0;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: linear-gradient(135deg, #0a1628 0%, #0f2042 40%, #1a3a6b 70%, #1e4d8c 100%);
    background-attachment: fixed;
}

.auth-main {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
}

/* ---------- Auth Card ---------- */
.auth-card-wrapper {
    width: 100%;
    max-width: 420px;
}

.auth-card {
    background: #ffffff;
    border-radius: 20px;
    border: none;
    box-shadow:
        0 25px 60px rgba(0, 0, 0, 0.35),
        0 10px 20px rgba(0, 0, 0, 0.15);
    overflow: hidden;
}

.auth-card-body {
    padding: 2.5rem 2.25rem;
}

/* ---------- Logo ---------- */
.auth-logo-wrap {
    display: flex;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.auth-logo {
    width: 90px;
    height: 90px;
    object-fit: contain;
    border-radius: 16px;
}

/* ---------- Headings ---------- */
.auth-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #0f2042;
    text-align: center;
    margin-bottom: 0.35rem;
    line-height: 1.2;
}

.auth-subtitle {
    font-size: 0.875rem;
    color: #6b7a99;
    text-align: center;
    margin-bottom: 1.75rem;
}

/* ---------- Form Labels ---------- */
.auth-label {
    font-size: 0.8125rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.4rem;
}

/* ---------- Inputs ---------- */
.auth-input {
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    padding: 0.65rem 1rem;
    font-size: 0.9rem;
    color: #1a202c;
    background: #f8fafc;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.auth-input:focus {
    border-color: #1e4d8c;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(30, 77, 140, 0.12);
    outline: none;
    color: #1a202c;
}

.auth-input::placeholder {
    color: #a0aec0;
}

/* Input group for URL slug */
.auth-input-group .input-group-text {
    border: 1.5px solid #e2e8f0;
    border-right: none;
    border-radius: 10px 0 0 10px;
    background: #eef2f7;
    color: #6b7a99;
    font-size: 0.85rem;
    padding: 0.65rem 0.9rem;
}

.auth-input-group .auth-input {
    border-left: none;
    border-radius: 0 10px 10px 0;
}

.auth-input-group .auth-input:focus {
    border-left: none;
}

/* ---------- Remember me row ---------- */
.auth-meta-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
    margin-top: -0.25rem;
}

.auth-remember .form-check-input {
    border-color: #c3cfe2;
    cursor: pointer;
}

.auth-remember .form-check-input:checked {
    background-color: #1e4d8c;
    border-color: #1e4d8c;
}

.auth-remember .form-check-label {
    font-size: 0.8125rem;
    color: #6b7a99;
    cursor: pointer;
}

.auth-forgot {
    font-size: 0.8125rem;
    color: #1e4d8c;
    text-decoration: none;
    font-weight: 500;
}

.auth-forgot:hover {
    color: #0f2042;
    text-decoration: underline;
}

/* ---------- Submit Button ---------- */
.auth-btn {
    width: 100%;
    padding: 0.75rem;
    background: linear-gradient(135deg, #1e4d8c 0%, #0f2042 100%);
    border: none;
    border-radius: 10px;
    color: #ffffff;
    font-size: 0.9375rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    cursor: pointer;
    transition: opacity 0.2s ease, transform 0.1s ease, box-shadow 0.2s ease;
    box-shadow: 0 4px 15px rgba(30, 77, 140, 0.35);
}

.auth-btn:hover {
    opacity: 0.92;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(30, 77, 140, 0.45);
}

.auth-btn:active {
    transform: translateY(0);
    opacity: 1;
}

/* ---------- Bottom Link ---------- */
.auth-footer-text {
    text-align: center;
    font-size: 0.8125rem;
    color: #6b7a99;
    margin-top: 1.5rem;
    margin-bottom: 0;
}

.auth-footer-text a {
    color: #1e4d8c;
    font-weight: 600;
    text-decoration: none;
}

.auth-footer-text a:hover {
    text-decoration: underline;
}

/* ---------- Alert ---------- */
.auth-alert {
    border-radius: 10px;
    font-size: 0.8375rem;
    padding: 0.6rem 0.9rem;
    margin-bottom: 1.25rem;
    border: none;
    background: var(--ba-danger-bg, #fff0f0);
    color: var(--ba-danger, #c0392b);
    border-left: 4px solid #e74c3c;
}

.auth-alert-success {
    background: var(--ba-success-bg, #f0fff4);
    color: var(--ba-success, #1e7e34);
    border-left-color: #28a745;
}

/* ---------- Password field: visibility toggle + strength meter
   (mirrors .regpage-toggle-pw / .regpage-strength in register-page.css
   so login/forgot/reset password fields feel like the same component) ---------- */
.auth-input-wrap {
    position: relative;
}

.auth-input-wrap .auth-input {
    width: 100%;
    padding-right: 3rem;
}

.auth-toggle-pw {
    position: absolute;
    right: 4px;
    top: 4px;
    height: calc(100% - 8px);
    width: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    color: #94a3b8;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

.auth-toggle-pw:hover {
    color: #4b5563;
    background: #f3f4f6;
}

.auth-toggle-pw:focus-visible {
    outline: 3px solid rgba(30, 77, 140, 0.4);
    outline-offset: 2px;
}

.auth-strength {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height .25s ease, opacity .25s ease, margin .25s ease;
}

.auth-strength.is-visible {
    max-height: 40px;
    opacity: 1;
    margin-top: 8px;
}

.auth-strength-track {
    height: 5px;
    border-radius: 999px;
    background: #e5e7eb;
    overflow: hidden;
}

.auth-strength-fill {
    height: 100%;
    width: 0%;
    border-radius: 999px;
    background: #dc2626;
    transition: width .25s ease, background-color .25s ease;
}

.auth-strength-fill.is-level-1 { width: 33%;  background: #ef4444; }
.auth-strength-fill.is-level-2 { width: 66%;  background: #f59e0b; }
.auth-strength-fill.is-level-3 { width: 100%; background: #16a34a; }

.auth-strength-label {
    display: block;
    margin-top: 5px;
    font-size: 12px;
    font-weight: 600;
    color: #9ca3af;
}

/* ---------- Helper text ---------- */
.auth-hint {
    font-size: 0.775rem;
    color: #94a3b8;
    margin-top: 0.3rem;
}

/* ---------- Signup card wider ---------- */
.auth-card-wrapper.auth-wide {
    max-width: 460px;
}

/* ---------- Responsive ---------- */
@media (max-width: 480px) {
    .auth-card-body {
        padding: 2rem 1.5rem;
    }

    .auth-logo {
        width: 74px;
        height: 74px;
    }

    .auth-title {
        font-size: 1.3rem;
    }
}

@media (max-width: 360px) {
    .auth-card-body {
        padding: 1.75rem 1.25rem;
    }
}
