.acs-auth-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 22px;
    background:
        radial-gradient(circle at 20% 15%, rgba(59, 130, 246, 0.16), rgba(59, 130, 246, 0) 36%),
        radial-gradient(circle at 85% 20%, rgba(14, 165, 233, 0.12), rgba(14, 165, 233, 0) 32%),
        rgba(15, 23, 42, 0.56);
    backdrop-filter: blur(2px);
}

.acs-auth-modal {
    position: relative;
    width: min(540px, 100%);
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 30px 90px rgba(2, 6, 23, 0.3);
    border: 1px solid #e8eeff;
    overflow: hidden;
    animation: acsAuthModalIn 0.22s ease;
}

@keyframes acsAuthModalIn {
    from {
        transform: translateY(8px) scale(0.985);
        opacity: 0;
    }

    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

.acs-auth-close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 10px;
    background: #f1f5f9;
    color: #64748b;
    font-size: 24px;
    line-height: 36px;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0;
    margin: 0;
}

.acs-auth-close:hover {
    background: #e8eef8;
    color: #334155;
}

.acs-auth-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    border-bottom: 1px solid #e7edf7;
    padding: 0 14px;
}

.acs-auth-tab {
    height: 56px;
    border: 0;
    background: transparent;
    color: #64748b;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.18s ease;
}

.acs-auth-tab.is-active {
    color: #2563eb;
    border-bottom-color: #2563eb;
}

.acs-auth-panel {
    display: none;
    padding: 20px 24px 22px;
}

.acs-auth-panel.is-active {
    display: block;
}

.acs-auth-form input {
    width: 100%;
    height: 46px;
    border: 1px solid #d3d9e6;
    border-radius: 10px;
    padding: 0 14px;
    font-size: 15px;
    color: #0f172a;
    background: #fff;
    outline: none;
    transition: border-color 0.18s, box-shadow 0.18s;
}

.acs-auth-form input::placeholder {
    color: #94a3b8;
}

.acs-auth-form input:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.13);
}

.acs-field-label {
    display: block;
    margin: 12px 0 8px;
    color: #334155;
    font-size: 14px;
    font-weight: 600;
}

.acs-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.acs-password-wrap {
    position: relative;
}

.acs-toggle-password {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    min-width: 48px;
    height: 30px;
    padding: 0 8px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: #fff;
    color: #334155;
    font-size: 12px;
    line-height: 28px;
    cursor: pointer;
}

.acs-social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 48px;
    border-radius: 12px;
    border: 1px solid #d4d4d8;
    text-decoration: none;
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 10px;
    transition: all 0.2s ease;
}

.acs-social-btn--google {
    background: #fff;
    color: #334155;
}

.acs-social-btn--google:hover {
    border-color: #9db6f8;
    background: #f7f9ff;
}

.acs-social-btn--telegram {
    background: linear-gradient(135deg, #0ea5e9, #0284c7);
    color: #fff;
    border-color: #0284c7;
}

.acs-social-btn--telegram:hover {
    filter: brightness(0.97);
}

.acs-social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    font-size: 14px;
}

.acs-or {
    position: relative;
    text-align: center;
    color: #94a3b8;
    font-size: 13px;
    margin: 16px 0;
}

.acs-or::before,
.acs-or::after {
    content: "";
    position: absolute;
    top: 50%;
    width: 40%;
    height: 1px;
    background: #e2e8f0;
}

.acs-or::before {
    left: 0;
}

.acs-or::after {
    right: 0;
}

.acs-or span {
    display: inline-block;
    padding: 0 8px;
    background: #fff;
    position: relative;
    z-index: 1;
}

.acs-row--space {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 10px 0 0;
}

.acs-checkbox {
    font-size: 14px;
    color: #475569;
    display: flex;
    align-items: center;
    gap: 6px;
}

.acs-checkbox input {
    width: 16px;
    height: 16px;
}

.acs-link {
    font-size: 14px;
    text-decoration: none;
    color: #2563eb;
}

.acs-link:hover {
    text-decoration: underline;
}

.acs-captcha-row {
    display: grid;
    grid-template-columns: 1fr 54px;
    gap: 8px;
    margin-bottom: 8px;
    align-items: center;
}

.acs-captcha-image {
    width: 90%;
    height: 46px;
    border-radius: 10px;
    border: 1px solid #0b164e;
    display: block;
    object-fit: cover;
}

.acs-captcha-refresh {
    height: 46px;
    border-radius: 10px;
    border: 1px solid #d1d5db;
    background: #f8fafc;
    color: #64748b;
    font-size: 24px;
    cursor: pointer;
}

.acs-captcha-refresh:hover {
    background: #eef2f7;
}

.acs-submit-btn {
    width: 100%;
    margin-top: 14px;
    height: 50px;
    border: 0;
    border-radius: 12px;
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: #fff;
    font-size: 17px;
    font-weight: 800;
    cursor: pointer;
    letter-spacing: 0.5px;
}

.acs-submit-btn:hover {
    color:#fff;
    filter: brightness(0.96);
}

.acs-auth-msg {
    padding: 0 24px 18px;
    color: #dc2626;
    font-size: 14px;
    min-height: 22px;
}

.acs-auth-msg.is-ok {
    color: #16a34a;
}

@media (max-width: 640px) {
    .acs-auth-overlay {
        padding: 12px;
    }

    .acs-auth-modal {
        max-width: calc(100vw - 16px);
    }

    .acs-auth-panel {
        padding: 16px;
    }

    .acs-grid-2 {
        grid-template-columns: 1fr;
    }
}