.auth-wrapper {
    max-width: 1220px;
    grid-template-columns: 1.08fr 0.92fr;
}

.auth-visual {
    min-height: 760px;
}

.auth-brand p {
    max-width: 540px;
}

.auth-card {
    max-width: 470px;
}

.auth-title {
    margin-bottom: 22px;
}

.step-indicator {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 24px;
}

.step-item {
    flex: 1;
    position: relative;
    text-align: center;
    padding: 12px 10px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
    transition: 0.2s ease;
}

body.light-mode .step-item {
    background: rgba(16, 32, 43, 0.02);
    border-color: rgba(16, 32, 43, 0.06);
}

.step-item.active {
    color: var(--primary);
    background: rgba(25, 230, 209, 0.08);
    border-color: rgba(25, 230, 209, 0.18);
}

.step-item.done {
    color: #8ff7d5;
    background: rgba(77, 255, 180, 0.08);
    border-color: rgba(77, 255, 180, 0.18);
}

body.light-mode .step-item.done {
    color: #057a4c;
}

.step-panel.hidden {
    display: none;
}

.auth-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.auth-grid .auth-field {
    min-width: 0;
    margin-bottom: 0;
}

.auth-field input[name="country_code"],
.auth-field input[name="phone"] {
    direction: ltr;
}

html[dir="rtl"] .auth-field input[name="country_code"],
html[dir="rtl"] .auth-field input[name="phone"],
body.rtl .auth-field input[name="country_code"],
body.rtl .auth-field input[name="phone"] {
    text-align: right;
}

html[dir="ltr"] .auth-field input[name="country_code"],
html[dir="ltr"] .auth-field input[name="phone"],
body.ltr .auth-field input[name="country_code"],
body.ltr .auth-field input[name="phone"] {
    text-align: left;
}

.phone-row {
    display: grid;
    grid-template-columns: 120px minmax(0, 1fr);
    gap: 12px;
    align-items: start;
}

.phone-row .auth-input-wrap {
    min-width: 0;
}

.auth-secondary-btn {
    border: none;
    margin-top: 0;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #031116;
    box-shadow: 0 16px 34px rgba(25, 230, 209, 0.16);
}

.auth-secondary-btn:hover {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
}

@media (max-width: 980px) {
    .auth-wrapper {
        max-width: 560px;
        grid-template-columns: 1fr;
    }

    .auth-card {
        max-width: 100%;
    }
}

@media (max-width: 640px) {
    .auth-page {
        padding: 12px;
    }

    .auth-wrapper {
        max-width: 100%;
        border-radius: 24px;
    }

    .auth-form-side {
        padding: 14px;
    }

    .auth-card {
        padding: 20px 14px;
        border-radius: 22px;
    }

    .auth-title {
        margin-bottom: 18px;
    }

    .auth-title h2 {
        font-size: 24px;
        line-height: 1.45;
    }

    .auth-title p {
        font-size: 13px;
        line-height: 1.8;
    }

    .step-indicator {
        flex-direction: row;
        gap: 8px;
        margin-bottom: 18px;
    }

    .step-item {
        width: auto;
        padding: 10px 6px;
        border-radius: 14px;
        font-size: 12px;
        line-height: 1.5;
        white-space: nowrap;
    }

    .auth-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px 10px;
    }

    .auth-field.full {
        grid-column: 1 / -1;
    }

    .auth-field label {
        font-size: 12px;
        margin-bottom: 7px;
        white-space: nowrap;
    }

    .auth-input-wrap {
        min-width: 0;
    }

    .auth-input-icon {
        transform: translateY(-50%) scale(0.88);
    }

    html[dir="rtl"] .auth-input-icon,
    body.rtl .auth-input-icon {
        right: 11px;
    }

    html[dir="ltr"] .auth-input-icon,
    body.ltr .auth-input-icon {
        left: 11px;
    }

    .auth-field input {
        height: 50px;
        border-radius: 15px;
        font-size: 13px;
        font-weight: 800;
    }

    html[dir="rtl"] .auth-field input,
    body.rtl .auth-field input {
        padding: 0 38px 0 10px;
    }

    html[dir="ltr"] .auth-field input,
    body.ltr .auth-field input {
        padding: 0 10px 0 38px;
    }

    .phone-row {
        grid-template-columns: 86px minmax(0, 1fr);
        gap: 8px;
    }

    .phone-row .auth-input-wrap:first-child .auth-input-icon {
        display: none;
    }

    .phone-row .auth-input-wrap:first-child input {
        padding: 0 8px !important;
        text-align: center !important;
        font-size: 12px;
        letter-spacing: 0;
    }

    .phone-row .auth-input-wrap:last-child input {
        font-size: 13px;
    }

    .auth-submit,
    .auth-secondary-btn,
    .auth-back-btn,
    .auth-google-btn {
        height: 50px;
        border-radius: 15px;
        font-size: 14px;
    }

    .auth-separator {
        margin: 14px 0;
        font-size: 12px;
    }

    .auth-link {
        margin-top: 14px;
        font-size: 13px;
    }
}

@media (max-width: 380px) {
    .auth-card {
        padding: 18px 12px;
    }

    .auth-grid {
        gap: 10px 8px;
    }

    .auth-field label {
        font-size: 11px;
    }

    .auth-field input {
        height: 48px;
        font-size: 12px;
    }

    html[dir="rtl"] .auth-field input,
    body.rtl .auth-field input {
        padding: 0 34px 0 8px;
    }

    html[dir="ltr"] .auth-field input,
    body.ltr .auth-field input {
        padding: 0 8px 0 34px;
    }

    .phone-row {
        grid-template-columns: 78px minmax(0, 1fr);
        gap: 7px;
    }

    .step-item {
        font-size: 11px;
        padding: 9px 5px;
    }
}