#register-modal .auth-backdrop {
    background: rgba(24, 43, 61, 0.72);
}

#register-modal .auth-dialog {
    width: min(100%, 598px);
    padding: 34px 36px;
    border: 1px solid #f0b37d;
    border-radius: 20px;
    background: #fffcf8;
    color: #17283c;
    box-shadow: 0 28px 70px rgba(12, 27, 43, 0.35);
}

#register-modal .auth-heading {
    margin-bottom: 26px;
}

#register-modal .auth-mark {
    width: 54px;
    height: 54px;
    margin-bottom: 12px;
    border-radius: 16px;
    background: #fff0e5;
    color: #f26f16;
}

#register-modal .auth-heading h2 {
    margin-bottom: 0;
    color: #171717;
    font-size: 1.46rem;
    font-weight: 500;
}

#register-modal .auth-heading p {
    display: none;
}

#register-modal .auth-fields {
    gap: 16px;
}

#register-modal .auth-field {
    display: grid;
    grid-template-columns: 138px minmax(0, 1fr);
    align-items: center;
    column-gap: 14px;
}

#register-modal .auth-field label {
    margin: 0;
    color: #17283c;
    font-size: 0.88rem;
    font-weight: 800;
}

#register-modal .auth-field input {
    height: 53px;
    border-color: #c8d2df;
    border-radius: 10px;
    color: #17283c;
    font-size: 0.95rem;
}

#register-modal .auth-field input:focus {
    border-color: #f57c2b;
    box-shadow: 0 0 0 3px rgba(245, 124, 43, 0.17);
}

#register-modal .register-phone-control {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 94px;
    gap: 9px;
}

#register-modal #register-send-code {
    border: 0;
    border-radius: 10px;
    background: #9ca8b7;
    color: #fff;
    font-weight: 800;
    cursor: pointer;
}

#register-modal #register-send-code:not(:disabled) {
    background: linear-gradient(135deg, #ef741f, #ff9448);
    box-shadow: 0 5px 12px rgba(239, 116, 31, 0.24);
}

#register-modal #register-send-code:not(:disabled):hover {
    background: #f27a28;
}

#register-form-message.success {
    font-size: 0.86rem;
}

#register-modal .register-phone-help {
    grid-column: 2;
    margin-top: -10px;
    color: #6d7888;
    font-size: 0.72rem;
}

#register-modal .auth-message {
    margin-left: 152px;
}

#register-modal .auth-actions {
    grid-template-columns: 1.4fr 1fr;
    gap: 12px;
    margin-top: 22px;
}

#register-modal .auth-actions button {
    min-height: 53px;
}

#register-modal .auth-submit {
    border-color: #f27a28;
    background: linear-gradient(135deg, #ef741f, #ff9448);
}

#register-modal .auth-submit:disabled {
    border-color: #9ca8b7;
    background: #9ca8b7;
    cursor: not-allowed;
    opacity: 1;
}

#register-modal .auth-close {
    border-color: #c8d2df;
    color: #17283c;
}

@media (max-width: 620px) {
    #register-modal .auth-dialog {
        width: min(100%, 500px);
        padding: 24px 16px;
    }

    #register-modal .auth-field {
        grid-template-columns: 105px minmax(0, 1fr);
        column-gap: 8px;
    }

    #register-modal .register-phone-help {
        grid-column: 2;
    }

    #register-modal .auth-message {
        margin-left: 113px;
    }
}

@media (max-width: 420px) {
    #register-modal .auth-dialog {
        padding: 20px 13px;
    }

    #register-modal .auth-heading {
        margin-bottom: 18px;
    }

    #register-modal .auth-field {
        display: block;
    }

    #register-modal .auth-field label {
        margin-bottom: 5px;
    }

    #register-modal .register-phone-help {
        display: block;
        margin-top: 4px;
    }

    #register-modal .auth-message {
        margin-left: 0;
    }

    #register-modal .auth-actions {
        grid-template-columns: 1fr 1fr;
    }
}

#panel-login-modal .auth-backdrop {
    background: rgba(24, 43, 61, 0.72);
}

#panel-login-modal .auth-dialog {
    width: min(100%, 598px);
    padding: 34px 36px;
    border: 1px solid #f0b37d;
    border-radius: 20px;
    background: #fffcf8;
    color: #17283c;
    box-shadow: 0 28px 70px rgba(12, 27, 43, 0.35);
}

#panel-login-modal .auth-mark {
    width: 54px;
    height: 54px;
    border-radius: 16px;
    background: #fff0e5;
    color: #f26f16;
}

#panel-login-modal .auth-heading h2 {
    color: #171717;
    font-size: 1.42rem;
    font-weight: 500;
}

#panel-login-modal .auth-heading p {
    color: #6d7888;
}

#panel-login-modal .auth-fields {
    gap: 16px;
}

#panel-login-modal .auth-field {
    display: grid;
    grid-template-columns: 138px minmax(0, 1fr);
    align-items: center;
    column-gap: 14px;
}

#panel-login-modal .auth-field label {
    margin: 0;
    color: #17283c;
    font-size: 0.88rem;
    font-weight: 800;
}

#panel-login-modal .auth-field input {
    height: 53px;
    border-color: #c8d2df;
    border-radius: 10px;
}

#panel-login-modal .auth-field input:focus {
    border-color: #f57c2b;
    box-shadow: 0 0 0 3px rgba(245, 124, 43, 0.17);
}

#panel-login-modal .auth-message {
    margin-left: 152px;
}

#panel-login-modal .auth-actions {
    grid-template-columns: 1.4fr 1fr;
    gap: 12px;
    margin-top: 22px;
}

#panel-login-modal .auth-actions button {
    min-height: 53px;
}

#panel-login-modal .auth-submit {
    border-color: #f27a28;
    background: linear-gradient(135deg, #ef741f, #ff9448);
}

#panel-login-modal .auth-close {
    border-color: #c8d2df;
    color: #17283c;
}

@media (max-width: 620px) {
    #panel-login-modal .auth-dialog {
        padding: 24px 16px;
    }

    #panel-login-modal .auth-field {
        grid-template-columns: 105px minmax(0, 1fr);
        column-gap: 8px;
    }

    #panel-login-modal .auth-message {
        margin-left: 113px;
    }
}

@media (max-width: 420px) {
    #panel-login-modal .auth-field {
        display: block;
    }

    #panel-login-modal .auth-field label {
        margin-bottom: 5px;
    }

    #panel-login-modal .auth-message {
        margin-left: 0;
    }

    #panel-login-modal .auth-actions {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 620px) {
    #register-modal .auth-dialog {
        width: 90% !important;
    }
}
#register-modal .auth-field:has(.register-phone-control) {
    align-items: start;
}

#register-modal .auth-field:has(.register-phone-control) > label {
    padding-top: 17px;
}

#register-modal .register-phone-help {
    grid-column: 2;
    width: calc(100% - 103px);
    margin: 5px 0 0;
    padding: 0;
    justify-self: start;
    text-align: left;
}

@media (max-width: 420px) {
    #register-modal .auth-field:has(.register-phone-control) > label {
        padding-top: 0;
    }
    #register-modal .register-phone-help {
        width: calc(100% - 103px);
        margin: 5px 0 0;
    }
}
/* Compact registration modal on phones */
@media (max-width: 420px) {
    #register-modal .auth-dialog {
        width: 92% !important;
        max-height: calc(100dvh - 20px);
        overflow-y: auto;
        padding: 14px 14px 13px;
        border-radius: 16px;
    }

    #register-modal .auth-heading {
        margin-bottom: 12px;
    }

    #register-modal .auth-mark {
        width: 42px;
        height: 42px;
        margin-bottom: 7px;
        border-radius: 13px;
    }

    #register-modal .auth-mark svg {
        width: 23px;
        height: 23px;
    }

    #register-modal .auth-heading h2 {
        font-size: 1.12rem;
        line-height: 1.25;
    }

    #register-modal .auth-fields {
        gap: 9px;
    }

    #register-modal .auth-field label {
        margin-bottom: 3px;
        font-size: 0.79rem;
        line-height: 1.2;
    }

    #register-modal .auth-field input {
        height: 43px;
        padding: 0 12px;
        font-size: 0.86rem;
        border-radius: 9px;
    }

    #register-modal .register-phone-control {
        grid-template-columns: minmax(0, 1fr) 82px;
        gap: 7px;
    }

    #register-modal #register-send-code {
        min-height: 43px;
        padding: 0 8px;
        font-size: 0.79rem;
    }

    #register-modal .register-phone-help {
        width: calc(100% - 89px);
        margin-top: 3px;
        font-size: 0.66rem;
        line-height: 1.2;
    }

    #register-modal .auth-actions {
        gap: 8px;
        margin-top: 13px;
    }

    #register-modal .auth-actions button {
        min-height: 44px;
        padding: 0 8px;
        font-size: 0.82rem;
    }

    #register-modal .auth-message {
        margin-top: 4px;
        font-size: 0.74rem;
        line-height: 1.25;
    }
}

@media (max-width: 360px), (max-height: 620px) {
    #register-modal .auth-dialog {
        padding-top: 10px;
        padding-bottom: 10px;
    }

    #register-modal .auth-mark {
        width: 38px;
        height: 38px;
        margin-bottom: 5px;
    }

    #register-modal .auth-heading {
        margin-bottom: 9px;
    }

    #register-modal .auth-fields {
        gap: 7px;
    }

    #register-modal .auth-field input,
    #register-modal #register-send-code {
        height: 40px;
        min-height: 40px;
    }

    #register-modal .auth-actions {
        margin-top: 10px;
    }

    #register-modal .auth-actions button {
        min-height: 41px;
    }
}
