/* =====================================================
   GEMEINSAMER AUTH WRAPPER
===================================================== */

.login,
.auth-page,
.password-page,
.register-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    width: 100%;
}


/* =====================================================
   GEMEINSAME CARD
===================================================== */

.loginbox,
.auth-card,
.password-card,
.register-card {
    width: 100%;
    max-width: 430px;

    padding: 28px;

    background: rgba(255, 255, 255, .97);

    border: 1px solid #e2e8f0;
    border-radius: 18px;

    box-shadow:
        0 10px 25px rgba(15, 23, 42, .06),
        0 30px 70px rgba(15, 23, 42, .10);

    backdrop-filter: blur(8px);
}


/* =====================================================
   BRAND
===================================================== */

.login-brand,
.auth-brand,
.password-brand,
.register-brand {
    display: flex;
    flex-direction: column;
    align-items: center;

    gap: 6px;

    margin-bottom: 24px;

    text-align: center;
}


.login-brand img,
.auth-brand img,
.password-brand img,
.register-brand img {
    display: block;

    width: 100%;
    max-width: 190px;
    height: auto;

    padding: 8px;

    background: #ffffff;

    border: 1px solid #eef2f7;
    border-radius: 14px;

    box-shadow:
        0 5px 14px rgba(15, 23, 42, .05);
}


.login-brand small,
.auth-brand small,
.password-brand small,
.register-brand small {
    color: #64748b;

    font-size: 11px;
    font-weight: 700;

    letter-spacing: .12em;

    text-transform: uppercase;
}


/* =====================================================
   HEADER
===================================================== */

.loginbox h3,
.auth-head h2,
.password-head h2,
.register-head h2 {
    margin:
        0
        0
        8px;

    color: #0f172a;

    font-size: 22px;
    font-weight: 800;

    text-align: center;
}


.auth-head,
.password-head,
.register-head {
    margin-bottom: 22px;
}


.auth-head p,
.password-head p,
.register-head p {
    margin: 0;

    color: #64748b;

    font-size: 13px;

    line-height: 1.55;

    text-align: center;
}


/* =====================================================
   FORM
===================================================== */

.modern-form,
.auth-form,
.password-card form,
.register-form {
    display: flex;
    flex-direction: column;

    gap: 14px;
}


/* =====================================================
   FIELD
===================================================== */

.field,
.auth-field,
.password-field,
.register-field {
    display: flex;
    flex-direction: column;

    gap: 6px;
}


.field label,
.auth-field label,
.password-field label,
.register-field label {
    color: #475569;

    font-size: 12px;
    font-weight: 700;
}


/* =====================================================
   INPUTS
===================================================== */

.field input,
.auth-field input,
.password-field input,
.register-field input {
    width: 100%;
    height: 44px;

    padding:
        0
        12px;

    background: #f8fafc;

    color: #0f172a;

    border: 1px solid #dbe1e8;
    border-radius: 10px;

    outline: none;

    font-size: 14px;
    font-weight: 600;

    transition:
        background-color .15s ease,
        border-color .15s ease,
        box-shadow .15s ease;
}


.field input::placeholder,
.auth-field input::placeholder,
.password-field input::placeholder,
.register-field input::placeholder {
    color: #94a3b8;

    font-weight: 500;
}


.field input:hover,
.auth-field input:hover,
.password-field input:hover,
.register-field input:hover {
    background: #ffffff;

    border-color: #94a3b8;
}


.field input:focus,
.auth-field input:focus,
.password-field input:focus,
.register-field input:focus {
    background: #ffffff;

    border-color: #2563eb;

    box-shadow:
        0 0 0 3px rgba(37, 99, 235, .10);
}


/* =====================================================
   BUTTON BASIS
===================================================== */

.btn,
.auth-btn,
.password-primary-btn,
.register-btn {
    min-height: 44px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding:
        8px
        14px;

    border-radius: 10px;

    font-size: 13px;
    font-weight: 700;

    text-decoration: none;

    cursor: pointer;

    transition:
        background-color .15s ease,
        border-color .15s ease,
        color .15s ease,
        transform .15s ease,
        box-shadow .15s ease;
}


/* =====================================================
   PRIMARY BUTTON
===================================================== */

.btn.primary,
.auth-btn.primary,
.password-primary-btn,
.register-btn.primary {
    width: 100%;

    background: #2563eb;

    color: #ffffff;

    border: 1px solid #2563eb;

    box-shadow:
        0 5px 14px rgba(37, 99, 235, .20);
}


.btn.primary:hover,
.auth-btn.primary:hover,
.password-primary-btn:hover:not(:disabled),
.register-btn.primary:hover {
    background: #1d4ed8;

    border-color: #1d4ed8;

    transform: translateY(-1px);

    box-shadow:
        0 7px 18px rgba(37, 99, 235, .24);
}


.btn.primary:active,
.auth-btn.primary:active,
.password-primary-btn:active:not(:disabled),
.register-btn.primary:active {
    transform: translateY(0);
}


.btn:disabled,
.auth-btn:disabled,
.password-primary-btn:disabled,
.register-btn:disabled {
    opacity: .55;

    cursor: wait;

    box-shadow: none;
}


/* =====================================================
   SECONDARY BUTTON
===================================================== */

.btn.secondary,
.auth-btn.secondary,
.register-btn.secondary {
    width: 100%;

    background: #ffffff;

    color: #475569;

    border: 1px solid #dbe1e8;
}


.btn.secondary:hover,
.auth-btn.secondary:hover,
.register-btn.secondary:hover {
    background: #f8fafc;

    color: #2563eb;

    border-color: #bfdbfe;
}


/* =====================================================
   LINKS / FOOTER ACTIONS
===================================================== */

.login-register,
.login-password-actions,
.auth-actions,
.password-actions,
.register-actions {
    margin-top: 12px;

    text-align: center;
}


.login-password-actions {
    margin-top: 14px;
}


.login-password-actions a,
.auth-actions a,
.password-back,
.register-actions a {
    color: #2563eb;

    font-size: 12px;
    font-weight: 700;

    text-decoration: none;

    transition:
        color .15s ease;
}


.login-password-actions a:hover,
.auth-actions a:hover,
.password-back:hover,
.register-actions a:hover {
    color: #1d4ed8;

    text-decoration: underline;
}


/* =====================================================
   BACK LINK
===================================================== */

.password-back {
    display: block;

    margin-top: 22px;

    text-align: center;
}


.password-back.success-link {
    padding: 10px;

    background: #eff6ff;

    color: #1d4ed8;

    border-radius: 9px;

    text-decoration: none;
}


/* =====================================================
   MESSAGE
===================================================== */

#loginMessage,
.auth-message,
.password-message,
.register-message {
    min-height: 18px;

    margin:
        14px
        0
        0;

    font-size: 12px;

    line-height: 1.45;

    text-align: center;
}


#loginMessage:empty,
.auth-message:empty,
.password-message:empty,
.register-message:empty {
    display: none;
}


/* =====================================================
   SUCCESS MESSAGE
===================================================== */

#loginMessage.success,
.auth-message.success,
.password-message.success,
.register-message.success {
    padding: 10px 12px;

    background: #f0fdf4;

    color: #166534;

    border: 1px solid #bbf7d0;
    border-radius: 9px;
}


/* =====================================================
   ERROR MESSAGE
===================================================== */

#loginMessage.error,
.auth-message.error,
.password-message.error,
.register-message.error {
    padding: 10px 12px;

    background: #fff1f2;

    color: #be123c;

    border: 1px solid #fecdd3;
    border-radius: 9px;
}


/* =====================================================
   PASSWORD REQUIREMENTS
===================================================== */

.password-requirements,
.auth-requirements,
.register-requirements {
    display: flex;
    flex-direction: column;

    gap: 3px;

    color: #94a3b8;

    font-size: 10px;

    line-height: 1.4;
}


.password-requirements .valid,
.auth-requirements .valid,
.register-requirements .valid {
    color: #16a34a;
}


.password-requirements .invalid,
.auth-requirements .invalid,
.register-requirements .invalid {
    color: #dc2626;
}


/* =====================================================
   OPTIONAL DIVIDER
===================================================== */

.auth-divider {
    display: flex;
    align-items: center;

    gap: 10px;

    margin: 16px 0;

    color: #94a3b8;

    font-size: 10px;
}


.auth-divider::before,
.auth-divider::after {
    content: '';

    flex: 1;

    height: 1px;

    background: #e2e8f0;
}


/* =====================================================
   GOOGLE / EXTERNER LOGIN
===================================================== */

.google-btn {
    width: 100%;

    background: #ffffff;

    color: #334155;

    border: 1px solid #dbe1e8;
}


.google-btn:hover {
    background: #f8fafc;

    border-color: #cbd5e1;
}


/* =====================================================
   MUTED
===================================================== */

.muted {
    color: #64748b;
}


/* =====================================================
   MOBILE
===================================================== */

@media (max-width: 500px) {

    .login,
    .auth-page,
    .password-page,
    .register-page {
        padding: 12px;
    }


    .loginbox,
    .auth-card,
    .password-card,
    .register-card {
        padding: 21px;

        border-radius: 15px;
    }


    .login-brand,
    .auth-brand,
    .password-brand,
    .register-brand {
        margin-bottom: 20px;
    }


    .login-brand img,
    .auth-brand img,
    .password-brand img,
    .register-brand img {
        max-width: 165px;
    }


    .loginbox h3,
    .auth-head h2,
    .password-head h2,
    .register-head h2 {
        font-size: 20px;
    }

}