* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    background: #ffffff;
}

.auth-page {
    min-height: 100vh;
    margin: 0;
    overflow-x: hidden;
    background: var(--auth-background) top center / contain no-repeat;
    color: var(--text);
    font-family: var(--font-family);
    font-weight: 400;
}

.auth-shell {
    width: 100%;
    min-height: 100vh;
    padding: 50px 20px 20px;
}

.auth-container {
    position: relative;
    z-index: 1;
    width: min(100%, 400px);
    max-width: 400px;
    margin: 0 auto;
    padding: 30px;
    overflow: visible;
    border-radius: 12px;
    background: var(--card);
    box-shadow: 0 2px 12px rgba(0, 0, 0, .1);
}

.auth-container form {
    width: 100%;
    overflow: visible;
}

.auth-logo-wrap {
    display: flex;
    justify-content: center;
    margin: 0 0 20px;
    text-align: center;
}

.auth-logo {
    width: auto;
    max-width: 180px;
    height: auto;
    display: block;
    object-fit: contain;
}

.auth-title {
    margin: 0 0 20px;
    color: var(--text);
    font-size: 18px;
    font-weight: 400;
    line-height: 1.35;
    text-align: center;
}

.auth-heading {
    margin: 0 0 20px;
    text-align: center;
    line-height: 1.7;
}

.auth-heading strong {
    display: block;
    color: var(--text);
    font-size: 20px;
    font-weight: 700;
}

.auth-heading .line2 {
    display: block;
    color: #555555;
    font-size: 18px;
    font-weight: 400;
}

.auth-heading .email {
    color: var(--primary);
    font-weight: 600;
    overflow-wrap: anywhere;
}

.auth-container label,
.auth-label {
    display: block;
    margin: 8px 0 6px;
    color: var(--text);
    font-size: 14px;
    font-weight: 500;
}

.auth-container input,
.auth-container select,
.auth-container textarea {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    display: block;
    margin: 8px 0 16px;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 4px;
    background: #ffffff;
    color: var(--text);
    font: inherit;
    font-size: 16px;
    line-height: 1.35;
}

.auth-container input:focus,
.auth-container select:focus,
.auth-container textarea:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 1px var(--primary), 0 0 4px rgba(201, 36, 36, .28);
}

.auth-container input:-webkit-autofill,
.auth-container input:-webkit-autofill:hover,
.auth-container input:-webkit-autofill:focus,
.auth-container textarea:-webkit-autofill,
.auth-container select:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 1000px #ffffff inset;
    box-shadow: 0 0 0 1000px #ffffff inset;
    -webkit-text-fill-color: var(--text);
    transition: background-color 5000s ease-in-out 0s;
}

.auth-button,
.auth-container button {
    width: 100%;
    min-height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
    border: 0;
    border-radius: 4px;
    background: var(--primary);
    color: #ffffff;
    font: inherit;
    font-size: 16px;
    font-weight: 500;
    line-height: 1.25;
    cursor: pointer;
    transition: background-color .16s ease, opacity .16s ease;
}

.auth-button:hover,
.auth-container button:hover {
    background: var(--accent);
}

.auth-button:disabled,
.auth-container button:disabled {
    cursor: not-allowed;
    opacity: .65;
}

.auth-error,
.error-message {
    display: block;
    min-height: 24px;
    margin: 10px 0 0;
    color: var(--primary);
    font-size: 14px;
    font-weight: 400;
    line-height: 1.45;
    text-align: center;
    overflow-wrap: anywhere;
    transition: opacity .2s ease;
}

.auth-footer,
.footer {
    margin-top: 20px;
    text-align: center;
    font-size: 14px;
    font-weight: 400;
}

.auth-footer p,
.footer p {
    margin: 0;
}

.auth-link,
.link {
    color: #194a8d;
    text-decoration: none;
}

.auth-link:hover,
.link:hover {
    text-decoration: underline;
}

.auth-footer-note {
    width: min(100%, 400px);
    max-width: 400px;
    margin: 10px auto 0;
    color: rgba(0, 0, 0, .45);
    font-size: 12px;
    line-height: 1.45;
    text-align: center;
}

.phone-container {
    display: flex;
    gap: 5px;
}

.phone-container #country_code {
    flex: 0 0 90px;
    width: 90px;
}

.phone-container input {
    flex: 1 1 auto;
}

@media (max-width: 480px) {
    .auth-shell {
        padding: 32px 16px 18px;
    }

    .auth-container {
        padding: 24px;
    }

    .auth-logo {
        max-width: 160px;
    }

    .phone-container {
        gap: 8px;
    }
}

@media (max-width: 360px) {
    .auth-shell {
        padding-inline: 12px;
    }

    .auth-container {
        padding: 20px;
    }

    .phone-container {
        flex-direction: column;
    }

    .phone-container #country_code {
        width: 100%;
        flex-basis: auto;
    }
}

@media (max-height: 680px) and (min-width: 481px) {
    .auth-shell {
        padding-top: 28px;
    }
}
