.auth-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 1200;
    background: rgba(45, 52, 54, 0.55);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s, visibility 0.25s;
}

.auth-modal-overlay.open {
    opacity: 1;
    visibility: visible;
}

.auth-modal {
    width: 100%;
    max-width: 420px;
    max-height: calc(100vh - 32px);
    overflow-y: auto;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    padding: 24px 22px 22px;
    position: relative;
    transform: translateY(12px) scale(0.98);
    transition: transform 0.25s;
}

.auth-modal-overlay.open .auth-modal {
    transform: translateY(0) scale(1);
}

.auth-modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    background: #f4f4f4;
    color: #636e72;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.auth-modal-close:hover {
    background: #e8e8e8;
}

.auth-modal-title {
    font-size: 22px;
    font-weight: 800;
    color: #2d3436;
    margin-bottom: 6px;
    padding-right: 36px;
}

.auth-modal-subtitle {
    font-size: 14px;
    color: #636e72;
    line-height: 1.5;
    margin-bottom: 18px;
}

.auth-modal-steps {
    margin: 0 0 16px 18px;
    font-size: 13px;
    color: #636e72;
    line-height: 1.7;
}

.auth-modal-steps b {
    color: #2d3436;
}

.auth-modal-btn {
    width: 100%;
    padding: 14px 18px;
    border: none;
    border-radius: 14px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.15s, opacity 0.15s;
}

.auth-modal-btn:active {
    transform: scale(0.98);
}

.auth-modal-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.auth-modal-btn-primary {
    background: #2aabee;
    color: #fff;
}

.auth-modal-btn-primary:hover:not(:disabled) {
    background: #229ed9;
}

.auth-modal-panel {
    display: none;
    margin-top: 16px;
}

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

.auth-modal-qr {
    text-align: center;
    margin-bottom: 12px;
}

.auth-modal-qr img {
    width: 180px;
    height: 180px;
    border-radius: 12px;
    border: 1px solid #e8e8e8;
}

.auth-modal-links {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.auth-modal-links a {
    display: block;
    text-align: center;
    padding: 11px 14px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    border: 1px solid #e8e8e8;
    color: #2d3436;
    transition: background 0.2s;
}

.auth-modal-links a:hover {
    background: #f8f8f8;
}

.auth-modal-links a.primary {
    background: #2aabee;
    border-color: #2aabee;
    color: #fff;
}

.auth-modal-links a.primary:hover {
    background: #229ed9;
}

.auth-modal-status {
    margin-top: 14px;
    font-size: 13px;
    color: #636e72;
    text-align: center;
    min-height: 20px;
}
