:root {
    --au-primary: #2955e8;
    --au-primary-600: #2047c9;
    --au-primary-700: #1a389f;
    --au-primary-50: #f2f6ff;
    --au-primary-100: #e3ebff;
    --au-primary-200: #c8d7ff;
    --au-ink: #0e1a3a;
    --au-muted: #5b6785;
    --au-line: #e1e7f4;
    --au-danger: #d64545;
    --au-ok: #12a26a;
}

body.au-lock {
    overflow: hidden;
}

.au-account {
    position: relative;
    display: inline-block;
}

.au-chip {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    height: 46px;
    padding: 0 20px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.38);
    background: rgba(255, 255, 255, 0.14);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    color: #fff;
    font-size: 14.5px;
    font-weight: 700;
    letter-spacing: 0.01em;
    transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.au-chip:hover {
    background: rgba(255, 255, 255, 0.26);
    transform: translateY(-1px);
    box-shadow: 0 10px 24px -12px rgba(8, 20, 84, 0.6);
}

.au-chip:focus-visible {
    outline: 3px solid rgba(255, 255, 255, 0.6);
    outline-offset: 2px;
}

.au-chip--user {
    padding: 0 16px 0 6px;
}

.au-chip-name {
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.au-chip-caret {
    font-size: 11px;
    opacity: 0.8;
    transition: transform 0.2s ease;
}

.au-chip[aria-expanded='true'] .au-chip-caret {
    transform: rotate(180deg);
}

.au-avatar {
    display: inline-grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #fff;
    color: var(--au-primary);
    font-size: 15px;
    font-weight: 800;
    flex-shrink: 0;
}

.au-avatar--lg {
    width: 44px;
    height: 44px;
    font-size: 18px;
    background: linear-gradient(135deg, var(--au-primary), var(--au-primary-700));
    color: #fff;
}

.au-dropdown {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    z-index: 60;
    width: 272px;
    padding: 10px;
    border-radius: 20px;
    background: #fff;
    border: 1px solid var(--au-line);
    box-shadow: 0 28px 54px -22px rgba(14, 26, 58, 0.36);
    color: var(--au-ink);
    animation: auPop 0.18s ease;
}

.au-dropdown[hidden] {
    display: none;
}

.au-dropdown-head {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 10px 14px;
    margin-bottom: 6px;
    border-bottom: 1px solid var(--au-line);
}

.au-dropdown-head div {
    min-width: 0;
}

.au-dropdown-head strong,
.au-dropdown-head small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.au-dropdown-head strong {
    font-size: 14.5px;
}

.au-dropdown-head small {
    font-size: 12.5px;
    color: var(--au-muted);
}

.au-dropdown-link {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 12px 12px;
    border-radius: 12px;
    color: var(--au-ink);
    font-size: 14px;
    font-weight: 600;
    text-align: left;
    text-decoration: none;
    transition: background 0.15s ease, color 0.15s ease;
}

.au-dropdown-link i {
    width: 18px;
    text-align: center;
    color: var(--au-primary);
}

.au-dropdown-link:hover {
    background: var(--au-primary-50);
    color: var(--au-primary);
}

.au-dropdown-link--out,
.au-dropdown-link--out i {
    color: var(--au-danger);
}

.au-dropdown-link--out:hover {
    background: #fff1f1;
    color: var(--au-danger);
}

@keyframes auPop {
    from {
        opacity: 0;
        transform: translateY(-6px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

.au-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(4, 8, 24, 0.82);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    font-family: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    color: var(--au-ink);
    animation: auFade 0.2s ease;
}

.au-overlay[hidden] {
    display: none;
}

@keyframes auFade {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.au-modal {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1fr);
    width: 100%;
    max-width: 800px;
    min-height: 0;
    border-radius: 26px;
    background: #fff;
    overflow: hidden;
    box-shadow: 0 50px 90px -30px rgba(8, 20, 84, 0.7);
    animation: auRise 0.28s cubic-bezier(0.2, 0.8, 0.2, 1);
}

@keyframes auRise {
    from {
        opacity: 0;
        transform: translateY(18px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

.au-side {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 34px 34px 26px;
    color: #fff;
    overflow: hidden;
    isolation: isolate;
    background: linear-gradient(150deg, #172f8f 0%, #2047c9 55%, #2955e8 100%);
}

.au-side::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background-image: radial-gradient(rgba(255, 255, 255, 0.2) 1.2px, transparent 1.2px);
    background-size: 24px 24px;
    -webkit-mask-image: linear-gradient(to bottom, #000, transparent 80%);
    mask-image: linear-gradient(to bottom, #000, transparent 80%);
}

.au-side-ring {
    position: absolute;
    z-index: -1;
    border-radius: 50%;
    border: 1.5px solid rgba(255, 255, 255, 0.18);
}

.au-side-ring--a {
    width: 340px;
    height: 340px;
    right: -150px;
    bottom: -120px;
}

.au-side-ring--b {
    width: 200px;
    height: 200px;
    right: -60px;
    bottom: -50px;
}

.au-side-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.28);
    font-size: 12.5px;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.au-side h2 {
    margin: 18px 0 0;
    font-size: 24px;
    line-height: 1.18;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.au-side h2 span {
    display: block;
    color: #bcd0ff;
}

.au-side p {
    margin: 10px 0 0;
    font-size: 13px;
    line-height: 1.6;
    color: #d6e1ff;
}

.au-perks {
    display: grid;
    gap: 10px;
    margin: 20px 0 0;
    padding: 0;
    list-style: none;
}

.au-perks li {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 12.5px;
    font-weight: 600;
}

.au-perks li span {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.22);
    font-size: 14px;
}

.au-side-foot {
    margin-top: 20px;
    font-size: 11.5px;
    font-weight: 600;
    color: #bcd0ff;
}

.au-side-foot i {
    margin-right: 6px;
}

.au-panel {
    position: relative;
    display: flex;
    align-items: center;
    padding: 34px 36px 30px;
}

.au-close {
    position: absolute;
    top: 14px;
    right: 14px;
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--au-primary-50);
    color: var(--au-muted);
    font-size: 16px;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.au-close:hover {
    background: var(--au-primary-100);
    color: var(--au-primary);
    transform: rotate(90deg);
}

.au-step {
    width: 100%;
}

.au-step[hidden] {
    display: none;
}

.au-icon {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border-radius: 15px;
    background: var(--au-primary-100);
    color: var(--au-primary);
    font-size: 19px;
    margin-bottom: 14px;
}

.au-step h1 {
    margin: 0;
    font-size: 22px;
    line-height: 1.2;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.au-sub {
    margin: 6px 0 0;
    font-size: 13px;
    line-height: 1.55;
    color: var(--au-muted);
}

.au-group {
    margin-top: 16px;
}

.au-label {
    display: block;
    margin-bottom: 8px;
    font-size: 12.5px;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: var(--au-ink);
}

.au-field {
    position: relative;
    display: flex;
    align-items: center;
    height: 48px;
    border-radius: 14px;
    border: 1.5px solid var(--au-line);
    background: #fff;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.au-field:focus-within {
    border-color: var(--au-primary);
    box-shadow: 0 0 0 4px rgba(41, 85, 232, 0.14);
}

.au-field.is-err {
    border-color: var(--au-danger);
    box-shadow: 0 0 0 4px rgba(214, 69, 69, 0.12);
    animation: auShake 0.34s ease;
}

.au-field-ico {
    flex-shrink: 0;
    width: 52px;
    text-align: center;
    color: #8b97b5;
    font-size: 16px;
}

.au-field input {
    flex: 1;
    min-width: 0;
    height: 100%;
    padding: 0 16px 0 0;
    border: 0;
    outline: 0;
    background: transparent;
    font-size: 15px;
    font-weight: 600;
    color: var(--au-ink);
}

.au-field input::placeholder {
    color: #a3adc6;
    font-weight: 500;
}

.au-field--phone input {
    padding-left: 14px;
}

.au-dial {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 100%;
    padding: 0 14px 0 16px;
    border-right: 1.5px solid var(--au-line);
    border-radius: 14px 0 0 14px;
    font-size: 14.5px;
    font-weight: 700;
    transition: background 0.2s ease;
}

.au-dial:hover {
    background: var(--au-primary-50);
}

.au-dial img {
    width: 24px;
    height: 16px;
    border-radius: 3px;
    object-fit: cover;
    box-shadow: 0 0 0 1px rgba(14, 26, 58, 0.12);
}

.au-dial i {
    font-size: 10px;
    color: #8b97b5;
}

.au-err {
    min-height: 0;
    margin: 6px 2px 0;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--au-danger);
}

.au-err:empty {
    display: none;
}

.au-alert {
    margin: 16px 0 0;
    padding: 12px 14px;
    border-radius: 12px;
    background: #fff1f1;
    border: 1px solid #ffd0d0;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.5;
    color: #b32d2d;
}

.au-alert[hidden] {
    display: none;
}

.au-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    height: 50px;
    margin-top: 18px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--au-primary) 0%, var(--au-primary-600) 100%);
    color: #fff;
    font-size: 14.5px;
    font-weight: 800;
    letter-spacing: 0.01em;
    box-shadow: 0 18px 30px -16px rgba(41, 85, 232, 0.8);
    transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.au-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 22px 34px -16px rgba(41, 85, 232, 0.9);
}

.au-btn i {
    font-size: 14px;
    transition: transform 0.2s ease;
}

.au-btn:hover i {
    transform: translateX(3px);
}

.au-btn.is-loading {
    pointer-events: none;
    opacity: 0.85;
}

.au-btn.is-loading i {
    display: none;
}

.au-btn.is-loading span::after {
    content: '';
    display: inline-block;
    width: 15px;
    height: 15px;
    margin-left: 10px;
    vertical-align: -2px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-top-color: #fff;
    animation: auSpin 0.7s linear infinite;
}

.au-btn.is-done {
    background: linear-gradient(135deg, #17b57a, var(--au-ok));
    box-shadow: 0 18px 30px -16px rgba(18, 162, 106, 0.8);
}

@keyframes auSpin {
    to {
        transform: rotate(360deg);
    }
}

.au-note {
    margin: 16px 0 0;
    text-align: center;
    font-size: 12px;
    line-height: 1.6;
    color: #8b97b5;
}

.au-icon--mail {
    background: #e6f7ef;
    color: var(--au-ok);
}

.au-target {
    margin: 4px 0 0;
    font-size: 14.5px;
    font-weight: 800;
    color: var(--au-ink);
    word-break: break-word;
}

.au-otp {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

.au-otp input {
    flex: 1;
    min-width: 0;
    height: 58px;
    border-radius: 14px;
    border: 1.5px solid var(--au-line);
    background: #fff;
    text-align: center;
    font-size: 24px;
    font-weight: 800;
    color: var(--au-ink);
    outline: 0;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.au-otp input:focus {
    border-color: var(--au-primary);
    box-shadow: 0 0 0 4px rgba(41, 85, 232, 0.14);
}

.au-otp input.is-filled {
    border-color: var(--au-primary-200);
    background: var(--au-primary-50);
}

.au-otp.is-err input {
    border-color: var(--au-danger);
    background: #fff6f6;
}

.au-otp.is-err {
    animation: auShake 0.34s ease;
}

@keyframes auShake {
    20%,
    60% {
        transform: translateX(-6px);
    }
    40%,
    80% {
        transform: translateX(6px);
    }
}

.au-resend {
    margin: 18px 0 0;
    text-align: center;
    font-size: 13px;
    font-weight: 600;
    color: var(--au-muted);
}

.au-resend button {
    color: var(--au-primary);
    font-weight: 800;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.au-back {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    margin-top: 14px;
    padding: 10px;
    font-size: 13px;
    font-weight: 700;
    color: var(--au-muted);
    transition: color 0.2s ease;
}

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

.au-countries {
    position: fixed;
    z-index: 1100;
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid var(--au-line);
    border-radius: 18px;
    box-shadow: 0 30px 60px -22px rgba(14, 26, 58, 0.45);
    overflow: hidden;
    animation: auPop 0.16s ease;
}

.au-countries[hidden] {
    display: none;
}

.au-countries-search {
    position: relative;
    padding: 12px;
    border-bottom: 1px solid var(--au-line);
}

.au-countries-search i {
    position: absolute;
    left: 26px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 13px;
    color: #8b97b5;
}

.au-countries-search input {
    width: 100%;
    height: 42px;
    padding: 0 12px 0 38px;
    border: 1.5px solid var(--au-line);
    border-radius: 12px;
    outline: 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--au-ink);
}

.au-countries-search input:focus {
    border-color: var(--au-primary);
}

.au-countries ul {
    margin: 0;
    padding: 6px;
    list-style: none;
    overflow-y: auto;
    flex: 1;
}

.au-countries li {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 10px;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--au-ink);
    cursor: pointer;
}

.au-countries li:hover,
.au-countries li.is-active {
    background: var(--au-primary-50);
    color: var(--au-primary);
}

.au-countries li[hidden] {
    display: none;
}

.au-countries li img {
    width: 24px;
    height: 16px;
    border-radius: 3px;
    object-fit: cover;
    flex-shrink: 0;
    box-shadow: 0 0 0 1px rgba(14, 26, 58, 0.12);
}

.au-countries li span {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.au-countries li em {
    font-style: normal;
    font-size: 12.5px;
    color: var(--au-muted);
}

@media (max-width: 860px) {
    .au-modal {
        grid-template-columns: 1fr;
        max-width: 420px;
        min-height: 0;
    }

    .au-side {
        display: none;
    }

    .au-panel {
        padding: 40px 28px 30px;
    }
}

@media (max-width: 520px) {
    .au-overlay {
        align-items: flex-end;
        padding: 0;
    }

    .au-modal {
        max-width: none;
        border-radius: 28px 28px 0 0;
        animation: auSheet 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
    }

    .au-panel {
        padding: 34px 22px 26px;
    }

    .au-step h1 {
        font-size: 23px;
    }

    .au-otp {
        gap: 10px;
    }

    .au-otp input {
        height: 60px;
        font-size: 25px;
    }

    .au-chip {
        height: 42px;
        padding: 0 16px;
        font-size: 13.5px;
    }

    .au-chip--user {
        padding: 0 12px 0 5px;
    }

    .au-avatar {
        width: 30px;
        height: 30px;
        font-size: 14px;
    }

    .au-chip-name {
        max-width: 90px;
    }

    .au-dropdown {
        width: 252px;
    }
}

@keyframes auSheet {
    from {
        transform: translateY(40px);
        opacity: 0;
    }
    to {
        transform: none;
        opacity: 1;
    }
}
