.sign_up, .sign_in {
    width: 100%;
    flex: 1;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 3vw 1vw 3vw;
    margin-bottom: clamp(80px, 8vw, 160px);
}

.sign_up_container {
    width: 22vw;
    min-width: 320px;
    background: #f6fbff;
    border-radius: 0.417vw;
    border: 0.052vw solid #e6eef6;
    animation: authIn 0.3s ease;
}
@keyframes authIn {
    from { opacity: 0; transform: translateY(0.5vw); }
    to   { opacity: 1; transform: translateY(0); }
}

.sign_up_header {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.2vw 1vw 0.9vw;
    text-align: center;
    border-bottom: 0.052vw solid #e6eef6;
}
.sign_up_logo {
    width: 5vw;
    height: auto;
    margin-bottom: 0.521vw;
}
.sign_up_title {
    font-size: 0.95vw;
    font-family: 'SemiBold', sans-serif;
    color: #1e293b;
    margin-bottom: 0.2vw;
}
.sign_up_subtitle {
    font-size: 0.65vw;
    font-family: 'Regular', sans-serif;
    color: rgba(30, 41, 59, 0.6);
}

.sign_up_body {
    display: flex;
    flex-direction: column;
    padding: 0.9vw 1vw;
    gap: 0.6vw;
}

.sign_up_field {
    display: flex;
    flex-direction: column;
    gap: 0.25vw;
}
.sign_up_field label {
    font-size: 0.65vw;
    font-family: 'Medium', sans-serif;
    color: rgba(30, 41, 59, 0.75);
}

.sign_up_input_wrap { position: relative; }
.sign_up_input {
    width: 100%;
    height: 2vw;
    border: 0.052vw solid #e6eef6;
    border-radius: 0.21vw;
    padding: 0 0.62vw 0 1.6vw;
    font-size: 0.75vw;
    font-family: 'Regular', sans-serif;
    color: #1e293b;
    outline: none;
    background: #fff;
    transition: all 0.2s ease;
}
.sign_up_input:focus {
    border-color: var(--main-color);
    box-shadow: 0 0 0 0.1vw rgba(22, 136, 174, 0.1);
}
.sign_up_input::placeholder { color: rgba(30, 41, 59, 0.4); }

.sign_up_icon {
    position: absolute;
    left: 0.55vw;
    top: 50%;
    transform: translateY(-50%);
    width: 0.75vw;
    height: 0.75vw;
    font-size: 0.75vw;
    line-height: 1;
    color: rgba(30, 41, 59, 0.4);
    pointer-events: none;
}
i.sign_up_icon { width: auto; height: auto; }
input.sign_up_input:focus + .sign_up_icon,
input.sign_up_input:not(:placeholder-shown) + .sign_up_icon,
select.sign_up_input:focus + .sign_up_icon {
    color: var(--main-color);
}

.sign_up_toggle_password {
    position: absolute;
    right: 0.42vw;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    width: 1.1vw;
    height: 1.1vw;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.1vw;
    transition: all 0.2s ease;
}
.sign_up_toggle_password:hover { background: rgba(22, 136, 174, 0.1); }
.sign_up_toggle_password svg {
    width: 0.65vw;
    height: 0.65vw;
    color: rgba(30, 41, 59, 0.4);
}

.sign_up_row {
    display: flex;
    gap: 0.5vw;
}
.sign_up_row .sign_up_field { flex: 1; }

.sign_up_checkbox {
    display: flex;
    align-items: center;
    gap: 0.4vw;
    cursor: pointer;
    margin-top: 0.15vw;
}
.sign_up_checkbox input { display: none; }
.sign_up_checkmark {
    width: 0.75vw;
    height: 0.75vw;
    background: #fff;
    border: 0.052vw solid #d1d5db;
    border-radius: 0.1vw;
    flex-shrink: 0;
    transition: all 0.2s ease;
    position: relative;
}
.sign_up_checkbox input:checked + .sign_up_checkmark {
    background: var(--main-color);
    border-color: var(--main-color);
}
.sign_up_checkbox input:checked + .sign_up_checkmark::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -60%) rotate(45deg);
    width: 0.16vw;
    height: 0.32vw;
    border: solid #fff;
    border-width: 0 0.08vw 0.08vw 0;
}
.sign_up_checkbox_text {
    font-size: 0.6vw;
    font-family: 'Regular', sans-serif;
    color: rgba(30, 41, 59, 0.7);
    line-height: 1.4;
}
.sign_up_checkbox_text a {
    color: var(--main-color);
    text-decoration: none;
    font-family: 'Medium', sans-serif;
}
.sign_up_checkbox_text a:hover { text-decoration: underline; }

.sign_up_forgot,
.sign_up_link {
    align-self: flex-end;
    font-size: 0.6vw;
    font-family: 'Medium', sans-serif;
    color: var(--main-color);
    text-decoration: none;
    margin-top: -0.2vw;
}
.sign_up_forgot:hover,
.sign_up_link:hover { text-decoration: underline; }

.sign_up_btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.3vw;
    width: 100%;
    height: 2vw;
    background: var(--main-color);
    border: none;
    border-radius: 0.21vw;
    font-size: 0.75vw;
    font-family: 'Medium', sans-serif;
    color: #fff;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 0.3vw;
}
.sign_up_btn:hover {
    background: #1a9bc7;
    transform: translateY(-0.05vw);
}
.sign_up_btn:active { transform: translateY(0); opacity: 0.9; }
.sign_up_btn svg { width: 0.75vw; height: 0.75vw; }

.sign_up_footer {
    padding: 0.6vw 1vw;
    text-align: center;
    border-top: 0.052vw solid #e6eef6;
    background: #f8fafc;
    border-radius: 0 0 0.417vw 0.417vw;
}
.sign_up_footer span {
    font-size: 0.65vw;
    font-family: 'Regular', sans-serif;
    color: rgba(30, 41, 59, 0.6);
}
.sign_up_footer a {
    color: var(--main-color);
    font-family: 'Medium', sans-serif;
    font-size: 0.7vw;
    text-decoration: none;
    margin-left: 0.2vw;
}
.sign_up_footer a:hover { text-decoration: underline; }

.sign_up_divider {
    position: relative;
    text-align: center;
    margin: 0.4vw 0;
}
.sign_up_divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 0.052vw;
    background: #e6eef6;
}
.sign_up_divider span {
    position: relative;
    background: #f6fbff;
    padding: 0 0.5vw;
    font-size: 0.55vw;
    font-family: 'Regular', sans-serif;
    color: rgba(30, 41, 59, 0.4);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.sign_up_social {
    display: flex;
    gap: 0.4vw;
}
.sign_up_social_btn {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    height: 1.8vw;
    background: #fff;
    border: 0.052vw solid #e6eef6;
    border-radius: 0.21vw;
    gap: 0.3vw;
    cursor: pointer;
    transition: all 0.2s ease;
}
.sign_up_social_btn:hover {
    background: #f1f5f9;
    border-color: #d1d5db;
}
.sign_up_social_btn svg { width: 0.75vw; height: 0.75vw; }
.sign_up_social_btn span {
    font-size: 0.6vw;
    font-family: 'Medium', sans-serif;
    color: #1e293b;
}

.password_strength {
    display: flex;
    gap: 0.25vw;
    margin-top: 0.25vw;
}
.strength_bar {
    flex: 1;
    height: 0.13vw;
    background: #e6eef6;
    border-radius: 0.05vw;
    overflow: hidden;
}
.strength_fill {
    height: 100%;
    width: 0%;
    transition: all 0.3s ease;
    border-radius: 0.05vw;
}
.strength_weak   .strength_fill { width: 33%;  background: #ef4444; }
.strength_medium .strength_fill { width: 66%;  background: #f59e0b; }
.strength_strong .strength_fill { width: 100%; background: #10b981; }

.sign_in .back-button,
.sign_up .back-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.3vw;
    cursor: pointer;
    width: 100%;
    height: 2vw;
    border: 0.052vw solid rgba(100, 116, 139, 0.35);
    border-radius: 0.21vw;
    padding: 0.16vw 0.78vw;
    transition: all 0.2s ease;
}
.sign_in .back-button:hover,
.sign_up .back-button:hover {
    background: rgba(100, 116, 139, 0.08);
    transform: translateY(0.1vw);
}
.sign_in .back-button:active,
.sign_up .back-button:active { opacity: 0.75; }
.sign_in .back-button span,
.sign_up .back-button span {
    font-size: 0.7vw;
    font-family: 'Regular', sans-serif;
    color: #1e293b;
}

.twofa_verify_section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.83vw;
    padding: 1vw 0;
}
.twofa_verify_icon { margin-bottom: 0.42vw; }
.twofa_verify_title {
    font-size: 0.95vw;
    font-family: 'SemiBold', sans-serif;
    color: #1e293b;
}
.twofa_verify_text {
    font-size: 0.65vw;
    font-family: 'Regular', sans-serif;
    color: rgba(30, 41, 59, 0.6);
    text-align: center;
}
.twofa_code_inputs {
    display: flex;
    gap: 0.42vw;
    margin-top: 0.52vw;
}
.twofa_code_input {
    width: 2.3vw;
    height: 2.81vw;
    border: 0.104vw solid #e6eef6;
    border-radius: 0.31vw;
    text-align: center;
    font-size: 1.25vw;
    font-family: 'SemiBold', sans-serif;
    color: #1e293b;
    background: #fff;
    outline: none;
    transition: all 0.2s ease;
}
.twofa_code_input:focus {
    border-color: var(--main-color);
    box-shadow: 0 0 0 0.16vw rgba(22, 136, 174, 0.15);
}
.twofa_code_input.error   { border-color: #ef4444; box-shadow: 0 0 0 0.16vw rgba(239, 68, 68, 0.15); }
.twofa_code_input.success { border-color: #10b981; box-shadow: 0 0 0 0.16vw rgba(16, 185, 129, 0.15); }
.twofa_code_dash {
    font-size: 1.25vw;
    font-family: 'Medium', sans-serif;
    color: #cbd5e1;
}
.twofa_error {
    font-size: 0.6vw;
    font-family: 'Medium', sans-serif;
    color: #ef4444;
    margin-top: 0.42vw;
}

.auth_status {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.6vw;
    padding: 1.4vw 1vw 0.9vw;
    text-align: center;
}
.auth_status_icon {
    width: 3.5vw;
    height: 3.5vw;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
}
.auth_status_icon.error    { background: rgba(239, 68, 68, 0.1); color: #ef4444; }
.auth_status_icon.pending  { background: rgba(22, 136, 174, 0.1); color: var(--main-color); }
.auth_status_icon svg { width: 1.8vw; height: 1.8vw; }

@media screen and (max-width: 1024px) {
    .sign_up, .sign_in { padding: 40px 16px 40px; margin-bottom: 96px; }
    .sign_up_container { width: 480px; max-width: 100%; min-width: 0; border-radius: 10px; border-width: 1px; }
    .sign_up_header { padding: 24px 22px 20px; border-bottom-width: 1px; gap: 4px; }
    .sign_up_logo { width: 90px; margin-bottom: 12px; }
    .sign_up_title { font-size: 22px; margin-bottom: 4px; }
    .sign_up_subtitle { font-size: 14px; }
    .sign_up_body { padding: 22px; gap: 14px; }
    .sign_up_field { gap: 6px; }
    .sign_up_field label { font-size: 13px; }
    .sign_up_input { font-size: 15px; height: 46px; padding: 0 14px 0 42px; border-radius: 8px; border-width: 1px; }
    .sign_up_input:focus { box-shadow: 0 0 0 3px rgba(22, 136, 174, 0.12); }
    .sign_up_icon { width: 18px; height: 18px; left: 14px; }
    .sign_up_toggle_password { width: 32px; height: 32px; right: 8px; border-radius: 6px; }
    .sign_up_toggle_password svg { width: 16px; height: 16px; }
    .sign_up_row { gap: 12px; }
    .sign_up_checkbox { gap: 10px; margin-top: 2px; }
    .sign_up_checkmark { width: 18px; height: 18px; border-radius: 4px; border-width: 1px; }
    .sign_up_checkbox input:checked + .sign_up_checkmark::after { width: 4px; height: 9px; border-width: 0 2px 2px 0; }
    .sign_up_checkbox_text { font-size: 13px; }
    .sign_up_forgot,
    .sign_up_link { font-size: 13px; margin-top: 0; }
    .sign_up_btn { height: 48px; font-size: 15px; border-radius: 8px; gap: 8px; margin-top: 6px; }
    .sign_up_btn svg { width: 18px; height: 18px; }
    .sign_up_divider { margin: 8px 0; }
    .sign_up_divider::before { height: 1px; }
    .sign_up_divider span { font-size: 12px; padding: 0 12px; }
    .sign_up_social { gap: 10px; }
    .sign_up_social_btn { height: 46px; gap: 8px; border-radius: 8px; border-width: 1px; }
    .sign_up_social_btn svg { width: 18px; height: 18px; }
    .sign_up_social_btn span { font-size: 14px; }
    .sign_up_footer { padding: 16px 22px; border-top-width: 1px; border-radius: 0 0 10px 10px; }
    .sign_up_footer span { font-size: 14px; }
    .sign_up_footer a { font-size: 14px; margin-left: 4px; }
    .password_strength { gap: 4px; margin-top: 6px; }
    .strength_bar { height: 4px; border-radius: 2px; }
    .sign_in .back-button,
    .sign_up .back-button { height: 46px; padding: 0 16px; border-radius: 8px; gap: 8px; border-width: 1px; }
    .sign_in .back-button span,
    .sign_up .back-button span { font-size: 14px; }
    .twofa_verify_section { gap: 16px; padding: 18px 0; }
    .twofa_verify_title { font-size: 20px; }
    .twofa_verify_text { font-size: 14px; }
    .twofa_code_inputs { gap: 8px; margin-top: 10px; }
    .twofa_code_input { width: 46px; height: 56px; border-radius: 8px; border-width: 2px; font-size: 24px; }
    .twofa_code_input:focus { box-shadow: 0 0 0 3px rgba(22, 136, 174, 0.15); }
    .twofa_code_dash { font-size: 24px; }
    .twofa_error { font-size: 13px; margin-top: 8px; }
    .auth_status { gap: 12px; padding: 28px 22px 20px; }
    .auth_status_icon { width: 64px; height: 64px; }
    .auth_status_icon svg { width: 32px; height: 32px; }
}

@media screen and (max-width: 600px) {
    .sign_up, .sign_in { padding: 28px 12px 28px; margin-bottom: 80px; }
    .sign_up_container { width: 100%; border-radius: 12px; }
    .sign_up_header { padding: 22px 18px 18px; }
    .sign_up_logo { width: 80px; margin-bottom: 10px; }
    .sign_up_title { font-size: 20px; }
    .sign_up_subtitle { font-size: 13px; }
    .sign_up_body { padding: 18px; gap: 12px; }
    .sign_up_input { height: 44px; padding: 0 12px 0 40px; font-size: 15px; }
    .sign_up_icon { left: 12px; width: 17px; height: 17px; }
    .sign_up_toggle_password { right: 6px; }
    .sign_up_btn { height: 46px; font-size: 15px; }
    .sign_up_social_btn { height: 44px; font-size: 13.5px; }
    .sign_up_social_btn span { font-size: 13.5px; }
    .twofa_code_input { width: 42px; height: 52px; font-size: 22px; }
    .sign_up_footer { padding: 14px 18px; }
}
