/* =========================================================
   Authentication
   ========================================================= */

.auth-page {
    min-height: calc(100vh - 160px);
    display: flex;
    align-items: center;
    padding: 72px 0 96px;
    background: #faf9f7;
}

.auth-page__shell {
    display: flex;
    justify-content: center;
}


/* =========================================================
   Card
   ========================================================= */

.auth-card {
    width: 100%;
    max-width: 440px;
    padding: 42px;
    background: #ffffff;
    border: 1px solid #e9e6e1;
    border-radius: 18px;
    box-shadow:
        0 1px 2px rgba(32, 32, 30, 0.02),
        0 12px 36px rgba(32, 32, 30, 0.05);
}

.auth-card__header {
    margin-bottom: 32px;
}

.auth-card__title {
    margin: 0;
    color: #20201e;
    font-size: clamp(1.75rem, 3vw, 2.125rem);
    font-weight: 600;
    line-height: 1.15;
    letter-spacing: -0.035em;
}

.auth-card__description {
    margin: 10px 0 0;
    color: #74716b;
    font-size: 0.9375rem;
    line-height: 1.6;
}


/* =========================================================
   Form
   ========================================================= */

.auth-form__fields {
    display: grid;
    gap: 22px;
}

.auth-field {
    display: grid;
    gap: 8px;
}

.auth-field__label {
    color: #34332f;
    font-size: 0.875rem;
    font-weight: 500;
}

.auth-field input,
.auth-field select,
.auth-field textarea {
    width: 100%;
    min-height: 50px;
    padding: 0 15px;
    color: #20201e;
    background: #ffffff;
    border: 1px solid #d9d6d0;
    border-radius: 10px;
    outline: none;
    transition:
        border-color 160ms ease,
        box-shadow 160ms ease,
        background-color 160ms ease;
}

.auth-field input::placeholder,
.auth-field textarea::placeholder {
    color: #aaa69f;
}

.auth-field input:hover,
.auth-field select:hover,
.auth-field textarea:hover {
    border-color: #bcb8b0;
}

.auth-field input:focus,
.auth-field select:focus,
.auth-field textarea:focus {
    border-color: #5d6651;
    box-shadow: 0 0 0 3px rgba(93, 102, 81, 0.11);
}

.auth-field--error input,
.auth-field--error select,
.auth-field--error textarea {
    border-color: #b95d55;
}


/* =========================================================
   Errors / Notices
   ========================================================= */

.auth-errors,
.auth-notice {
    margin-bottom: 24px;
    padding: 13px 15px;
    border-radius: 10px;
    font-size: 0.875rem;
    line-height: 1.5;
}

.auth-errors {
    color: #8d3933;
    background: #fff6f5;
    border: 1px solid #efd4d1;
}

.auth-errors p {
    margin: 0;
}

.auth-errors p + p {
    margin-top: 5px;
}

.auth-notice--success {
    color: #496044;
    background: #f4f8f2;
    border: 1px solid #d9e5d5;
}

.auth-error {
    margin: 0;
    color: #a44740;
    font-size: 0.8125rem;
    line-height: 1.45;
}

.auth-field__help {
    color: #85817a;
    font-size: 0.8125rem;
    line-height: 1.45;
}


/* =========================================================
   Actions
   ========================================================= */

.auth-form__actions {
    margin-top: 28px;
}

.auth-form__forgot {
    display: inline-block;
    margin-bottom: 18px;
    color: #5d6651;
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
}

.auth-form__forgot:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.auth-submit {
    width: 100%;
    min-height: 52px;
    padding: 12px 20px;
    border: 0;
    border-radius: 10px;
    background: #20201e;
    color: #ffffff;
    cursor: pointer;
    font-weight: 600;
    transition:
        background-color 160ms ease,
        transform 120ms ease;
}

.auth-submit:hover {
    background: #383733;
}

.auth-submit:active {
    transform: translateY(1px);
}

.auth-submit:focus-visible,
.auth-form__forgot:focus-visible {
    outline: 3px solid rgba(93, 102, 81, 0.22);
    outline-offset: 3px;
}


/* =========================================================
   Responsive
   ========================================================= */

@media (max-width: 720px) {
    .auth-page {
        min-height: auto;
        align-items: flex-start;
        padding: 42px 0 88px;
        background: #ffffff;
    }

    .auth-card {
        max-width: 480px;
        padding: 0;
        border: 0;
        border-radius: 0;
        box-shadow: none;
    }

    .auth-card__header {
        margin-bottom: 28px;
    }

    .auth-card__title {
        font-size: 1.75rem;
    }

    .auth-field input,
    .auth-field select,
    .auth-field textarea {
        min-height: 52px;
        font-size: 1rem;
    }

    .auth-submit {
        min-height: 54px;
    }
}

/* =========================================================
   Mobile verification
   ========================================================= */

.auth-card__mobile {
    color: #34332f;
    font-weight: 600;
    white-space: nowrap;
}

.auth-secondary-action {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 24px;
    color: #74716b;
    font-size: 0.875rem;
}

.auth-resend {
    margin: 0;
}

.auth-resend__button {
    padding: 0;
    border: 0;
    background: transparent;
    color: #5d6651;
    cursor: pointer;
    font: inherit;
    font-weight: 600;
}

.auth-resend__button:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.auth-resend__button:focus-visible {
    outline: 3px solid rgba(93, 102, 81, 0.22);
    outline-offset: 3px;
    border-radius: 3px;
}

.auth-register-link {
    color: #5d6651;
    font-weight: 600;
    text-decoration: none;
}

.auth-register-link:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.auth-register-link:focus-visible {
    outline: 3px solid rgba(93, 102, 81, 0.22);
    outline-offset: 3px;
    border-radius: 3px;
}

@media (max-width: 420px) {
    .auth-secondary-action {
        flex-wrap: wrap;
    }
}
