@charset "utf-8";

/*
 * Auth screens: login, register, forgot password and code verification.
 * A bare page — no site header or footer — so nothing competes with the form.
 */

:root {
    --auth-primary: #29b6be;
    --auth-primary-dark: #1e959c;
    --auth-ink: #1f2937;
    --auth-muted: #8b95a1;
    --auth-line: #dfe3e8;
    --auth-danger: #e05561;
    --auth-art-bg: #f1f2f4;
}

.auth-page {
    direction: ltr;
    text-align: left;
    min-height: 100vh;
    background: #ffffff;
    padding: 26px 30px 60px;
    display: flex;
    flex-direction: column;
}

.auth-page.rtl {
    direction: rtl;
    text-align: right;
}

.auth-page__top {
    display: flex;
    justify-content: flex-start;
    margin-bottom: 10px;
}

.auth-page__logo img {
    height: 58px;
    width: auto;
    object-fit: contain;
}

.auth-page__logo span {
    font-size: 22px;
    font-weight: 800;
    color: var(--auth-primary-dark);
}

.auth-card {
    flex: 1;
    width: 100%;
    max-width: 1120px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 60px;
}

.auth-card__art {
    order: 2;
    background: var(--auth-art-bg);
    border-radius: 26px;
    min-height: 470px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px;
}

.auth-art {
    width: 100%;
    max-width: 330px;
    height: auto;
}

.auth-card__form {
    order: 1;
    max-width: 420px;
    width: 100%;
    justify-self: start;
}

.auth-card__head {
    margin-bottom: 26px;
}

.auth-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    font-size: 14px;
    font-weight: 600;
    color: var(--auth-muted);
    text-decoration: none;
    transition: color 0.2s ease;
}

.auth-back:hover {
    color: var(--auth-primary-dark);
}

.auth-back__icon {
    font-size: 11px;
}

[dir="ltr"] .auth-back__icon {
    transform: rotate(180deg);
}

.auth-card__head h1 {
    margin: 0 0 12px;
    font-size: 34px;
    font-weight: 700;
    color: var(--auth-ink);
    line-height: 1.3;
}

.auth-card__head p {
    margin: 0;
    font-size: 14.5px;
    line-height: 1.8;
    color: var(--auth-muted);
}

/* ---------- Fields ---------- */
.auth-form {
    display: grid;
    gap: 20px;
}

.auth-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/*
 * The label sits on the border line, so the field keeps its outline shape
 * whether it is empty or filled — matching the design's notched inputs.
 */
.auth-field {
    position: relative;
}

.auth-field__label {
    position: absolute;
    top: -8px;
    inset-inline-start: 16px;
    padding: 0 6px;
    background: #ffffff;
    font-size: 12px;
    font-weight: 500;
    color: var(--auth-muted);
    z-index: 1;
}

.auth-field input {
    width: 100%;
    height: 54px;
    padding: 0 18px;
    border: 1px solid var(--auth-line);
    border-radius: 8px;
    background: #ffffff;
    font-size: 15px;
    color: var(--auth-ink);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.auth-field--icon input {
    padding-right: 48px;
}

.auth-page.rtl .auth-field input {
    text-align: right;
}

.auth-page.rtl .auth-field--icon input {
    padding-right: 18px;
    padding-left: 48px;
}

.auth-field input::placeholder {
    color: #b8c0c9;
}

.auth-field input:focus {
    outline: none;
    border-color: var(--auth-primary);
    box-shadow: 0 0 0 3px rgba(41, 182, 190, 0.12);
}

.auth-field input:focus + .auth-field__label,
.auth-field input:focus ~ .auth-field__label {
    color: var(--auth-primary-dark);
}

.auth-field.is-invalid input {
    border-color: var(--auth-danger);
}

.auth-field.is-invalid .auth-field__label {
    color: var(--auth-danger);
}

.auth-field__toggle {
    position: absolute;
    inset-inline-end: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 26px;
    height: 26px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    color: var(--auth-muted);
    font-size: 15px;
    cursor: pointer;
    transition: color 0.2s ease;
}

.auth-field__toggle:hover {
    color: var(--auth-primary-dark);
}

/* ---------- Options row ---------- */
.auth-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: -4px;
}

.auth-check {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    font-size: 13.5px;
    color: var(--auth-ink);
    cursor: pointer;
    user-select: none;
}

.auth-check input {
    appearance: none;
    -webkit-appearance: none;
    width: 17px;
    height: 17px;
    margin: 0;
    border: 1px solid #c4ccd4;
    border-radius: 4px;
    cursor: pointer;
    position: relative;
    flex-shrink: 0;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.auth-check input:checked {
    background: var(--auth-primary);
    border-color: var(--auth-primary);
}

.auth-check input:checked::after {
    content: "";
    position: absolute;
    left: 5px;
    top: 1px;
    width: 5px;
    height: 10px;
    border: solid #ffffff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.auth-check a {
    color: var(--auth-danger);
    text-decoration: none;
}

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

.auth-link {
    font-size: 13.5px;
    font-weight: 500;
    color: var(--auth-danger);
    text-decoration: none;
}

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

/* ---------- Submit + footer links ---------- */
.auth-submit {
    width: 100%;
    height: 48px;
    border: none;
    border-radius: 8px;
    background: var(--auth-primary);
    color: #ffffff;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.25s ease, box-shadow 0.25s ease, transform 0.2s ease;
}

.auth-submit:hover:not(:disabled) {
    background: var(--auth-primary-dark);
    box-shadow: 0 10px 24px rgba(41, 182, 190, 0.28);
    transform: translateY(-1px);
}

.auth-submit:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

.auth-alt {
    margin: 0;
    text-align: center;
    font-size: 13.5px;
    color: var(--auth-ink);
}

.auth-alt a {
    color: var(--auth-danger);
    font-weight: 600;
    text-decoration: none;
}

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

.auth-feedback {
    margin: 0;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.6;
}

.auth-feedback.is-error {
    background: #fdecee;
    color: #b3323f;
}

.auth-feedback.is-success {
    background: #e8f7f6;
    color: #147075;
}

/* ---------- Social ---------- */
.auth-divider {
    position: relative;
    margin: 30px 0 18px;
    text-align: center;
}

.auth-divider::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--auth-line);
}

.auth-divider span {
    position: relative;
    padding: 0 14px;
    background: #ffffff;
    font-size: 13px;
    color: var(--auth-muted);
}

.auth-socials {
    direction: ltr;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}

.auth-social {
    height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--auth-line);
    border-radius: 8px;
    background: #ffffff;
    font-size: 19px;
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.auth-social:hover {
    border-color: #c4ccd4;
    box-shadow: 0 6px 16px rgba(31, 41, 55, 0.08);
    transform: translateY(-1px);
}

/* ---------- Responsive ---------- */
@media only screen and (max-width: 991px) {
    .auth-card {
        grid-template-columns: 1fr;
        gap: 34px;
        max-width: 520px;
    }

    .auth-card__art {
        min-height: 300px;
    }

    .auth-card__form {
        max-width: none;
        justify-self: stretch;
    }

    .auth-card__head h1 {
        font-size: 28px;
    }
}

@media only screen and (max-width: 560px) {
    .auth-page {
        padding: 18px 18px 40px;
    }

    .auth-row {
        grid-template-columns: 1fr;
    }

    .auth-card__head h1 {
        font-size: 25px;
    }
}

.auth-alt--start {
    text-align: start;
    font-size: 13px;
    color: var(--auth-muted);
}

.auth-countdown {
    font-weight: 600;
    color: var(--auth-ink);
}

/* ---------- Progress steps ---------- */
.auth-steps {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    margin: 0 0 26px;
    padding: 0;
    list-style: none;
    counter-reset: none;
}

.auth-steps__item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 7px;
    position: relative;
    text-align: center;
}

/* The connector runs from each step back to the one before it. */
.auth-steps__item:not(:first-child)::before {
    content: "";
    position: absolute;
    top: 13px;
    inset-inline-end: 50%;
    width: 100%;
    height: 2px;
    background: var(--auth-line);
}

.auth-steps__item.is-done::before,
.auth-steps__item.is-current::before {
    background: var(--auth-primary);
}

.auth-steps__dot {
    position: relative;
    z-index: 1;
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #ffffff;
    border: 2px solid var(--auth-line);
    font-size: 12px;
    font-weight: 700;
    color: var(--auth-muted);
    transition: background-color 0.25s ease, border-color 0.25s ease, color 0.25s ease;
}

.auth-steps__item.is-current .auth-steps__dot {
    border-color: var(--auth-primary);
    color: var(--auth-primary-dark);
}

.auth-steps__item.is-done .auth-steps__dot {
    background: var(--auth-primary);
    border-color: var(--auth-primary);
    color: #ffffff;
}

.auth-steps__label {
    font-size: 11.5px;
    line-height: 1.4;
    color: var(--auth-muted);
}

.auth-steps__item.is-current .auth-steps__label {
    color: var(--auth-ink);
    font-weight: 600;
}

/* ---------- Select, hint and photo upload ---------- */
.auth-field select {
    width: 100%;
    height: 54px;
    padding: 0 18px;
    border: 1px solid var(--auth-line);
    border-radius: 8px;
    background: #ffffff;
    font-size: 15px;
    color: var(--auth-ink);
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.auth-field select:focus {
    outline: none;
    border-color: var(--auth-primary);
    box-shadow: 0 0 0 3px rgba(41, 182, 190, 0.12);
}

.auth-field.is-invalid select {
    border-color: var(--auth-danger);
}

.auth-hint {
    margin: -8px 0 0;
    font-size: 12.5px;
    line-height: 1.7;
    color: var(--auth-muted);
}

.auth-upload {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px;
    border: 1px dashed var(--auth-line);
    border-radius: 12px;
}

.auth-upload.is-invalid {
    border-color: var(--auth-danger);
}

.auth-upload__preview {
    width: 62px;
    height: 62px;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    overflow: hidden;
    background: var(--auth-art-bg);
    color: var(--auth-muted);
    font-size: 22px;
}

.auth-upload__preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.auth-upload__control {
    display: flex;
    flex-direction: column;
    gap: 4px;
    cursor: pointer;
}

.auth-upload__control input {
    display: none;
}

.auth-upload__button {
    font-size: 14px;
    font-weight: 600;
    color: var(--auth-primary-dark);
}

.auth-upload__hint {
    font-size: 12px;
    color: var(--auth-muted);
}
