.auth-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(2px);
}

.auth-modal-overlay.is-open {
    display: flex;
}

.auth-modal {
    position: relative;
    width: 100%;
    max-width: 440px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.18);
    padding: 28px 28px 24px;
    animation: authModalIn 0.22s ease;
}

@keyframes authModalIn {
    from {
        opacity: 0;
        transform: translateY(12px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.auth-modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 50%;
    background: #f3f4f6;
    color: #6b7280;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
}

.auth-modal-close:hover {
    background: #e5e7eb;
    color: #111827;
}

.auth-modal-tabs {
    display: flex;
    gap: 24px;
    border-bottom: 1px solid #e5e7eb;
    margin-bottom: 24px;
}

.auth-modal-tab {
    position: relative;
    border: 0;
    background: transparent;
    padding: 0 0 14px;
    font-size: 18px;
    font-weight: 600;
    color: #9ca3af;
    cursor: pointer;
}

.auth-modal-tab.is-active {
    color: #2563eb;
}

.auth-modal-tab.is-active::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 2px;
    background: #2563eb;
    border-radius: 999px;
}

.auth-modal-panel {
    display: none;
}

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

.auth-modal-field {
    margin-bottom: 16px;
}

.auth-modal-field label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #374151;
}

.auth-modal-field input[type="text"],
.auth-modal-field input[type="email"],
.auth-modal-field input[type="password"] {
    width: 100%;
    height: 44px;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    padding: 0 14px;
    font-size: 14px;
    color: #111827;
    background: #fff;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

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

.auth-modal-password-wrap {
    position: relative;
}

.auth-modal-password-wrap input {
    padding-right: 42px;
}

.auth-modal-password-toggle {
    position: absolute;
    top: 50%;
    right: 12px;
    transform: translateY(-50%);
    border: 0;
    background: transparent;
    color: #9ca3af;
    cursor: pointer;
    padding: 0;
}

.auth-modal-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

.auth-modal-check {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #4b5563;
}

.auth-modal-check input {
    width: 16px;
    height: 16px;
}

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

.auth-modal-link:hover {
    text-decoration: underline;
}

.auth-modal-captcha-box {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.auth-modal-captcha-box img {
    width: 200px;
    height: 50px;
    object-fit: fill;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    background: #fff;
}

.auth-modal-captcha-refresh {
    width: 36px;
    height: 36px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #fff;
    color: #6b7280;
    cursor: pointer;
}

.auth-modal-captcha-refresh:hover {
    color: #2563eb;
    border-color: #bfdbfe;
}

.auth-modal-error {
    display: block;
    margin-top: 6px;
    font-size: 13px;
    color: #dc2626;
}

.auth-modal-submit {
    width: 100%;
    height: 46px;
    border: 0;
    border-radius: 10px;
    background: #2563eb;
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 8px;
}

.auth-modal-submit:hover {
    background: #1d4ed8;
}

body.auth-modal-open {
    overflow: hidden;
}
