.mayi-auth-modal {
    position: fixed;
    inset: 0;
    z-index: 180;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(2, 5, 8, 0.74);
    backdrop-filter: blur(18px);
    opacity: 1;
    transition: opacity 0.22s ease;
}
.mayi-auth-modal.is-hidden {
    display: none;
}
.mayi-auth-modal.is-closing {
    opacity: 0;
}
.mayi-auth-dialog {
    position: relative;
    width: min(600px, calc(100vw - 40px));
    overflow: visible;
    border: 2px solid rgba(255,255,255,0.18);
    border-radius: 26px;
    background: #1e1f24;
    color: #fff;
    box-shadow: 0 36px 120px rgba(0,0,0,0.72);
    transform: scale(1);
    transition: transform 0.22s ease;
}
.mayi-auth-modal.is-closing .mayi-auth-dialog {
    transform: scale(0.97);
}
.mayi-auth-head {
    position: relative;
    min-height: 74px;
    padding: 20px 34px 14px;
    border-radius: 24px 24px 18px 18px;
    background: #191a1f;
}
.mayi-auth-head h2 {
    margin: 0;
    color: #fff;
    font-size: 30px;
    line-height: 1.05;
    font-weight: 950;
}
.mayi-auth-head p {
    margin: 6px 0 0;
    color: #adb5c3;
    font-size: 14px;
    line-height: 1.5;
    font-weight: 700;
}
.mayi-auth-close {
    position: absolute;
    right: 20px;
    top: 18px;
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 999px;
    color: rgba(255,255,255,0.68);
    background: transparent;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
}
.mayi-auth-close:hover {
    color: #fff;
    background: rgba(255,255,255,0.06);
}
.mayi-auth-body {
    overflow: visible;
    padding: 20px 34px 16px;
}
.mayi-auth-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
.mayi-auth-tab {
    height: 42px;
    border: 1px solid rgba(255,255,255,0.14);
    border-radius: 13px;
    color: #949cae;
    background: #18191f;
    font-size: 18px;
    font-weight: 900;
    cursor: pointer;
}
.mayi-auth-tab.active {
    border: 2px solid #5feaff;
    color: #fff;
    background: #15363f;
}
.mayi-auth-divider {
    height: 1px;
    margin: 14px 0 16px;
    background: rgba(255,255,255,0.16);
}
.mayi-auth-panel {
    display: none;
}
.mayi-auth-panel.active {
    display: block;
}
.mayi-auth-form {
    display: grid;
    gap: 7px;
}
.mayi-auth-field label {
    display: block;
    margin: 0 0 6px;
    color: #dbe1ec;
    font-size: 15px;
    line-height: 1;
    font-weight: 900;
}
.mayi-auth-field label .required {
    color: #63ebff;
    margin-left: 5px;
}
.mayi-auth-input,
.mayi-auth-code-row input {
    width: 100%;
    height: 44px;
    border: 1px solid rgba(255,255,255,0.16);
    border-radius: 12px;
    color: #fff;
    background: #15161b;
    outline: none;
    padding: 0 16px;
    font-size: 16px;
    font-weight: 700;
}
.mayi-auth-input::placeholder,
.mayi-auth-code-row input::placeholder {
    color: #6d778b;
}
.mayi-auth-input:focus,
.mayi-auth-code-row input:focus {
    border-color: rgba(95,234,255,0.72);
    box-shadow: 0 0 0 3px rgba(95,234,255,0.08);
}
.mayi-auth-code-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 128px;
    gap: 10px;
}
.mayi-auth-code-btn {
    height: 44px;
    border: 2px solid #5ce7ff;
    border-radius: 12px;
    color: #80efff;
    background: #14313b;
    font-size: 15px;
    font-weight: 950;
    cursor: pointer;
}
.mayi-auth-code-btn:disabled {
    opacity: 0.52;
    cursor: not-allowed;
}
.mayi-auth-row-between {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}
.mayi-auth-link {
    border: 0;
    padding: 0;
    color: #7fedff;
    background: transparent;
    font-size: 14px;
    font-weight: 900;
    cursor: pointer;
}
.mayi-auth-agree {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-top: 0;
    color: #aeb6c4;
    font-size: 13px;
    line-height: 1.35;
    font-weight: 700;
}
.mayi-auth-agree input {
    width: 16px;
    height: 16px;
    margin: 1px 0 0;
    accent-color: #5feaff;
}
.mayi-auth-agree button {
    border: 0;
    padding: 0;
    color: #e8edf5;
    background: transparent;
    cursor: pointer;
    font: inherit;
}
.mayi-auth-submit {
    width: 100%;
    height: 50px;
    border: 0;
    border-radius: 15px;
    color: #050507;
    background: #fff;
    font-size: 19px;
    font-weight: 950;
    cursor: pointer;
    box-shadow: 0 18px 54px rgba(255,255,255,0.1);
}
.mayi-auth-submit:disabled {
    opacity: 0.74;
    cursor: wait;
}
.mayi-auth-switch {
    margin: 6px 0 0;
    text-align: center;
    color: #80efff;
    font-size: 14px;
    font-weight: 800;
}
.mayi-auth-switch button {
    border: 0;
    padding: 0;
    color: inherit;
    background: transparent;
    cursor: pointer;
    font: inherit;
}
.mayi-auth-message {
    min-height: 16px;
    margin-top: 6px;
    color: #7fedff;
    font-size: 13px;
    line-height: 1.45;
    font-weight: 800;
    text-align: center;
}
.mayi-auth-message.error {
    color: #ff7b9c;
}
.mayi-auth-legal-note {
    margin-top: 8px;
    color: #8f98aa;
    text-align: center;
    font-size: 12px;
    font-weight: 700;
}
.mayi-auth-text-modal {
    position: fixed;
    inset: 0;
    z-index: 190;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
    background: rgba(0,0,0,0.72);
}
.mayi-auth-text-modal.is-hidden {
    display: none;
}
.mayi-auth-text-card {
    width: min(620px, calc(100vw - 28px));
    max-height: min(720px, calc(100vh - 28px));
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.16);
    border-radius: 24px;
    background: #1e1f24;
    color: #fff;
}
.mayi-auth-text-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 22px;
    border-bottom: 1px solid rgba(255,255,255,0.12);
}
.mayi-auth-text-head strong {
    font-size: 20px;
}
.mayi-auth-text-head button {
    border: 0;
    color: rgba(255,255,255,0.68);
    background: transparent;
    font-size: 28px;
    cursor: pointer;
}
.mayi-auth-text-body {
    max-height: min(610px, calc(100vh - 130px));
    overflow: auto;
    padding: 20px 22px;
    color: #d8dde8;
    font-size: 15px;
    line-height: 1.8;
    white-space: pre-wrap;
}
@media (max-width: 760px) {
    .mayi-auth-modal {
        padding: 12px;
        align-items: flex-start;
    }
    .mayi-auth-dialog {
        width: 100%;
        max-height: calc(100vh - 24px);
        border-radius: 28px;
    }
    .mayi-auth-head {
        padding: 28px 24px 20px;
        border-radius: 28px 28px 22px 22px;
    }
    .mayi-auth-head h2 {
        font-size: 34px;
    }
    .mayi-auth-head p {
        padding-right: 54px;
        font-size: 16px;
    }
    .mayi-auth-body {
        max-height: calc(100vh - 128px);
        padding: 24px;
    }
    .mayi-auth-tabs {
        gap: 12px;
    }
    .mayi-auth-tab {
        height: 52px;
        font-size: 20px;
    }
    .mayi-auth-field label {
        font-size: 18px;
    }
    .mayi-auth-input,
    .mayi-auth-code-row input,
    .mayi-auth-code-btn {
        height: 56px;
        font-size: 18px;
    }
    .mayi-auth-code-row {
        grid-template-columns: 1fr;
    }
    .mayi-auth-submit {
        height: 62px;
        font-size: 22px;
    }
}
